Previous Thread
Next Thread
Print Thread
Rate Thread
User Login Options
#323378 11/01/2019 7:07 AM
Joined: Oct 2019
Posts: 2
Likes: 1
DCPhil Offline OP
Lurker
OP Offline
Lurker
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
Re: User Login Options
DCPhil #323379 11/02/2019 6:22 PM
Joined: Jan 2000
Posts: 5,805
Likes: 10
UBB.Dev / UBB.Wiki Owner
Time Lord
Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,805
Likes: 10
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, UBB.Sitemaps
1 member likes this: temp
Re: User Login Options
DCPhil #323383 11/04/2019 6:32 AM
Joined: Oct 2019
Posts: 2
Likes: 1
DCPhil Offline OP
Lurker
OP Offline
Lurker
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
isaac
isaac
California
Posts: 1,068
Joined: July 2001
Forum Statistics
Forums63
Topics37,543
Posts293,773
Members13,838
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 250
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 30
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,805
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 9
isaac 8
driv 2
temp 2
Morgan 1
Top Likes Received
isaac 38
Gizmo 10
Brett 7
Morgan 2
Top Likes Received (30 Days)
isaac 4
Gizmo 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
(Snapshot build 20200524.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.034s Queries: 23 (0.015s) Memory: 3.2574 MB (Peak: 3.6276 MB) Data Comp: Zlib Server Time: 2020-05-30 17:59:38 UTC
Valid HTML 5 and Valid CSS