vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Another Parse Error (https://vborg.vbsupport.ru/showthread.php?t=72626)

Roo 12-08-2004 01:17 AM

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:

Zachery 12-08-2004 02:35 AM

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

Boofo 12-08-2004 03:10 AM

Posting that whole section of code might give us a glimpse as to what's wrong. ;)

Roo 12-08-2004 03:17 AM

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.

Boofo 12-08-2004 03:49 AM

Try this:

Quote:

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

Roo 12-08-2004 08:46 PM

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:

Boofo 12-09-2004 03:39 AM

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.

filburt1 12-09-2004 04:08 AM

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.

Roo 12-09-2004 05:13 AM

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

Boofo 12-09-2004 06:25 AM

Change this:
PHP Code:

 $_PERMQUERY[4] = 

to this:

PHP Code:

  $_PERMQUERY[4] = "; 



All times are GMT. The time now is 07:27 PM.

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.01017 seconds
  • Memory Usage 1,739KB
  • 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
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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