PDA

View Full Version : Forum Display Enhancements - CES Intelligent Announcement Query


thincom2000
01-20-2007, 10:00 PM
CES Intelligent Announcement Query
Version: 1.0.2

*** NEWS ***
1/28/2007 - v1.0.2 released
1/25/2007 - updated install instructions
1/24/2007 - v1.0.1 released
1/21/2007 - v1.0.0 released

Known Issues:
- none

What It Does:
Makes forumdisplay.php smarter. It will only use a query for Announcements IF there are any announcements for that forum. So more likely than not, this will improve your forumdisplay pages by virtually eliminating 1 query.

I actually wrote this for another mod I'm working on that contains a modified version of forumdisplay.php. Decided to release these plugins separately so people can benefit from it now.

Products to Install: 1
Plugins Included: 2
Files to Upload: 0
Template Edits: 0
Files to Edit: 1
Queries Added:* -1

*This only subtracts 1 query if you don't have any announcements configured for that forum.

*** Changelog ***
As of Version 1.0.2:
- added support for global announcements

As of Version 1.0.1:
- made the announcement check faster
- announcements will work after uninstall if file edits not undone

Sn1p34
01-21-2007, 09:29 PM
Theres no download file?

HMBeaty
01-21-2007, 09:32 PM
Theres no download file?

+1?

thincom2000
01-21-2007, 09:35 PM
Sorry guys, I was just making sure all the mod info on here was correct before uploading the file.

*File uploaded.*

Distance
01-21-2007, 09:39 PM
Wow people are so impatient, good tip

MrNase
01-22-2007, 03:50 AM
less queries - more fun!

Thanks! :)

Hornstar
01-22-2007, 04:32 AM
If thats the case, then maybe vbulletin should have this as default then.

FleaBag
01-22-2007, 09:05 AM
I agree. Maybe they will incorporate. :)

Eliminating queries is something I always look to do. Thank you. :)

MaestroX
01-22-2007, 04:32 PM
Thanks for this. Anything to get my forum running faster is always a plus :)

thincom2000
01-23-2007, 04:34 AM
Yeah, also... for anyone who would uninstall this. Why? It's better for performance to leave it installed, plus the file edits you have done would cause Announcements not to work at all after an uninstall (unless you also reversed the file edits).

Or I updated the file edits to allow for that... I need to look at this again, I may have just brainstormed a 0.2 KB more efficient way of doing this.

thincom2000
01-24-2007, 11:40 PM
Version 1.0.1 was just uploaded. This contains instructions for an updated file edit that will do this check faster, and if someone is foolish enough to uninstall this product, announcements will now work without undoing the file edits.

stomph
01-25-2007, 05:58 AM
Thanks for this hack!

There's a ) missing on line 477 in forumdisplay:
if ($announce_exists OR (!is_array($announces)))

adhari_com
01-25-2007, 06:34 AM
Thanx for the great effort,
Although I think eliminating a single query would be replaced with the query calling the hook and also executing itself!

Just an opinion.

thincom2000
01-25-2007, 04:51 PM
You are correct that the hooks creates a new query. However this is an additional query in the AdminCP Announcements page, and not one users would experience on your forumdisplay.

I would not have released this if it was that pointless.

There's a ) missing on line 477 in forumdisplay:
if ($announce_exists OR (!is_array($announces)))

I have updated the installation instructions with the missing parenthesis. Thanks!

TheFrienzNet
01-28-2007, 09:07 PM
As much as I love your other hacks, I love this one too;however, there is a bug once again. Global announcements do not show up.

Get Shorty
01-28-2007, 09:44 PM
As much as I love your other hacks, I love this one too;however, there is a bug once again. Global announcements do not show up.

I don't use global announcements. Is that the only bug we're aware of?

I may install this one too...

thincom2000
01-28-2007, 09:55 PM
Global Announcements fixed.

Get Shorty
01-28-2007, 10:13 PM
Sweet. Installing...