vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin.org Site Feedback (https://vborg.vbsupport.ru/forumdisplay.php?f=7)
-   -   prob with vbull (https://vborg.vbsupport.ru/showthread.php?t=53858)

DPoole 06-04-2003 10:51 PM

prob with vbull
 
try to download this hack and check out the error u get

u can view pages 2 and 3 but not page 1

http://www.vbulletin.org/hacks/index...ack&hackid=197

Erwin 06-04-2003 11:01 PM

I can see page 1 fine:

https://vborg.vbsupport.ru/showthrea...=&pagenumber=1

DPoole 06-05-2003 12:05 AM

maybe cause you are admin Erwin

Let some others try it - it dont work

Fatal error: Maximum execution time of 15 seconds exceeded in /www/vbulletin.org/htdocs/forum/admin/functions.php on line 2856

Dan 06-05-2003 12:14 AM

Quote:

Fatal error: Maximum execution time of 15 seconds exceeded in /www/vbulletin.org/htdocs/forum/admin/functions.php on line 2856
Confirmed

Gary King 06-05-2003 02:18 AM

Actually, this seems to happen on several hack threads - not too sure on why, though.

Erwin 06-05-2003 02:51 AM

Mmm... it's to do with the PHP code boxes, and a hack that's not working properly... it's a known bug. I will let Stefan know.

Xenon 06-05-2003 04:54 AM

yeah, it has to do with the show function names as links.
you should disable that option in your usercp if you get those errors..

Dean C 06-05-2003 01:55 PM

Or completely remove the hack? It's not really necessary is it :)?

- miSt

Boofo 06-05-2003 02:08 PM

I can see page 1 just fine.

Xenon 06-05-2003 02:10 PM

Dean, Erwin and me are discussing that already, but if it's needed is the question for user not for us, as we don't need it, but there might be users which needs it ;)

Boofo 06-05-2003 02:55 PM

I had that turned off in my usercp. Now that I turn it on, it get the same error. Does that only happen when it is the first post in the thread? I have never had that happen on my site.

Xenon 06-05-2003 03:55 PM

nope, the problem is on how much codeboxes are there.....

the algorithm seems to be very intense...

Boofo 06-05-2003 03:58 PM

Is there any way to fix it? I don't want to run into this same thing on down the road.

Xenon 06-05-2003 06:58 PM

nope, no way, at least i didn't found one till now.
i already optimized it as strong as possible, but now the str_replace with a large array of replacement vars gives it the rest... ;)

Boofo 06-05-2003 07:14 PM

So, you found a fix or you haven't? I just tried it again and I still get the error.

Xenon 06-06-2003 10:42 AM

nope i didn't find a fix.

the bug occures more often in the past, i heve fixed it in a way that it doesn't occure as much as it was at first, but i can't fix it totally

Boofo 06-06-2003 05:35 PM

Can you tell me what you did to make it better than it was?

Xenon 06-06-2003 09:41 PM

do you use the hack yourself?

i thought it wasn't released???

well i have rewritet it a bit, to use a cache, so it would not create the functions names array with each post as it did before

Boofo 06-06-2003 09:56 PM

Quote:

Today at 05:41 PM Xenon said this in Post #18
do you use the hack yourself?

i thought it wasn't released???

well i have rewritet it a bit, to use a cache, so it would not create the functions names array with each post as it did before

I think Firefly released this a long time back. Can you share the re-write? ;)

Xenon 06-06-2003 10:03 PM

i don't know the original coding anymore but this is the function we use now:

PHP Code:

function showfunclinks($buffer)
{
    global 
$allfuncs;
    static 
$searchfuncarray$replacfuncarray;
    if (!isset(
$searchfuncarray)) 
    {
        
$searchfuncarray = array();
        
$replacfuncarray = array();
        foreach (
$allfuncs['internal'] as $name
        {
            
$searchfuncarray[] = "/([^a-z])$name(<\/font><font color=\"" ini_get('highlight.keyword') . "\">){0,1}( {0,1})\(<\/font>/i";
            
$replacfuncarray[] = "\\1<a href=\"http://www.php.net/$name\" target=\"_blank\">$name</a>\\2\\3(</font>";
        }
    }
    
$buffer preg_replace($searchfuncarray$replacfuncarray$buffer);
    return 
$buffer;



Boofo 06-06-2003 10:33 PM

Here's the original code I have:

[PHP] /* Highlight function names in [php] */
$allfuncs = get_defined_functions();
$searches = array();
$replaces = array();
foreach ($allfuncs['internal'] as $name) {
$searches[] = "/([^a-z])$name(<\/font><font color=\"" . ini_get('highlight.keyword') . "\">){0,1}( {0,1})\(<\/font>/i";
$replaces[] = "\\1<a href=\"http://www.php.net/$name\" target=\"_blank\">$name</a>\\2\\3(</font>";
}
$buffer = preg_replace($searches, $replaces, $buffer);
/* end Highlight function names in
PHP Code:

 */ 

There's the:

PHP Code:

// ###################### Start phphighlite #######################
function phphighlite($code) {
  
//PHP 4 only 

above it with some more code. What do I need to replace?

Xenon 06-07-2003 08:45 AM

replace the whole first php code with
PHP Code:

$buffer showfunclinks($buffer); 

and add the function i posted above into your functions.php :)

Boofo 06-07-2003 09:18 AM

I did what you said above and got this error at the top of the page:

Warning: Invalid argument supplied for foreach() in /home/bear/public_html/forum/admin/functions.php on line 1266

and the links were not there.

Xenon 06-07-2003 09:51 AM

ah i see, you have a differnte structure than we have here ;)

put
PHP Code:

$allfuncs get_defined_functions(); 

at the end of functions.php before the ending ?> :)

Boofo 06-07-2003 10:45 AM

Well, that got rid of the error, but still no links in the php code. ;)

Xenon 06-07-2003 02:06 PM

then i can't help ya more, that's how it works here.

Davey 06-20-2003 12:34 PM

Quote:

06-05-03 at 06:54 AM Xenon said this in Post #7
yeah, it has to do with the show function names as links.
you should disable that option in your usercp if you get those errors..

perhaps a link to the part where you edit this option would be handy since i can't find it..

Xenon 06-20-2003 12:40 PM

it's in the user options :)


All times are GMT. The time now is 03:18 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.01136 seconds
  • Memory Usage 1,777KB
  • 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
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (28)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