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)

Reeve of shinra 03-22-2005 03:42 AM

Thank you for releasing this hack. In retrospect, I cant believe you cant search for calander events making this very much needed.

Reeve of shinra 03-22-2005 03:57 AM

Maybe I missed something but how does a user access the search?

deathemperor 03-22-2005 04:49 AM

you can use: http://YOURSITE.com/FORUM/calendar.php?do=search for the link to event search.

Reeve of shinra 03-22-2005 05:13 AM

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.

deathemperor 03-22-2005 05:35 AM

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.

Reeve of shinra 03-22-2005 05:46 AM

Ah that was it. I knew it had to be something simple lol

Thanks!

MikaK 03-23-2005 07:12 AM

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):

Quote:

Database error in vBulletin 3.0.3:
Invalid SQL: SELECT * FROM eventcomments WHERE eventid=12
mysql error: Table 'soundchi_loudlounge.eventcomments' doesn't exist
mysql error number: 1146
Date: Wednesday 23rd of March 2005 12:45:51 AM
Script: http://www.soundchilds.net/loud_lounge/calendar.php
Referer: http://www.soundchilds.net/loud_loun...newevecom&e=12
Username: MikaK
IP Address: xxx
my table is using a prefix 'scll' so it should be sclleventcomments.

Certainly hope there is a fix around for the mysql error. This is one hell of a handy hack:banana:

Regs,
-Mika

deathemperor 03-23-2005 02:36 PM

OOPS !

my bad mistake, I missed 2 table_prefix.

TO FIX:

IN calendar.php FIND:

PHP Code:

    // 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'));


zip updated.

MikaK 03-23-2005 03:02 PM

Quote:

Originally Posted by deathemperor
OOPS !

my bad mistake, I missed 2 table_prefix.

Worked like a treat:) Tnx.

deathemperor 03-23-2005 04:29 PM

no prob.

I'm glad to hear that.


All times are GMT. The time now is 06:08 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.01294 seconds
  • Memory Usage 1,752KB
  • 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
  • (2)bbcode_php_printable
  • (2)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