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


Roo 12-10-2004 02:35 AM

can someone just put me out of my misery and send me the actual php pages with the new scripting in place so I can overwrite? I think that will be easier... :tired:

Steve Machol 12-10-2004 03:25 AM

Quote:

Originally Posted by Roo
can someone just put me out of my misery and send me the actual php pages with the new scripting in place so I can overwrite? I think that will be easier... :tired:

It would be against the license agreement to send you vB files - modified or not.

filburt1 12-10-2004 01:07 PM

Also I strongly suggest avoiding creating variable names in the format $_VARNAME as they are intended to be superglobals (for example, $_SERVER, $_REQUEST, $_GET, etc.).

Roo 12-10-2004 09:09 PM

Hey this is the scripting I am copying into my existing scripting to use the CMS system. I haven't wriiten this myself.

SamirDarji 12-13-2004 10:18 PM

Since this is in support of the cmps by vbadvanced.com, I'd try searching over there. Off hand, I think you ran into the 3.0.3 issue where one line that was indicated to change didn't need any changes at all.


All times are GMT. The time now is 02:52 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.01001 seconds
  • Memory Usage 1,753KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete