Topic: pun_bbcode extension

Can you please make the next version force a space before and after the smilies? Many people click on it and if there isn't a space before it, it wont show up right and its safe to throw one after it too, since they might add a smiley into a huge paragraph without bothering to add a space.

Also do you have the source files to the icons? I was wondering if they had a color version of them or not, otherwise I'll just change the palette in photoshop, but it would be nice if you did have full color versions of them too.

Thanks a lot. smile

Re: pun_bbcode extension

You can find the smilies on 'img/smilies/'.

Re: pun_bbcode extension

I meant the source files for the icons (bold, picture) as in PSD or something

Re: pun_bbcode extension

'extensions/pub_bbcode/buttons/Oxygen/'

Re: pun_bbcode extension

s0me0ne wrote:

Can you please make the next version force a space before and after the smilies?

Added.

s0me0ne wrote:

Also do you have the source files to the icons?

I will try to.

Carpe diem

Re: pun_bbcode extension

s0me0ne wrote:

Also do you have the source files to the icons?

pun_bbcode/buttons.psd
Is it OK?

Carpe diem

7

Re: pun_bbcode extension

The plugin doesn't seem to work in IE6 hmm

Re: pun_bbcode extension

Anatoly wrote:
s0me0ne wrote:

Also do you have the source files to the icons?

pun_bbcode/buttons.psd
Is it OK?

Everything is flattened, but this isnt a big issue, so dont wory about it. wink

9

Re: pun_bbcode extension

One problem with the bbcode_buttons extension.
Although it requires the include/parser.php it does not check the preferences of the forum and it includes buttons which should not be made available such as (in my case) the image button.

I consider this a bug. Is there a way around it?

10

Re: pun_bbcode extension

Unfortunately I did not manage to understand you completely. Are you talking about using usual buttons in BBcode Bar? Describe it in a more detailed way, please.

Re: pun_bbcode extension

colak - good point. I'll look at that for my extension as well.

my mind is on a permanent tangent
byUsers forum

12 (edited by colak 2009-03-17 14:33)

Re: pun_bbcode extension

Slavok wrote:

Unfortunately I did not manage to understand you completely. Are you talking about using usual buttons in BBcode Bar? Describe it in a more detailed way, please.

Hi Slavok,

In the neme forum under the Settings/Features preferences we have "Allow BBCode img tag in posts." unchecked which implies that we do not allow images on the forum.

The bbcode extension does not recognise this preference and provides the forum members with the img tag button.

> Edit: typo

13

Re: pun_bbcode extension

Thank you for the explanations, this check will be implemented in the next version of the extension.

Re: pun_bbcode extension

hey, i want to add another button to the bbcode bar, how do i do that.
its a video button: [video][/video]

Thanks

MyFootballCafe.com  is Now Online!

15 (edited by Khalid-S 2009-03-22 07:58)

Re: pun_bbcode extension

SuperMAG wrote:

hey, i want to add another button to the bbcode bar, how do i do that.
its a video button: [video][/video]

Thanks

I request that too.. any help guys?

Thanks in advance.

16

Re: pun_bbcode extension

SuperMAG wrote: wrote:

hey, i want to add another button to the bbcode bar, how do i do that.
its a video button: [video][/video]

Thanks

If there is a way i'd like to know how extra buttons are added. I am particularly interested in a way to add the [strike][/strike] attribute.

Re: pun_bbcode extension

have a look at:
PunBB BBCode Extended available via quirm.net

it should also give you tips on how to add the video tag if you want it.

my mind is on a permanent tangent
byUsers forum

Re: pun_bbcode extension

well i cant understand the manifest as much i understood a clear code.

but i think it adds a spoiler tag.

i installed a video extension by Neck. which you can post videos by [video] [/video] . I just need to add a button to the bbcode bar, so users can easily insert that code.

thanks

MyFootballCafe.com  is Now Online!

Re: pun_bbcode extension

you'll need to edit the puntoolbar extension, with that one it is very easy, just copy one of the existing ones. As for the button - any image should be usable.

my mind is on a permanent tangent
byUsers forum

Re: pun_bbcode extension

By puntoolbar extension, you mean the bar.php file in pun_bbcode or edit PunBB BBCode Extended's mainifest.xml or another extension? can you please specify.

Thanks.

Re: pun_bbcode extension

BBCode buttons is the official 'toolbar' such that it is. So to add buttons to the toolbar you need to edit things in there.

BBCode Extended adds spoiler and strikethough tags and is available via quirm.net

my mind is on a permanent tangent
byUsers forum

Re: pun_bbcode extension

ok here is the bar.php in pun_bbcode extension:

<?php

/***********************************************************************

    Copyright (C) 2008  PunBB

    Based on Easy BBCode extension by Rickard Andersson.

    PunBB is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published
    by the Free Software Foundation; either version 2 of the License,
    or (at your option) any later version.

    PunBB is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
    MA  02111-1307  USA

***********************************************************************/

if (!defined('FORUM'))
    die();

// NOTE: I couldn't find how to remove sf-set from here.
?>    <div class="sf-set" id="pun_bbcode_bar">
        <div id="pun_bbcode_wrapper"<?php echo $forum_user['pun_bbcode_use_buttons']?' class="graphical"':'' ?>>
            <div id="pun_bbcode_buttons">
<?php

// List of tags, which may have attribute
$tags_without_attr = array('b', 'i', 'u', 'url', 'email', 'img', 'list', 'li' => '*', 'quote', 'code');

// List of tags, which may not to have attribute
if ($forum_user['pun_bbcode_use_buttons'])
    $tags_with_attr = array('color');
else
    $tags_with_attr = array('quote', 'color', 'url', 'email', 'img', 'list');

// Let's get the list of all tags
$tags = array_unique(array_merge($tags_without_attr, $tags_with_attr));

if ($forum_user['pun_bbcode_use_buttons'])
{
    if (file_exists($ext_info['path'].'/buttons/'.$forum_user['style'].'/'))
        $buttons_path = $ext_info['url'].'/buttons/'.$forum_user['style'];
    else
        $buttons_path = $ext_info['url'].'/buttons/Oxygen';
}
$tabindex = -1;

foreach ($tags as $filename => $tag)
{
    if (in_array($tag, $tags_without_attr))
    {
        if ($forum_user['pun_bbcode_use_buttons'])
            echo '<img src="'.$buttons_path.'/'.(is_numeric($filename)?$tag:$filename).'.png" alt="['.$tag.']" title="'.$tag.'"';
        else
            echo '<input type="button" value="'.ucfirst($tag).'" name="'.$tag.'"';

        echo ' onclick="insert_text(\'['.$tag.']\',\'[/'.$tag.']\')" tabindex="'.$tabindex.'"/>';
    }

    if (in_array($tag, $tags_with_attr))
    {
        if ($forum_user['pun_bbcode_use_buttons'])
            echo '<img src="'.$buttons_path.'/'.(is_numeric($filename)?$tag:$filename).'.png" alt="['.$tag.'=]" title="'.$tag.'="';
        else
            echo '<input type="button" value="'.ucfirst($tag).'=" name="'.$tag.'"';

        echo ' onclick="insert_text(\'['.$tag.'=]\',\'[/'.$tag.']\')" tabindex="'.$tabindex.'" />';
    }

    $tabindex--;
}

?>
            </div>
            <div id="pun_bbcode_smilies">
<?php

// Display the smiley set
foreach (array_unique($smilies) as $smile_text => $smile_file)
    echo '<a href="javascript:insert_text(\''.$smile_text.'\', \'\');" tabindex="'.($tabindex--).'"><img src="'.$base_url.'/img/smilies/'.$smile_file.'" width="15" height="15" alt="'.$smile_text.'" /></a>'."\n";

?>            </div>
        </div>
    </div>

Can u show me quick example of which lines to duplicate. Thanks

MyFootballCafe.com  is Now Online!

Re: pun_bbcode extension

my apologies - can't remember everything off the top of my head smile

$tags_without_attr = array('b', 'i', 'u', 'url', 'email', 'img', 'list', 'li' => '*', 'quote', 'code', 'spoiler','strike'=>'s');

I added in spoiler and strike, and that line is in bar.php, though you may also deem it necessary to add to this line:

$tags_with_attr = array('quote', 'color', 'url', 'email', 'img', 'list');

help any?

my mind is on a permanent tangent
byUsers forum

24 (edited by Khalid-S 2009-03-22 18:49)

Re: pun_bbcode extension

Thanks. I've added a spoiler and video 16x pictures as well. If anyone want to use them, They are actually from Mac OSX Leopard original stock icons, well designed in my opinion.

http://b1.s3.p.quickshareit.com/files/spoilerdfd6c.png http://b5.s3.p.quickshareit.com/files/video1aa35.png http://b2.s3.p.quickshareit.com/files/mp3a82a0.png

Re: pun_bbcode extension

THANKS ALOT Rich Pedley, it worked, just added the video. Thanks for the buttons Khalid-S.

MyFootballCafe.com  is Now Online!