Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Is this possible? Displaying threads on index with x criteria
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: Is this possible? Displaying threads on index with x criteria
I'll try to make it a bit general (hopefully). We use XThreads functions here, (the hard things is done by XThreads Biggrin), so maybe we can use it for other XThreads applications.

Try this (attached - modify it as our needs).
Edit the file, find and and modify the value:

PHP Code:
$forumid = 2;
$xdays = 10;
$tlimit = 3;

Edit mnxt_mrtxpd_threads and/or mnxt_mrtxpd_threads_thread templates as our needs.

By default, we can find thread subject inside the mnxt_mrtxpd_threads_thread.
Use {$thread['profilelink']} for thread author username (linked to profile).

In the template, we can use {$threadfields['key']} for non attachments fields (description, category and etc), and {$threadfields['key']['item']} for attachments fields (image and/or files).

We can use something like this if we want the thumbnail displayed in the side box has a different size with the thumbnail displayed in threadlist/showthread:

HTML Code
<a href="{$thread['threadlink']}"><img src="{$threadfields['key']['thumbs']['thumbnail_size']['url']}" alt="{$thread['subject']} Preview" title="{$thread['subject']}" width="{$threadfields['key']['thumbs']['thumbnail_size']['w']}" height="{$threadfields['key']['thumbs']['thumbnail_size']['h']}" /></a>

Modify it as our needs, depends on the Key for our image custom fields. And make sure that the thumbnail size is in our Image Thumbnail Generation list settings (or we can add it there, and run the Rebuild XThreads Attachment Thumbnails tools).

{$forumurl_q} followed by filtertf_key will lead us to the forumdisplay (filtered).

Use {$thread['rank']} for the rank.
If we want to use image for the rank, we can use it something like this:

HTML Code
<img src="images/hottest_threads_{$thraed['rank']}.png" alt="" />

Then upload hottest_threads_1.png, hottest_threads_2.png, hottest_threads_3.png and etc, depends on the limit, where 1 is the hottest threads.

Please tell me if there is something wrong with the code. I'm still learning.



Attached File(s)
.php  mnxt_mrtxpd.php (Size: 4.58 KB / Downloads: 506)

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

« Next Oldest | Next Newest »

Messages In This Thread
RE: Is this possible? Displaying threads on index with x criteria - RateU - 05-11-2012 04:40 AM

 Standard Tools
Forum Jump: