Version: 1.00, by deathemperor
Developer Last Online: Jul 2011
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/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'.
When I try that, I get a user not allowed permissions error. I went into the admincp and for admin, the search calender option is set to 'yes'. I probably typo'd something... i'll have to check the code edits when im more awake.
it may be because you have not 'save' the usergroup permission in the first time so that it takes effect. I believe the code is ok since ppl is searching finely.
Installed this on a 303 with event attendance. All went fine, but when trying to add a comment or quote a existing comment this error pops up (the comments get added into the db all ok):
// calculating which page the comment edited or posted is in
$perpage = $vboptions['evecomperpage'];
$countq = $DB_site->query("SELECT * FROM eventcomments WHERE eventid=$e");
$evecomcount = $DB_site->num_rows($countq);
$evepage = ceil($evecomcount/$perpage);
// query the newest comment
$thisevecom = $DB_site->query_first("SELECT evecomid FROM eventcomments WHERE evecomtitle = '" . addslashes($title) . "' ORDER BY evecomdateline DESC LIMIT 1");
$url = "calendar.php?$session[sessionurl]do=getinfo&e=$e&page=$evepage#comment$thisevecom[evecomid]";
eval(print_standard_redirect('redirect_postthanks'));
}
REPLACE WITH:
PHP Code:
// calculating which page the comment edited or posted is in
$perpage = $vboptions['evecomperpage'];
$countq = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "eventcomments WHERE eventid=$e");
$evecomcount = $DB_site->num_rows($countq);
$evepage = ceil($evecomcount/$perpage);
// query the newest comment
$thisevecom = $DB_site->query_first("SELECT evecomid FROM " . TABLE_PREFIX . "eventcomments WHERE evecomtitle = '" . addslashes($title) . "' ORDER BY evecomdateline DESC LIMIT 1");
$url = "calendar.php?$session[sessionurl]do=getinfo&e=$e&page=$evepage#comment$thisevecom[evecomid]";
eval(print_standard_redirect('redirect_postthanks'));
}