SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / General / Support / Image and link code
Posted:  05 Oct 2009 23:08   Last Edited By: Tim1
I need to make this work in my forum.

[url=http://www.posterlovers.com/gallery/showphoto.php/photo/5832/limit/recent][img]http://www.posterlovers.com/gallery/data/632/mother.jpg[/img][/url]



Is there something in the code I can change to make it work?

I end up with the link working but no image.
__________________
web tips at Webmaster Tips or talk about television at  TVcrazy.net TV Board
Posted:  07 Oct 2009 15:42
In code/functions.php, there is a function:
function trunc_url_title($url, $maxchars = 50)

This function is meant to stop too long anchor texts. The image tag(the anchor text in your example) is longer than 50 chars. You can set the maxchars to lets say 100.
Posted:  08 Oct 2009 20:41
Thanks but i changed it all the way to 500 and it only shows the link not the image.
__________________
web tips at Webmaster Tips or talk about television at  TVcrazy.net TV Board
Posted:  09 Oct 2009 08:11
I tested this locally and it worked for me.
Posted:  09 Oct 2009 19:45
Am I looking at the wrong place. I edited in the code folder the functions.php and this line

function trunc_url_title($url, $maxchars = 75)


except the only difference i see is mine said 75 and not 50.

I got to be missing something.
__________________
web tips at Webmaster Tips or talk about television at  TVcrazy.net TV Board
Posted:  10 Oct 2009 14:38
What html code do the nested tags produce? Depending on the board version the maxchars value may be different. I have a local copy and the tags worked perfectly. On the seo-board forums here, it won't work because the maxchars is set to 50.
Posted:  19 Oct 2009 23:12
This is the code I found when I previewed it.

<td class=posttext valign=top colspan=3>
<a href="http://www.posterlovers.com/gallery/showphoto.php/photo/5832/limit/recent" target="_new"><img src=\"http://www.posterlovers.com/gallery/data/632/mother.jpg\" a ... </a>
</td>
__________________
web tips at Webmaster Tips or talk about television at  TVcrazy.net TV Board
Posted:  26 Oct 2009 15:01
Tim1, it should work. Send me a copy of your functions.php. Have you made any mods to the forum?
Posted:  02 Nov 2009 23:31
I sent you the code, but I just took a brand new functions.php and change that one line you said to, and it did the same thing. I wonder if it's another php page?

Is there any in particular I should send back up to my server? I just downloaded your newest version. So I have all new files I can send back up in case I might have changed something.
__________________
web tips at Webmaster Tips or talk about television at  TVcrazy.net TV Board
Posted:  03 Nov 2009 11:24
In code/functions.php, function: format_bbcodes.
Replace the current function, with this one:
function format_bbcodes($text)
{
  global $lang;
  $search = array(
  '[b]','[/b]','[B]','[/B]','[i]','[/i]','[I]','[/I]','[u]','[/u]','[U]','[/U]');
  $replace = array(
  '<strong>','</strong>','<strong>','</strong>','<em>','</em>','<em>','</em>','<u>','</u>','<u>','</u>');
 
  $text = str_replace($search, $replace, $text);

  $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">'
  );
 
  return preg_replace($search, $replace, $text);
}
Basically, I've changed the order of formatting, placing the img tag from first to last.
Posted:  09 Nov 2009 22:02
Thank you. Works now!
__________________
web tips at Webmaster Tips or talk about television at  TVcrazy.net TV Board