1 (edited by vin100 2006-06-18 23:15)

Topic: please remove this

project removed ; you can delete this topic

2

Re: please remove this

Ohh That is nice... I will have to try to install this later today. Thanks for sharing!

3

Re: please remove this

doesn't work... after changing my post.php i get errors

Re: please remove this

minis wrote:

doesn't work...

for you ...

minis wrote:

after changing my post.php i get errors

what is the errors messages ?

5 (edited by CodeXP 2006-02-17 18:43)

Re: please remove this

Looking really good!

There are some fixes needed though.. First, in the english smilies.php lang file, line 51 & 52 are incorrect. Change them from:

'Must int'                    =>    'Position must be an integer.'
'Positions changed'            =>    'Positions successfully changed. Redirecting ...',

to

'Must int'                    =>    'Position must be an integer.',
'Positions changed'            =>    'Positions successfully changed. Redirecting ...'

I'm still testing, so I'll let you know if I encounter any more errors. Great work so far though! smile

EDIT:
Also, the clickable smiley row doesn't work as expected. It returns 10 smileys, no matter how many are added. What I mean is, if you don't add any trough the plugin, it'll return 10 missing images, pointing to your img folder.

Another thing, though it's not really an error as much as an overlook. The [---] (<hr />) tag should be changed so that it returns </p><hr /><p>. The reason is that otherwise, the document won't validate.

Re: please remove this

yes you're right, thanks you for reports CodeXP ; i'll look at that tomorrow smile

Re: please remove this

Been looking through the mod a little, and made a few changes (none important ones though). Here's a couple I thought could be useful for some:

- A minor change to the toolbar.js, enabling you to highlight an url or image in the text area, and get that value as default (same way as the acronym function) for the img & url button.
Changed file here: download

- Also, I rewrote some of the common.php language additions, to be a little more descriptive etc.: Changes here

8 (edited by CodeXP 2006-02-18 00:08)

Re: please remove this

Here's a fix for the broken smiley images...

Instead of adding the code listed in the read_me.txt file, use the following:

REPLACEMENT TEXT FOR STEP 10 & 13:

<?php endif; ?>                        <label for="req_message"><strong><?php echo $lang_common['Message'] ?></strong></label>
                        <textarea name="req_message" id="req_message" rows="20" cols="95" tabindex="<?php echo $cur_index++ ?>"><?php echo isset($_POST['req_message']) ? pun_htmlspecialchars($message) : (isset($quote) ? $quote : ''); ?></textarea>

<?php
// Display the smiley set
@include_once PUN_ROOT.'cache/cache_smilies.php';
if (!defined('PUN_CACHE_SMILEY'))
{
    require_once PUN_ROOT.'include/cache_smilies.php';
    generate_smiley_cache();
    require PUN_ROOT.'cache/cache_smilies.php';
}

// Most of the loop was taken from Rickards mod_easy_bbcode.php
$smiley_dups = array();
$num_smilies = count($smiley_text);

for ($i = 0; $i < $num_smilies; ++$i)
{
    // Is there a smiley at the current index?
    if (!isset($smiley_text[$i]))
        continue;

    if (in_array($smiley_img[$i], $smiley_dups)) {
            // Unset duplicate entries
            unset($smiley_text[$i]);
            unset($smiley_img[$i]);
    }

    $smiley_dups[] = $smiley_img[$i];
}

// Re-index the arrays
$smiley_text = array_values($smiley_text);
$smiley_img = array_values($smiley_img);
?>
<script type="text/javascript" src="js/toolbar.js"></script>
<noscript><div><strong>Please enable javascript to activate the text formatting tools</strong></div></noscript>
<script type="text/javascript">

    function popup_color_picker()
    {
        document.getElementById('req_message').focus();
        var width = 400;
        var height = 230;
        window.open('color_picker.php', 'cp', 'alwaysRaised=yes, dependent=yes, resizable=no, location=no, width='
                    +width+', height='+height+', menubar=no, status=yes, scrollbars=no, menubar=no');
    }

    function popup_smilies()
    {
        document.getElementById('req_message').focus();
        var width = 120;
        var height = 150;
        window.open('smilies.php', 'smilies', 'alwaysRaised=yes, dependent=yes, resizable=yes, location=no, width='
                    +width+', height='+height+', menubar=no, status=yes, scrollbars=yes, menubar=no');
    }

    var smiliesTxt = new Array();
    var smiliesImg = new Array();
<?php
$stop = count($smiley_text);
for ($i = 0; $i < $stop; ++$i)
{
    if($i < 10) {
        echo "\t".'smiliesTxt['.$i.'] = "'.$smiley_text[$i].'";'."\n";
        echo "\t".'smiliesImg['.$i.'] = "'.$smiley_img[$i].'";'."\n";
    } else {
        $more_smilies = 1;
    }
}
?>
    if (document.getElementById)
    {
        var tb = new toolBar(document.getElementById('req_message'),'img/bt/','img/smilies/');

        tb.btStrong('<?php echo str_replace("'","\'",$lang_common['btStrong']); ?>');
        tb.btEm('<?php echo str_replace("'","\'",$lang_common['btEm']); ?>');
        tb.btIns('<?php echo str_replace("'","\'",$lang_common['btIns']); ?>');
        tb.btDel('<?php echo str_replace("'","\'",$lang_common['btDel']); ?>');
        tb.btQ('<?php echo str_replace("'","\'",$lang_common['btQ']); ?>');
        tb.btCode('<?php echo str_replace("'","\'",$lang_common['btCode']); ?>');
        tb.btAcronym(
            '<?php echo str_replace("'","\'",$lang_common['btAcronym']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btAcronymMsg']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btAcronymAcr']); ?>'
            );
        tb.btColor('<?php echo str_replace("'","\'",$lang_common['btColor']); ?>');
        tb.addSpace(10);
        tb.btBquote('<?php echo str_replace("'","\'",$lang_common['btBquote']); ?>');
        tb.btPre('<?php echo str_replace("'","\'",$lang_common['btPre']); ?>');
        tb.btHr('<?php echo str_replace("'","\'",$lang_common['btHr']); ?>');
        tb.addSpace(10);
        tb.btLink(
            '<?php echo str_replace("'","\'",$lang_common['btLink']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btLinkUrl']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btLinkText']); ?>'
            );
        tb.btImgLink(
            '<?php echo str_replace("'","\'",$lang_common['btImgLink']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btImgLinkUrl']); ?>');
        tb.addSpace(10);
        tb.btEmail(
            '<?php echo str_replace("'","\'",$lang_common['btEmail']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btEmailAdr']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btEmailText']); ?>'
            );
        tb.btNospam(
            '<?php echo str_replace("'","\'",$lang_common['btNospam']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btNospamAdr']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btNospamText']); ?>'
            );
        tb.addSpace(10);
        tb.btSmilies('<?php echo str_replace("'","\'",$lang_common['btSmilies']); ?>');
        tb.barSmilies(smiliesTxt,smiliesImg);
        tb.draw();
        <?php if ($more_smilies) echo 'tb.moreSmilies(\''.
        str_replace("'","\'",$lang_common['moreSmilies']).
        '\');'; ?>
    }
</script>

EDIT:

You may want to replace the your smilies.php, with this one: [Download]

Re: please remove this

Wow! This looks great! smile

hej!

Re: please remove this

It was working for a while and now it doesn't appear anymore lol sad

I changed the toolbar but then put it back and it just stopped working.

11 (edited by vin100 2006-02-18 11:15)

Re: please remove this

thank you CodeXP ; so i've release 1.1.1 ; and added things in help.php for new tags

12 (edited by gregb 2006-02-18 16:46)

Re: please remove this

bug with AP_News_Generator

Edit :

Ca marche spam en fait...

Can we make a link on the image's name, in order to don't have to copy the name of the image files ?

Greg Serveur : www.gregserveur.com

13

Re: please remove this

see that http://skyforum.ayzo.net/skyBoard/messa … 1&s=12

Greg Serveur : www.gregserveur.com

14

Re: please remove this

gregb wrote:

Can we make a link on the image's name, in order to don't have to copy the name of the image files ?

no you can't, you have to copy the image name

15

Re: please remove this

How we can put a space between smiley images ?

see http://www.gregserveur.com/forum/post.php?tid=65

Greg Serveur : www.gregserveur.com

16

Re: please remove this

with CSS, somethings like this :

#smilies img { padding: 0 0.2em; }

Re: please remove this

Can't you just edit the code to contain a space?

18

Re: please remove this

No CSS is better than space, because with CSS we can adjust space between image (0.2em or 0.4em or what you want)

Re: please remove this

Ok. I have EasyBBCodes+extraBBCodes.
vin100
, your mod is a real beauty, but it's incompatible with the formers.
And to insert a huge number of lines of code inside three files is a veary thing, imho.
Can you form it in a single file (like mod_easy_bbcode.php) so one can include it in any form one needs?

20

Re: please remove this

what is "the formers" ? sorry but i don't understand

you add many lines because you can choose wich button you want to display on each form
for exemple if you don't want acronyms buton on quick post form you simply have to remove this lines from viewtopic.php :

        tb.btAcronym(
            '<?php echo str_replace("'","\'",$lang_common['btAcronym']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btAcronymMsg']); ?>',
            '<?php echo str_replace("'","\'",$lang_common['btAcronymAcr']); ?>'
            );

if you don't want smilies you can remove this :

        tb.btSmilies('<?php echo str_replace("'","\'",$lang_common['btSmilies']); ?>');
        tb.barSmilies(smiliesTxt,smiliesImg);

etc.

so I don't think i'll put all code in one file, but if you use all butons on the 3 form you can make 1 file

Re: please remove this

what is "the formers" ? sorry but i don't understand

I meant mods EasyBBCodes+extraBBCodes.
e.g. for people who once installed these mods and wish to install yours there is not so simple to do this.

Imho, holding all that type of code in one file (as it is done in mod_easy_bbcode.php) much more convinient
than adding a dozen of lines inside affected files.
And, sorry, I can't see why anyone should wish to escape any buttons or smilies in the form.

22 (edited by Apupv 2006-03-08 17:54)

Re: please remove this

You can skip smilies and rarely used buttons in order to lighten the size of the viewtopic.php, for example.

Re: please remove this

help, the smiley window does not pop up.

24

Re: please remove this

tracktrix, i've the same problem.
you just need to add some smiles in Admin section and connect they with text.