PDA

View Full Version : Where can I find the code for the simple search? Also a logout query.


Rick Stirling
05-09-2008, 04:54 AM
I've been setting up vBadvanced with a fair amount of success, and I want to customise the layout.

Mainly I want to move to login section and simple search box to the top of the site, above the header. I've managed to find the code for the login box and I've placed it, however I also want to a logout link within the same block. I've got this working but I have a question.

The code I pasted in is this:

<a href="http://boards.polycount.net/login.php?do=logout&amp;logouthash=53f972bfdde8eb96ff1f0e0eb37c1160" onclick="return log_out('Are you sure you want to log out?')">Log Out</a>

I've concerned that the logouthash variable should be generated internally by vBulletin and that I have hard coded it into the logout URL. Has anyone else worked with the logout link?



Secondly, I want to put the simple search box above my header, but I can't find the code to copy. Can anyone point towards the correct template?

Brian
05-09-2008, 12:31 PM
Just search the original navbar template for 'login.php' and you should see the default code.

Our Sponsors
 

Rick Stirling
05-09-2008, 01:36 PM
Login.php for the logout? Cheers, I'll have a look in there.

Any idea what file houses the search form code? It's the search box that you can add via the vbadvanced page designer that I'm after.

Brian
05-09-2008, 04:45 PM
Yup. Should be login.php?do=logout, with some other variables mixed in somewhere (don't remember the exact format off the top of my head).

The Search box for the CMPS is located in the 'adv_portal_search' template.

Our Sponsors
 

Rick Stirling
05-10-2008, 06:59 AM
Ta! The search worked right away, but I'm still unable to find a function anywhere that calls login.php with ?do=logout. It *SEEMS* to work by just copying the HTML, but I'll dig a little deeper.

Thanks again!

Brian
05-10-2008, 01:46 PM
It's definitely there, at least in the default template.
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>

Assuming you're running vB 3.6 then you can just copy that link code. If you're running 3.7 you may want to double check your 'navbar' template to make sure it hasn't changed (don't think it has, but I'm not 100% positive).

Rick Stirling
05-11-2008, 06:15 PM
You are a star, thanks so much!