vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Parse BBCode In Member.php (https://vborg.vbsupport.ru/showthread.php?t=101576)

Andreas 11-28-2005 08:46 AM

Quote:

Originally Posted by noonespecial
$userinfo[field27] is what I need parsed

So ... have you tried to parse that?

noonespecial 11-28-2005 08:47 AM

Quote:

Originally Posted by Andreas
So ... have you tried to parse that?

Yah, and I get this on the profile page...

HTML Code:

&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;l t;b&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp;amp; amp;amp; amp;amp; amp;amp; amp;amp; amp;gt;S pread the AbsolutePunk.net Banner!&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;lt ;/b&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp;amp; amp;amp; amp;amp; amp;amp; amp;amp; amp;lt;b r /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;g t;&amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;g t;&amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;g t;&amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;a mp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;a mp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;a mp;amp;l t;br /&amp;amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;l t;br /&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;gt;&amp;amp;amp;lt;br /&amp;amp;amp;gt;&amp;amp;lt;br /&amp;amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;<br />
&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;l t;di v align=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp ;amp ;amp ;amp ;amp ;amp ;amp ;amp ;amp ;amp ;amp ;amp ;quo t;ri ght&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;am p;am p;am p; amp;amp; amp;amp; amp;amp; amp;amp; quot;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp; amp; amp; amp; amp; amp; amp; amp; am p;amp;amp;gt ;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; lt;a href=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; quot ;htt p://&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;q uot; http : //www.absolutepunk.net/index.php?sub=banners&amp;amp;amp;amp;amp;amp;amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; quot ;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp; amp; amp; amp; amp; amp; amp; am p;amp;am p;quot; target=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;qu ot;_ blan k&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp; amp; amp; am p;amp;am p;amp;am p;amp;am p;quot;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;am p;am p;am p;am p;am p;am p;am p;am p;am p; amp;amp;amp; gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;lt ;i mg src=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;q uot; http ://images.absolutepunk.net/images/banners/125x125.gif&amp;amp;amp;amp;amp;amp;amp;amp;amp;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;qu ot; border=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;qu ot;0 &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a m p ;amp;amp ;amp;amp ;amp;amp ;amp;quo t; alt=&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;q uot; &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a m p ;amp;amp ;amp;amp ;amp;amp ;amp;amp ;quot; /&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;a mp;g t;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;amp;a mp;lt ;/a&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; gt;&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; amp;amp; amp;amp; amp;amp; amp;amp; amp;amp; amp;lt ;/div&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;am p;gt ;

using: $userinfo[field27] = $parser->do_parse($userinfo[field27]);

Andreas 11-28-2005 08:49 AM

Lot's of entities ;)

What's the content of field27?

noonespecial 11-28-2005 08:52 AM

Quote:

Originally Posted by Andreas
Lot's of entities ;)

What's the content of field27?

this:

Code:

[.b]Spread the AbsolutePunk.net Banner![./b]
[.right][.url="http://www.absolutepunk.net/index.php?sub=banners"][.img]http://images.absolutepunk.net/images/banners/125x125.gif[./img][./url][./right]

Is what I have in there to test the BBCode.

You can see it not working in action here: http://www.absolutepunk.net/member.php?u=1083

However:

$userinfo[field27] = $parser->do_parse($userinfo[field27], 1, 1, 1, 1, 0, 0);

Works because it allows HTML (right?) (fixing those weird errors above); however, I really don't want to allow HTML on the profile pages - only BBCode.

Edit: It appears that code (above) doesn't allow HTML ...

Andreas 11-28-2005 09:06 AM

1 Attachment(s)
I've attached a small script that should give you an idea of what you did wrong ;)

Boofo 11-28-2005 09:34 AM

Quote:

Originally Posted by noonespecial
this:

Code:

[.b]Spread the AbsolutePunk.net Banner![./b]
[.right][.url="http://www.absolutepunk.net/index.php?sub=banners"][.img]http://images.absolutepunk.net/images/banners/125x125.gif[./img][./url][./right]

Is what I have in there to test the BBCode.

You can see it not working in action here: http://www.absolutepunk.net/member.php?u=1083

However:

$userinfo[field27] = $parser->do_parse($userinfo[field27], 1, 1, 1, 1, 0, 0);

Works because it allows HTML (right?) (fixing those weird errors above); however, I really don't want to allow HTML on the profile pages - only BBCode.

Edit: It appears that code (above) doesn't allow HTML ...

Shouldn't html be off by default?

Boofo 11-28-2005 09:36 AM

1 Attachment(s)
Quote:

Originally Posted by Andreas
I've attached a small script that should give you an idea of what you did wrong ;)

Does this look better, Andreas? ;)

Andreas 11-28-2005 10:04 AM

The XML looks strange (how did you manage to export this? doesn't import ...), but yeah - that's the way to go :)

Boofo 11-28-2005 10:11 AM

Quote:

Originally Posted by Andreas
The XML looks strange (how did you manage to export this? doesn't import ...), but yeah - that's the way to go :)

hehe I actually edited the xml you posted earlier. I guess my editor must have done something screwy. You know it couldn't be me messing up, right? ;)

HTML is turned off by default, isn't it?

Andreas 11-28-2005 10:20 AM

Yes, HTML is off be default.

I thought you manually edited it and somehow managed to screw it up :D


All times are GMT. The time now is 11:10 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.01157 seconds
  • Memory Usage 1,763KB
  • 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
  • (1)bbcode_html_printable
  • (6)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