MyBB Hacks

Full Version: [split] XThreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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.
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.
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?
Do you have another attachment (file attachment) beside image attachment in that thread/forum, Lee?
Hi Rateu - yes, I have the rar file and usually up to three other .jpg attachments as well.
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.

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)."')

Hi RateU, I tried this and got the same error:

PHP Code:
			$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
		");

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!=''

Pages: 1 2 3
Reference URL's