Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Using XThreads Custom Thread Fields For Plugin Settings
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #3
RE: Using XThreads Custom Thread Fields For Plugin Settings
Wow RateU - this is an awesome idea and JUST what I have wanted for a while - it would be great to be able to define a thread as visible on the portal page. I am downloading the plugin to have a look.

Thank you

EDIT
I had a look at the plugin, fixed the non globalling on the run function and I tested on LeeFish (I hope its ok) and yea, guess what? I was wondering if a thumbnail image could be added......

I was trying to add it in myself, but I got a bit lost in all the post parsing Frown

Code:
1
2
3
4
5
6
7
8
9
10
11
12
	$xtdispportal_icon_cache = $GLOBALS['cache']->read('posticons');
	$query = $db->query('
		SELECT t.*, t.username AS tusername, u.username, u.avatar, u.usergroup, u.displaygroup, a.aid, f.name
		FROM '.TABLE_PREFIX.'threads t
		LEFT JOIN '.TABLE_PREFIX.'users u ON (u.uid=t.uid)
		LEFT JOIN '.TABLE_PREFIX.'xtattachments a ON (a.tid=t.tid)		
		LEFT JOIN '.TABLE_PREFIX.'threadfields_data td ON (td.tid=t.tid)
		LEFT JOIN '.TABLE_PREFIX.'forums f ON (f.fid=t.fid)
		WHERE t.visible=1 AND td.xtdispportal="Yes" AND t.closed NOT LIKE "moved|%" AND a.thumbs!=""'.$xtdispportal_unviewwhere.'
		GROUP BY a.tid
		ORDER BY t.dateline desc
	');


I tried the above code in the query and it does not crash, but also no pic...

so I added this extra line:

Code:
			$xtdispportal_replies = my_number_format($xtdispportal['replies']);
			$xtdispportal_att_thumb = xthreads_get_xta_url($xtdispportal).'/thumb240x180';
			$xtdispportal_views = my_number_format($xtdispportal['views']);


and I added to the template

Code:
{$xtdispportal_att_thumb} 

But still no thumb.

I hope its ok for me to do this - I look at/alter other peoples plugins to try and learn.

EDIT
And I am back again... After several hours of banging my head on the wall I realised that the ICON (as coded by RateU in the original plugin) also does not show in the portal - so it seems like its something to do with images. I have attached my file.

Also, I don't want to seem like a whiner or to overshadow the great work RateU has done here, I really appreciate this plugin and all the work he does to help us all with implementing XThreads.



Attached File(s)
.php  xtdispportal_leefish_edit.php (Size: 5.19 KB / Downloads: 619)


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 09-21-2010 04:15 AM by leefish.)
09-20-2010 09:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Using XThreads Custom Thread Fields For Plugin Settings - leefish - 09-20-2010 09:29 AM

 Standard Tools
Forum Jump: