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'.
Sorry, I was having a trip.
To fix that do the following:
find in caledar.php:
PHP Code:
switch($searchfor)
{
case 'event':
// search for song(s)
$searchfor_query = "event.title LIKE '%$keyword%'";
// $searchfor_subquery = "OR event.event LIKE '%$keyword%'";
$searchin = "event";
break;
case 'eventcomments':
// search for singer(s)
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchfor_subquery = "OR eventcomments.evecombody LIKE '%$keyword%'";
$searchin = "eventcomments";
break;
default:
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchin = "eventcomments";
}
REPLACE IT WITH:
PHP Code:
switch($searchfor)
{
case 'event':
// search for song(s)
$searchfor_query = "event.title LIKE '%$keyword%'";
// $searchfor_subquery = "OR event.event LIKE '%$keyword%'";
$searchin = "event AS event";
break;
case 'eventcomments':
// search for singer(s)
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchfor_subquery = "OR eventcomments.evecombody LIKE '%$keyword%'";
$searchin = "eventcomments AS eventcomments";
break;
default:
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchin = "eventcomments AS eventcomments";
}
Sorry, I was having a trip.
To fix that do the following:
find in caledar.php:
PHP Code:
switch($searchfor)
{
case 'event':
// search for song(s)
$searchfor_query = "event.title LIKE '%$keyword%'";
// $searchfor_subquery = "OR event.event LIKE '%$keyword%'";
$searchin = "event";
break;
case 'eventcomments':
// search for singer(s)
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchfor_subquery = "OR eventcomments.evecombody LIKE '%$keyword%'";
$searchin = "eventcomments";
break;
default:
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchin = "eventcomments";
}
REPLACE IT WITH:
PHP Code:
switch($searchfor)
{
case 'event':
// search for song(s)
$searchfor_query = "event.title LIKE '%$keyword%'";
// $searchfor_subquery = "OR event.event LIKE '%$keyword%'";
$searchin = "event AS event";
break;
case 'eventcomments':
// search for singer(s)
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchfor_subquery = "OR eventcomments.evecombody LIKE '%$keyword%'";
$searchin = "eventcomments AS eventcomments";
break;
default:
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchin = "eventcomments AS eventcomments";
}
@VB-Fanatiker, yep those can be made.
I tried the above and get this error:
Database error in vBulletin 3.0.7:
Quote:
Invalid SQL:
SELECT event AS event.*,user.*
FROM vb3_event AS event
LEFT JOIN vb3_user AS user ON (user.userid=event AS event.userid)
WHERE event.title LIKE '%council%'
ORDER BY evecomtitle DESC
LIMIT 10
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 '.*,user.*
FROM vb3_event AS event
LEFT JOIN vb3_user
This has been a long awaited hack my site has been dyerly needing. I have since controlled my event posting via a fourm, so I have many threads spanning now until mid year. some with pages of posts. what I need is an importer where I could fill in the details and a thread location and it would then port them into this system. is that a large job? it would be fantastic, im willing to exchange graphic work for such an importer.
Thanks ether way, love the calendar mods
also, I have some possible write work for you too deathemperor. a special profiles section, but first I need to impliment this.
anyway to add a special "new posts" link for the calendar comments?
switch($searchfor)
{
case 'event':
// search for song(s)
$searchfor_query = "event.title LIKE '%$keyword%'";
// $searchfor_subquery = "OR event.event LIKE '%$keyword%'";
$searchin = "event AS event";
break;
case 'eventcomments':
// search for singer(s)
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchfor_subquery = "OR eventcomments.evecombody LIKE '%$keyword%'";
$searchin = "eventcomments AS eventcomments";
break;
default:
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchin = "eventcomments AS eventcomments";
}
REPLACE WITH:
PHP Code:
switch($searchfor)
{
case 'event':
// search for song(s)
$searchfor_query = "event.title LIKE '%$keyword%'";
// $searchfor_subquery = "OR event.event LIKE '%$keyword%'";
$searchin = "event";
$as = " AS event";
break;
case 'eventcomments':
// search for singer(s)
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchfor_subquery = "OR eventcomments.evecombody LIKE '%$keyword%'";
$searchin = "eventcomments AS eventcomments";
$as = " AS eventcomments";
break;
default:
$searchfor_query = "eventcomments.evecomtitle LIKE '%$keyword%'";
$searchin = "eventcomments AS eventcomments";
}
FIND:
PHP Code:
$eventsearch = $DB_site->query("
SELECT $searchin.*,user.* $evetitle FROM " . TABLE_PREFIX . "$searchin LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid=$searchin.$usereve)
$evejoin WHERE $searchfor_query$searchfor_subquery$searchfor_query1$searchfor_query2 ORDER BY $order_by$order LIMIT 10
");
REPLACE WITH
PHP Code:
$eventsearch = $DB_site->query("
SELECT $searchin.*,user.* $evetitle FROM " . TABLE_PREFIX . "$searchin$as LEFT JOIN " . TABLE_PREFIX . "user AS user ON (user.userid=$searchin.$usereve)
$evejoin WHERE $searchfor_query$searchfor_subquery$searchfor_query1$searchfor_query2 ORDER BY $order_by$order LIMIT 10
");
zip updated.
Quote:
Originally Posted by snyx
anyway to add a special "new posts" link for the calendar comments?