PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.


Login to move these ads to the bottom of the page

#1 2006-03-31 21:01:45

neutral
Member
From: Russia, Khabarovsk
Registered: 2005-11-17
Posts: 18

Modern BBcode 1.0.0

Code:

##        Mod title:  Modern BBcode 
##
##      Mod version:  1.0.0 
##   Works on PunBB:  1.2.x 
##     Release date:  29.03.2006 
##           Author:  neutral 
##
##      Description:  Adds some new bbcodes and toolbar to post/quickpost/edit forms with bbcode buttons.
##              New bb codes:
##            - strikeout text
##            - monospace text
##            - center aligned text
##            - right aligned text
##            - fontsize
##            - list (ordered, unordered)
##            - spoiler
##
##       Affects DB:  No 
##
##   Affected files:  header.php
##                    post.php
##              edit.php
##              viewtopic.php
##              /include/parser.php
##              /style/imports/base.css
##              /style/imports/<style_name>_cs.css
##
##            Notes:  This mod is based on Rikard Anderson's "Easy BBcode".
##              So installation is similar, excepting update of styles, since all
##              toolbars, buttons and popups are based on CSS.
##
##
##       DISCLAIMER:  Please note that 'mods' are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##

Download here

Offline

 

#2 2006-04-01 06:25:33

dharmil
Member
Registered: 2006-03-18
Posts: 25
Website

Re: Modern BBcode 1.0.0

look nice i havent installed it yet cuz i have mob_easy_bbcode and  this other thing that makes bbocde easy to post but i forget the name so i first need to uninstall them

Offline

 

#3 2006-04-06 07:45:31

Ajandurah
Guest

Re: Modern BBcode 1.0.0

I've installed this an must say I like it a lot, however I have come across one bug so far dealing with smilies. When using Firefox (1.5) and you edit an existing post and attempt to add a smilie using the 'more...' link for the smilie popup, any selected smilie will not be inserted. Nothing happens at all, it works ok in Internet Explorer though.

Anyway I tracked it down to the Javascript function insert_text() inside smilies.php

The line...

msgfield = (docOpener.all) ? docOpener.all.req_message : docOpener.forms['post']['req_message'];

Does not work with Firefox, at this point execution of the script halts and hence nothing happens. However if you change this line to...

msgfield = docOpener.getElementsByName("req_message").item(0);

Then it works fine in Firefox and Internet Explorer. Obviously a better hack would be to give the form element req_message an ID tag and use getElementById(<idtag>) rather than taking liberties with the returned elements list (in this case assuming there will only ever be a single element with the name req_message).

I havn't tested this with Opera or Safari etc as I don't have them available to me at present, though it should work.

 

#4 2006-04-10 04:44:56

neutral
Member
From: Russia, Khabarovsk
Registered: 2005-11-17
Posts: 18

Re: Modern BBcode 1.0.0

Ajandurah
Thanks for bugfix smile I have tested it on Opera, FireFox and IE - and it works. I will update the mod soon.

Offline

 

#5 2006-04-21 06:35:15

nrwilk
Member
Registered: 2006-04-15
Posts: 30
Website

Re: Modern BBcode 1.0.0

I got this mod into Pun Frontpage, and I love it!  This is easily the absolute best BBcode mod for PunBB so far.

The only thing is, I have a bunch of styles installed, and I'm not any good with css.  Do you have any tips on how to easily integrate your mod into styles other than the default included ones?

Thanks it looks really good!

Last edited by nrwilk (2006-04-22 09:34:40)

Offline

 

#6 2006-04-28 19:40:13

Vibrant
Member
Registered: 2006-04-23
Posts: 11

Re: Modern BBcode 1.0.0

hi, i have installed everything but i get this where the bbcode images should be...

http://img91.imageshack.us/img91/6072/picture15nh.png

*edit* nvm i got it to work big_smile

Last edited by Vibrant (2006-04-28 19:42:33)

Offline

 

#7 2006-04-29 01:12:21

uberushaximus
New member
Registered: 2006-04-18
Posts: 2

Re: Modern BBcode 1.0.0

Very awesome, now if only someone could write a line to replace the current one for the PMS mod tongue

Offline

 

#8 2006-05-14 10:37:21

freakerz
Guest

Re: Modern BBcode 1.0.0

Great Mod!

Couple of bugs..

Still had that Javascript error, maybe you should update the file wink

Then when I add smileys over 15px x 15px.. it wouldn,t show right.. so I removed the widt="15" height="15" from the regexp here:

       

Code:

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

Line 429 for me.. after adding the script..

Last edited by freakerz (2006-05-14 10:37:39)

 

#9 2006-07-01 19:59:29

mdfh
Member
Registered: 2006-06-04
Posts: 16

Re: Modern BBcode 1.0.0

There is an error showing on the top in mainpage, userlist, etc.
viewtopic.php, edit.php and post.php will work well without the notice.

Did I miss something?

Notice: Undefined variable: modern_bbcode_enabled in /home/****/public_html/header.php on line 145


near that line are:
if ($modern_bbcode_enabled)
{
    $tpl_main = str_replace('<body onload="', '<body onClick="documentClickHandler(event.target);" onload="fixOperaWidth();', $tpl_main);
    $tpl_main = str_replace('<body>', '<body onClick="documentClickHandler(event.target);" onload="fixOperaWidth();">', $tpl_main);
}

Last edited by mdfh (2006-07-01 20:11:28)

Offline

 

#10 2006-07-05 11:19:25

agravetoncas
Member
From: #gentoo on freenode
Registered: 2005-11-17
Posts: 28
Website

Re: Modern BBcode 1.0.0

i guess french language file would be

Code:

<?php

// Language definitions used in various scripts
$lang_modern_bbcode = array(

// Prompt message for list tag message box
'List tag prompt'        =>    'Veuillez saisir le texte de l\'item à lister. Cliquer \"Annuler\" ou laisser le champs de saisie vide pour terminer.',

// Buttons texts
'Bold'                =>    'B',
'Italic'            =>    'I',
'Underline'            =>    'U',
'Strikeout'            =>    'S',
'URL'                =>    'Lien',
'Mail'                =>    '@',
'Code'                =>    '#',
'Quote'                =>    '»»',
'Color'                =>    'Couleur',
'Smiley'            =>    'Smiley',
'Inc text field height'        =>    '+',
'Dec text field height'        =>    '-',
'Monospace text'        =>    'Mono',
'Center'            =>    'Centre',
'Right'                =>    'Droite',
'Fontsize'            =>    'Taille',
'Image'                =>    'Image',
'List'                =>    'Liste',
'Spoiler'            =>    'Spoiler',
'Help'                =>    '?',

// Buttons titles
'Bold title'            =>    'Gras',

'Italic title'            =>    'Italique',

'Underline title'        =>    'Souligné',

'Strikeout title'        =>    'Strikeout',

'URL title'            =>    'Lien',

'Mail title'            =>    'E-mail',

'Code title'            =>    'Code',

'Quote title'            =>    'Citation',

'Color title'            =>    'Couleur',

'Smiley title'            =>    'Smilies',

'Inc text field height title'    =>    'Augmenter la zone de saisie de texte',

'Dec text field height title'    =>    'Réduire la zone de saisie de texte',

'Monospace text title'        =>    'Texte monospace (code)',

'Center title'            =>    'Aligner le texte au centre',

'Right title'            =>    'Aligner le texte à droite',

'Fontsize title'        =>    'Taille de la police de caractères',

'Image title'            =>    'Image',

'List title'            =>    'Liste',

'Spoiler title'            =>    'Spoiler (text caché)',

'Help title'            =>    'Aide au BBCode',

// Fontsizes
'Very small'            =>    'Très petit texte',
'Small'                =>    'Petit texte',
'Big'                =>    'Grand texte',
'Large'                =>    'Très grand texte',

// Image kinds
'No float'            =>    'Image ancrée',
'Float to left'            =>    'Image flottante sur la gauche',
'Float to right'        =>    'Image flottante sur la droite',

// Image kind titles

'No float title'        =>    'Le texte ne flotte pas autours de l\'image',

'Float to left title'        =>    'Le texte flotte autours de l\'image depuis la gauche',

'Float to right title'        =>    'Le texte flotte autours de l\'image depuis la droite',


// List kinds
'Unordered'            =>    'Liste non ordonnée',
'Ordered'            =>    'Liste ordonnée',

// List kind titles

'Unordered title'        =>    'Créer une liste non-ordonnée',

'Ordered title'            =>    'Créer une liste ordonnée',

'More text'            =>    'Plus...',



// Smilies popup window string constants

'Smilies table'            =>    'Liste de smilies',

'Smiley text'            =>    'Texte',

'Smiley image'            =>    'Smiley'


);

GreenPun style css code to add could be (better for sure) :

Code:

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

/* MOD MODERN BB-CODE STYLE INDICATORS */

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



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

/* MOD MODERN BBCODE: OVERRIDES FOR STANDART PUNBB STYLE INDICATORS */

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



#post textarea, #post input.longinput, #edit textarea, #edit input.longinput {

    border: 1px #0d4d0a solid; 

}



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

/* MOD MODERN BBCODE: TOOLBAR AND TOOLBUTTON STYLE INDICATORS */

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



DIV.toolbar {

    background: #387735;

    border-left: 1px #0d4d0a solid;

    border-top: 1px #0d4d0a solid;

    border-right: 1px #0d4d0a solid;

}



DIV.toolbar .draghandle {

    border-left: 2px #0d4d0a dotted;

}



DIV.toolbar .separator {

    border-left: 1px #0d4d0a solid;

}



DIV.toolbar a.tool_btn, DIV.toolbar a.dropdown, DIV.toolbar a.dropdown_opened {

    border: 1px #68aa65 solid;

    color: #DEDFDF;

}



DIV.toolbar a.tool_btn:visited, DIV.toolbar a.dropdown:visited, DIV.toolbar a.dropdown_opened:visited {

    color: #DEDFDF;

}



DIV.toolbar a.tool_btn:hover, DIV.toolbar a.dropdown:hover {

    border: 1px #6cb26a solid;

    color: #FFF;    

    background: #0d4d0a;

}



DIV.toolbar a.dropdown {

    background: url(/../../img/modern_bbcode/greenpun_arrow.png) no-repeat top right;

}



DIV.toolbar a.dropdown_opened, DIV.toolbar a.dropdown_opened:hover, DIV.toolbar a.dropdown_opened:visited {

    color: #FFF;

    border: 1px #0d4d0a solid;

    background: #68aa65 url(/../../img/modern_bbcode/greenpun_arrow_opened.png) no-repeat top right;

}



DIV.toolbar a.dropdown:hover {

    background: #0d4d0a url(/../../img/modern_bbcode/greenpun_arrow_hover.png) no-repeat top right;

}



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

/* MOD MODERN BBCODE: POPUP PALETTE INDICATORS */

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



/* 0. Common popup panel indicators */



#colorpalette #colorbtn, #smilespanel #smilesbtn, #sizepanel #sizebtn, #imgpanel #imgbtn, #listpanel #listbtn {

    border-left: 1px #0d4d0a solid;

    border-right: 1px #0d4d0a solid;

    color: #68aa65;

    background: #68aa65;

}



#colorpalette #colorcontent, #smilespanel #smilescontent, #sizepanel #sizecontent, #imgpanel #imgcontent, #listpanel #listcontent {

    border: 1px #0d4d0a solid; 

    background: #68aa65;

}



/* 1. Smileys popup panel indicators */



#smilespanel #adv a, #smilespanel #adv a:visited {

    color: #FFF;

}



#smilespanel #adv a:hover {

    color: #0d4d0a;

}



/* 2. Colors popup panel indicators */



#colorpalette #colorcontent a {

    border: 1px #387735 solid;

}



#colorpalette #colorcontent a:hover {

    border: 1px #6cb26a solid;

}



/* 3. Font-sizes, Images and Lists popup panel indicators */



#sizepanel #sizecontent a, #imgpanel #imgcontent a, #listpanel #listcontent a {

    border: 1px solid #387735;

    color: #FFF;

    background: #387735;

}



#sizepanel #sizecontent a:hover, #imgpanel #imgcontent a:hover, #listpanel #listcontent a:hover  {

    border: 1px #0d4d0a solid;

    color: #FFF;    

    background: #68aa65;    

}



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

/* MOD MODERN BBCODE: ADDITIONAL BBCODE INDICATORS */

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



code {

    color: #B42000;

}



div.postmsg li {

    color: #666;

}



DIV.spoilerbox p {

    color: #F1F1F1;

}



DIV.spoilerbox p:hover {

    color: #333;

}



IMG.postimg {

    padding: 1px;

    margin: 2px 5px;

    border: 1px solid #0d4d0a;

    background: #FFF;

}



DIV.postmsg a:hover IMG.postimg {

    border: 1px solid #B42000;

}

and images would be :
http://familyguy234.free.fr/img/modern_bbcode/greenpun_arrow.png
http://familyguy234.free.fr/img/modern_bbcode/greenpun_arrow_hover.png
http://familyguy234.free.fr/img/modern_bbcode/greenpun_arrow_opened.png

Sreenshot (nottez que la faute sur le mot 'Taille' est corrigée dans le code proposé ci-dessus :
http://familyguy234.free.fr/modern_bbcode_sshot.jpg

Last edited by agravetoncas (2006-07-05 11:26:57)

Offline

 

#11 2006-07-26 11:36:40

CowMix
Member
Registered: 2006-05-10
Posts: 28

Re: Modern BBcode 1.0.0

I'm having a problem with the drop boxes moving left or right from where they are supposed to appear when you resize the window, a popupbox will remain fixed once its opened but if you resize the window and open it again it will be right or wheres its supposed to be. Is this some kind of complication with my overall site styling?

Image

Last edited by CowMix (2006-07-26 18:41:48)

Offline

 

#12 2006-08-25 23:26:52

SDTux
Member
From: Russia, Ekaterinburg
Registered: 2006-01-24
Posts: 23
Website

Re: Modern BBcode 1.0.0

Vibrant wrote:

hi, i have installed everything but i get this where the bbcode images should be...

http://img91.imageshack.us/img91/6072/picture15nh.png

*edit* nvm i got it to work big_smile

I have the same truble in Opera.
Did you make all changes once again or were it something else?

Offline

 

#13 2006-08-27 12:49:54

lsantoro
New member
From: Buenos Aires, Argentina
Registered: 2006-07-04
Posts: 8
Website

Re: Modern BBcode 1.0.0

I have just installed it, and it works 100% ok. Thanks!

If you want to see a test of this mod: http://www.compradoresonline.com.ar/viewtopic.php?id=10

Last edited by lsantoro (2006-08-27 13:14:08)

Offline

 

#14 2006-08-30 22:49:12

solace
New member
Registered: 2006-05-29
Posts: 2

Re: Modern BBcode 1.0.0

i'm not having any luck making this work for sending PM's... any help?

Offline

 

#15 2006-08-31 01:04:15

solace
New member
Registered: 2006-05-29
Posts: 2

Re: Modern BBcode 1.0.0

also, the code to add this to the Quick Post doesn't seem to work under IE

Offline

 

#16 2006-09-23 15:41:59

Theberge43
New member
Registered: 2006-09-23
Posts: 3

Re: Modern BBcode 1.0.0

Weird thing ... Everything works exept the little arrows

Offline

 

#17 2006-10-01 10:17:28

MrMister
New member
Registered: 2006-10-01
Posts: 4

Re: Modern BBcode 1.0.0

Theberge43 wrote:

Weird thing ... Everything works exept the little arrows

That's because you have the forum on a subir and not the root (like me).
Just replace the url(/../../img/modern_bbcode/ with url(../../img/modern_bbcode/ and it'll be fine. Or if you prefer use the css below that has been altered already.

Code:

/****************************************************************/
/* MOD MODERN BB-CODE STYLE INDICATORS */
/****************************************************************/

/****************************************************************/
/* MOD MODERN BBCODE: OVERRIDES FOR STANDART PUNBB STYLE INDICATORS */
/****************************************************************/

#post textarea, #post input.longinput, #edit textarea, #edit input.longinput {
    border: 1px #0d4d0a solid; 
}

/****************************************************************/
/* MOD MODERN BBCODE: TOOLBAR AND TOOLBUTTON STYLE INDICATORS */
/****************************************************************/

DIV.toolbar {
    background: #387735;
    border-left: 1px #0d4d0a solid;
    border-top: 1px #0d4d0a solid;
    border-right: 1px #0d4d0a solid;
}

DIV.toolbar .draghandle {
    border-left: 2px #0d4d0a dotted;
}

DIV.toolbar .separator {
    border-left: 1px #0d4d0a solid;
}

DIV.toolbar a.tool_btn, DIV.toolbar a.dropdown, DIV.toolbar a.dropdown_opened {
    border: 1px #68aa65 solid;
    color: #DEDFDF;
}

DIV.toolbar a.tool_btn:visited, DIV.toolbar a.dropdown:visited, DIV.toolbar a.dropdown_opened:visited {
    color: #DEDFDF;
}

DIV.toolbar a.tool_btn:hover, DIV.toolbar a.dropdown:hover {
    border: 1px #6cb26a solid;
    color: #FFF;    
    background: #0d4d0a;
}

DIV.toolbar a.dropdown {
    background: url(../../img/modern_bbcode/greenpun_arrow.png) no-repeat top right;
}

DIV.toolbar a.dropdown_opened, DIV.toolbar a.dropdown_opened:hover, DIV.toolbar a.dropdown_opened:visited {
    color: #FFF;
    border: 1px #0d4d0a solid;
    background: #68aa65 url(../../img/modern_bbcode/greenpun_arrow_opened.png) no-repeat top right;
}

DIV.toolbar a.dropdown:hover {
    background: #0d4d0a url(../../img/modern_bbcode/greenpun_arrow_hover.png) no-repeat top right;
}

/****************************************************************/
/* MOD MODERN BBCODE: POPUP PALETTE INDICATORS */
/****************************************************************/

/* 0. Common popup panel indicators */

#colorpalette #colorbtn, #smilespanel #smilesbtn, #sizepanel #sizebtn, #imgpanel #imgbtn, #listpanel #listbtn {
    border-left: 1px #0d4d0a solid;
    border-right: 1px #0d4d0a solid;
    color: #68aa65;
    background: #68aa65;
}

#colorpalette #colorcontent, #smilespanel #smilescontent, #sizepanel #sizecontent, #imgpanel #imgcontent, #listpanel #listcontent {
    border: 1px #0d4d0a solid; 
    background: #68aa65;
}

/* 1. Smileys popup panel indicators */

#smilespanel #adv a, #smilespanel #adv a:visited {
    color: #FFF;
}

#smilespanel #adv a:hover {
    color: #0d4d0a;
}

/* 2. Colors popup panel indicators */

#colorpalette #colorcontent a {
    border: 1px #387735 solid;
}

#colorpalette #colorcontent a:hover {
    border: 1px #6cb26a solid;
}

/* 3. Font-sizes, Images and Lists popup panel indicators */

#sizepanel #sizecontent a, #imgpanel #imgcontent a, #listpanel #listcontent a {
    border: 1px solid #387735;
    color: #FFF;
    background: #387735;
}

#sizepanel #sizecontent a:hover, #imgpanel #imgcontent a:hover, #listpanel #listcontent a:hover  {
    border: 1px #0d4d0a solid;
    color: #FFF;    
    background: #68aa65;    
}

/****************************************************************/
/* MOD MODERN BBCODE: ADDITIONAL BBCODE INDICATORS */
/****************************************************************/

code {
    color: #B42000;
}

div.postmsg li {
    color: #666;
}

DIV.spoilerbox p {

   color: #F1F1F1;
}

DIV.spoilerbox p:hover {
    color: #333;
}

IMG.postimg {
    padding: 1px;
    margin: 2px 5px;
    border: 1px solid #0d4d0a;
    background: #FFF;
}

DIV.postmsg a:hover IMG.postimg {
    border: 1px solid #B42000;
}

Last edited by MrMister (2006-10-01 10:19:59)

Offline

 

#18 2006-10-10 00:46:03

Axium
New member
Registered: 2006-10-10
Posts: 1

Re: Modern BBcode 1.0.0

I have noticed that the popup divs work fine in the post/edit pages, but the quick post is messed up (the popups actually appear at the bottom of the page not on the icon itself).

Has anyone else noticed this behavior?

Offline

 

#19 2006-10-21 11:05:04

porcaeva
Member
Registered: 2006-08-20
Posts: 37

Re: Modern BBcode 1.0.0

i see this error Parse error: syntax error, unexpected T_FUNCTION, expecting '{' in /web/htdocs/www.xxx.com/home/board/include/parser.php on line 291

i have try this mod in 2 punbb but i see the same error help me please!!!

Last edited by porcaeva (2006-10-21 11:38:08)

Offline

 

#20 2006-10-22 14:51:10

porcaeva
Member
Registered: 2006-08-20
Posts: 37

Re: Modern BBcode 1.0.0

please help!!!

Offline

 

#21 2007-02-07 05:55:17

FSX
Member
Registered: 2006-09-14
Posts: 616
Website

Re: Modern BBcode 1.0.0

How can I make this work on the Private message page?

Offline

 

#22 2007-02-07 13:06:06

Kairi
Member
Registered: 2006-09-10
Posts: 116

Re: Modern BBcode 1.0.0

FSX wrote:

How can I make this work on the Private message page?

Not certain but try this anyhoo...

Open message_send.php

Find:

Code:

<label><strong><?php echo $lang_common['Subject'] ?></strong><br /><input class="longinput" type='text' name='req_subject' value='<?php echo $subject ?>' size="80" maxlength="70" tabindex='<?php echo $cur_index++ ?>' /><br /></label>

After add:

Code:

<?php require(PUN_ROOT.'mod_modern_bbcode.php'); ?>

I'm not totally positive but it works for easy bbcode tongue

Offline

 

#23 2007-02-07 13:36:12

FSX
Member
Registered: 2006-09-14
Posts: 616
Website

Re: Modern BBcode 1.0.0

It doesn't work.

Offline

 

#24 2007-02-07 13:59:09

Kairi
Member
Registered: 2006-09-10
Posts: 116

Re: Modern BBcode 1.0.0

FSX wrote:

It doesn't work.

Did you not find that line of code or did the require just not work period?

Offline

 

#25 2007-02-08 00:55:18

Ed
Member
Registered: 2006-11-12
Posts: 115

Re: Modern BBcode 1.0.0

Is there a way to add mmore things to the toolbar? Like the youtube and googlevid BB-codes.

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.