1 (edited by FruitCake 2008-11-08 15:53)

Topic: Show images in posts Bug ?

I use punBB 1.2.20

I click in Profile > Display > uncheck Show images in posts.

and when I come in topic

Ex. have message like this

[url=http://punbb.informer.com/][img]http://punbb.informer.com/img/slick_punbb/logo_2_left.png[/img][/url]

in show like this

<image>

I think why not show url but show url image


sorry my bad english

Re: Show images in posts Bug ?

You want it to show the image's URL instead?

Re: Show images in posts Bug ?

Moved to "Feature request" forum.

You may just modify 1.2.20 the way you like it :-)

Carpe diem

Re: Show images in posts Bug ?

i want it to show URL in

[url=......]

not image URL

roll:rolleyes::rolleyes:

Re: Show images in posts Bug ?

Oh, I kinda get what you mean now.

If Anatoly tells me what file to edit, I can edit it for you so the BBCode shows something like this instead:
http://punbb.informer.com/img/slick_punbb/logo_2_left.png

Re: Show images in posts Bug ?

parser.php ?

Re: Show images in posts Bug ?

Garciat wrote:

If Anatoly tells me what file to edit, I can edit it for you...

Here: http://punbb.informer.com/trac/browser/ … v=621#L284

Carpe diem

8 (edited by User33 2008-11-11 21:55)

Re: Show images in posts Bug ?

Add:

    if($link!=$full_url && stripos($link, '[img]')!==false && $pun_user['show_img'] == '0')
    {
        $link = str_ireplace(array("[img]", "[/img]"), "", $link);
        $link = ((strlen($link) > 55) ? substr($link, 0 , 39).' &hellip; '.substr($, -10) : $link);
    }

to Line 276 on 'include/parser.php'.

or download the file from http://garciat.us.to/code/punbb/parser.php (right-click > save as...)

Re: Show images in posts Bug ?

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/httpd/vhosts/aaa/httpdocs/include/parser.php on line 304

Fatal error: Call to undefined function: parse_message() in /home/httpd/vhosts/aaa/httpdocs/viewtopic.php on line 583

include/parser.php on line 304

        $link = ((strlen($link) > 55) ? substr($link, 0 , 39).' &hellip; '.substr($, -10) : $link);

viewtopic.php on line 583

    $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);

10 (edited by User33 2008-11-11 21:55)

Re: Show images in posts Bug ?

I think you placed the piece of code somewhere it shouldn't be.

Try using the parser.php I provided.

Note: This is only for PunBB 1.2.20