|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
HTML_BBCodeParser problem with [img] tag
Hi All,
I'm quite new to PEAR and only recently set it up on a shared linux account using the go-pear.php web interface. After this I successfully installed the HTML_BBCodeParser package and set up PEAR in PHP path. I began testing out the package with a simple script and everything seemed to work fine for most tags, but for some reason the [img] tag does not seem to parse correctly. My code is below (please note that as a new poster, the forum has blocked me from posting the image url): Code:
/* For the PHP code below please just assume that
{absolute url here} = http://www.sitepoint.com/images/sitepoint-logo.gif
PHP Code:
As you can see I've made various attempts to get the image tag working unfortunately to no avail. As you will see in the HTML below: Code:
hello <strong>world</strong><br /> <em>italics</em> <q>Here is a quote</q><br /> <a href="http://bbShowcase.org/">bbShowcase</a><br /> <span style="color:red">red</span> <img src=""="http://www.sitepoint.com/images/sitepoint-logo.gif" /><br /> [img="<a href="http://www.sitepoint.com/images/sitepoint-logo.gif">http://www.sitepoint.com/images/sitepoint-logo.gif</a>"=200x200]<br /> <img /><br /> <img /><br /> [img="[url=http://www.sitepoint.com/images/sitepoint-logo.gif]http://www.sitepoint.com/images/sitepoint-logo.gif</a>"]<br /> Can anyone help me figure out what might be going wrong here? Any help would be very much appreciated. P.S. Incase someone was wondering my BBCodeParser.ini looks like this: PHP Code:
|
|
#2
|
|||
|
|||
|
I have done it like this
PHP Code:
Output: hello <strong>world</strong> <em>italics</em> <q>Here is a quote</q> <span style="color:red">red</span> <img src="absolute url here" /> If someone knows how to get addFilter working for customised filters, I'd like to hear about it. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PEAR Packages > HTML_BBCodeParser problem with [img] tag |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|