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-07-2011 10:07 AM)leefish Wrote: [ -> ]The {$xtstickies_list} is already in forum display as it is the container for the stickies.

How you get the variable in your forumdisplay?
Put it manually?
Yes, because as I said, its to be used in the XThreads templates.

(01-07-2011 10:07 AM)leefish Wrote: [ -> ]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.

So (I think) if I put it in the plugin to put it in the forumdisplay_threadlist then it will add to the forumdisplay_threadlist template in all the template sets except the global templates. Well, it wont work if its NOT an XThread template - so there will just be a daft box called forumstickies. I think it wont add to the global templates unless I specify it by name - and thats also a bit pointless as it means that I would have to add it to all global templates knowing the prefixes......so its easier to just add it manually (IMO)
(01-08-2011 04:59 AM)leefish Wrote: [ -> ]Yes, because as I said, its to be used in the XThreads templates.

(01-07-2011 10:07 AM)leefish Wrote: [ -> ]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.

So (I think) if I put it in the plugin to put it in the forumdisplay_threadlist then it will add to the forumdisplay_threadlist template in all the template sets except the global templates. Well, it wont work if its NOT an XThread template - so there will just be a daft box called forumstickies. I think it wont add to the global templates unless I specify it by name - and thats also a bit pointless as it means that I would have to add it to all global templates knowing the prefixes......so its easier to just add it manually (IMO)

So, any reason why you put this in your plugin?

PHP Code:
find_replace_templatesets('header', '#^(.*)$#s', "\\1\r\n" . '<!-- Forum Stickies list -->');


PHP Code:
find_replace_templatesets('header', '#<!-- Forum Stickies list -->#', '', 0);

Yes, because if that is NOT in the header then it does not work
(01-08-2011 05:39 AM)leefish Wrote: [ -> ]Yes, because if that is NOT in the header then it does not work

Did you try to remove the <!-- Forum Stickies list --> from your header template, but leave the {$xtstickies_list} variable in your template?
Yes I did. I also tried moving the <!-- Forum Stickies list --> to the forumdisplay and showthread template. Not working. I think the issue (as I said earlier) is in the Global start. I am thinking that that is making the plugin make more queries than it should? Thats the bit I was thinking to do.

However, if I take the global start away and put <!-- Forum Stickies list --> in the head of the forumdisplay/showthread templates then that means  an admin would need to edit the forumdisplay and showthread in two places. So in that case I leave out the template edits on the header and make it so that inserting <!-- Forum Stickies list --> on the forumdisplay and showthread is a manual action, plus inserting the variable {$xtstickies_list}  on the threadlist and showthread to give a working plugin.
(01-08-2011 06:51 AM)leefish Wrote: [ -> ]Yes I did. I also tried moving the <!-- Forum Stickies list --> to the forumdisplay and showthread template. Not working. I think the issue (as I said earlier) is in the Global start. I am thinking that that is making the plugin make more queries than it should? Thats the bit I was thinking to do.

However, if I take the global start away and put <!-- Forum Stickies list --> in the head of the forumdisplay/showthread templates then that means  an admin would need to edit the forumdisplay and showthread in two places. So in that case I leave out the template edits on the header and make it so that inserting <!-- Forum Stickies list --> on the forumdisplay and showthread is a manual action, plus inserting the variable {$xtstickies_list}  on the threadlist and showthread to give a working plugin.

Are you sure when you remove the <!-- Forum Stickies list --> text from your header template (not the global_start function, do not touch your plugin file), but leave the {$xtstickies_list} variable in your template, the sticky threads won't be displayed?
Or maybe you've edited your plugin?
Well, I tried it twice yesterday - will try again. BRB. And yea, I did a little edit - I will redownload from here so we are talking about the same file.
Hurries back in  -- ok, it works with the one from here. Yay. Now I need to redo my edits without breaking it Smile
Pages: 1 2 3
Reference URL's