Mark.B
11-07-2010, 12:21 AM
Here's what I'm trying to do:
http://www.bowlandcentral.com/forum/search.php?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.
$templater = vB_Template::create('forumhome_loggedinuser');
$templater->register('loggedin', $loggedin);
$activeusers .= $templater->render();
By my reckoning, if I place {vb:raw activeusers} in the search_resultlist template, this should give me a raw list of logged in users, which I can then style.
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.....
http://www.bowlandcentral.com/forum/search.php?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.
$templater = vB_Template::create('forumhome_loggedinuser');
$templater->register('loggedin', $loggedin);
$activeusers .= $templater->render();
By my reckoning, if I place {vb:raw activeusers} in the search_resultlist template, this should give me a raw list of logged in users, which I can then style.
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.....