Author |
Message |
novw Board Member
Joined: 14 Nov 2011
Posts: 15
|
Posted: Mon Nov 14, 2011 9:38 pm Post subject: img tag inside url tag in need of extra space |
|
|
Huh? See topic title
At http://www.kerstdorpen.nl/forum is my forum. It is running smoothly and doing what I want it to. Except for one thing:
Code: |
[URL=http://][img]http://[/img][/URL]
|
Is not working.
When a spce is added in front of the first img tag however (like so)
Code: |
[URL=http://] [img]http://[/img][/URL]
|
All is well. This picture is now a link to the url. Somewhere some parsing is going wrong, but I can't for the life of me figure out where? |
|
Back to top |
|
|
drathbun Board Member
Joined: 24 Jul 2008
Posts: 729 Location: Texas
|
Posted: Mon Nov 14, 2011 10:36 pm Post subject: Re: img tag inside url tag in need of extra space |
|
|
The code that converts bbcode to html is found in includes/bbcode.php. Have you made any modifications to that file? _________________ phpBBDoctor Blog |
|
Back to top |
|
|
novw Board Member
Joined: 14 Nov 2011
Posts: 15
|
Posted: Tue Nov 15, 2011 7:18 am Post subject: Re: img tag inside url tag in need of extra space |
|
|
Probably. I have quite a few mods inserted in the code. I will check bbcodes.php against an original one... Thx!
-
edit:
Nope. There is nothing wrong I can see with the bbcode.php, which has Advanced BBCode Box MOD inside. I even re-inserted the code from the mod. Still no go.
What are my opions? Live with it, or is there somebody able (and willing) to check it out for me? |
|
Back to top |
|
|
drathbun Board Member
Joined: 24 Jul 2008
Posts: 729 Location: Texas
|
Posted: Tue Nov 15, 2011 9:25 am Post subject: Re: img tag inside url tag in need of extra space |
|
|
I suggest that you try downloading and then saving your bbcode.php file as bbcode.txt and then include it as an attachment on this post; someone may be able to help you work through the issue. _________________ phpBBDoctor Blog |
|
Back to top |
|
|
novw Board Member
Joined: 14 Nov 2011
Posts: 15
|
Posted: Tue Nov 15, 2011 10:00 am Post subject: Re: img tag inside url tag in need of extra space |
|
|
drathbun wrote: | someone may be able to help you work through the issue. |
Very much appreciated. I seem unable top attach ? I click browse, select the .txt file, add a description click add, and am forwarded back to the edit message screen. No attachment is attached?
this link should work. |
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Wed Nov 23, 2011 3:50 am Post subject: Re: img tag inside url tag in need of extra space |
|
|
What is this?
Code: | // Remove our padding from the string..
return substr($text, 1);; |
_________________ Love your data! Back it up! |
|
Back to top |
|
|
novw Board Member
Joined: 14 Nov 2011
Posts: 15
|
Posted: Wed Nov 23, 2011 7:18 am Post subject: Re: img tag inside url tag in need of extra space |
|
|
Extremely good catch, but... in the file I have on my board, and the file I have posted here is
Code: |
// Remove our padding from the string..
$text = substr($text, 1);
|
not with 2 times ;
?
If the question is, what is this line actually doing: sorry my friend. I have not the slightest idea. |
|
Back to top |
|
|
Holger Board Member
Joined: 19 Jan 2009
Posts: 509 Location: Hanover
|
Posted: Wed Nov 23, 2011 7:46 am Post subject: Re: img tag inside url tag in need of extra space |
|
|
Hm? In the txt-file you are linking to there are 2 ; _________________ Love your data! Back it up! |
|
Back to top |
|
|
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Wed Nov 23, 2011 2:11 pm Post subject: Re: img tag inside url tag in need of extra space |
|
|
I'm also seeing two semi-colons in the .txt. Otherwise the line itself is from the original code, it goes with the following:
Code: | // pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text; |
|
|
Back to top |
|
|
novw Board Member
Joined: 14 Nov 2011
Posts: 15
|
Posted: Wed Nov 23, 2011 6:44 pm Post subject: Re: img tag inside url tag in need of extra space |
|
|
Again very good catch. So good I did not even see it when I was looking at it...
Unfortunately after changing
Code: |
// Remove our padding from the string..
$text = substr($text, 1);;
|
to
Code: |
// Remove our padding from the string..
$text = substr($text, 1);
|
I still end up with
Image link
when I add a space in front of the img, I end up with what I want: a linked and clickable picture. |
|
Back to top |
|
|
novw Board Member
Joined: 14 Nov 2011
Posts: 15
|
Posted: Wed Nov 23, 2011 6:47 pm Post subject: Re: img tag inside url tag in need of extra space |
|
|
Maybe I can turn this into a "feature request"? Can somebody script me up that as soon as
Code: |
[url=blahblah][img]blah
|
appears anywhere in the text a space is added? Heck: in front of EVERY IMG tag the forum may add a space. No harm is done. |
|
Back to top |
|
|
drathbun Board Member
Joined: 24 Jul 2008
Posts: 729 Location: Texas
|
Posted: Thu Nov 24, 2011 6:47 pm Post subject: Re: img tag inside url tag in need of extra space |
|
|
The extra space is added as a part of the process, to ensure that there are no empty strings for the rest of the process. Once the process is completed, then the extra space is removed.
I have not had time to review this yet, but I know that much from earlier look through the code. _________________ phpBBDoctor Blog |
|
Back to top |
|
|
novw Board Member
Joined: 14 Nov 2011
Posts: 15
|
Posted: Sat Nov 26, 2011 8:46 am Post subject: Re: img tag inside url tag in need of extra space |
|
|
novw wrote: |
appears anywhere in the text a space is added? Heck: in front of EVERY IMG tag the forum may add a space. No harm is done. |
Geez. Just read this. This is not English... I mean, every time in any text when an IMG tag is found, there should be a blank space added in front. Even when a smart user adds his own space the forum should still understand what is wanted. Because even when there are 2 (or 3, or 4, or...) spaces in front of IMG, the forum software picks it up as a IMG tag. It already ignores the extra blanks.
Am I making sense?
If text={IMG text should be _{IMG |
|
Back to top |
|
|
|