Version: 1.3.0, by thincom2000
Developer Last Online: Sep 2022
Category: Show Thread Enhancements -
Version: 3.6.x
Rating:
Released: 01-26-2007
Last Update: 03-25-2007
Installs: 19
Uses Plugins
Code Changes
No support by the author.
CES Intelligent Attachment Query
Version: 1.3.0
Version 1.3.0 has no real changes other than now being a product. Now requires CES Pre-Process Hooks.
*** NEWS ***
3/25/2007 - v1.3.0 (product version) released
------------------------------------------------------
1/28/2007 - v3.0.0 released
1/27/2007 - v1.0.0, v2.0.0, v2.0.1 released
I actually came across this while trying to reduce queries in my CES Site News mod which uses a customized showthread.php.
Known Issues:
- NONE
What It Does:
Normally showthread wastes a query on attachments by checking if the thread has an attachment in any post, not bothering to check if that post and attachment are even on the current page, then querying for the page's posts. This hack removes a potentially unnecessary query from showthread.php by joining queries.
I hope someone from Jelsoft sees this thread.
Mod Features:
- removes 1 pointless query
Products to Install: 1 Plugins Included: 2 Files to Upload: 0 Files to Edit: 1 New Templates: 0 Template Edits: 0 Queries Added*: -1
*See "What It Does" for details.
*** Changelog *** As of Version 1.3.0:
- only 1 file edit
- requires CES Pre-Process Hooks
- uses vBulletin's Plugin system
- changed version numbering (confusion!)
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
No. Anyone can post attachments without moderation, excluding guests. The forum was restricted to certain usergroups. I didn't check in the open forums... whoops
Okay, this was caused by a typo I made in the 3.0 install file (that I didn't make in my test which is why I didn't understand the problem). Uploading the non-typo'd version now.
attach.dateline AS attachdate, attach.thumbnail_dateline, attach.filename, attach.filesize, attach.visible
and change:
PHP Code:
attach.visible
to:
PHP Code:
attach.visible AS attachvisible
That should fix your "all attachments are moderated" woes.
Not having this resulted in $attachment['visible'] being false, which class_postbit.php interpreted as the attachment requiring moderation to become visible.
attach.dateline AS attachdate, attach.thumbnail_dateline, attach.filename, attach.filesize, attach.visible
and change:
PHP Code:
attach.visible
to:
PHP Code:
attach.visible AS attachvisible
That should fix your "all attachments are moderated" woes.
Not having this resulted in $attachment['visible'] being false, which class_postbit.php interpreted as the attachment requiring moderation to become visible.
vBulletin only adds a query for attachments when the thread has an attachment somewhere.
This hack rearranges the code so that the query doesn't have to be added.
The fact that you didn't notice a query removed means nothing, since this hack only prevents a query from being added, much like caching an uncached template in $globaltemplates, only with attachments.