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)

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


All times are GMT. The time now is 09:37 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.01423 seconds
  • Memory Usage 1,822KB
  • 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
  • (10)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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