vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   html enabled between [html][/html] (https://vborg.vbsupport.ru/showthread.php?t=39516)

Logician 06-20-2002 01:45 PM

1 Attachment(s)
I applied the code to my board and it works here.

Broekie 06-20-2002 02:00 PM

Jup, I've posted it with a user in usergroup 6
Could it be the version of vbb I'm using? (2.2.5)

I'll try it at my 2.2.6 testboard right now, that board has alsmost no hackes installed...

[edit]
Damned, I can't reach the new server (the one with vbb 2.2.6 installed)
I'll de-install all the installed hacks at my 2.2.5 testboard one-by-one to find out which one it is that's influencing this hack.
Thanks for testing it at your board, I now know that it should work (not that I doubted you ofcourse ;))
[/edit]

Logician 06-20-2002 02:22 PM

You are applying the code to admin/functions.php and you are REPLACING the existing code right? Also bbcode is ON in the forum you post?

Can you send the portion of admin/functions.php begining 10 lines above the hack and ending 10 lines after the hack. Let me check it.

Broekie 06-20-2002 02:29 PM

1 Attachment(s)
Quote:

Originally posted by Logician
You are applying the code to admin/functions.php and you are REPLACING the existing code right? Also bbcode is ON in the forum you post?

Can you send the portion of admin/functions.php begining 10 lines above the hack and ending 10 lines after the hack. Let me check it.

Here you go:

Logician 06-20-2002 02:46 PM

ok you applied correctly.. that's strange, it works fine here..

If you are sure message poster (not reader!) is from usergroup 6 and bbcode is enabled in the forum you post, I'm clueless.

Broekie 06-20-2002 02:56 PM

I'm very sure about those things :)

But I won't give up, I'll even stay up all night to make it work ;)
I just can't stand that it works for you but not for me ;)

And again, thanks very much for your support!

Broekie 06-20-2002 04:23 PM

Logician, I've got some strange news. It also doesn't work at a totaly unhacked vbb2.2.1

The only thing I can think of is that it works for you due to a other hack you've installed...

Otherwise, I'm also totaly clueless...

Logician 06-20-2002 04:40 PM

Lets make some debugging:

Apply this code instead of the other (to a test board!):

PHP Code:

if ($post[usergroupid]==OR $post[usergroupid]==5) {
echo 
"usergroupid is 6 or 5<br>";
 if (
preg_match("/(\[)(html)(])(\r\n)*([^\"]*)(\[\/html\])/siU"$post[pagetext], $matches1))
    {
echo 
"HTML tag matched!<br>";
     
$temp_value='-@log?c?an@-';
     
$parsed_html=bbcodeparse2($matches1[5],1,1,1,1);
echo 
"this is parsed_html=".$parsed_html."<br>";
     
$post[pagetext]=preg_replace("/(\[)(html)(])(\r\n)*([^\"]*)(\[\/html\])/siU""$temp_value"$post[pagetext]);
    }
}  
$post[message]=bbcodeparse($post[pagetext],$forum[forumid],$post[allowsmilie]);
echo 
"bbcodeparse runs..<br>";

if ((
$post[usergroupid]==OR $post[usergroupid]==5) and isset($parsed_html)) 
{
echo 
"rewriting parsed HTML";
$post[message]=str_replace($temp_value$parsed_html$post[message]); } 

Now after you applied the code, create a new thread in any forum with Site Admin account and post a test message with html tag. After it's posted, showthread.php will run and it will display the message you posted. Check the begining of this page. You should see some debugging text there. Tell me what they are..

Broekie 06-20-2002 04:47 PM

Code:

usergroupid is 6 or 5

Warning: Unknown modifier 'h' in /home/www/testforum/admin/functions.php on line 273
bbcodeparse runs..

line 273 is this line:
PHP Code:

 if (preg_match("/([)(html)(])(\r\n)*([^\"]*)([/html])/siU"$post[pagetext], $matches1)) 


Logician 06-20-2002 04:50 PM

ok problem is in the code.. I'll correct it, brb.. (how come it worked here, really weird!)


All times are GMT. The time now is 06:07 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.01545 seconds
  • Memory Usage 1,746KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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