vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Calendar Search and Comments for Events (https://vborg.vbsupport.ru/showthread.php?t=78210)

snyx 03-24-2005 04:37 AM

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.

deathemperor 03-24-2005 12:29 PM

an importer like you want is really complex, beside I've never done something like that, it would take alot of time.

Glad to hear you love it.

VB-Fanatiker 03-24-2005 11:23 PM

*vB-Fanatiker klicks install*

Great hack, thanks deathemperor !

Why this hack search only in the event titles and comments but not in the event details?
And is it possible to change this hack to search in new calendercustomfields else?

P.S.: Sorry for my bad schoolenglish, I'm german.

deathemperor 03-25-2005 02:55 AM

the search was supposed to be simple, it can be improved however.

what do you mean by calendercustomfields ?

remember that search function is one of the most simple things so to add this and that isn't hard.

YLP1 03-25-2005 03:26 AM

I am recieving the following error when trying to search:

Quote:

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT *
FROM vb3_event
WHERE event.title LIKE '%christmas%'

mysql error: Unknown table 'event' in where clause

mysql error number: 1109

Date: Thursday 24th of March 2005 11:30:55 PM
Script: http://www.yourlincolnpark.com/LPSFo...er=after&pp=10
Referer: http://www.yourlincolnpark.com/LPSFo....php?do=search
Username: Me
IP Address: myIP
How can I fix this? Any help is greatly appreciated.

VB-Fanatiker 03-25-2005 04:25 AM

Quote:

Originally Posted by deathemperor
the search was supposed to be simple, it can be improved however.

what do you mean by calendercustomfields ?

remember that search function is one of the most simple things so to add this and that isn't hard.

Thank you for your fast reply. :squareeyed:
I mean that the search also must be done in the event details. Do you know, how can we make this?

The "calendercustomfields" can be created in the ACP of the calendar. It's a very cool function for arrange the entrys. ;)

YLP1 03-25-2005 04:23 PM

Quote:

am recieving the following error when trying to search:


Quote:
Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT *
FROM vb3_event
WHERE event.title LIKE '%christmas%'

mysql error: Unknown table 'event' in where clause

mysql error number: 1109

Date: Thursday 24th of March 2005 11:30:55 PM
Script: http://www.yourlincolnpark.com/LPSF...ter=after&pp=10
Referer: http://www.yourlincolnpark.com/LPSF...r.php?do=search
Username: Me
IP Address: myIP

How can I fix this? Any help is greatly appreciated.
Quote:

Database error in vBulletin 3.0.7:

Invalid SQL:
SELECT *
FROM vb3_eventcomments
WHERE eventcomments.evecomtitle LIKE '%council%'

mysql error: Unknown table 'eventcomments' in where clause

mysql error number: 1109

Date: Friday 25th of March 2005 01:24:55 PM
Script: http://www.yourlincolnpark.com/LPSFo...er=after&pp=10
Referer: calendar.php?do=search
I have been trying to fix this but I don't know much about PHP...I did figure out that this error is similar to any type of search by Title, comments, etc.

Please advise on how I can fix this. Thanks in advance.

VB-Fanatiker 03-25-2005 07:47 PM

Quote:

Originally Posted by YLP1
I have been trying to fix this but I don't know much about PHP...I did figure out that this error is similar to any type of search by Title, comments, etc.

Please advise on how I can fix this. Thanks in advance.

There are missing tables in the database. Have you done the changes at the end of this hack?
Quote:

upload evecom_install.php to you Admincp folder and run it
etc.

YLP1 03-25-2005 08:53 PM

Quote:

Originally Posted by VB-Fanatiker
There are missing tables in the database. Have you done the changes at the end of this hack?

etc.

Yeppers I ran the install.....I ran it again just to be sure and this is the error I received:


Quote:

Database error in vBulletin 3.0.7:

Invalid SQL:
CREATE TABLE `vb3_eventcomments` (
`evecomid` int(10) unsigned NOT NULL auto_increment,
`evecomiconid` int(10) unsigned NOT NULL default '0',
`eventid` int(10) unsigned NOT NULL default '0',
`evecomtitle` varchar(250) default NULL,
`evecombody` longtext NOT NULL,
`evecomdateline` int(10) unsigned NOT NULL default '0',
`evecomusername` varchar(250) NOT NULL default '',
`evecomuserid` int(10) unsigned NOT NULL default '0',
`evecomhash` varchar(32) NOT NULL default '',
`valid` tinyint(1) unsigned NOT NULL default '1',
PRIMARY KEY (`evecomid`)
) TYPE=MyISAM

mysql error: Table 'vb3_eventcomments' already exists

mysql error number: 1050

Date: Friday 25th of March 2005 05:53:48 PM
Script: ***admin/evecom_install.php
Referer: ***/evecom_install.php
Username: Robin
IP Address:
Looks like these were already created. What else could be causing the errors?

Thanks in advance.

Edited to add: I confirmed that I have the tables of
vb3_event
- allowsmilies
- calendarid
- customfields
- dateline
- dateline_from
- dateline_to
- event
- eventid
- lastevecomdateline
- recuroption
- recurring
- title
- totalcom
- userid
- utc
- visible


and vb3_eventcomments has these:
- evecombody
- evecomdateline
- evecomhash
- evecomiconid
- evecomid
- evecomtitle
- evecomuserid
- evecomusername
- eventid
- valid

I also uninstalled and reinstalled and went over the instruction three times yet everything works except the search of title, dates, comments, etc.

YLP1 03-26-2005 10:41 AM

I am sorry to be a pest and such a newbie at coding but I have researched the error code and studied up on the coding to see if I could fix it alas...I can't figure out and I am getting errors on all the search functions of this mod and really need guidance on how to fix this.

deathemperor 03-26-2005 11:25 AM

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.

VB-Fanatiker 03-26-2005 12:44 PM

Quote:

Originally Posted by deathemperor
@VB-Fanatiker, yep those can be made.

Sorry, I'm not a coder. Do you know, what we must change in this hack to seach in the event details too? :cheeky:
Thats very important for us.

deathemperor 03-26-2005 12:53 PM

If you like I'll upgrade this to have that options later. just give me sometimes cuz it's soon my birthday ^^

VB-Fanatiker 03-26-2005 01:23 PM

@deathemperor
That would be very, very friendly! :banana:
Wish a nice birthday!

YLP1 03-26-2005 06:32 PM

Quote:

Originally Posted by deathemperor
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

mysql error number: 1064

Date: Saturday 26th of March 2005 03:31:20 PM
Script: http://www.yourlincolnpark.com/LPSFo...er=after&pp=10
Referer: http://www.yourlincolnpark.com/LPSFo....php?do=search
Username: Robin
IP Address: myip

snyx 03-26-2005 08:04 PM

Quote:

Originally Posted by snyx
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?

deathemperor 03-27-2005 08:20 AM

@YLP1:

FIND:

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";            
        } 

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?

what do you mean ?

YLP1 03-27-2005 01:21 PM

Quote:

Originally Posted by deathemperor
@YLP1:

Hi deathemperor, I made the changes you posted and this is error I received:

Quote:

Invalid SQL:
SELECT *
FROM vb3_event
WHERE event.title LIKE '%council%'

mysql error: Unknown table 'event' in where clause

mysql error number: 1109

Date: Sunday 27th of March 2005 10:20:47 AM
Script: http://www.yourlincolnpark.com/LPSFo...er=after&pp=10
Referer: http://www.yourlincolnpark.com/LPSFo....php?do=search
It's not liking the where clause again. This query stuff confuses me to no end LOL

deathemperor 03-27-2005 10:06 PM

it's because I was too tired, having one day under the 38 C degree Sun.

make this change:

FIND:

PHP Code:

        $eventsearchcount $DB_site->query("
                SELECT * 
                FROM " 
TABLE_PREFIX "$searchin 
                WHERE 
$searchfor_query $searchfor_subquery $searchfor_query2 
        "
); 

REPLACE WITH:
PHP Code:

        $eventsearchcount $DB_site->query("
                SELECT * 
                FROM " 
TABLE_PREFIX "$searchin $as
                WHERE 
$searchfor_query $searchfor_subquery $searchfor_query2 
        "
); 


MikaK 03-28-2005 07:24 AM

Would it be difficult to hack in events ratings?

Regs,
-Mika

deathemperor 03-28-2005 08:00 AM

you mean you want to rate for events ?

this isn't too hard too make tho, it will be included in the next version when I have time.

MikaK 03-28-2005 09:39 AM

Quote:

Originally Posted by deathemperor
you mean you want to rate for events ?

this isn't too hard too make tho, it will be included in the next version when I have time.

Sounds good. Would definately suite my needs.

I still get a my sql error when searching for eventcomments:

Code:

 
Database error in vBulletin 3.0.3:
Invalid SQL:
        SELECT *
        FROM sclleventcomments 
        WHERE eventcomments.evecomtitle LIKE '%house%' 
 
mysql error: Unknown table 'eventcomments' in where clause
mysql error number: 1109
Date: Monday 28th of March 2005 03:35:31 AM

I had my bb set with the prefix "scll" so probably a missing prefix case.

Regs,
-Mika

deathemperor 03-28-2005 09:55 AM

pm sent

deathemperor 03-28-2005 10:52 AM

*UPDATE: 03/28/2005

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

this happens only on board using table prefix

MikaK 03-28-2005 11:05 AM

Quote:

Originally Posted by deathemperor
*UPDATE: 03/28/2005

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

this happens only on board using table prefix

Can you specify some more details ie. do you mean a specific section of the installation text file or re-running the install script?

Regs,
-Mika

deathemperor 03-28-2005 11:11 AM

re edit all the steps you made for calendar.php,

I suggest you upload the new calendar.php and make the edit as in the instruction file.

MikaK 03-28-2005 11:21 AM

Quote:

Originally Posted by deathemperor
re edit all the steps you made for calendar.php,

I suggest you upload the new calendar.php and make the edit as in the instruction file.

Ok. tnx. On my way.

=M=

nexialys 03-28-2005 12:07 PM

@deathemperor...

i see in the installer that there is a Step 3 for language insertions, but there is only one phrase added... why this ?!... will you do the entire hack updated to add the phrases in the system?... because this step is actually useless... (my 2cents).. i would prefer having this done in $vbphrases, so we can translate the hack!!!

thanks anyway.. i love it - even if i will install it once in $vbphrase only!

deathemperor 03-28-2005 02:04 PM

the installer is simply one script I use to make all the installers for my hacks, basicly it always have those steps. it's not about I have that step in, it's about making all the phrase, the only phrase I added was because I got to add it in, it's the front end error message.. I'll consider it in the next version.

snyx 03-28-2005 08:10 PM

Quote:

Originally Posted by deathemperor
what do you mean ?

Well there is a "New Posts" link which outputs the new posts/threads made in the forums. Whats the chance of having a seperate "New Comments" link for posting done in the Calendar?

deathemperor 03-28-2005 11:16 PM

Quote:

Originally Posted by snyx
Well there is a "New Posts" link which outputs the new posts/threads made in the forums. Whats the chance of having a seperate "New Comments" link for posting done in the Calendar?

it cannot be made, because this is just "New reply" not a "new thread" you know, "new thread" here only means making a new event.

snyx 04-02-2005 05:17 AM

Quote:

Originally Posted by deathemperor
it cannot be made, because this is just "New reply" not a "new thread" you know, "new thread" here only means making a new event.

grumble, that about bold/unbold event titles on calendar depending on new/no replies

YLP1 04-03-2005 04:22 AM

Quote:

Originally Posted by deathemperor
it's because I was too tired, having one day under the 38 C degree Sun.

make this change:

FIND:

PHP Code:

        $eventsearchcount $DB_site->query("
                SELECT * 
                FROM " 
TABLE_PREFIX "$searchin 
                WHERE 
$searchfor_query $searchfor_subquery $searchfor_query2 
        "
); 

REPLACE WITH:
PHP Code:

        $eventsearchcount $DB_site->query("
                SELECT * 
                FROM " 
TABLE_PREFIX "$searchin $as
                WHERE 
$searchfor_query $searchfor_subquery $searchfor_query2 
        "
); 



Thank You Bunches.... I am all working now...

VB-Fanatiker 04-09-2005 07:25 PM

Quote:

Originally Posted by deathemperor
If you like I'll upgrade this to have that options later. just give me sometimes cuz it's soon my birthday ^^

Hi deathemperor,

you already in the last 2 weeks thought about it, to make the event details searchable? :nervous:
That would be great, thanks a lot!

VB-Fanatiker

YLP1 04-12-2005 01:32 AM

I have a question...how do I fix this broken avatar link? I'm not sure why it's pulling from where it's pulling shouldn't pull from the member's chosen avatar? How do I fix this?

Any help is greatly appreciated.

provedel 04-12-2005 12:09 PM

Quote:

Originally Posted by YLP1
I have a question...how do I fix this broken avatar link? I'm not sure why it's pulling from where it's pulling shouldn't pull from the member's chosen avatar? How do I fix this?

Any help is greatly appreciated.

Same here...
On the forum, my avatar point to forums/customavatars/avatar1_0.gif

In Calendar the missing avatar point to forums/customavatars/avatar_0.gif

Note!
My avatars are currently being served from the filesystem, not from Database!!!

Thanks in advance...

YLP1 04-12-2005 08:35 PM

I have another question...when there are more than one event on a given calendar day, how would I a little icon like a bullet or something to indicate each calendar item.

If you look at the calendar graphic I have attached, you will see that on this calendar day I have three events (not including the birthday).

I have also attached a graphic that shows calendar events without use of the mini calendar as well. The bullet icon would make it much easier to identify each event.

These events are seperated by a dotted line, I would like to put an icon or bullet in front of each event entry to identify better each event.

How would I do that?

Thanks in advance.

YLP1 04-17-2005 02:45 AM

Quote:

Originally Posted by provedel
Same here...
On the forum, my avatar point to forums/customavatars/avatar1_0.gif

In Calendar the missing avatar point to forums/customavatars/avatar_0.gif

Note!
My avatars are currently being served from the filesystem, not from Database!!!

Thanks in advance...

I still can't figure out how to fix this unless a hard link is entered but I am not sure where to put that URL to customavatars.

In looking at the code and the size of the Avatar it looks like the normal size avatars are made smaller??!??

I dunno....any help to fix this is greatly appreicated.

KTBleeding 04-17-2005 04:05 AM

Will this hack search custom calendar field content?

VB-Fanatiker 04-18-2005 11:27 PM

Quote:

Originally Posted by KTBleeding
Will this hack search custom calendar field content?

No.
I need this feature also!!!
:rolleyes:


All times are GMT. The time now is 11:47 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01815 seconds
  • Memory Usage 1,940KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (12)bbcode_php_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete