Previous Thread
Next Thread
Print Thread
Rate Thread
#323378 11/01/2019 7:07 AM
Joined: Oct 2019
Posts: 2
Likes: 1
Lurker
Lurker
Offline
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,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
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
Lurker
Lurker
Offline
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
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)