Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [split] Coding Question
ZiNgA BuRgA Online
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: [split] Coding Question
I haven't checked, but if you want to just pull from XThreads instead of MyBB's attachment system, you could probably do the following edits (IDK if they work or not).

For Rateu's plugin, find:

PHP Code:
1
2
3
4
5
6
7
8
9
10
		$query = $db->query("
			SELECT a.*, p.fid AS pfid, p.tid AS ptid, p.pid AS ppid, t.*
			FROM ".TABLE_PREFIX."attachments a
			LEFT JOIN ".TABLE_PREFIX."posts p ON (p.pid=a.pid)
			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
			WHERE t.visible=1 AND a.thumbnail != '' AND a.thumbnail != 'SMALL' AND t.fid IN ('".implode("','", $mnlatatgal_tid_array)."')
			GROUP BY a.pid
			ORDER BY a.aid DESC
			LIMIT $mnlatatgal_num
		");

Replace with

PHP Code:
1
2
3
4
5
6
7
8
		$query = $db->query("
			SELECT a.updatetime, a.md5hash, a.uploadtime, a.aid, a.attachname, a.filename, t.*
			FROM ".TABLE_PREFIX."xtattachments a
			LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=a.tid)
			WHERE t.visible=1 AND t.fid IN ('".implode("','", $mnlatatgal_tid_array)."')
			ORDER BY a.aid DESC
			LIMIT $mnlatatgal_num
		");

Find:

PHP Code:
			$mnlag_datetime = my_date($mybb->settings['dateformat'], $mnlag['dateuploaded']).' '.my_date($mybb->settings['timeformat'], $mnlag['dateuploaded']);
			$mnlag_att_thumb = "attachment.php?thumbnail=".intval($mnlag['aid']);

Replace with:

PHP Code:
			$mnlag_datetime = my_date($mybb->settings['dateformat'], $mnlag['uploadtime']).' '.my_date($mybb->settings['timeformat'], $mnlag['uploadtime']);
			$mnlag_att_thumb = xthreads_get_xta_url($mnlag).'/thumb160x120';

(replace "thumb160x120" with your dimensions)

Jeff's looks more difficult to do


My Blog
06-05-2010 10:20 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
[split] Coding Question - leefish - 06-05-2010, 05:40 AM
RE: [split] Coding Question - ZiNgA BuRgA - 06-05-2010, 09:14 AM
RE: [split] Coding Question - leefish - 06-05-2010, 09:35 AM
RE: [split] Coding Question - ZiNgA BuRgA - 06-05-2010 10:20 AM
RE: [split] Coding Question - RateU - 06-05-2010, 10:27 AM
RE: [split] Coding Question - leefish - 06-05-2010, 10:15 PM
RE: [split] Coding Question - leefish - 06-05-2010, 10:53 PM
RE: [split] Coding Question - leefish - 06-06-2010, 01:09 AM
RE: [split] Coding Question - RateU - 06-06-2010, 07:26 AM
RE: [split] Coding Question - leefish - 06-06-2010, 07:34 AM
RE: [split] Coding Question - RateU - 06-06-2010, 10:19 AM
RE: [split] Coding Question - leefish - 06-06-2010, 10:51 AM
RE: [split] Coding Question - walkman - 06-06-2010, 11:24 AM
RE: [split] Coding Question - RateU - 06-06-2010, 11:27 AM
RE: [split] Coding Question - leefish - 06-06-2010, 11:41 AM

 Standard Tools
Forum Jump: