05-27-2011, 11:08 PM
05-28-2011, 02:45 AM
There is a tutorial (for MyBB 1.2) here:
http://mybbhacks.zingaburga.com/showthread.php?tid=54
Maybe you can modify it.
If XThreads installed in your forum, I have a plugin for that (XThreads is required for this), based on the tutorial (attached).
http://mybbhacks.zingaburga.com/showthread.php?tid=54
Maybe you can modify it.
If XThreads installed in your forum, I have a plugin for that (XThreads is required for this), based on the tutorial (attached).
05-28-2011, 04:21 AM
Hi RateU, I just downloaded your plugin and tried it out in my default templates. When I use the new paginate control added by the plugin then when I change pages the portal announcements lose their XThreads formatting and the pages don't move forward. You can see it on the mybb default templates of leefish.nl.
05-28-2011, 06:00 AM
Works for me:
http://www.14.mynie.co.cc/portal.php
The threads in the first page comes from Brand Directory forum (even I use template prefix for that).
Threads in the second page comes from Article Gallery (using the default portal announcement template) and from Product Review (using template prefix).
The announcements rating works too.
But (again), because I'm not a coder and I'm still learning, probably it's better to modify the portal.php file directly than using the plugin
http://www.14.mynie.co.cc/portal.php
The threads in the first page comes from Brand Directory forum (even I use template prefix for that).
Threads in the second page comes from Article Gallery (using the default portal announcement template) and from Product Review (using template prefix).
The announcements rating works too.
But (again), because I'm not a coder and I'm still learning, probably it's better to modify the portal.php file directly than using the plugin
05-28-2011, 06:40 AM
yes, I think I will. Thanks anyway RateU.
05-29-2011, 05:23 PM
RateU's code looks good - do you happen to have manually edited portal.php at all leefish?
05-30-2011, 02:51 AM
(05-29-2011 05:23 PM)ZiNgA BuRgA Wrote: [ -> ]RateU's code looks good - do you happen to have manually edited portal.php at all leefish?Yes I do - and that is the "problem".
Nothing wrong with RateU's code - its using a preg_replace so yes, my manual edits are screwing it up. So I just added the required code direct to my already heavily edited portal.php.
I have a lot of plugins already (not that these plugins are causing any extra queries, its just cluttering my plugins list) and I am trying to tidy the list up.
On this pagination - its really neat, but its a full page reload (of course) and I think that means I am hitting the db every time I click to a new page. Thats not so good on the portal page . I have a few queries already memcached so that helps, but I was actually looking around for an AJAX script so at least I only "reload" the announcements div.
I am also looking at a "select by news" type filter as well, jQuery should be easiest I think as I am already loading the jQuery library, so on the AJAX reload its probably also going to be jQuery based.
05-30-2011, 09:34 AM
(05-30-2011 02:51 AM)leefish Wrote: [ -> ]On this pagination - its really neat, but its a full page reload (of course) and I think that means I am hitting the db every time I click to a new page. Thats not so good on the portal page .Unless you're hitting server limits, page loading too slow or otherwise, I really wouldn't worry about that...
(05-30-2011 02:51 AM)leefish Wrote: [ -> ]I have a few queries already memcached so that helpsYou modified some queries?
05-30-2011, 04:14 PM
(05-30-2011 09:34 AM)ZiNgA BuRgA Wrote: [ -> ]You modified some queries?
Yes, I have some modified queries - on the latest threads. Those are not memcached though - I have three image galleries on my portal page and those results are memcached. It means that when the page loads I have 3 less queries.
My host is one of my friends and he is a compulsive cacher - he has a site with nearly one million members on a forum that has been running for the last seven years. I realise that we don't really need to do this caching so much on LeeFish, but its his server (and he hosts me for free) and he would like me to use these techniques. So.
I have the manual edits from the tutorial working fine on the portal page. When I put RateU's plugin on leefish when I clicked next page (and subsequent pages) on the portal it just showed the existing portal announcements from the first page but with no images or text in the post message.
05-30-2011, 06:00 PM
If he's got a really high traffic site, I wouldn't be surprised if he has some sort of caching proxy installed. IMO, I'd try taking advantage of that before doing anything else - it would net the most benefit in terms of load.