vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Functions.php Error From Hell (https://vborg.vbsupport.ru/showthread.php?t=41569)

Diva 07-27-2002 12:28 AM

Functions.php Error From Hell
 
Hi. I tried to do a very easy hack. change the name "Guest". Now I can't see the individual threads and I get this error:

Quote:

Parse error: parse error, expecting `']'' in /home/diva/public_html/test/admin/functions.php(281) : eval()'d code on line 31

Here's the weird part. I tried putting back the original functions.php and even a new one... I still get that error. Any ideas?

DrkFusion 07-27-2002 02:03 AM

Hmm...did you edit functions.php alot?

You can maybe try reuploading the original functions.php if the hack was the only one, if not, just paste what you modified.

Imyself am not good with php, I get thrown off with parseerrors hehe, but I can compare and try to find a solution.

Drk

Diva 07-27-2002 02:06 AM

Hi! Thanks for answering so fast. Actually, I hadn't really hacked a lot at that point. But even when I replaced the functions.php, it stayed there. I had a friend set up another test board and he thinks it may have something to do with the style design. But it says it's the function.php. :\

DrkFusion 07-27-2002 02:10 AM

Can you paste whats on line 31 in functions.php?
Did you replace functions.php with the one you downloaded in vb members area? If not, then try download fresh copy of vb and replacing the file.

Drk

Diva 07-27-2002 02:13 AM

Sure! This is lines 28-31:

Quote:

if ($pagenumber>1) {
$prevpage = $pagenumber-1;
eval("\$prevlink = \"".gettemplate("pagenav_prevlink")."\";");
}

DrkFusion 07-27-2002 02:17 AM

I am assuming that } is at line 31?

Diva 07-27-2002 02:18 AM

yes.

DrkFusion 07-27-2002 02:19 AM

Try this,

find
Code:

// ###################### Start getpagenav #######################
all the way to line 31, which I hopefully think it is ) and replace it with

Code:

// ###################### 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")."\";");
        }


DrkFusion 07-27-2002 02:22 AM

Sorry about that smilie in the code

Drk

Diva 07-27-2002 02:24 AM

is line 31 a blank space?


All times are GMT. The time now is 12:15 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.01096 seconds
  • Memory Usage 1,733KB
  • 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_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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