MyBB Hacks

Full Version: Any interest?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(01-06-2011 02:15 PM)1master1 Wrote: [ -> ]awesome Tongue

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 Intello
(01-06-2011 04:02 PM)Vapor Wrote: [ -> ]I think it looks good lee no matter what Intello

...Thanks vapor. But um, there is nothing wrong with it. Apart from 1master1 not being able to read a w3c validation message. Frown

Look at this: its the mybb site....

has 140 warnings for colour stuff

http://jigsaw.w3.org/css-validator/valid...http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fcommunity.mybb.com%2Fforum-127.html&profile=css21&usermedium=all&warning

So I want people who are using firefox and IE6 to be able to use the site - better that than a "perfect" css sheet IMO.
Please don't take my comment like that ...lol

I merely meant that master wasn't happy with vaidation blah blah blah Tongue

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.
Nice, Lee Smile
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. Frown

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.
Pages: 1 2 3
Reference URL's