Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Any interest?
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #21
RE: Any interest?
(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?

01-08-2011 03:53 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #22
RE: Any interest?
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)


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 01-08-2011 05:01 AM by leefish.)
01-08-2011 04:59 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #23
RE: Any interest?
(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);


01-08-2011 05:32 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #24
RE: Any interest?
Yes, because if that is NOT in the header then it does not work


[Image: leelink.gif]
MYBB1.6 & XThreads
01-08-2011 05:39 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #25
RE: Any interest?
(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?

(This post was last modified: 01-08-2011 05:51 AM by RateU.)
01-08-2011 05:50 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #26
RE: Any interest?
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.


[Image: leelink.gif]
MYBB1.6 & XThreads
01-08-2011 06:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #27
RE: Any interest?
(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?

(This post was last modified: 01-08-2011 07:10 AM by RateU.)
01-08-2011 07:09 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #28
RE: Any interest?
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


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 01-08-2011 07:20 AM by leefish.)
01-08-2011 07:14 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: