| View previous topic :: View next topic |
| Author |
Message |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Tue Sep 14, 2004 12:50 pm Post subject: [MOD-DB] HTML BBcode MOD v1.1.4 |
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note:
This MOD has been kindly approved by the phpBB MOD Team
Check out its Release Announcement topic:
http://www.phpbb.com/phpBB/viewtopic.php?t=235489
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MOD Title: HTML BBcode MOD
MOD Version: 1.1.4
MOD Description: This MOD adds an HTML BBcode to your forum, which allows you to enter HTML tags yourself when posting a message. It is also possible to post JavaScript, Flash or Java objects, Forms, etc. You can even use other BBCode tags within an HTML block! Syntax is pretty simple: [html]text[/html]. While this BBCode is powerful, it is also somehow dangerous! By default, it is only allowed for the main board administrator. It can also be allowed for other Admins or members of a usergroup via ACP.
Notes:
A) This MOD is now compatible with the latest version of the Multiple BBCode MOD ONLY !!!
Latest MultiBB MOD version is 1.4.0.
You can get it here: http://www.phpbb.com/phpBB/viewtopic.php?t=145513
B) Be aware: If you have other BBCode MODs installed you should ask their authors for an upgrade script to the new MultiBB MOD !!!
DEMO:
Please, see below.
Download:
Link removed. Please use the phpBB MODs Database (BBCodes category).
MOD Header:
| Code: | ##############################################################
## MOD Title: HTML BBcode MOD
## MOD Author: markus_petrux < phpbb.mods@phpmix.com > (Markus) http://www.phpmix.com
## MOD Description: This MOD adds an HTML BBcode to your forum, which allows you to enter HTML tags yourself
## when posting a message. It is also possible to post JavaScript, Flash or Java objects, Forms, etc.
## You can even use other BBCode tags within an HTML block! Syntax is pretty simple: [html]text[/html].
## While this BBCode is powerful, it is also somehow dangerous! By default, it is only allowed for the
## main board administrator. It can also be allowed for other Admins or members of a usergroup via ACP.
##
## MOD Version: 1.1.4
##
## Installation Level: Intermediate
## Installation Time: ~30 Minutes
## Files To Edit: 10
## includes/constants.php
## includes/functions.php
## includes/bbcode.php
## templates/subSilver/bbcode.tpl
## language/lang_english/lang_main.php
## language/lang_english/lang_bbcode.php
## templates/subSilver/posting_body.tpl
## language/lang_english/lang_admin.php
## admin/admin_board.php
## templates/subSilver/admin/board_config_body.tpl
## Included Files: 0
##############################################################
## 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:
##
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## *** ABOUT HTML BBCODE MOD ***
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##
## * BEFORE installing this MOD:
##
## This MOD adds the following line into your includes/constants.php file:
##
## define('FOUNDER', 2);
##
## ...where number 2 is the main board administrator. It is the user_id used to install phpBB.
## If for whatever reason you have removed or disabled this user, please adjust the value
## of the FOUNDER constant accordingly. It must match the user_id of your CURRENT main board admin.
## For instance, if the user_id of your main board admin is 100, then change that line to look
## like:
##
## define('FOUNDER', 100);
##
##
## * Allowing HTML is a somehow dangerous !!!
##
## By default, the HTML BBCode is disabled. The main board administrator is allowed to:
##
## a) bypass this restriction.
## b) allow others admins or members of a usergroup to use it (ACP->Configuration).
##
##
## * Syntax for the HTML BBCode is pretty simple:
##
## Usage: [html]text[/html]
##
##
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## *** IMPORTANT NOTES ***
## *** PLEASE, READ BEFORE INSTALLING THIS MOD. THANKS ***
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
##
## NOTE --- Make backups of all files and DB tables altered by this MOD
##
## ****
## **** Please, do it now. Make backups BEFORE installing MODs.
## ****
##
##
## NOTE --- Please, consider using EasyMOD to install this MOD.
##
## ****
## **** EasyMOD can automatically install this MOD for you. It works!
## **** EasyMOD version 0.1.13 also supports SQL processing !!!
## ****
## **** Get it here:
## **** http://www.phpbb.com/phpBB/viewtopic.php?t=217673
## ****
##
##
## NOTE --- you MUST first have already installed the Multi BBCode MOD v1.4.0 !!!
##
## 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.
##
## **** Get it here:
## **** http://www.phpbb.com/phpBB/viewtopic.php?t=145513
##
##
## NOTE --- It is also recommended the BBCode Buttons Organizer MOD !!!
##
## Allows for a neat display of unlimited quick BBCode buttons.
##
## **** Get it here:
## **** http://www.phpbb.com/phpBB/viewtopic.php?t=145516
##
##############################################################
## MOD History:
##
## 2004-10-20 - Version 1.1.4
## - Added a new constant (FOUNDER) in place of the hardcoded user_id for the main board admin (2).
##
## 2004-10-05 - Version 1.1.3
## - Fixed for PHP3 compatibility (now using intval instead of is_numeric).
## - Fixed for compatibility with the new Multiple BBCode MOD v1.4.0 !!!
## - Fixed posting_body.tpl to avoid errors when posting HTML Forms.
##
## 2004-09-18 - Version 1.1.2
## - Fixed SQL error in admin_board when the board has no usergroups defined.
##
## 2004-09-17 - Version 1.1.1
## - Fixed a small bug in admin_board.
## - Fixed a bug in posting related to Multiple BBCode.
##
## 2004-09-17 - Version 1.1.0
## - Added BBCode button (Alt+H) in posting page.
## - Added Support for Usergroup permissions.
##
## 2004-09-14 - Version 1.0.0
## - First Beta released
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
############################################################## |
_________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Tue Sep 14, 2004 1:16 pm Post subject: Re: [BETA] HTML BBcode MOD v1.0.0 |
|
|
Well, I'm an admin here, so I can use the new HTML BBCode MOD to do things like this:
| Code: | [html]
<script language="javascript">
<!--
var html_demo_path = '/images/avatars/gallery/';
var html_demo_imgs = [];
html_demo_imgs[html_demo_imgs.length] = '01-BigSmilies3/happyface.gif';
html_demo_imgs[html_demo_imgs.length] = '01-BigSmilies5/wink.gif';
html_demo_imgs[html_demo_imgs.length] = '01-BigSmilies1/big.gif';
var html_demo_current = 0;
function html_demo_swap()
{
if( !document.images ) return;
document.images['html_bbcode_demo'].src = html_demo_path+html_demo_imgs[html_demo_current++];
if( html_demo_current >= html_demo_imgs.length )
html_demo_current = 0;
}
// -->
</script>
<table cellpadding="20" cellspacing="0" border="0" align="center" class="bodyline">
<tr>
<td>
<img name="html_bbcode_demo" title="Funny, isn't it?" src="/images/avatars/gallery/01-BigSmilies1/basic.gif" border="0" onmouseover="html_demo_swap();" onmouseout="this.src='/images/avatars/gallery/01-BigSmilies1/basic.gif';" />
</td>
</tr>
</table>
<table cellpadding="2" cellspacing="0" border="0" align="center" class="forumline">
<tr>
<td>
Mouse over the smilie!
</td>
</tr>
</table>
[/html] |
_________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Tue Sep 14, 2004 1:32 pm Post subject: Re: [BETA] HTML BBcode MOD v1.0.0 |
|
|
So, if a regular user tries to use the HTML BBCode. The post will look like this:
[html]
<script language="javascript">
<!--
var html_demo_path = '/images/avatars/gallery/';
var html_demo_imgs = [];
html_demo_imgs[html_demo_imgs.length] = '01-BigSmilies3/happyface.gif';
html_demo_imgs[html_demo_imgs.length] = '01-BigSmilies5/wink.gif';
html_demo_imgs[html_demo_imgs.length] = '01-BigSmilies1/big.gif';
var html_demo_current = 0;
function html_demo_swap()
{
if( !document.images ) return;
document.images['html_bbcode_demo'].src = html_demo_path+html_demo_imgs[html_demo_current++];
if( html_demo_current >= html_demo_imgs.length )
html_demo_current = 0;
}
// -->
</script>
<table cellpadding="20" cellspacing="0" border="0" align="center" class="bodyline">
<tr>
<td>
<img name="html_bbcode_demo" title="Funny, isn't it?" src="/images/avatars/gallery/01-BigSmilies1/basic.gif" border="0" onmouseover="html_demo_swap();" onmouseout="this.src='/images/avatars/gallery/01-BigSmilies1/basic.gif';" />
</td>
</tr>
</table>
<table cellpadding="2" cellspacing="0" border="0" align="center" class="forumline">
<tr>
<td>
Mouse over the smilie!
</td>
</tr>
</table>
[/html] _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Fri Sep 17, 2004 5:00 pm Post subject: Re: [BETA] HTML BBcode MOD v1.1.0 |
|
|
ZIP has been updated to version 1.1.0
Changes:
* Added BBCode button (Alt+H) in posting page (to be confirmed by MOD validators).
* Added Support for Usergroup permissions.
No upgrade script. Uninstall is pretty simple. Also, keep in mind this is Beta code. I hope you may understand.
Please, read top post on this topic for further information.  _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Fri Sep 17, 2004 10:35 pm Post subject: Re: [BETA] HTML BBcode MOD v1.1.0 |
|
|
Oops! ...I'm sorry, but it seems I made a mistake in admin_board.php and another one in posting.php
Therefore...
ZIP has been updated to version 1.1.1
Upgrade from v1.1.0:
| Code: | #
# ---[ OPEN ]----------
#
admin/admin_board.php
#
# ---[ FIND ]----------
#
if( bbcode_html_allowed() )
#
# ---[ REPLACE WITH ]----------
#
if( $userdata['user_id'] == 2 )
#
# ---[ SAVE ]----------
# |
| Code: | #
# ---[ OPEN ]----------
#
posting.php
#
#-----[ FIND ]---------------------------------
#
$EMBB_keys = array(''
$EMBB_widths = array(''
$EMBB_values = array(''
#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_keys = array('','h'
#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
$EMBB_keys = array(''
#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_widths = array('','40'
#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
$EMBB_widths = array(''
#
#-----[ IN-LINE FIND ]---------------------------------
#
$EMBB_values = array('','HTML'
#
#-----[ IN-LINE REPLACE WITH ]---------------------------------
#
$EMBB_values = array(''
#
#-----[ AFTER, ADD ]---------------------------------
#
//+MOD: HTML BBCode MOD
if( bbcode_html_allowed() )
{
$EMBB_keys[] = 'h';
$EMBB_widths[] = '40';
$EMBB_values[] = 'HTML';
}
//-MOD: HTML BBCode MOD
#
# ---[ SAVE ]----------
# |
My apologies for that.  _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Sat Sep 18, 2004 6:04 pm Post subject: Re: [BETA] HTML BBcode MOD v1.1.0 |
|
|
ZIP has been updated to version 1.1.2
Upgrade from v1.1.1:
| Code: | #
# ---[ OPEN ]----------
#
includes/functions.php
#
# ---[ FIND ]----------
#
if( !($result = $db->sql_query($sql)) || !($rowset = $db->sql_fetchrowset($result)) )
{
message_die(GENERAL_ERROR, 'Could not obtain group list', '', __LINE__, __FILE__, $sql);
}
$groups_count = count($rowset);
#
# ---[ REPLACE WITH ]----------
#
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain group list', '', __LINE__, __FILE__, $sql);
}
$groups_count = (!($rowset = $db->sql_fetchrowset($result)) ? 0 : count($rowset));
#
# ---[ SAVE ]----------
# |
Fix: SQL error when the board has no usergroups defined.  _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Mon Sep 20, 2004 3:39 pm Post subject: [RC] HTML BBcode MOD v1.1.2 --- Submitted |
|
|
This MOD has been submitted to the phpBB MODs Database.
. _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Tue Sep 28, 2004 3:11 am Post subject: Re: [RC] HTML BBcode MOD v1.1.2 --- on stand by... |
|
|
ok, this MOD has been Rejected by the Validation Team. Reason is I used a function not supported by PHP3, which is the minimum version required by phpBB. Oops!
Also, a new version of the Multiple BBCode MOD seems to be in the kitchen
Please, read this for more information on both subjects:
http://www.phpbb.com/phpBB/viewtopic.php?p=1259260#1259260 _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Tue Oct 05, 2004 4:01 pm Post subject: Re: [RC] HTML BBcode MOD v1.1.3 ---awaiting for validation! |
|
|
ZIP has been updated to version 1.1.3
Changes:
* Fixed for PHP3 compatibility (now using intval instead of is_numeric).
* Fixed for compatibility with the new Multiple BBCode MOD v1.4.0 !!!
* Fixed posting_body.tpl to avoid errors when posting HTML Forms.
It has been submitted to the MODs Database. Therefore, awaiting for validation.
Please, read top post on this topic for further information. Thanks. _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Wed Oct 20, 2004 4:25 am Post subject: Re: [RC] HTML BBcode MOD v1.1.3 ---awaiting for validation! |
|
|
ZIP has been updated to version 1.1.4
Changes:
* Added a new constant (FOUNDER) in place of the hardcoded user_id for the main board admin (2).
Upgrade from version 1.1.3:
| Code: | #
#-----[ OPEN ]------------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------------
#
define('MOD', 2);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//+MOD: HTML BBCode MOD
define('FOUNDER', 2); // If needed, you can change 2 to the user_id of your founder admin.
//-MOD: HTML BBCode MOD
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
if( intval($board_config['bbcode_html_group']) < 0 && $userdata['user_id'] != 2 )
#
#-----[ REPLACE WITH ]-------------------------------------
#
if( intval($board_config['bbcode_html_group']) < 0 && $userdata['user_id'] != FOUNDER )
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------------
#
if( $userdata['user_id'] == 2 )
#
#-----[ REPLACE WITH ]-------------------------------------
#
if( $userdata['user_id'] == FOUNDER )
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
# |
It has been submitted to the MODs Database. Therefore, awaiting for validation.
Please, read top post on this topic for further information. Thanks. _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Wed Oct 26, 2005 10:10 pm Post subject: Re: [MOD-DB] HTML BBcode MOD v1.1.4 |
|
|
Here's an example using the GoogleAds javascript:
Here's the HTML code:
| Code: |
[html]
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-3622563609670736";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_color_border = "7B895E";
google_color_bg = "F0F0F0";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
if( document.getElementById || document.all )
{
var googleAds = 'http://pagead2.googlesyndication.com/pagead/show_ads.js';
document.write('<sc'+'ript type="text/javascr'+'ipt" src="'+googleAds+'"></scr'+'ipt>');
}
// -->
</script>
</td></tr>
</table>
[/html]
|
_________________ http://www.phpmix.org |
|
| Back to top |
|
 |
markus [Administrator]
![[Administrator] [Administrator]](images/ranks/rank_stars7_admin.gif)

Joined: 28 Jul 2003 Posts: 1124
|
Posted: Sun Feb 05, 2006 8:18 am Post subject: |
|
|
Oops, I just figured that the demo was broken during the site migration.
It should be fixed now. _________________ http://www.phpmix.org |
|
| Back to top |
|
 |
|