Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Is this possible? Displaying threads on index with x criteria
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #21
RE: Is this possible? Displaying threads on index with x criteria
Yes, latest threads showing an image from each of the latest threads. I'll change the design a bit though, but that's for me to figure out, haha. Like in the image in the OP: http://i.imgur.com/wf6fJ.jpg
06-15-2012 09:00 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #22
RE: Is this possible? Displaying threads on index with x criteria
Similar to this (?):
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=1347&pid=1137

If you don't mind some editing to the file, you can try it.

Open up the file:

Change the settings:

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


Find this code:

PHP Code:
116
$xttimg_index_latest_threads = xttimg_threads_run($fids,5,'dateline','xttimg_index_latest_threads_thread','xttimg_index_latest_threads','timg',$xtimgdim,$avdim);


Replace the timg with your XThreads image key, example for the main image in the Brand Directory example application: mimg

Remove this line:

PHP Code:
117
$xttimg_index_most_viewed_threads = xttimg_threads_run($fids,5,'views','xttimg_index_most_viewed_threads_thread','xttimg_index_most_viewed_threads','timg',$xtimgdim,$avdim);

You can use the line above if you want to add another blocks.
If you don't want it, you can remove xttimg_index_most_viewed_threads and xttimg_index_most_viewed_threads_thread templates.

Put {$xttimg_index_latest_threads} variable manually in your index template.

If it is not what you want, maybe we can modify it.


06-16-2012 07:30 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #23
RE: Is this possible? Displaying threads on index with x criteria
Hi RateU! Sorry I had neglected to follow up with you on this before, but all of your suggestions worked fine. Smile Thank you!

I was wondering if it would be possible to embed these templates within the forumbit_depth2_forum template instead of just the index?
02-04-2013 07:56 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #24
RE: Is this possible? Displaying threads on index with x criteria
So you want to show this in thread lists (sub-forums)? You will need to hook at forumdisplay_start I think.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
02-05-2013 04:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #25
RE: Is this possible? Displaying threads on index with x criteria
(02-05-2013 04:35 AM)Sama34 Wrote:  So you want to show this in thread lists (sub-forums)? You will need to hook at forumdisplay_start I think.

No, on the index within the forumbit.
02-05-2013 04:36 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #26
RE: Is this possible? Displaying threads on index with x criteria
I think you can simply move {$mnxt_mrtxpd_threads} around your index template. Maybe I'm misunderstanding.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
02-05-2013 04:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #27
RE: Is this possible? Displaying threads on index with x criteria
It has to be within the forumbit_depth2_forum template ... there is a reason for this.

http://i.imgur.com/guNv7kk.png

Haralooks and Brand Directory are links to forums, and they are actually the templates
xttimg_index_latest_threads and mnxt_mrtxpd_threads, respectively. However, because of this, it's impossible to pull the unread status and last post information properly.

I can customize the display of each forumbit using template conditionals, but in order to get the last post info and unread status I need to have those templates as a part of the forumbit.
02-05-2013 04:46 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #28
RE: Is this possible? Displaying threads on index with x criteria
Oh I see, you will probably need to wait for rate, I'm unsure how the plugin works at that extend.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
02-05-2013 05:23 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: #29
RE: Is this possible? Displaying threads on index with x criteria
(02-04-2013 07:56 AM)brad-t Wrote:  I was wondering if it would be possible to embed these templates within the forumbit_depth2_forum template instead of just the index?
Maybe you need to change the hook.
Try this way:
Open the file, find:

PHP Code:
109
110
$plugins->add_hook('index_start','xttimg_index_index');
function xttimg_index_index(){

Replace it with:

PHP Code:
109
110
111
$plugins->add_hook('build_forumbits_forum','xttimg_index_index');
function xttimg_index_index(&$f){
	if(THIS_SCRIPT != 'index.php' || $f['fid'] != 21) return;

Change the 21 with your forum id.
Put your variable, for example: {$GOBALS['xttimg_index_latest_threads']} in your forumbit_depth2_forum template.
   

(02-05-2013 04:46 AM)brad-t Wrote:  customize the display of each forumbit using template conditionals,
If it is a custom complex forumbit_depth2_forum template, personally, I prefer to use the XThreads's Template Prefix feature for creating the custom template.

02-06-2013 01:57 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #30
RE: Is this possible? Displaying threads on index with x criteria
Thanks as always dear RateU!

Let me know if you are ever looking for paid work – I'm sure I could use your help on a lot of things Smile
02-06-2013 07:38 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: