Previous Thread
Next Thread
Print Thread
Rate Thread
#323378 11/01/2019 7:07 AM
Joined: Oct 2019
Posts: 2
Likes: 1
D
DCPhil Offline OP
Lurker
OP Offline
Lurker
D
Joined: Oct 2019
Posts: 2
Likes: 1
When a user logs in, how can I take them straight to the Active Threads page, or straight to a particular Forum?

Sponsored Links
Joined: Jan 2000
Posts: 5,808
Likes: 12
UBB.Dev / UBB.Wiki Owner
Time Lord
Online Tapedshut
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,808
Likes: 12
The login routine hands off the start page via the function "start_page" in the libs/html.inc.php file. This is completely untested, but I believe you'll want to adjust:
Code
		if ($start_view == "lists") {
			$main = "myhome&type=lists";
		} else {
			$main = "cfrm";
		}

The only "start view" options currently in UBB.threads is the forum summary (cfrm/Traditional Forum View) or "Follow Lists" (lists); these can be selected via "Edit Preferences", whereby their value is processed in the start_page function above.

I believe you could just build an additional elseif to inject additional pages into the start_page function, such as:
Code
		if ($start_view == "lists") {
			$main = "myhome&type=lists";
		} elseif ($start_view == "faq") {
			$main = "faq";
		} else {
			$main = "cfrm";
		}

And you'd also have to edit the display preferences template (templates/default/editdisplay.tpl) and language file (languages/english/editdisplay.php) to add any additional pages.
Code
{* Starting View: Watchlist or Forums *}
<label for="start_view">{$lang.DEFAULT_START}</label>
<br>
<select name="start_view" class="form-select" id="start_view">
<option value="lists" {$list_selected}>{$lang.FAV_LIST}</option>
<option value="cfrm" {$cfrm_selected}>{$lang.FAV_CFRM}</option>
</select>
<br><br>

It'll take some playing around (you'll need to add additional selected lines in the editdisplay script to handle logic that doesn't currently exist, as an example) but its entirely possible with time and testing.

We've discussed adding to this feature in future builds of UBB.threads, but currently don't have any concrete timeframes at hand.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
1 member likes this: temp
Joined: Oct 2019
Posts: 2
Likes: 1
D
DCPhil Offline OP
Lurker
OP Offline
Lurker
D
Joined: Oct 2019
Posts: 2
Likes: 1
Thank you Gizmo for pointing me in the right direction. I'll play around a little and see what I can come up with.

1 member likes this: Gizmo

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Pilgrim
Pilgrim
NH, USA
Posts: 190
Joined: June 2000
Forum Statistics
Forums63
Topics37,551
Posts293,833
Members13,838
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 417
Topics Created 0
Posts Made 0
Users Online 2
Birthdays 31
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,808
Greg Hard 4,625
Top Posters(30 Days)
isaac 25
WebGuy 6
Gizmo 2
Top Likes Received
isaac 62
Gizmo 12
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 15
Gizmo 2
WebGuy 2
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2020 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Release build 20201027.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.036s Queries: 23 (0.013s) Memory: 3.2721 MB (Peak: 3.6369 MB) Data Comp: Zlib Server Time: 2020-10-31 19:20:41 UTC
Valid HTML 5 and Valid CSS