phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

BBCodes


 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
~Cowboy~
Board Member



Joined: 08 Dec 2008

Posts: 297
Location: Chicago


flag
PostPosted: Sun Jan 04, 2009 6:08 pm 
Post subject: BBCodes

Is there a mod out there to create your own BBCode buttons in the ACP for Phpbb2?

If not perhaps we should get started on that. icon_wink.gif

_________________
Image link
We are not refugees we are trail blazers. icon_wink.gif
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Sun Jan 04, 2009 8:14 pm 
Post subject: Re: BBCodes

This is for adding blink BB code. You can take a look at it and I guess you can replace the instances of blick with whatever code you like. icon_wink.gif
Code:
##############################################################
## MOD Title: Blink BBCode
## MOD Author: *=Matt=* < matt.gru@gmail.com > (Matt Lien) http://www.glitchplay.com/
## MOD Description: Makes the text blink.
## MOD Version: 1.0.0
##
## Installation Level: (Easy)
## Installation Time: 5 - 10 Minutes
## Files To Edit: includes/bbcode.php
##                language/lang_english/lang_main.php
##                templates/subSilver/bbcode.tpl
##                templates/subSilver/posting_body.tpl
##
## Included Files: N/A
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##  Makes the text blink. What else can I say.
##
##############################################################
## MOD History:
##
## 2006-06-11 - Version 1.0.0
##  - First Stable release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#-----[ OPEN ]---------------------------------
#
includes/bbcode.php

#
#-----[ FIND ]---------------------------------
#
$EMBB_widths = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'50'

#
#-----[ FIND ]---------------------------------
#
$EMBB_values = array(''

#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_values = array(''

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'Blink'

#
#-----[ FIND ]------------------------------------------
#
   // [b] and [/b] for bolding text.
   $text = str_replace("[b:$uid]", $bbcode_tpl['b_open'], $text);
   $text = str_replace("[/b:$uid]", $bbcode_tpl['b_close'], $text);
#
#-----[ AFTER, ADD ]-------------------------------
#

   // [blink] and [/blink] for blinking text.
   $text = str_replace("[blink:$uid]", $bbcode_tpl['blink_open'], $text);
   $text = str_replace("[/blink:$uid]", $bbcode_tpl['blink_close'], $text);
#
#-----[ FIND ]------------------------------------------
#
   // [b] and [/b] for bolding text.
   $text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text);
#
#-----[ AFTER, ADD ]----------------------------
#

   // [blink] and [/blink] for blinking text.
   $text = preg_replace("#\[blink\](.*?)\[/blink\]#si", "[blink:$uid]\\1[/blink:$uid]", $text);
#
#-----[ OPEN ]---------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]---------------------------------
#
# NOTE: the full line to look for is:
#$lang['bbcode_f_help'] = "Font size: [size=x-small]small text[/size]";
#
$lang['bbcode_f_help'] =

#
#-----[ AFTER, ADD ]---------------------------------
#

$lang['bbcode_help']['blink'] = 'Blink: [Blink]Text[/blink] (alt+%s)';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
   
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->
#
#-----[ AFTER, ADD ]------------------------------------------
#

<!-- BEGIN blink_open --><blink><!-- END blink_open -->
<!-- BEGIN blink_close --></blink><!-- END blink_close -->
#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/posting_body.tpl

#
#-----[ FIND ]---------------------------------
#
# NOTE: the actual line to find is MUCH longer, containing all the bbcode tags
#
bbtags = new Array(

#
#-----[ IN-LINE FIND ]---------------------------------
#
'[url]','[/url]'

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'[blink]','[/blink]'

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
~Cowboy~
Board Member



Joined: 08 Dec 2008

Posts: 297
Location: Chicago


flag
PostPosted: Sun Jan 04, 2009 8:27 pm 
Post subject: Re: BBCodes

I was actually talking about a mod that allows BBCode insertion from the ACP

Putting it in manually like that is what we would be trying to avoid. icon_wink.gif

So BBCodes buttons can be inserted into the reply page in the way that they are in phpbb3.

_________________
Image link
We are not refugees we are trail blazers. icon_wink.gif
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Mon Jan 05, 2009 1:18 pm 
Post subject: Re: BBCodes

Moved to MOD Requests, thanks.
_________________
phpBBDoctor Blog
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Mon Jan 05, 2009 2:51 pm 
Post subject: Re: BBCodes

Not exactly what you asked, but close. icon_wink.gif
Code:
## easymod compliant
##############################################################
## MOD Title:    Multiple BBCode MOD
## MOD Author:   Nuttzy99 < nospam@blizzhackers.com > (n/a) http://www.blizzhackers.com
## MOD Author, Secondary: wGEric < eric@best-dev.com > (Eric Faerber) http://mods.best-dev.com/
##
## MOD Description:  Allows you to install BBCode MODs that
##    add quick BBCode buttons in post edits.  Without this
##    MOD, there is no standard way of installing BBCode MODs.
## MOD Version:  1.4.0c
##
## Installation Level:  EASY
## Installation Time:   2 minutes
## Files To Edit:       posting.php
##                      templates/subSilver/posting_body.tpl
## Included Files:      n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
##
## Author Notes:
##     + if Multi BBCode MOD v1.0.1 is already installed, use the update to 1.2.0 MOD
##          and do NOT install this MOD script
##     + Works with phpBB 2.0.2 thru 2.0.10
##     + installable with EasyMOD
##
##   Version 1.4.0 makes it so MOD Authors don't have to set a hotkey for their BBCodes.
##
##   I have added instructions to the MOD that tell MOD Authors what to do in the language files
##   This isn't required but I heavily recommend that you do it anyways just in case the MOD Authors
##   use something in what I have added as their FIND.
##
##############################################################
##
## MOD History:
##
##    2004-09-26 - Version 1.4.0
##      + Sets hot key automatically
##      + Adds it to Private Messages (version b)
##      + Fixes a help line bug (version c)
##
##    2003-09-25 - Version 1.2.1
##         + improved MOD Template compliance
##
##    2003-08-15 - Version 1.2.0
##         + updated for 2.0.6
##         + allows additional hotkeys - Xore did most of the work ;-)
##         + made EasyMOD compatiable
##
##    2003-02-03 - Version 1.0.1
##         + updated for 2.0.4
##         + no code changes required, just updated the header info
##
##    2002-08-31 - Version 1.0.0
##         + initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################


#
#-----[ OPEN ]---------------------------------
#
posting.php


#
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
# make_jumpbox('viewforum.'.$phpEx);
#
make_jumpbox(


#
#-----[ AFTER, ADD ]---------------------------------
#
Multi_BBCode();

#
#-----[ OPEN ]---------------------------------
#
privmsg.php


#
#-----[ FIND ]---------------------------------
#
   generate_smilies('inline', PAGE_PRIVMSGS);


#
#-----[ AFTER, ADD ]---------------------------------
#
Multi_BBCode();

#
#-----[ OPEN ]---------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]---------------------------------
#
$bbcode_tpl = null;
#
#-----[ AFTER, ADD ]---------------------------------
#

// MULTI BBCODE-begin
function Multi_BBCode()
{
   global $template, $lang;

   // DO NOT CHANGE THIS ARRAY
   $hotkeys = array('', 'd', 'e', 'g', 'h', 'j', 'k', 'm', 'n', 'r', 't', 'v', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');

   //NOTE: the first element of each array must be ''   Add new elements AFTER the ''
   $EMBB_widths = array('') ;
   $EMBB_values = array('') ;
   for ($i=1; $i<count($EMBB_values); $i++)
   {
      // load BBcode MODs info
      $val = ($i*2)+16 ;
      $help_lang = ( !empty($lang['bbcode_help'][(strtolower($EMBB_values[$i]))]) ) ? $lang['bbcode_help'][(strtolower($EMBB_values[$i]))] : $lang['bbcode_help'][$EMBB_values[$i]];
      $template->assign_block_vars('MultiBB', array(
         'KEY' => $hotkeys[$i],
         'NAME' => "addbbcode$val",
         'HELP' => sprintf($help_lang, $hotkeys[$i]),
         'WIDTH' => $EMBB_widths[$i],
         'VALUE' => $EMBB_values[$i],
         'STYLE' => "bbstyle($val)")
      );
   }
}
// MULTI BBCODE-end

#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/posting_body.tpl


#
#-----[ FIND ]---------------------------------
#
f_help = "{L_BBCODE_F_HELP}";

#
#-----[ AFTER, ADD ]---------------------------------
#
<!-- BEGIN MultiBB -->
{MultiBB.VALUE}_help = "{MultiBB.HELP}";
<!-- END MultiBB -->

#
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
#           <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
#           </span></td>
#
   name="addbbcode16"
   </td>

#
#-----[ AFTER, ADD ]---------------------------------
#

         <!-- BEGIN MultiBB -->
         <td><span class="genmed">
           <input type="button" class="button" accesskey="{MultiBB.KEY}" name="{MultiBB.NAME}" value="{MultiBB.VALUE}" style="width: {MultiBB.WIDTH}px" onClick="{MultiBB.STYLE}" onMouseOver="helpline('{MultiBB.VALUE}')" />
           </span></td>
         <!-- END MultiBB -->
#
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
#               <select name="addbbcodefontcolor" onChange="bbfontstyle('[color=' + this.form.addbbcodefontcolor.options[this.form.addbbcodefontcolor.selectedIndex].value + ']', '[/color]')" onMouseOver="helpline('s')">
#
   name="addbbcode18"


#
#-----[ IN-LINE FIND ]---------------------------------
#
name="addbbcode18"


#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
name="addbbcodefontcolor"


#
#-----[ IN-LINE FIND ]---------------------------------
#
this.form.addbbcode18.options


#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
this.form.addbbcodefontcolor.options


#
#-----[ IN-LINE FIND ]---------------------------------
#
this.form.addbbcode18.selectedIndex


#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
this.form.addbbcodefontcolor.selectedIndex


#
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
#               </select> &nbsp;{L_FONT_SIZE}:<select name="addbbcodefontsize" onChange="bbfontstyle('[size=' + this.form.addbbcodefontsize.options[this.form.addbbcodefontsize.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
#
   name="addbbcode20"

#
#-----[ IN-LINE FIND ]---------------------------------
#
name="addbbcode20"


#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
name="addbbcodefontsize"


#
#-----[ IN-LINE FIND ]---------------------------------
#
this.form.addbbcode20.options


#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
this.form.addbbcodefontsize.options


#
#-----[ IN-LINE FIND ]---------------------------------
#
this.form.addbbcode20.selectedIndex


#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
this.form.addbbcodefontsize.selectedIndex

#
#-----[ OPEN ]---------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]---------------------------------
#
#  NOTE - the full line to look for is:
#   $lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';
#
$lang['bbcode_f_help']

#
#-----[ AFTER, ADD ]---------------------------------
#

//
// bbcode help format goes like this
// $lang['bbcode_help']['value'] = 'BBCode Name: Info (Alt+%s)';
//
// value is what you put in $EMBB_values in posting.php
// %s gets replaced with the automatic hotkey that the bbcode gets assigned
//
$lang['bbcode_help']['value'] = 'BBCode Name: Info (Alt+%s)';

#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------
#
# EoM

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Ram
Board Member



Joined: 23 Dec 2008

Posts: 100
Location: Somewhere over the rainbow


flag
PostPosted: Mon Jan 05, 2009 2:59 pm 
Post subject: Re: BBCodes

BBcode Box Reloaded 1.2.2a
Back to top
~Cowboy~
Board Member



Joined: 08 Dec 2008

Posts: 297
Location: Chicago


flag
PostPosted: Mon Jan 05, 2009 4:55 pm 
Post subject: Re: BBCodes

Eh gads ram I don't understand that. is it French? icon_eek.gif

It does look like it might be close to what I am looking for though.

Is there an English version? Google stinks at translating that page...

_________________
Image link
We are not refugees we are trail blazers. icon_wink.gif
Back to top
Ram
Board Member



Joined: 23 Dec 2008

Posts: 100
Location: Somewhere over the rainbow


flag
PostPosted: Mon Jan 05, 2009 6:02 pm 
Post subject: Re: BBCodes

Quote:
## MOD Title: BBcode Box Reloaded (BBcBxR)
## MOD Author: reddog < N/A > (N/A) http://www.reddevboard.com
## MOD Description: this MOD replaces basic bbcode buttons by images
## in posting display, several options are available
## from the Admin Control Panel
## MOD Version: 1.2.2a
##
## Installation Level: Intermediate
## Installation Time: 20-25 Minutes
## Files To Edit: 12
## common.php
## posting.php
## privmsg.php
## includes/bbcode.php
## includes/constants.php
## includes/functions.php
## includes/page_header.php
## language/lang_english/lang_main.php
## templates/subSilver/bbcode.tpl
## templates/subSilver/overall_header.tpl
## templates/subSilver/posting_body.tpl
## templates/subSilver/simple_header.tpl
## Included Files:
## root/*.*


Here is the way to add BBCode: http://www.reddevboard.com/forum/viewtopic.php?t=920
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Mon Jan 05, 2009 8:41 pm 
Post subject: Re: BBCodes

The link is still for french text. icon_confused.gif
_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Ram
Board Member



Joined: 23 Dec 2008

Posts: 100
Location: Somewhere over the rainbow


flag
PostPosted: Tue Jan 06, 2009 9:15 am 
Post subject: Re: BBCodes

I can try to translate this, in one world it explain how to simply had BBCode when having the BBCBxR MOD installed.
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0216 seconds using 15 queries. (SQL 0.0053 Parse 0.0006 Other 0.0156)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo