PDA

View Full Version : Miscellaneous Hacks - CES Lv vB Event Forums Addon - Query Blaster


thincom2000
04-03-2007, 10:00 PM
CES Lv vB Event Forums - Query Blaster
Version: 1.1.3

Requires:

CES Pre-Process Hooks 1.2.0+ (https://vborg.vbsupport.ru/showthread.php?t=143155) (needs showthread_preprocess and forumdisplay_preprocess)
Lv vB Event Forums 3.3.1+ (https://vborg.vbsupport.ru/showthread.php?p=1181025)
Farcaster's Event Attendance & vb Event Forums Integration 1.1.0+ (https://vborg.vbsupport.ru/showthread.php?t=133970)


*** NEWS ***
7/28/2007 - v1.1.3 released
7/27/2007 - v1.1.2 released
7/24/2007 - v1.1.0, v1.1.1 released
4/2/2007 - v1.0.0 released

Known Issues:
- none

What It Does:
This modifies the Lv vB Event Forums addon by replacing a number of plugins and effectively removing LOTS of extra queries (you probably noticed). Also adds the ability to add attachments to events.

Products to Install: 1
Plugins Included: 20
Files to Upload: 0
Files to Edit: 1
New Templates: 5
Template Edits: 0

Mod Features:
- adds an option to the Forum Manager
- event attachments
- much fewer queries in forumdisplay and especially showthread

You will need to edit all your Event Forums in the Forum Manager and set "Is this an event forum?" to yes. This just makes some of the plugin code simpler and I think removed 1 query elsewhere. You still need to specify forum-calendar relationships in settings.

*** Changelog ***
As of Version 1.1.3
fixed upcoming events on forumdisplay
fixed edit options for first post
fixed thread titles in forumdisplay
fixed thread not created on event creation
removed unused templates


As of Version 1.1.2
fixed empty first post (event details)


As of Version 1.1.1
fixed missing plugin since 1.0.0 that fetches event info


As of Version 1.1.0
event forums use own showthread template
separate postbit for event details
map forums to calendars in the forum manager
fixed redirect bug on attachment edit
fixed bug where comments bar was disconnected

Quantnet
04-03-2007, 11:57 PM
Been waiting.
Screenshot ?

Lionel
04-04-2007, 12:51 AM
Yeah. I am curious to see the approach taken to handle the attachments. Sounds like it could be very useful.

thincom2000
04-04-2007, 01:10 AM
It's nothing too crazy and not really worthy of a screenshot in my opinion. To handle the attachments:

"Edit Attachments" is added to the Edit Event dropdown. You still cannot add attachments when you first post the event, because it has to use the event editor.

The Edit Attachments option opens the post editor instead of the event editor, but with only the Manage Attachments area.

BadgerDog
07-06-2007, 03:04 PM
If I don't want to use Farcaster's mod, but I do run the other two, can I still use your mod and get the performance advantage?

Requires:
CES Pre-Process Hooks 1.2.0+
Lv vB Event Forums 3.3.1+
Farcaster's Event Attendance & vb Event Forums Integration 1.1.0+

Thanks :)

Regards,
Badger

thincom2000
07-07-2007, 04:08 AM
Last time I checked, the product wouldn't installed unless you had all those products. It may work without the integration but I'm not sure.

Also, it's been a while since I updated this mod so I'm not sure if everything posted here works as it should. I am having no problems on my site, so if you encounter anything, let me know and I'll be glad to help figure it out.

BadgerDog
07-07-2007, 09:59 AM
Last time I checked, the product wouldn't installed unless you had all those products. It may work without the integration but I'm not sure.

Also, it's been a while since I updated this mod so I'm not sure if everything posted here works as it should. I am having no problems on my site, so if you encounter anything, let me know and I'll be glad to help figure it out.

Thank you Sir.... :up:

Regards,
Badger

TheMilkCarton
07-24-2007, 12:48 PM
This ruined my install of vB Event Forums + Event Attendance w/ integration. And of course, Uninstalling this product didn't fix it back to normal.

All comments on an Event do not appear on SHOWTHREAD, although they are still there. And as with all your mods I've used (CES Site News), You still aren't getting the $spacer_open and $spacer_close right (and I'm even on a completely different style this time!). The area where the comments should be becomes entirely broken and none of the tables line up correctly. Not that it matters, because the comments aren't showing.

At least it did what it said. It reduced the queries all right, except for the fact that it rendered my Event Forums completely useless.

I now have to spend a few hours picking up the pieces.

If I sound angry, it's because I am. I took all the time making the laborious file edits for CES Preprocess Hooks, and while I was at it tried a few of your other "Query Blasters" (which none of them helped)

So since I can't figure out why comments aren't showing even after I uninstalled, I guess I'll have to start everything over from scratch, including the dozens of phrase and template edits I did to make vB Event Forums + Event Attendance actually USABLE, since they are both disgustingly messy hacks.

TheMilkCarton
07-24-2007, 01:03 PM
Edit: I forgot to mention installing this makes the body of the event info disappear entirely as well.

thincom2000
07-24-2007, 01:13 PM
Hm... don't understand what's up with $spacer_open and $spacer_close. Maybe the style I use just uses it incorrectly everywhere... Anyway, sorry you had such a horrible experience with this addon. It is possible that you may have made a bad file edit in the process of doing all the Pre-Process Hooks (of which you only needed forumdisplay_preprocess and showthread_preprocess). Or you may have updated either Event Forums or Farcaster's Integration since applying my patch.

However I do remember that I experienced a similar conflict when I upgraded my vBulletin to 3.6.7-PL1. At that time I was unsure what the cause of the conflict actually was and thought it was an isolated case since I have so many mods running for showthread... I will look into this and post an updated version now that I know it was NOT an isolated case.

thincom2000
07-24-2007, 03:24 PM
Okay the new version uses separate templates for everything so that template edits for Lv vB Event Forums are unnecessary in SHOWTHREAD. In addition, it fixes a few bugs like a broken Comments table, inability to utilize the attachments feature, etc. I'm also positive that this version works since I'm currently running it.

TheMilkCarton
07-25-2007, 12:31 AM
XML Error: mismatched tag at Line 2390

I get that when uploading the new XML file.

Edit: There was a missing </phrasetype> a few lines above it.

Now I get Warning: Invalid argument supplied for foreach() in /showthread.php(997) : eval()'d code on line 15 when going to an event

Oh geez. So I realized you changed the Yes/No to "Event forum?" question to what ID to map it too, but that didn't solve the problem. The Event info still doesn't show up, and it's now even more screwed up than before.

Not only does the event not show, the comments don't show, and now the event date has changed positions and isn't where I had it before.

------------------------------------------------------------

You know what, it's fine. Don't bother trying to fix this. It's honestly not worth the effort anymore. I've decided that I'm just getting rid of the event forum entirely and keeping the Event Attendance.

It's not worth the amount of frustration I'm going through trying to figure out why on earth your hack permanently damaged my installs of vB Event forums and Event Attendance + the integration.

Just PLEASE tell me what it overwrote in the templates, plugins, or DB that could be hiding the replies to the event.

This update just caused considerably more problems than the previous version, and I'd recommend you take the file down until things can get sorted out.

thincom2000
07-25-2007, 01:50 AM
I don't know how to answer your "overwrite" question. This mod doesn't overwrite anything. It disables the existing plugins on install, and re-enables them on uninstall. As for the templates, the mod now uses its own templates (so I apologize that your time changed positions). And the only DB change was adding the calendar map to the forum table.

As for the rest of your issues, I'm at a loss. Except for the missing </phrasetype>, everything in the new product file is exactly as it is on my installation. :confused:

EDIT: Fixed the product file. I checked the showthread_preprocess plugin again and it fetches data for the event based on an array containing field names. As far as I can tell, this array has been accidentally left out of the product file since 1.0.0. While I understand you plan to drop Event Forums, I certainly hope this fixes the issue, since surely you are not the only user experiencing empty event stuff. Unfortunately this still doesn't explain why the Comments were missing, so hopefully another able member could help me work that out.

TheMilkCarton
07-25-2007, 04:28 AM
Sorry, tried 1.1.1, not any better. Well, I guess it's *somewhat* better, it doesn't give me showthread.php error. Event info and comments still don't show, and I'm still confused as to how your plugin takes the event date say, Fri, 5-4-07, and relocates it to where the body of the event info should be.

Are you doing this testing on the latest versions of Farcaster's mods? He had updated the hacks since you released this plugin, and before the two updates today.

OK, I really give up for real this time. I can't handle the frustration anymore.

thincom2000
07-25-2007, 05:20 AM
The plugin uses a template called postbit_event. I will look into Farcaster's update, although at first glance it just looks like he fixed some phrases.

If you can link me to one of your messed up event forums, I would like to at least look at it. For example the actual HTML output is what I'm interested in.

TheMilkCarton
07-25-2007, 08:14 AM
Well, I uninstalled everything.

Then I installed vB Event forums > Event Attendance > then the Integration Add-On.

The replies still don't show. Your product had to have done some kind of irreversible damage to the database. Upon uninstalling everything a 2nd time, I went into phpMyAdmin to make CERTAIN that all the RSVP and Event Forums tables were dropped.

As for the HTML, it went something like this

<!-- Post Area -->
<div id="post_2353" ...></div>
<div id="last_shown" ...></div>
<!-- /Post Area -->

I made that up off the top of my head, but it was only showing the bar with the thread controls (View First Unread, Thread Tools, yadda yadda).. Then the rest was just a bunch of blank DIVs, that still had the Post IDs.

Here's the real code:

<div id="posts"><!-- post #4879 -->


<div id="edit4879" style="padding:0px 0px 4px 0px">
<!-- this is not the last post shown on the page -->





</div>


<!-- / post #4879 --><!-- post #4880 -->


<div id="edit4880" style="padding:0px 0px 4px 0px">






</div>


<!-- / post #4880 --><div id="lastpost"></div></div>

This was after the 3rd CLEAN INSTALL, can you please just tell me what settings your product changed? I looked at the install code in the XML but it didn't give me much to go on.
---------------------------------------------------------------

UGHHHHHHHHHHHHHHHHHHHHHHHHH.. It was your Pre-Processes that was doing it.

Great. Just great. I'm 100% positive I made the file edits correctly, too.

Well good. Pre-Processes is uninstalled, and I'm not going to attempt using this hack again.

thincom2000
07-25-2007, 12:50 PM
Okay thanks. It must be a typo or something in the Pre-Processes instructions. Thanks for putting up with this as long as you did.

thincom2000
07-27-2007, 03:32 PM
Thanks to vBulletin 3.6.8 being released, I finally ran into the empty postbit problem again when I upgraded. Apparently my fix for this had been a file edit and never made it into the instructions. I have changed this to plugin code and included it in the new product file, so as far as I can tell, there should no longed be the previously reported issue. :rolleyes:

TheMilkCarton
07-27-2007, 04:10 PM
Apparently my fix for this had been a file edit and never made it into the instructions. I have changed this to plugin code and included it in the new product file, so as far as I can tell, there should no longed be the previously reported issue. :rolleyes:

I'm glad to hear this...

So maybe it was NOT your Pre-processes that was doing it. Hopefully it was just a coincidence.

I'm willing to give this another shot, since you appeared to fix it with the default vB files and had no problem fixing it with a plugin.

Were the only file edits you made the showthread_ and forumdisplay_ preprocesses?

Well, anyway, I'm going to try this again... At least this time going into it, I'll know there's a chance it's going to screw up my Event stuff. The last time when it happened so unexpectedly, I was completely LIVID. :)

I just realllllyy can't justify using the Event Forums mod when it makes forumdisplay use ****80+ queries****, so lets hope this works this time.

thincom2000
07-27-2007, 05:07 PM
Yes the only necessary file edits are the showthread_ and forumdisplay_preprocess instructions.

TheMilkCarton
07-27-2007, 06:08 PM
Well.. there's at least some progress, now.

The first post, (the event) still shows up twice. Once at the top, and once underneath the "Post Reply" button and right before the first comment. EDIT: To clarify, it not only shows the entire event twice, it also somehow duplicates the rsvp_form and rsvp_bits. And to be more precise it puts the 2nd copy directly under the "Thread Tools ---- Search This Thread ---- Rate Thread" bar.

Also, it changes my formatting for "calendar_showeventsbit", and I can't seem to find which template you've replaced the first post with. It's also somehow showing my avatar, username, and user title, much like the horizontal postbit template looks.

Oh, and of course, the spacer_open/close is still out of whack. Everything from the first Post Reply button all the way down to below the Forum Jump is jutting out 10-ish pixels to the right.
-------------------------------------------
If it helps diagnose, the XML disabled 10 of the original event forums plugins, and 1 of the integration Add-On, is this the correct number?

EDIT2: OK... well I deleted "$lv_vb_eventforums_eventdetails" out of "showthread_event" and now it shows the eventbit in the correct place (and only once) :).

EDIT3: All right... I figured out why the layout was messing up. I use vBadvanced to integrate something on the top of many pages, including showthread.php, and I've noticed since using Event Forums + Event Attendance that somehow, one of the products were inserting "calendar_showeventsbit" above the table I've integrated below $navbar, instead of inserting below it.

Well, anyway, I disabled the vBa integration on showthread.php, and that fixes it.... but the layout still shouldn't be breaking. The layout didn't break with Event Forums + Event Attendance + vBa below $navbar, but it does with EF + EA + Your Fix + vBa below $navbar.

EDIT4: Also had to change lv_vb_eventforums_event_comments to:
<if condition="$totalposts == 1">
$spacer_open

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" align="$stylevar[left]"<if condition="$vboptions['legacypostbit']"> colspan="2"</if> valign="top">
$vbphrase[no_comments_event]
</td>
</tr>
</table>
<br />

$spacer_close
</if>
Otherwise it was breaking my layout somewhat. And I got rid of the "Comments" tcat entirely, because placing one tcat under another (the threadtools tcat) looked weird, and I thought the "Comments" tcat was unnecessary anyway.

Well I'm glad to say that I got it working AND looking right!!

Thank you so much for updating this. I went from 84+ queries to 20+ on FORUMDISPLAY and from 35-40+ queries to 17+ on SHOWTHREAD

-------------------------------------------------
EDIT5: Spoke too soon.. When posting a New Event it doesn't create the thread. I've mapped everything appropriately, since the existing threads in the event forums still work as events. When I switch back to the old "eventdata_presave" it created the thread, but since I didn't switch back to the old redirect plugins, it didn't redirect.

Switching back to all the old "eventdata_" plugins seems to fix my problem. Coincidentally, the CPU usage just sky rocketed on my (shared) server, so I sure hope it wasn't me. :)

EDIT6: Well........... "Edit Attachments" doesn't seem to work either. It sends me to "calendar.php?do=edit&e=371"
EDIT7: Well........... "Upcoming Events" on FORUMDISPLAY doesn't work either.

I'm guessing there is a problem with some widely used variable you're using like "$lv_vb_eventforums_threadid" or one of those.

EDIT8: Geeeeez... It's also not adding the date to the end of thread titles. So I'm assuming it's either part of the above problems, or you're not telling it to grab the "Thread Title Format" field from the Event Forums options. Switching back to the old "threadbit_process" makes it work again, but of course the queries on forumdisplay DOUBLE.

thincom2000
07-28-2007, 06:39 AM
lol Thank you for being so thorough. At least now I can narrow down the issues. You should continue to use the old eventdata plugins. I included them in the product when I was feeling a bit more ambitious, then realized doing so would result in a total rewrite of the original Event Forums hack (but it did not seem an errors would occur).

I will also look into upcoming events disappearing on forumdisplay. Strange the spacing still didn't work for you since I recall testing it at multiple spacer settings. I'm surprised the attachments still don't redirect properly since that bug was supposedly fixed but I will look at it again. I believe the current plugins don't try to use the thread title options from the Event options, since I was more concerned as of late actually getting the rest of the hack to work on other setups than mine.

Anyway, I'm glad you finally discovered a conflict with another hack because it was going to drive me nuts figuring that out when I don't even use vBa myself.

TheMilkCarton
07-28-2007, 12:46 PM
Well, the only conflict with vBa was the layout messing up, and it's only because the original Event Forums plugin is inserting the "calendar_showeventsbit" in the same location as the top vBa block.

It should be: $header
$navbar
<!-- vBa Top Block -->
<!-- calendar_showeventsbit -->
but instead it was doing:
$header
$navbar
<!-- calendar_showeventsbit -->
<!-- vBa Top Block -->


So, I just have to figure out where the original mod tells the calendar_showeventsbit to insert right below $navbar.

Although, really, the original mod shouldn't be trying to insert anything, since YOUR mod is also trying to insert the same thing in another location. :) But like I said, I already deleted "$lv_vb_eventforums_eventdetails" from showthread_event to get rid of the duplicates.

thincom2000
07-28-2007, 05:40 PM
It's a setting in the Event Forums options. Choose the option that says you will edit the showthread template yourself. You shouldn't have to do anything else except tick that option.

thincom2000
07-28-2007, 08:54 PM
I think I fixed pretty much everything you complained about in your last post in the new product. Let me know if you find anything else. :)

TheMilkCarton
07-29-2007, 09:31 AM
All right. I turned off the automatic template edit and am using the $lv_vb_eventforums_eventdetails variable now, just to narrow down WHY things aren't working for me.

The update seemed to fix the FORUMDISPLAY issues... Custom fields and the Event Date now show in the threadbits, and still only use 26 queries, instead of 52!! :)

However, Edit Attachments still takes me to calendar.php. And the "eventdata_" plugins that come with YOUR product still aren't working.

The only thing I really care about is Edit Attachments. I'm fine with using the old "eventdata_" plugins. To narrow things down a bit, how did you "fix" Edit Attachments in this last update? Was it just a plugin edit? If it were a template edit, then I know why it's not working for me, since my templates are customized and wouldn't have been updated with 1.1.3

thincom2000
07-29-2007, 04:01 PM
If you modified showthread_event you will need to revert it in 1.1.3. I usually include a list of updated templates in my hacks but I guess I didn't think of it for this one. However, the new version of the calendar_manage_start plugin should have fixed the attachments issue.

Try changing the Execute Order for the calendar_manage_start plugin to 1.

TheMilkCarton
07-29-2007, 04:23 PM
I compared the templates and there is nothing functional changed. You do insert a </form> before the $lv_vb_eventforums_eventdetails and then begin the inline mod form after it, but I don't have my $lv_vb_eventforums_eventdetails in that location anyway. I did add "name="iform"" to the inline mod form, however. Since I guess you did that in case the Event form and Inline Mod form were clashing.

I changed the Execute Order to 1 and still nothing.

It's not even trying to send me to editpost.php so if ($vbulletin->GPC['what'] == 'attach') is somehow false, or maybe "if (intval($_GET['attach']) == 1)" is coming up false.

If the condition were true then it should at LEAST be trying to send me to something like "/editpost.php?p=&attach=1" with a blank postid, if it were the query that wasn't grabbing the firstpostid correctly.

OK. So I entered "editpost.php?p=4911&attach=1" where 4911 is the firstpostid of one of my events, and it redirects me to calendar.php...

So can you tell me exactly what plugins need to be DISABLED on the old Event Forums mod? Something might still be enabled when it shouldn't be.

thincom2000
07-29-2007, 07:46 PM
Maybe the old editpost_edit_start plugin is still enabled. I just checked the install code and the product doesn't automatically disable it, so this is probably the issue.

TheMilkCarton
07-29-2007, 08:53 PM
Yeah, that's probably it. LOL. :)

Sorry, there were far too many plugins between your product and the old one to try and sort out plugins at duplicate hooks. Especially when it involves scrolling from one end of the plugin page to another.

Oh, and I totally lied about FORUMDISPLAY working 100%. I forgot about testing out Upcoming Events... and well it's still not working.

thincom2000
07-29-2007, 10:46 PM
Set the Event Forums setting "Number of days in the Summary" to a high number to be sure. Also make sure "Show Summary" is set to Yes.

When I installed the new version I thought there was a problem too but I couldn't find one in the code and for me the issue just ended up being these settings. Keep in mind that it only shows events that have been posted in that forum (I don't think it includes subforums).

And by the way, you can find duplicate plugins easily in the vB default Plugin Manager by sorting by hook location instead of product.

MPDesignZ
11-30-2007, 06:52 PM
Hi I need to know how to get the attachments part to work on this? Or is there a way I can simply add attachments to my events?

MP

AWJunkies
11-30-2007, 08:44 PM
No offense but this is a pointless mod and should be integrated into the original mods you are trying to transform to decrease and speed up. You should contact the owners of the other mods and just integrate them.

Installed 4+ mods just for one function events is out of control. They all should be integrated as one.

That is easier on the user and easier for removal and adding the mod. It also allows for easier upgrading and development for future add-ons. I can go on and on but will leave it at that.

Your mod is GREAT and thank you for it and its objective not bashing your coding in any way.

TheMilkCarton
01-06-2008, 04:28 PM
Quite awhile ago I was helping you sort out the mess this hack was making and we actually got it working, but I happened to forget about the Events still not being listed on FORUMDISPLAY.

I was doing a calendar mod for something else when I realized that using the Event Forums hack with this patch is causing the events to not cache to the datastore in the database.

I can't seem to sort out which plugin is causing the problem so if you're not having any problems or don't have time to work on this can you at least point me in the right direction? It seems every time I get on here to complain about one of your mods not working you do a great job with helping out, so I'll just cross my fingers and hope I hear back. :)

Caerydd
01-28-2008, 09:31 AM
Quite awhile ago I was helping you sort out the mess this hack was making and we actually got it working, but I happened to forget about the Events still not being listed on FORUMDISPLAY.

I was doing a calendar mod for something else when I realized that using the Event Forums hack with this patch is causing the events to not cache to the datastore in the database.

I can't seem to sort out which plugin is causing the problem so if you're not having any problems or don't have time to work on this can you at least point me in the right direction? It seems every time I get on here to complain about one of your mods not working you do a great job with helping out, so I'll just cross my fingers and hope I hear back. :)


I hope you do get some help. The Event Forums causing events not to cache is a BIG headache for me, as my vba/vbulletin site relies on me being able to gather up Upcoming events from many different Calenders to present them to my users. Good Luck!

thincom2000
02-22-2008, 06:28 PM
I will be releasing a better and easier to install version by the end of this weekend. For now, I have a presentation to get ready for. I'll keep you posted.

thincom2000
03-02-2008, 07:23 AM
I'm pretty close to releasing this update now. Just a forewarning that the "fully-integrated" version uses vBulletin 3.7 templates, so it will require 3.7 or later and I will be releasing it in a separate thread.

Cerbero1000
03-31-2009, 11:57 PM
any news???

OcR Envy
04-24-2009, 12:57 PM
Very interested in this as well. However when I attempted it completely fubared my install of event forums.

jnrdavo
12-28-2009, 04:53 AM
I've been using this mod on 4 of my forums very successfully for quite a while now.

I'm slowly moving my forums over to V4, but alas, this mod does not work.

Here's hoping that it can get re-written for V4 as I think it's a must compared to what is standard :D