Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [split] Coding Question
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #7
RE: [split] Coding Question
Reporting back - yes it works! But, it has lost the ability to select only the first attachment in a post.

Using my current settings (pull last 5 attachments from forum 30) with the MyBB attachments version would give me five attachment thumbnails from 5 posts.

Using the same settings in the Xthreads version gives me five attachment thumbnails from 3 posts.  This is because one of the posts has three attachment thumbnails.

I am looking at the differences in the two code sets posted above, and I see that in Rateus code there is a line to group by pid, then to pull the attachments. I have no pid in the Zinga version, but I see that Zinga is using the threads table to join to in the database.

So, I added a line in the code (line6):

Code:
1
2
3
4
5
6
7
8
9
			$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)."')
			GROUP BY a.tid
			ORDER BY a.aid DESC
			LIMIT $mnlatatgal_num
		");


I tested it and it worked perfectly. My next challenge is to work out how to get this to show on the forum display. I do think that this is a plug in that many other users would like to have and I would like to ask Rateu if he would consider posting it as a plug in here on MyBBhacks? I can't post it as it is not my plugin.



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 06-05-2010 10:56 PM by leefish.)
06-05-2010 10:53 PM
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
[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: