The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Problem trying to hook online users into search.
Here's what I'm trying to do:
http://www.bowlandcentral.com/forum/...hp?do=getdaily As you can see, at the top of the getdaily search is a Who's Online block. I did this a while ago, and basically I copied the Who's Online code from index.php (forumhome), hooked it into search_start, and then placed $activeusers inside some html in the template, and it works. Can I make it work in vB4? Two solid days and nothing!! I have done the same thing, copied the code (this time from forum.php obviously). It seems from tests that search_start no longer works as a hook, but search_process_start does. Anyway I've tested it extensively in both. Code:
$templater = vB_Template::create('forumhome_loggedinuser'); $templater->register('loggedin', $loggedin); $activeusers .= $templater->render(); However, the output is nothing...blank.No matter what I try to do. Am I fundamentally misunderstanding something? It's rather vital I get this working and I am now completely flummoxed! This piece of code has the following at the bottom to register the variables, which I am presuming is correct..... |
#2
|
||||
|
||||
$activeusers is literally just the list of active users. You could just use the template_hook there in search_resultlist. Use the hook location search_start and then try (at the end of your code you stole from forum.php):
Code:
$template_hook['search_results_top'] .= $activeusers; |
#3
|
|||
|
|||
Lynne I have it now...thank you. I used the hook as you suggested.
Also hook location should have been where it originally was...search_start. I checked in the file and the hook is there. Why it didn't work originally I don't know. Now for some galling CSS work to make it look nice. --------------- Added [DATE]1289129362[/DATE] at [TIME]1289129362[/TIME] --------------- Here's the results with styling. http://www.bowlandcentral.com/images/shots2/shot12.jpg |
#4
|
||||
|
||||
Nice, Mark! (I like your avatar in the upper right also - I don't think I've seen that yet in all the sites I've looked at!)
|
#5
|
|||
|
|||
Quote:
Am now having fun with tabs, with help from your article. I've spent most of the day on this but I have one tab that won't play ball, and it's because I'm trying to put a dropdown menu in the UPPER (main) tabs, rather than the sub menus. And I have a sneaky feeling that actually isn't going to work..... |
#6
|
||||
|
||||
There is an article on how to have the navtab as a dropdown. I thinks it's by shelby?
|
#7
|
|||
|
|||
Thanks, off to have a look before I drive myself bonkers.
|
#8
|
|||
|
|||
It's basically the same as in navbar
Navbar dropdown menu looks like this HTML Code:
<li class="popupmenu"><a class="popupctrl">Dropdown title</a> <ul class="popupbody popuphover"> <li>Dropdown item 1</li> </ul> </li> HTML Code:
<li class="popupmenu"><a class="popupctrl navtab">Dropdown title</a> <ul class="popupbody popuphover"> <li>Dropdown item 1</li> </ul> </li> |
#9
|
|||
|
|||
Cheers...have now managed to get a dropdown tab and it highlights properly and everything. Only thing I'm finding is that the sub-menu styling is a little messed up (the lower navbar links).
I shall post a thread separately about this, it's functional but looks untidy. I can only assume the Javascript is messing with it but I can't see why. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|