Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Calendar Search and Comments for Events Details »»
Calendar Search and Comments for Events
Version: 1.00, by deathemperor deathemperor is offline
Developer Last Online: Jul 2011 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 03-15-2005 Last Update: 09-14-2005 Installs: 26
DB Changes
 
No support by the author.

This hack I made was a paid request by Lee Wilde, the thread can be found here: https://vborg.vbsupport.ru/showthread.php?t=74337 . He and I want to release this to public because Lee Wilde believed that there're alot of members looking for this.

*UPDATE: 03/28/2005

If you installed this hack before 03/28/2005, to fix search bugs please rehack the file calendar.php


*UPDATE: 03/23/2005

Fixed 2 table_prefix mistaken, please read this post: https://vborg.vbsupport.ru/showpost....0&postcount=38

*UPDATE: 03/17/2005 fixed avatar disable problem and a minor wrong in instructions.txt

TO FIX avatar disable:

FIND:

PHP Code:
SELECT eventcomments.*, event.lastevecomdateline,user.*,userfield.*,usertextfield.signature customavatar.dateline AS avatardateline FROM " . TABLE_PREFIX . "eventcomments AS eventcomments 
REPLACE WITH:

PHP Code:
SELECT eventcomments.*, event.lastevecomdateline,user.*,userfield.*,usertextfield.signature " . iif($vboptions['avatarenabled'], "customavatar.dateline AS avatardateline") . " FROM " . TABLE_PREFIX . "eventcomments AS eventcomments 



What does this hack do ?

Give your users ability to search for Events on Calendar.
Ability to add comments for events.

The permission is usergroup based:
  • Viewing permission.
  • Post Comments.
  • Edit Own comments.
  • Edit Others comments.
  • Delete Own comments.
  • Delete Other comments.
  • Search Events.


Files edit: 3
New Template: 7
Templates Edit:1
Database: 1 new table, 2 new column for table 'event'.

Installation time: less than 10 minutes.

Screenshots: (thanks to Lee Wilde).

Search Events: https://vborg.vbsupport.ru/attachmen...chmentid=24795

event_with_quickreply_enabled : https://vborg.vbsupport.ru/attachmen...chmentid=24793
event_with_reply_added : https://vborg.vbsupport.ru/attachmen...chmentid=24794

Credits: The installer I use is from V3 Article with permission from John so the credit goes to him.

Last words: I will try to help with all the problems *in cases* may occur.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 03-17-2005, 01:57 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I placed the search in the navbar under a drop down for calendar as a link. It would be nice to be able to use with vbaCMS. The old module does not recognize the events id
Reply With Quote
  #23  
Old 03-17-2005, 02:54 PM
Leeper Leeper is offline
 
Join Date: Nov 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hit a snag. My signature block comes up as code. Any ideas? Link
Reply With Quote
  #24  
Old 03-18-2005, 02:54 AM
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Location: Las Cruces, NM
Posts: 473
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A couple of problems I'm having:

The avatar link is broken
The drop-down on the user name has some weird code in it
The signature is not recognizing line breaks
When trying to delete a comment I get:

Quote:
Invalid SQL: UPDATE event SET totalcom = totalcom - 1,lastevecomdateline= WHERE eventid=94
mysql error: You have an error in your SQL syntax near 'WHERE eventid=94' at line 1

mysql error number: 1064
Here is an example:
http://www.churchmedia.net/community...-4-19&e=94&c=4
Reply With Quote
  #25  
Old 03-18-2005, 04:13 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here the fix for the error when trying to delete comments:

in calendar.php find:

PHP Code:
$DB_site->query("DELETE FROM " TABLE_PREFIX "eventcomments WHERE evecomid=$id");
            
            
$lastevecom $DB_site->query_first("SELECT * FROM " TABLE_PREFIX "eventcomments ORDER BY evecomdateline DESC LIMIT 1");
            
$DB_site->query("UPDATE " TABLE_PREFIX "event SET totalcom = totalcom - 1,lastevecomdateline=$lastevecom[evecomdateline] WHERE eventid=$e"); 
REPLACE IT WITH:

PHP Code:
$DB_site->query("DELETE FROM " TABLE_PREFIX "eventcomments WHERE 

evecomid=
$id");
            
            
$lastevecom $DB_site->query_first("SELECT * FROM " TABLE_PREFIX 

"eventcomments ORDER BY evecomdateline DESC LIMIT 1");
            
$lastevequery '';
            if(
is_array($lastevecom) && !empty($lastevecom[evecomdateline]))
            {
                

$lastevequery=",lastevecomdateline=$lastevecom[evecomdateline]";
            }
            
$DB_site->query("UPDATE " TABLE_PREFIX "event SET totalcom = 

totalcom - 1 
$lastevequery WHERE eventid=$e"); 
let me know if it works, I am currently away from my PC so I can't do any deep fix. I'll fix the signature problem soon.

Thanks everyone very much for your kind words.
Reply With Quote
  #26  
Old 03-18-2005, 04:38 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Am I missing something? Do I need to apply that fix? I am able to delete comments, events no problems, so I am not sure if I should do it or not....
Reply With Quote
  #27  
Old 03-18-2005, 04:53 AM
Lee Wilde's Avatar
Lee Wilde Lee Wilde is offline
 
Join Date: Apr 2004
Location: Perth, Australia
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If it aint broke, don't fix it Lionel ;-)

We have all customised our forums in different ways, so we may experience different problems. So far the only problem I've seen on mine is the signature not displaying correctly, but deathemperor will provide a fix for that soon I'm sure.
Reply With Quote
  #28  
Old 03-18-2005, 11:55 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
Am I missing something? Do I need to apply that fix? I am able to delete comments, events no problems, so I am not sure if I should do it or not....
that problem occurs when you have only one comment in an event, So I recommend anyone who installed this hack apply the fix.


SIGNATURE FIX: in calendar.php FIND:

PHP Code:
$eventcomment['evecombody'] = fetch_censored_text($eventcomment['evecombody']); 
ADD BELOW (actually it's possible to add above ^^):

PHP Code:
$eventcomment['signature'] = parse_bbcode($eventcomment['signature'], 01); 
zip updated.
Reply With Quote
  #29  
Old 03-18-2005, 06:54 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did not have the delete problem under the conditions that you said. I updated and I got
Quote:
Database error in vBulletin 3.0.7:

Invalid SQL: UPDATE event SET totalcom =

totalcom - 1 ,lastevecomdateline=$lastevecom[evecomdateline] WHERE eventid=42
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '[evecomdateline] WHERE eventid=42' at line 3

mysql error number: 1064
So I reverted and all is fine.

mysql database 4.03
Reply With Quote
  #30  
Old 03-19-2005, 12:22 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry, to fix that: find:

PHP Code:
$lastevequery=',lastevecomdateline=$lastevecom[evecomdateline]'
replace with:
PHP Code:
$lastevequery=",lastevecomdateline=$lastevecom[evecomdateline]"
updated fix post above.
Reply With Quote
  #31  
Old 03-19-2005, 01:57 AM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

that works, thanks.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 02:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08751 seconds
  • Memory Usage 2,336KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete