Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Hello. I am currently having a problem in functions.php. Details »»
Hello. I am currently having a problem in functions.php.
Version: , by Scrub Scrub is offline
Developer Last Online: Sep 2005 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-13-2002 Last Update: Never Installs: 0
 
No support by the author.

Hello all,
I've installed countless hack that have included the editing of functions.php. I get this error whenever viewing the thread.

Quote:
Parse error: parse error, unexpected '}', expecting ']' in /home/www/theonlinelounge/forums/admin/functions.php(432) : eval()'d code on line 28
Now here is the lines between 1 and 55.

PHP Code:
<?php
error_reporting
(7);

// start prep shutdown function
$noshutdownfunc 0// #CHANGE ME IF YOU CAN'T USE register_shutdown_function
$ourtimenow time(); // Make this available to all files

// Defined constants used for user field.
// Hope to convert all user fields into one integer.
define ("SHOWSIGNATURES"1);
define ("SHOWAVATARS"2);
define ("SHOWIMAGES"4);
define ("SHOWVBCODE"8);

unset(
$templatecache);

// ###################### Start getpagenav #######################
// template-based page splitting system from 3dfrontier.com :)
function getpagenav($results,$address) {
    global 
$perpage,$pagenumber,$pagenavpages;

    if (
$results <= $perpage) {
        return 
"";
    }

    
$totalpages ceil($results/$perpage);

    if (
$pagenumber>1) {
        
$prevpage $pagenumber-1;
        eval(
"\$prevlink = \"".gettemplate("pagenav_prevlink")."\";");
    }
    if (
$pagenumber<$totalpages) {
        
$nextpage $pagenumber+1;
        eval(
"\$nextlink = \"".gettemplate("pagenav_nextlink")."\";");
    }
    while (
$curpage++<$totalpages) {
        if ( ( 
$curpage <= $pagenumber-$pagenavpages || $curpage >= $pagenumber+$pagenavpages ) && $pagenavpages!=) {
            if (
$curpage==1) {
                eval(
"\$firstlink = \"".gettemplate("pagenav_firstlink")."\";");
            }
            if (
$curpage==$totalpages) {
                eval(
"\$lastlink = \"".gettemplate("pagenav_lastlink")."\";");
            }
        } else {
            if (
$curpage==$pagenumber) {
                eval(
"\$pagenav .= \"".gettemplate("pagenav_curpage")."\";");
            } else {
                eval(
"\$pagenav .= \"".gettemplate("pagenav_pagelink")."\";");
            }
        }
    }
    eval(
"\$pagenav = \"".gettemplate("pagenav")."\";");
    return 
$pagenav;

}
Would one you of you be as to so kind to help me on this? The site co-owner thinks it may be with the away hack. But I did a search on the forums and found nothing! . This error only show up in in showthread. I mean it works fine on my localhost, but not on web server. The first post does not show up in the showthread, neither do the replys. . Could it be because of the other errors we were having with the FTP about the Warning: 206 errors and junk.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-13-2002, 09:30 PM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's nothing wrong with code between line 1 and 55.
Most certainly you have one extra closing tag in functions.php near line 432
Reply With Quote
  #3  
Old 07-13-2002, 09:42 PM
Scrub's Avatar
Scrub Scrub is offline
 
Join Date: Oct 2001
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for your reply, nuno. I will check to make sure, and if I find nothing I will report it back here.
Reply With Quote
  #4  
Old 07-13-2002, 09:51 PM
Scrub's Avatar
Scrub Scrub is offline
 
Join Date: Oct 2001
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the code between 402 and 456:

PHP Code:
    // do ip addresses
    
if ($post[ip]!="") {
        if (
$logip==2) {
            eval(
"\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
        }
        if (
$logip==1) {
            eval(
"\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
        }
        if (
$logip==0) {
            
$post[iplogged]="";
        }
    } else {
        
$post[iplogged]="";
    }

    
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);

    
//highlight words for search engine
    
if (isset($highlight) && $highlight != '') {
        if ((isset(
$postid) and $postid==$post[postid]) or !isset($postid)) {
            
reset($replacewords);
            while (list(
$key,$val)=each($replacewords)) {
            
$post['message']=preg_replace("#(^| |\n|\r|\t|\]|>|\")(".$val.")(([\.,]+[ $\n\r\t])|$|\"|<|\[| |\n|\r|\t)#si""\\1<highlight>\\2</highlight>\\3"$post['message']);
            }
        }
    }
    
// do posts from ignored users
    
if (($ignore[$post[userid]] and $post[userid] != 0)) {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    }
    return 
$retval;
}

// ###################### Start gettextareawidth #######################
function gettextareawidth() {
    
// attempts to fix idiotic Nutscrape textarea width problems
    
global $HTTP_USER_AGENT;

    if (
eregi("MSIE",$HTTP_USER_AGENT)) { // browser is IE
        
return "{textareacols_IE}";

    } elseif (
eregi("Mozilla/5.0",$HTTP_USER_AGENT)) { // browser is NS 6
        
return "{textareacols_NS6}";

    } elseif (
eregi("Mozilla/4.",$HTTP_USER_AGENT)) { // browser is NS4
        
return "{textareacols_NS4}";

    } else { 
// unknown browser - stick in a sensible value
        
return 60;

    }


I do not think I have an extra bracket, but I could be looking over it. .
Reply With Quote
  #5  
Old 07-13-2002, 11:25 PM
nuno's Avatar
nuno nuno is offline
 
Join Date: Oct 2001
Posts: 469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

replace that code with
Code:
// do ip addresses
	if ($post[ip]!="") {
		if ($logip==2) {
			eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_show")."\";");
		}
		if ($logip==1) {
			eval("\$post[iplogged] .= \"".gettemplate("postbit_ip_hidden")."\";");
		}
		if ($logip==0) {
			$post[iplogged]="";
		}
	} else {
		$post[iplogged]="";
	}

	$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);

	//highlight words for search engine
	if (isset($highlight) && $highlight != '') {
		if ((isset($postid) and $postid==$post[postid]) or !isset($postid)) {
			reset($replacewords);
			while (list($key,$val)=each($replacewords)) {
			$post['message']=preg_replace("#(^| |\n|\r|\t|\]|>|\")(".$val.")(([\.,]+[ $\n\r\t])|$|\"|<|\[| |\n|\r|\t)#si", "\\1<highlight>\\2</highlight>\\3", $post['message']);
			}
		}
	}
	// do posts from ignored users
	if (($ignore[$post[userid]] and $post[userid] != 0)) {
		eval("\$retval = \"".gettemplate("postbit_ignore")."\";");
	} else {
		eval("\$retval = \"".gettemplate("postbit")."\";");
	}
	return $retval;
}

// ###################### Start gettextareawidth #######################
function gettextareawidth() {
	// attempts to fix idiotic Nutscrape textarea width problems
	global $HTTP_USER_AGENT;

	if (eregi("MSIE",$HTTP_USER_AGENT)) { // browser is IE
		return "{textareacols_IE}";

	} elseif (eregi("Mozilla/5.0",$HTTP_USER_AGENT)) { // browser is NS 6
		return "{textareacols_NS6}";

	} elseif (eregi("Mozilla/4.",$HTTP_USER_AGENT)) { // browser is NS4
		return "{textareacols_NS4}";

	} else { // unknown browser - stick in a sensible value
		return 60;

	}

}
Reply With Quote
  #6  
Old 07-14-2002, 12:15 AM
Scrub's Avatar
Scrub Scrub is offline
 
Join Date: Oct 2001
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey,
Thanks nuno! But we decided to reinstall the forum and it works like a a charm! but if we have this problem again, I will add what you just said. . Anyway, I have another problem now. We have the modlog installed and we get an error on line 57. On line 57, we have the following code:

PHP Code:
htmlheader(); 
The error claims it to unidentified. Or something close to it. Would you know it is doing this? Thanks again.
Reply With Quote
Reply


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 11:05 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.04051 seconds
  • Memory Usage 2,293KB
  • Queries Executed 19 (?)
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)bbcode_code
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (6)postbit_onlinestatus
  • (6)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_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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete