101

Re: Easy BBCode 1.0.1

Hi,
I just downloaded it, but how do I install it?

Do I need another mod to install this mod? The .zip file only have 3 files and no install.txt

Many thanks!
Oliver

http://tinymailto.com/oliversl <-- my email after a captcha

Re: Easy BBCode 1.0.1

Some have install.txt others have readme.txt... but they do the same thing.

Did u not open the readme.txt? it explains what you need to do.

103

Re: Easy BBCode 1.0.1

oliversl wrote:

Hi,
I just downloaded it, but how do I install it?

Do I need another mod to install this mod? The .zip file only have 3 files and no install.txt

Many thanks!
Oliver

1 - Unzip the archive and keep the same structure. Upload the files in the root of your forum.


--------------------------------------------------------------------------------


2 - OPEN post.php

SEARCH (line 332)

$form = '<form id="post" method="post" action="post.php?action=post&tid='.$tid.'" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">';

REPLACE BY:

$form = '<form id="post" name="post" method="post" action="post.php?action=post&tid='.$tid.'" onsubmit="this.submit.disabled=true;if(process_form(this)){return true;}else{this.submit.disabled=false;return false;}">';

SEARCH (line 385):

$form = '<form id="post" method="post" action="post.php?action=post&fid='.$fid.'" onsubmit="return process_form(this)">';

REPLACE BY:
$form = '<form id="post" name="post" method="post" action="post.php?action=post&fid='.$fid.'" onsubmit="return process_form(this)">';

SEARCH (line 493):
<?php endif; ?>                        <label><strong><?php echo $lang_common['Message'] ?></strong><br />

REPLACE BY:

<?php endif; require PUN_ROOT.'mod_easy_bbcode.php'; ?>                        <label><strong><?php echo $lang_common['Message'] ?></strong><br />

SAVE AND UPLOAD


--------------------------------------------------------------------------------


3 - OPEN edit.php

SEARCH (line 202):

<form id="edit" method="post" action="edit.php?id=<?php echo $id ?>&action=edit" onsubmit="return process_form(this)">

REPLACE BY:

<form id="edit" name="edit" method="post" action="edit.php?id=<?php echo $id ?>&action=edit" onsubmit="return process_form(this)">

SEARCH (line 210):

<?php endif; ?>                        <label><?php echo $lang_common['Message'] ?><br />

REPLACE BY:

<?php endif; $bbcode_form = 'edit'; $bbcode_field = 'req_message'; require PUN_ROOT.'mod_easy_bbcode.php'; ?>                        <label><?php echo $lang_common['Message'] ?><br />

SAVE AND UPLOAD


--------------------------------------------------------------------------------


4 - OPEN include/parser.php

SEARCH (line 314)

                $pattern = array('#\[b\](.*?)\[/b\]#s',
                     '#\[i\](.*?)\[/i\]#s',
                     '#\[u\](.*?)\[/u\]#s',
                     '#\[url\]([^\[]*?)\[/url\]#e',
                     '#\[url=([^\[]*?)\](.*?)\[/url\]#e',
                     '#\[email\]([^\[]*?)\[/email\]#',
                     '#\[email=([^\[]*?)\](.*?)\[/email\]#',
                     '#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s');


REPLACE BY:
                $pattern = array('#\[b\](.*?)\[/b\]#s',
                     '#\[i\](.*?)\[/i\]#s',
                     '#\[u\](.*?)\[/u\]#s',
                     '#\[url\]([^\[]*?)\[/url\]#e',
                     '#\[url=([^\[]*?)\](.*?)\[/url\]#e',
                     '#\[email\]([^\[]*?)\[/email\]#',
                     '#\[email=([^\[]*?)\](.*?)\[/email\]#',
                     '#\[ul\](.*?)\[/ul\]#',
                     '#\[ol\](.*?)\[/ol\]#',
                     '#\[uli\](.*?)\[/uli\]#',
                     '#\[oli\](.*?)\[/oli\]#',
                     '#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s',
                     '#\(.*?)\[/font\]#',
                     '#\#',
                     '#\[/font\]#',
                     '#\[align=(.*?)\](.*?)\[/align\]#',
                     '#\[style="(.*?)"\](.*?)\[/style\]#',
                     '#\[hr /\]#',
                     '#\[hr\]#',
                     '#\[table\](.*?)\[/table\]#',
                     '#\[caption\](.*?)\[/caption\]#',
                     '#\[tr\](.*?)\[/tr\]#',
                     '#\[td\](.*?)\[/td\]#',
                     '#\[s\](.*?)\[/s\]#',
                     '#\[pre\](.*?)\[/pre\]#',
                     '#\[pre\]#',
                     '#\[/pre\]#',
                     '#\[sup\](.*?)\[/sup\]#',
                     '#\[sub\](.*?)\[/sub\]#',
                     '#\{1,2})](.*?)\[/size\]#s',
                     '#\#',
                     '#\[/size\]#',
                     '#\[h\](.*?)\[/h\]#');

SEARCH (line 323):

                $replace = array('<strong>$1</strong>',
                     '<em>$1</em>',
                     '<span class="bbu">$1</span>',
                     'handle_url_tag(\'$1\')',
                     'handle_url_tag(\'$1\', \'$2\')',
                     '<a href="mailto:$1">$1</a>',
                     '<a href="mailto:$1">$2</a>',
                     '<span style="color: $1">$2</span>');

REPLACE BY:

                $replace = array('<strong>$1</strong>',
                     '<em>$1</em>',
                     '<span class="bbu">$1</span>',
                     'handle_url_tag(\'$1\')',
                     'handle_url_tag(\'$1\', \'$2\')',
                     '<a href="mailto:$1">$1</a>',
                     '<a href="mailto:$1">$2</a>',
                     '<ul>$1</ul>',
                     '<ol>$1</ol>',
                     '<li>?  $1</li>',
                     '<li>$1</li>',
                     '<span style="color: $1">$2</span>',
                     '<span style="font-family: $1">$2</span>',
                     '<span style="font-family: $1">',
                     '</span>',
                     '<p align="$1">$2</p>',
                     '<span style="$1">$2</span>',
                     '<hr />',
                     '<hr />',
                     '<table>$1</table>',
                     '<div align="center">$1</div>',
                     '<tr>$1</tr>',
                     '<td>$1</td>',
                     '<del>$1</del>',
                     '<pre>$1</pre>',
                     '<pre>',
                     '</pre>',
                     '<sup>$1</sup>',
                     '<sub>$1</sub>',
                     '<span style="font-size: $1pt;">$2</span>',
                     '<span style="font-size: $1pt;">$2',
                     '</span>',
                     '<span style="background-color: #FFFF00; color: #000000">$1</span>');

SAVE AND UPLOAD

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

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  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

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

I'm from Viet Nam. i speak english vey bad! Sorry.

Re: Easy BBCode 1.0.1

@oliversl

This is confusing....
Was you asking about the orignal Easy BBCode Mod?? the one that this post is orignally about.

Or you asking about something else??

What have you downloaded?

105

Re: Easy BBCode 1.0.1

Hi Steven,
I downloaded:
http://www.punres.org/download.php?id=115

from:
http://www.punres.org/files.php?pid=50

I understand that the readme.txt is in some sort of language, maybe a language as the one used in the EaseMod in phpbb.
Thats why I asked if there is a mod that can read and interpred the language in readme.txt. If that kind of mod exists, I think it will make installation/upgrade more easy.

I will follow thronga instructions or just do what the readme.txt says.

After I find a solution, I will complete this page:
http://wiki.punres.org/How_to_install_a_mod

Thanks
Oliver

http://tinymailto.com/oliversl <-- my email after a captcha

106 (edited by nick23 2006-06-27 21:46)

Re: Easy BBCode 1.0.1

hi chaps,

I've uploaded the following mod:  Easy BBCode 1.0.1 http://punbb.org/forums/viewtopic.php?id=6217 - and the bb code buttons appear perfectly, however when posting, text is only present for the emoticons (rather than the actual png files).

Below the bbcode buttons i just get the text version of the emoticon, and when clicking on it, the text version appears in the post. The actual smilie doesnt appear either way.


This is from my parser.php file:


// Here you can add additional smilies if you like (please note that you must escape singlequote and backslash)
$smiley_text = array(':)', '=)', ':|', '=|', ':(', '=(', ':D', '=D', ':o', ':O', ';)', ':/', ':P', ':lol:', ':mad:', ':rolleyes:', ':cool:');
$smiley_img = array('smile.png', 'smile.png', 'neutral.png', 'neutral.png', 'sad.png', 'sad.png', 'big_smile.png', 'big_smile.png', 'yikes.png', 'yikes.png', 'wink.png', 'hmm.png', 'tongue.png', 'lol.png', 'mad.png', 'roll.png', 'cool.png');



Am I meant to change something here? Or within the mod_easy file uploaded from the Easy BBCode mod?


(the png files are all located in html/board/img/smilies.



cheers,

107

Re: Easy BBCode 1.0.1

Okay. Fixed it. Was an issue with the files uploaded (the actual png files).

Anyways, all looks good apart from 2 emoticons that appear to be squashed when appearing under the bbcode buttons and when selected in a post.

Any ideas what may cause this?

Re: Easy BBCode 1.0.1

Read this: http://www.punres.org/viewtopic.php?id=1633 smile

109 (edited by nick23 2006-06-27 23:38)

Re: Easy BBCode 1.0.1

Yep. Did so!

Thing is, now the emoticons appear fine when they appear for selection, but they are squashed when its been posting (i should add that its only the bigger emotions that are squashed. the normal sized ones are fine).

Reading through this thread, someone had the same problem, but I dont quite understand how they resolved it.



Cyrix wrote:

Hi, i've problem, when posted, the smilies image size is decreased, how can that be changed to normal size, like all others standart smilies?

Here's screenshot http://img93.imageshack.us/img93/1149/2 … rot5kv.png

And Cyrix then stated:

managed.. it was needed to remove from parser.php all smilies, and add easy smilies mod, then through that mod added smilies and everything works fine.

110

Re: Easy BBCode 1.0.1

steve, you mention changing this:

echo "\t\t\t\t\t\t\t".'<a href="javascript:insert_text(\''.$smiley_text[$i].'\', \'\');"><img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.$smiley_text[$i].'" /></a>'."\n";



what has to be altered?

Re: Easy BBCode 1.0.1

nick23 wrote:

steve, you mention changing this:

echo "\t\t\t\t\t\t\t".'<a href="javascript:insert_text(\''.$smiley_text[$i].'\', \'\');"><img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.$smiley_text[$i].'" /></a>'."\n";

what has to be altered?

to this

echo "\t\t\t\t\t\t\t".'<a href="javascript:insert_text(\''.$smiley_text[$i].'\', \'\');"><img src="img/smilies/'.$smiley_img[$i].'" alt="'.$smiley_text[$i].'" /></a>'."\n";

removing

 width="15" height="15"

112

Re: Easy BBCode 1.0.1

yes, thats been done already.

do i need to do the same for the following in the parser file?


$num_smilies = count($smiley_text);
    for ($i = 0; $i < $num_smilies; ++$i)
        $text = preg_replace("#(?<=.\W|\W.|^\W)".preg_quote($smiley_text[$i], '#')."(?=.\W|\W.|\W$)#m", '$1<img src="img/smilies/'.$smiley_img[$i].'" width="15" height="15" alt="'.substr($smiley_img[$i], 0, strrpos($smiley_img[$i], '.')).'" />$2', $text);

Re: Easy BBCode 1.0.1

Yep

114

Re: Easy BBCode 1.0.1

Fantastic! Cheers.

115 (edited by nickfzx 2007-03-13 17:29)

Re: Easy BBCode 1.0.1

I have this installed on my site and it works great in the quick reply and post except that when I go to edit post, none of the buttons work.

To test this out you can use my testing server:

//edited out by me - don't want google indexing it//

not sure why this is happening, i have a lot of mods and the like...but it is strange right?  does anyone else have this problem?

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

Re: Easy BBCode 1.0.1

Unfortunately I can't take a look because apparently MySQL has too many connections. However, for anything involving JS, the FireBug extension for Firefox is great. It might point you in the right direction (it has for me on many occasions).

Looking for a certain modification for your forum? Please take a look here before posting.

117

Re: Easy BBCode 1.0.1

Hello. Have installed Easy_BBCode_1.0.1, works fine but i want smileys and bbcode to show over quickpost, look at the picture. How do i do?

http://img478.imageshack.us/img478/3923/quickpostie6.jpg

118

Re: Easy BBCode 1.0.1

i got it working thanks pogenwurst...yeah my testing server has issues with those Too many connect errors...once the host (which is mediatemple) has sorted them out I will move the whole site over to them.

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

119

Re: Easy BBCode 1.0.1

adjust wrote:

Hello. Have installed Easy_BBCode_1.0.1, works fine but i want smileys and bbcode to show over quickpost, look at the picture. How do i do?

http://img478.imageshack.us/img478/3923 … ostie6.jpg

repeat step 5, 6 and 7 to viewtopic.php

#
#---------[ 5. OPEN ]---------------------------------------------------------
#

edit.php


#
#---------[ 6. FIND (line: 210) ]---------------------------------------------
#

<?php endif; ?>                        <label><?php echo $lang_common['Message'] ?><br />


#
#---------[ 7. REPLACE WITH ]-------------------------------------------------
#

<?php endif; $bbcode_form = 'edit'; $bbcode_field = 'req_message'; require PUN_ROOT.'mod_easy_bbcode.php'; ?>                        <label><?php echo $lang_common['Message'] ?><br />
فهد

120

Re: Easy BBCode 1.0.1

Does anyone know how the instructions to integrate the Easy BBCode 1.0.1 into my Private Message window? (meaning the smileys/buttons would be available when writing a PM)

Re: Easy BBCode 1.0.1

It's almost exactly like editing post.php

Find:

                <label><strong><?php echo $lang_common['Message'] ?></strong><br />

Before, add:

                <?php require PUN_ROOT.'mod_easy_bbcode.php'; ?>

122

Re: Easy BBCode 1.0.1

in message_send.php of course : )
thanks!

123 (edited by lie2815 2007-02-19 06:22)

Re: Easy BBCode 1.0.1

Ok, I am having some massive troubles right here:
http://bydebrasdesigns.com/biblestudy/f … .php?id=16
Help?

EDIT: I had followed trongha's recommendations (is that ok with the first version, too?)

FluxBB - v1.4.8

124 (edited by lie2815 2007-02-21 00:33)

Re: Easy BBCode 1.0.1

I put my doubtful code here.

FluxBB - v1.4.8

125

Re: Easy BBCode 1.0.1

Could anybody help me, please?
Again, the error message is:

Warning: preg_replace(): Compilation failed: unmatched parentheses at offset 5 in /home/content/d/e/b/debsue/html/biblestudy/forum/include/parser.php on line 383

Warning: preg_replace(): No ending delimiter '#' found in /home/content/d/e/b/debsue/html/biblestudy/forum/include/parser.php on line 383

Warning: preg_replace(): Compilation failed: unmatched parentheses at offset 6 in /home/content/d/e/b/debsue/html/biblestudy/forum/include/parser.php on line 383

Warning: preg_replace(): No ending delimiter '#' found in /home/content/d/e/b/debsue/html/biblestudy/forum/include/parser.php on line 383
FluxBB - v1.4.8