Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [split] XThreads
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #1
[split] XThreads
I have a question about this - I was adding a post today in one of my Xthread forums and indeed encountered the preview post bug. I have an image gallery on my front page that calls the latest images from downloads and after I had encountered this bug (and managed to post the original thread) I saw that the preview pic was missing from the gallery. I did some more checks and discovered that I have several posts with this problem. I was able to fix it with the one from today by just deleting the thread and reposting, but for the older ones I would rather not do that (if possible). Can you advise how to fix it?

Attached is the plugin I am using to call the images.


Attached File(s)
.rar  mbhattatgal.rar (Size: 2.25 KB / Downloads: 498)


[Image: leelink.gif]
MYBB1.6 & XThreads
10-12-2010 09:36 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: XThreads
If you're talking about the preview post bug I put up on github, that shouldn't be it, because it doesn't actually delete the attachment (or the link) in any way - it's only a display issue.
To reproduce it, full edit a thread's first post and then hit preview post - the attachment will appear to be gone, but it's really still there.  Even if you save the post, the attachment will still actually be there.

My Blog
10-12-2010 06:16 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #3
RE: XThreads
Hi Zinga - well, it is odd - it only does it if I have previewed the post before saving. Maybe its something in the plug in?


[Image: leelink.gif]
MYBB1.6 & XThreads
10-14-2010 12:16 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: #4
RE: XThreads
Do you have another attachment (file attachment) beside image attachment in that thread/forum, Lee?

10-14-2010 04:22 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #5
RE: XThreads
Hi Rateu - yes, I have the rar file and usually up to three other .jpg attachments as well.


[Image: leelink.gif]
MYBB1.6 & XThreads
10-14-2010 04:45 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: #6
RE: XThreads
I think you need to edit the plugin:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=474&pid=35
or (maybe)
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=415&pid=30

10-14-2010 04:50 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #7
RE: XThreads
Hi RateU - yes, I had already looked through both of those - I made an edit (which seems fine to me) but its giving this error:

Code:
Parse error: syntax error, unexpected T_STRING in /customers/leefish.nl/leefish.nl/httpd.www/mybb/inc/plugins/mbhattatgal.php on line 195


So its obviously not right.... I dont know whats wrong with line 195. Edited (and not working) plug in attached.



Attached File(s)
.php  1mbhattatgal.php (Size: 6.97 KB / Downloads: 511)


[Image: leelink.gif]
MYBB1.6 & XThreads
10-14-2010 05:52 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: #8
RE: XThreads
Try to edit this code:

PHP Code:
NOT LIKE "moved|%" AND a.thumbs!=""('".implode("','", $mbhattatgal_tid_array)."')


to

PHP Code:
NOT LIKE 'moved|%' AND a.thumbs!='' AND t.fid IN ('".implode("','", $mbhattatgal_tid_array)."')


10-14-2010 06:17 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #9
RE: XThreads
Hi RateU, I tried this and got the same error:

PHP Code:
1
2
3
4
5
6
7
8
9
			$query = $db->query("
			SELECT t.*, f.name, a.updatetime, a.md5hash, a.uploadtime, a.aid, a.attachname, a.filename
			FROM '.TABLE_PREFIX.'threads t
			LEFT JOIN '.TABLE_PREFIX.'xtattachments a ON (a.tid=t.tid)
			WHERE t.visible=1 AND t.closed NOT LIKE "moved|%" AND a.thumbs!="" AND t.fid IN('".implode("','", $mbhattatgal_tid_array)."')
			GROUP BY a.tid
			ORDER BY a.aid DESC
			LIMIT $mbhattatgal_num
		");



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 10-14-2010 06:36 AM by leefish.)
10-14-2010 06:35 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: #10
RE: XThreads
Look at the code that I've posted above, Lee:

PHP Code:
'moved|%'

That part using single quote.

And this using two single quote too:

PHP Code:
a.thumbs!=''


10-14-2010 06:45 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: