SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / General / Bug Reports / Tags IMG and URL doesn't work together
Posted:  17 Jun 2007 19:16
Tags IMG and URL doesn't work together. Example:

1. I post simple textlink, it displays correctly

2. I post and image - for example a smilie from this forum - it displays correctly - http://forums.seo-board.com/smilies/rolleyes.gif

3. When I try to include tag IMG into tag URL (clickable image) - it shows me the crap - example is 

When I try to copy an URL of this bad image from browser I see it's in broken format... Any suggestions???
Posted:  19 Jun 2007 07:25
Yep, I will take a look at it.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  20 Jun 2007 23:33
Any suggestions on this?
Posted:  24 Jun 2007 10:35
A not so good workaround should be to stop truncating url titles. In
Code:

function trunc_url_title($url, $maxchars = 70)
change the value of $maxchars to sth looong like 1000.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  25 Jun 2007 21:49
I've tried this and got a HTML in output where tag <IMG> contained the source in format

Code:

http://forumdomain.com/%22http://imagehosdomain.com/image.jpg/%22


I'll try to update my board to latest version (now 1.0) and take a look at it... Thanks anywau for your help.
Posted:  07 Jul 2007 06:55
Same thing here.
I edited the fonction.php page as you suggested but still the image doesnt display in the message.

Here's what I get instead :

http://www.enregistrersous.com/images/22161049820070707065150.jpg

Any other suggestions on how to fix this ?
__________________
MusicalBox
Posted:  07 Jul 2007 19:59
Ok. Try this. In /code/functions.php, check the function format_bbcodes(). It uses regular expressions. We need to place the img tags not at the beginning, but at the end of the array. That part of the code will become:
  $search = array(
  '#\[email\](.*?)\[/email\]#i',
  '#\[email=(.*?)\](.*?)\[/email\]#i', 
  '#\[url=(http|https|ftp)://(.+?)\](.+?)\[/url\]#ie',
  '#\[url\](http|https|ftp)://(.+?)\[/url\]#ie',
  '#\[code\]#i',
  '#\[/code\]#i',
  '#\[quote\]#i',
  '#\[quote=(.*?)\]#i',
  '#\[/quote\]#i',
  '#\[img\](http|https|ftp)://(.*?)\[/img\]#i' 
  );
  $replace = array(
  '<a href="mailto:\\1">\\1</a>',
  '<a href="mailto:\\1">\\2</a>',
  'trunc_url(\'\\1://\\2\',\'\\3\')',
  'trunc_url(\'\\1://\\2\',\'\\1://\\2\')',
  '<div class="code"><b>'.$lang['code'].': </b><br><br>',
  '</div>',
  '<div class="quote"><b>'.$lang['quote'].': </b><br>',
  '<div class="quote"><b>'.$lang['quoting'].' \\1</b><br>',
  '</div>',
  '<img src="\\1://\\2" alt="\\1://\\2">'
  );
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  08 Jul 2007 10:10
Success !

Working perfectly.
Thanks again for your excellent support Hristo.

Note :
I also added "border=0" to this line :

'<img src="\\1://\\2" alt="\\1://\\2">'

so it becomes this :

'<img src="\\1://\\2" border=0 alt="\\1://\\2">'

This way we dont get the ugly (personal taste) blue border around the image or the thumbnail.
__________________
MusicalBox
Posted:  21 Oct 2007 16:17   Last Edited By: Bluesplayer
Hi

I have altered the above functions file but still no joy?  The full url shows after with the bbcode showing as well.  Really need to add an url to an image as I have to post a lot of banners etc .

Test:


Regards
Bluesplayer
Posted:  21 Oct 2007 16:43
Ah

I have a work around for this now.  I have altered the vtopic file so that an admin can post html.  I can quickly add an html url now to a bbcode image.  This is good enough .

Cheers
Bluesplayer