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)

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 08:32 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.01029 seconds
  • Memory Usage 1,729KB
  • 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
  • (4)bbcode_php_printable
  • (1)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
  • (8)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