(01-06-2011 02:15 PM)1master1 Wrote: [ -> ]awesome
the below threads are successfully validated. use any gimmick to get it worked?
What do you mean? It already was working. You can't use a css validation and then ask me why the HTML is right...it always was.
I think it looks good lee no matter what
Please don't take my comment like that ...lol
I merely meant that master wasn't happy with vaidation blah blah blah
Personally I could care less about 100% validation because you will always get some oddball with some version of (insert browser here) that won't see it the way it's suppose to be viewed.
hey RateU, were you the one who downloaded my plugin file? If so, is it ok????
I think it is better to add the variable in forumdisplay and showthread?
You mean the <!--Forum Stickies List--> in the header?
Yes, I tried that but could not get it to work without the global start. I replaced global start with forumdisplay_start (and put <!--Forum Stickies List--> in the head section of the forum display) but then I had no Stickies showing in the threadlist.
It does seem overkill to have that run globally, but I cannot work out how to fix it.
I thought it was this piece I needed to edit
PHP Code:
$plugins->add_hook('global_start', 'xtdispforum_tcache');
function xtdispforum_tcache()
{
global $mybb, $templatelist, $plugins;
if($mybb->settings['xtdispforum_fid'] != 0)
{
if(THIS_SCRIPT == 'forumdisplay.php' || THIS_SCRIPT == 'showthread.php')
{
if(isset($templatelist))
{
$templatelist .= ',xtstickies_list,xtstickies_list_list';
}
}
$plugins->add_hook('global_end', 'xtdispforum_run');
$plugins->add_hook('forumdisplay_start', 'xtdispforum_run');
$plugins->add_hook('showthread_start', 'xtdispforum_run');
}
}
|
Put the {$xtstickies_list} variable in forumdisplay and showthread template after the {$header} variable in those templates.
You can move the hook from the xtdispforum_tcache function.
Put it directly in your plugin.
With this way, each Admin can reposition the variable.
I'm sorry RateU, but you have completely lost me.
The {$xtstickies_list} is already in forum display as it is the container for the stickies. It doesn't really go in showthread, but I wanted to keep the option open. I didn't see the point of putting it direct into templates as its for XThreads and therefore would be a custom template. So its up to the admin to put the variable where they want it in the template.
My problem is indeed around running the xtdispforum_tcache function, if I take OUT that global then the plugin does not display the variable (of course). My problem is that I don't actually know HOW to move that hook or indeed where to. It does work as it is - but its not optimised - so I need a TAD more detail on how to do it.