Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
CES Intelligent Attachment Query Details »
CES Intelligent Attachment Query
Mod Version: 1.3.0, by thincom2000 (Coder) thincom2000 is offline
Developer Last Online: Oct 2019 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.x Rating: (0 vote - 0 average) Installs: 17
Released: 27 Jan 2007 Last Update: 26 Mar 2007 Downloads: 67
Supported Uses Plugins Code Changes  

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!)

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Show Thread Enhancements CES Intelligent Postbit Query thincom2000 vBulletin 3.6 Add-ons 87 15 Mar 2008 00:00
Forum Display Enhancements CES Intelligent Announcement Query thincom2000 vBulletin 3.6 Add-ons 17 29 Jan 2007 00:13

Comments
  #2  
Old 27 Jan 2007, 21:18
Gizmo5h1t3's Avatar
Gizmo5h1t3 Gizmo5h1t3 is offline
 
Join Date: Aug 2005
Real name: STEVE
saved a copy of showthread, edited it, and copied over.....
least the boards still running....cant say ive noticed the saved query tho??
Reply With Quote
  #3  
Old 27 Jan 2007, 21:32
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
The query is only saved if there is an attachment anywhere in the thread and not on the page.
vBulletin by default will make a query in that situation.

So in normal forum/showthread use, you would not notice a drop in queries.
Reply With Quote
  #4  
Old 27 Jan 2007, 22:53
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
I uploaded version 2.0 which completely eliminates 1 query from showthread.php (even on the pages with attachments) if there is an attachment somewhere in the thread.
Reply With Quote
  #5  
Old 28 Jan 2007, 21:53
Kiros72 Kiros72 is offline
 
Join Date: Apr 2006
Real name: Ben Arnett
Forgive my stupidity, but I have to wonder if the one-less query makes up for all the new commands processed in showthread...
Reply With Quote
  #6  
Old 28 Jan 2007, 23:39
Get Shorty's Avatar
Get Shorty Get Shorty is offline
 
Join Date: Jun 2006
Real name: Nick
I get errors:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I'm also using your other modifcation to showthread, fyi.

This was a thread that didn't have any attachments.

I've reverted back for now.
Reply With Quote
  #7  
Old 28 Jan 2007, 23:42
Get Shorty's Avatar
Get Shorty Get Shorty is offline
 
Join Date: Jun 2006
Real name: Nick
Here is the code that I was using... See anything wrong?

showthread.txt
Reply With Quote
  #8  
Old 29 Jan 2007, 00:40
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
It's because there's a comma missing. This problem was fixed in version 3.0.0.
Reply With Quote
  #9  
Old 29 Jan 2007, 00:42
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
Originally Posted by Kiros72 View Post
Forgive my stupidity, but I have to wonder if the one-less query makes up for all the new commands processed in showthread...
Queries are VERY slow. Code is usually better.
Reply With Quote
  #10  
Old 29 Jan 2007, 01:56
Get Shorty's Avatar
Get Shorty Get Shorty is offline
 
Join Date: Jun 2006
Real name: Nick
Trying again... I'll post back with my results in a bit.
Reply With Quote
  #11  
Old 29 Jan 2007, 02:11
Get Shorty's Avatar
Get Shorty Get Shorty is offline
 
Join Date: Jun 2006
Real name: Nick
Everything seemed to work, except for one problem. All of the current attachments showed up as "attachments pending approval".

Reverted back to normal for now...
Reply With Quote
  #12  
Old 29 Jan 2007, 12:18
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
This should not be happening... I'll look into it later today.

Do you have usergroups who need attachment moderation? Because I can't even figure out how to set that.

Last edited by thincom2000; 29 Jan 2007 at 12:31.
Reply With Quote
  #13  
Old 29 Jan 2007, 14:17
Get Shorty's Avatar
Get Shorty Get Shorty is offline
 
Join Date: Jun 2006
Real name: Nick
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
Reply With Quote
  #14  
Old 30 Jan 2007, 00:00
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
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.
Reply With Quote
  #15  
Old 30 Jan 2007, 00:07
thincom2000 thincom2000 is offline
 
Join Date: Jun 2006
Real name: Ted
Basically you need to find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and change:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 13:12.

Layout Options | Width: Wide Color: