MyBB Hacks

Full Version: top viewed posts & last post (with Thread Image) ???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey again Smile

First go to this link LINK you will see that on the left of every thread there is an image that have been done with this XThreads / Thread Image option (thanks RateU Smile)

now i'm looking for something that will show me 2 boxes

in the first i will see the top 5 viewed posts.
in the second i'll see last 5 post

BOTH of those from a SPECIFIED forum!S! (not 1 - forum S )

how i do that?

thank a lot!
In the main url www.***.com/index.php - and yes it should be similar to what i have in the users profile but i need the last (5) from the specific forums and the top 5 from those forums. at the end they should look like just as they look here BUT in this page at the top
Assuming you use timg as the Key, you can try this (attached).
Edit the file, and change these values:

PHP Code:
$fids = array('2','3');// Forum IDs
$xtimgdim = array('w'=>75,'h'=>75);// XThreads image thumbnail dimension


Edit xttimg_index_latest_threads and xttimg_index_latest_threads_thread templates for the latest threads.
Edit xttimg_index_most_viewed_threads and xttimg_index_most_viewed_threads_thread templates for the most viewed threads.

Put {$xttimg_index_latest_threads} and {$xttimg_index_most_viewed_threads} variable in your index template.

Thank you! This looks great!

Just thought I would tell you, though, that using this plugin it did not pull the thumbnail size I had input in xtimgdim -- it used the full size image. I just added "thumb250x400" manually to the templates, is that OK?
Did you set the setting like this?

PHP Code:
$xtimgdim = array('w'=>250,'h'=>400);

Thanks for the plugin, works very well.
I'm trying add a parent template in plugin with 'xttimg_index_latest_threads' and 'xttimg_index_most_viewed_threads' inside it. I already insert the activated and deactivate queries, already insert the new template in 'add hook' templalist, but i don't know where and how put the eval line, anyone can help me with that?
Maybe you can put it at the end of the xttimg_index_index() function.
Thanks for the help RateU, but i can't get this to work, here is my code:
http://shorttext.com/8Vxrrpve6eOk4m
Something like this after the $au_portal_latest_threads and $au_portal_most_viewed_threads variables at the end of your au_portal_index() function:

PHP Code:
if($au_portal_latest_threads || $au_portal_most_viewed_threads){
	global $au_portal;
	eval('$au_portal = "'.$GLOBALS['templates']->get('au_portal').'";');
}

Pages: 1 2
Reference URL's