UBB.Dev
Posted By: pootlecat Custom pages and Who is online - 02/11/2005 8:57 PM
I have a tricky question
I have used Josh's Generic UBB.Threads page throughout my site and was wondering how I can get these pages to be identified on the 'Who is online' screen? At the moment all you see are blank 'Location' boxes.
Posted By: Zackary Re: Custom pages and Who is online - 02/11/2005 9:08 PM
Edit your languages > online.php file.

Add a string as follows:

Code
 <br />$ubbt_lang['Your_Page_Name'] = 	"Your Page Name Description"; <br />


Your_Page_Name is the name of the file of the page being viewed, minus the .php extension.

Example:
Code
 <br />$ubbt_lang['index'] = 	"At the Entrance"; <br />


Hope that helps.
Posted By: pootlecat Re: Custom pages and Who is online - 02/11/2005 11:10 PM
wow, thanks! I had no idea it would be that easy
Posted By: pootlecat Re: Custom pages and Who is online - 02/18/2005 4:19 AM
Just one more question
I want to change the coding so that registered users see one page and unreg people see another - using the custom page template.

I was thinking another if statement in here would work well but I am not sure how to check if they are logged in or not:
Code
 if (!$debug) {<br />   	include("$thispath/templates/content/idb/search.tmpl");<br />	} 

Any ideas?
Posted By: JoshPet Re: Custom pages and Who is online - 02/18/2005 8:56 AM
Code
<br />if (!$debug) {<br />    if ($user['U_Username']) {<br />          include("$thispath/templates/content/idb/registered.tmpl");<br />    } else {<br />   	include("$thispath/templates/content/idb/unregistered.tmpl");<br />    }<br />}<br />


Rename templates accordingly.
Posted By: pootlecat Re: Custom pages and Who is online - 02/18/2005 2:20 PM
Thanks so much - that works like a charm!
© UBB.Developers