Topic: BBcode

I plan release this mod soon ,but must finish some functions .More info about this mod  http://punbb.org/forums/viewtopic.php?id=3847 .

If someone want test it there is my test forum.
Image and close all tags functions not existing yet .

The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

Re: BBcode

Just tested it , seems pretty nice big_smile

can't wait for it to be released

Re: BBcode

Yeah, seems nice :)

One small note though, email should not give errormessage when you press cancel. Otherwice really nice :)

4 (edited by Maciek 2004-05-17 10:09)

Re: BBcode

Chacmool wrote:

Yeah, seems nice :)

One small note though, email should not give errormessage when you press cancel. Otherwice really nice :)

Ok i can remove this error message or change it .
meyby something like this : "You must enter an email address"

The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

5

Re: BBcode

ohhhh.. i want this mod smile

Re: BBcode

It doesn't work in Firefox :(

7

Re: BBcode

Jansson wrote:

It doesn't work in Firefox sad


yeah.. just noticed that too.. that sucked sad

8 (edited by Maciek 2004-05-27 21:58)

Re: BBcode

i must screw something hmm .I check this when i get some time (and when i install firefox) .


Edit

Btw.Meyby Someone with firefox or mozilla testing first script version on test forum .

The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

Re: BBcode

email code is working the same either the "guided mode" or "normal mode".

10 (edited by Maciek 2004-06-14 09:35)

Re: BBcode

Ok i rewrite some parts of script and now works ok smile

1.0.1 version download click me

Upgrade from 1.0. to 1.0.1 version download click me

jacobswell wrote:

email code is working the same either the "guided mode" or "normal mode".

I now email ,http ,image and list tag working the same on bouth mod .

The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

11 (edited by jacobswell 2004-05-28 13:37)

Re: BBcode

something missing in the code of parser.php.

missing code for [*].

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

    $replace = array('<strong>$1</strong>',
                     '<em>$1</em>',
                     '<u>$1</u>',
                     'truncate_url(\'$1\')',
                     'truncate_url(\'$1\', \'$2\')',
               '<ul>$1</ul>',
               '<li>',
               '<font size=\'$1\'>$2</font>',
               '<font face=\'$1\'>$2</font>',
               '<p align=\'$1\'>$2</p>',
                     '<a href="mailto:$1">$1</a>',
                     '<a href="mailto:$1">$2</a>',
                     '<span style="color: $1">$2</span>',
               '<hr>'
    );

[----] means horizental line. I added for me. Great Job. thanks.

12 (edited by Maciek 2004-05-28 18:37)

Re: BBcode

Small install guide update

When u install MOD in edit.php

you have something like this

Find line 202

</td>
<td class="puncon2"> <textarea name="req_message" rows="20" cols="95"><?php echo pun_htmlspecialchars($cur_post['message']) ?></textarea></td>
</tr>

and replace with

</td>
<td class="puncon2"> <textarea name="req_message" id="req_message" rows="20" cols="95" tabindex="<?php echo $cur_index++ ?>"><?php echo $quote ?></textarea></td>
</tr>
</tr> 
</table></td> 
</tr> 

this is wrong must be

and replace with

</td>
<td class="puncon2"> <textarea name="req_message" id="req_message" rows="20" cols="95" tabindex="<?php echo $cur_index++ <?php echo pun_htmlspecialchars($cur_post['message']) ?></textarea></td>
</tr>
The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

13

Re: BBcode

I find next bug sad
If you install this mod check file edit.php

try edit some post if you see editing message everything is ok if you dont see
open edit.php and check :

if in line 202 you have

</td>
<td class="puncon2"> <textarea name="req_message" id="req_message" rows="20" cols="95" tabindex="<?php echo $cur_index++ ?>"><?php echo $quote ?></textarea></td>
</tr>

replace

<?php echo $quote ?>

with

<?php echo pun_htmlspecialchars($cur_post['message']) ?>

That's all

FOR NOW smile

The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

14 (edited by jacobswell 2004-05-29 02:10)

Re: BBcode

in bb_code.php

</select>
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>

should be replaced with

</select>
</td>
</tr>
<tr>
<td>

and

</td>
</tr>
</td>
</tr>
<//---------------------------------------------------->
<//but what if we need change radio button status :/   > 
<//---------------------------------------------------->
<tr>
<small><input type="radio" name="mode" value="normal" onClick="changeMode('normal')">
 Guided Mode  
<input type="radio" name="mode" value="advanced" onClick="changeMode('advanced')" checked="checked">
 Normal Mode</small>
</tr>
</table>

should be replace with

</td>
</tr>
<//---------------------------------------------------->
<//but what if we need change radio button status :/   > 
<//---------------------------------------------------->
<tr>
<td>
<small><input type="radio" name="mode" value="normal" onClick="changeMode('normal')">
 Guided Mode  
<input type="radio" name="mode" value="advanced" onClick="changeMode('advanced')" checked="checked">
 Normal Mode</small>
</td>
</tr>
</table>

15

Re: BBcode

jacobswell wrote:

in bb_code.php

</select>
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>

should be replaced with

</select>
</td>
</tr>
<tr>
<td>

and

</td>
</tr>
</td>
</tr>
<//---------------------------------------------------->
<//but what if we need change radio button status :/   > 
<//---------------------------------------------------->
<tr>
<small><input type="radio" name="mode" value="normal" onClick="changeMode('normal')">
 Guided Mode  
<input type="radio" name="mode" value="advanced" onClick="changeMode('advanced')" checked="checked">
 Normal Mode</small>
</tr>
</table>

should be replace with

</td>
</tr>
<//---------------------------------------------------->
<//but what if we need change radio button status :/   > 
<//---------------------------------------------------->
<tr>
<td>
<small><input type="radio" name="mode" value="normal" onClick="changeMode('normal')">
 Guided Mode  
<input type="radio" name="mode" value="advanced" onClick="changeMode('advanced')" checked="checked">
 Normal Mode</small>
</td>
</tr>
</table>

Thanks for info ,when i back to home i fix that

The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

16 (edited by shuron 2004-07-27 23:34)

Re: BBcode

can i have a correct mode in one pice?
please big_smile

17

Re: BBcode

shuron wrote:

can i have a correct mode in one pice?
please big_smile

Sure why not smile

http://jacobswell.nared.net/upload/bbcodeMOD1.0.2.rar

The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

18

Re: BBcode

thanks

19

Re: BBcode

jacobswell wrote:

something missing in the code of parser.php.

missing code for [*].

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

    $replace = array('<strong>$1</strong>',
                     '<em>$1</em>',
                     '<u>$1</u>',
                     'truncate_url(\'$1\')',
                     'truncate_url(\'$1\', \'$2\')',
               '<ul>$1</ul>',
               '<li>',
               '<font size=\'$1\'>$2</font>',
               '<font face=\'$1\'>$2</font>',
               '<p align=\'$1\'>$2</p>',
                     '<a href="mailto:$1">$1</a>',
                     '<a href="mailto:$1">$2</a>',
                     '<span style="color: $1">$2</span>',
               '<hr>'
    );

[----] means horizental line. I added for me. Great Job. thanks.

Here's a PHP programming tip to make the management of the above _much_ nicer:

$patternreplace = array(
  '#\[b\](.*?)\[/b\]#s'     => '<strong>$1</strong>',
  '#\[i\](.*?)\[/i\]#s'       => '<em>$1</em>',
  '#\[u\](.*?)\[/u\]#s'     => '<u>$1</u>',
  // etc
  );

$pattern = array_keys($patternreplace);
$replace = array_values($patternreplace);

Hope this helps.

Paul.

Re: BBcode

Maciek
do you know how to get [tab] code from ikonboard working in punbb?

21

Re: BBcode

im trying to learn some more advanced bb code things with text. please email me great advanced learning sites or give me examples please at cbsilk24@yahoo.com

22

Re: BBcode

is there an updated verson of this mod for 1.1.5? if so where can i download it.

23 (edited by Maciek 2004-09-06 14:10)

Re: BBcode

Gizzmo wrote:

is there an updated verson of this mod for 1.1.5? if so where can i download it.

Hi here http://jacobswell.nared.net/upload/bbcodeMOD1.0.2.rar you find last version (1.0.2) (thanks jacobswell) .This version should works "normal" in 1.1.5 but i dont test it .

Btw. I almost finish bbcode 2.0 beta version mod and i think u should wait for it ,beacouse old 1.X series had too many bugs in java script  i stop developing this mod . I need few days more to finish new java script and then i released it.

In 2.0 you find :
new script  (no more browser errors)
button status
Advanced mode (allows you to manually enter code.)
Simple mode (displays guides which assist you in formatting.)

The best things in life are free*

* plus shipping and handling

[img]http://members.lycos.co.uk/maciekziolkowski/gmailsign.jpg[/img]

24

Re: BBcode

kool i think i will wait than.

25

Re: BBcode

can you put it on the quick post sectition too, or at least show how to