top viewed posts & last post (with Thread Image) ???
ArieKatz Offline
Junior Member
**
Posts: 11
Joined: May 2012
Post: #1
Question top viewed posts & last post (with Thread Image) ???
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!
06-14-2012 03:45 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: top viewed posts & last post (with Thread Image) ???
In what page? I think it should be similar to this?
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=531&pid=1092
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=531&pid=1096

06-15-2012 06:26 AM
Find all posts by this user Quote this message in a reply
ArieKatz Offline
Junior Member
**
Posts: 11
Joined: May 2012
Post: #3
RE: top viewed posts & last post (with Thread Image) ???
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
06-16-2012 12:09 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: top viewed posts & last post (with Thread Image) ???
Assuming you use timg as the Key, you can try this (attached).
Edit the file, and change these values:

PHP Code:
112
113
$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.



Attached File(s)
.php  xttimg_index.php (Size: 8.78 KB / Downloads: 668)

(This post was last modified: 06-16-2012 07:03 AM by RateU.)
06-16-2012 06:56 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #5
RE: top viewed posts & last post (with Thread Image) ???
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?
06-17-2012 01:32 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: top viewed posts & last post (with Thread Image) ???
Did you set the setting like this?

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


06-17-2012 05:25 AM
Find all posts by this user Quote this message in a reply
rgponce Offline
Junior Member
**
Posts: 3
Joined: Oct 2012
Post: #7
RE: top viewed posts & last post (with Thread Image) ???
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?
10-30-2012 04:00 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: top viewed posts & last post (with Thread Image) ???
Maybe you can put it at the end of the xttimg_index_index() function.

11-03-2012 02:57 AM
Find all posts by this user Quote this message in a reply
rgponce Offline
Junior Member
**
Posts: 3
Joined: Oct 2012
Post: #9
RE: top viewed posts & last post (with Thread Image) ???
Thanks for the help RateU, but i can't get this to work, here is my code:
http://shorttext.com/8Vxrrpve6eOk4m
11-04-2012 01:51 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #10
RE: top viewed posts & last post (with Thread Image) ???
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').'";');
}


11-05-2012 02:56 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: