Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 12-08-2004, 01:17 AM
Roo Roo is offline
 
Join Date: Dec 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Another Parse Error

ok I am getting my parse error from this line off script in functions.php, but I think I have looked at it too long and I can't see what in it's causing it:

if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR (THIS_SCRIPT == 'adv_index' AND $vboptions['showcalendar']) OR (THIS_SCRIPT == 'index' AND $vboptions['showevents']))

HELP! :ermm:
Reply With Quote
  #2  
Old 12-08-2004, 02:35 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Roo
ok I am getting my parse error from this line off script in functions.php, but I think I have looked at it too long and I can't see what in it's causing it:

if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR (THIS_SCRIPT == 'adv_index' AND $vboptions['showcalendar']) OR (THIS_SCRIPT == 'index' AND $vboptions['showevents']))

HELP! :ermm:
Well whats the error, try adding ; to the end of that line
Reply With Quote
  #3  
Old 12-08-2004, 03:10 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Posting that whole section of code might give us a glimpse as to what's wrong.
Reply With Quote
  #4  
Old 12-08-2004, 03:17 AM
Roo Roo is offline
 
Join Date: Dec 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK Im trying to install vBadvanced CMPS and everything is fine until I replace this line in functions.php:
if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR (THIS_SCRIPT == 'index' AND $vboptions['showevents']))

with this:

if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR (THIS_SCRIPT == 'adv_index') OR (THIS_SCRIPT == 'index' AND $vboptions['showevents']))

all i do is a direct cut and paste and then my whole forum vanishes in cyber obilivion with a Parse error. I added the ; and nothing changed I still lost it.... I then have to replace ALL the files I changed with the originals. I have the lastest version of vBulletin.
Reply With Quote
  #5  
Old 12-08-2004, 03:49 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:

Quote:
if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR THIS_SCRIPT == 'adv_index' OR (THIS_SCRIPT == 'index' AND $vboptions['showevents']))
Reply With Quote
  #6  
Old 12-08-2004, 08:46 PM
Roo Roo is offline
 
Join Date: Dec 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope still isn't working. I replace the script, upload it all and then I get the same parse error. This is driving me crazy. What can be causing this? :ermm:
Reply With Quote
  #7  
Old 12-09-2004, 03:39 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Roo
nope still isn't working. I replace the script, upload it all and then I get the same parse error. This is driving me crazy. What can be causing this? :ermm:
Then post the rest of the code for that and we can see if something else is wrong.
Reply With Quote
  #8  
Old 12-09-2004, 04:08 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR (THIS_SCRIPT == 'adv_index' AND $vboptions['showcalendar']) OR (THIS_SCRIPT == 'index' AND $vboptions['showevents'])) 
...is syntatually correct from what can I see. Posting the specific parse error and a few lines of code before and after this one will more likely reveal the problem.
Reply With Quote
  #9  
Old 12-09-2004, 05:13 AM
Roo Roo is offline
 
Join Date: Dec 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't post the specific parse error without copying and pasting all the scripting again. But the parse error is on the function.php page. Here are the line of script above and below the line that needs editing. I have left the ORIGINAL line in place for you to see too.

} // end if access masks enabled and is logged in user

if (!empty($user['membergroupids']))
{
$sqlcondition = "IN($USERGROUPID, $user[membergroupids])";
}
else
{
$sqlcondition = "= $USERGROUPID";
}

// query calendar permissions
if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR (THIS_SCRIPT == 'index' AND $vboptions['showevents']))
{ // Only query calendar permissions when accessing the calendar or subscriptions or index.php
$_PERMQUERY[4] = "
SELECT calendarpermission.usergroupid, calendarpermission.calendarpermissions,calendar.ca lendarid,calendar.title, displayorder
FROM " . TABLE_PREFIX . "calendar AS calendar
LEFT JOIN " . TABLE_PREFIX . "calendarpermission AS calendarpermission ON (calendarpermission.calendarid=calendar.calendarid AND usergroupid IN(" . implode(', ', $membergroupids) . "))
ORDER BY displayorder ASC
";
Reply With Quote
  #10  
Old 12-09-2004, 06:25 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change this:
PHP Code:
 $_PERMQUERY[4] = 
to this:

PHP Code:
  $_PERMQUERY[4] = "; 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:21 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08858 seconds
  • Memory Usage 2,260KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete