Previous Thread
Next Thread
Print Thread
Rate Thread
User Login Options #323378 11/01/2019 6:07 AM
Joined: Oct 2019
Posts: 2
DCPhil Offline OP
Lurker
OP Offline
Lurker
Joined: Oct 2019
Posts: 2
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 [Re: DCPhil] #323379 11/02/2019 5:22 PM
Joined: Jan 2000
Posts: 5,787
Gizmo Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Offline
UBB.Dev / UBB.Wiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,787
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
Re: User Login Options [Re: DCPhil] #323383 11/04/2019 5:32 AM
Joined: Oct 2019
Posts: 2
DCPhil Offline OP
Lurker
OP Offline
Lurker
Joined: Oct 2019
Posts: 2
Thank you Gizmo for pointing me in the right direction. I'll play around a little and see what I can come up with.


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
badfrog
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
Forum Statistics
Forums63
Topics37,494
Posts293,675
Members13,829
Most Online5,166
Sep 15th, 2019
Top Posters(All Time)
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,787
Greg Hard 4,625
Top Posters(30 Days)
isaac 6
DCPhil 2
Gizmo 1
Today's Statistics
Currently Online 637
Topics Created 0
Posts Made 0
Users Online 2
Birthdays 19
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191118.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.034s Queries: 21 (0.010s) Memory: 3.2343 MB (Peak: 3.4431 MB) Data Comp: Zlib Server Time: 2019-11-19 10:18:25 UTC
Valid HTML 5 and Valid CSS