[BETA] Advanced BBcode Box Mod 5.1.0c

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
houser
Registered User
Posts: 97
Joined: Sun Sep 24, 2006 9:41 am

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by houser »

Hi,

I came on looking for exactly this too:
supramati wrote:compatible with the Advanced BBCode Box mod? :idea:
in order to do grouprights-controlled html in posts.
coul this be used together also:
http://www.phpbb.com/community/viewtopi ... 5&t=235489

Also, is thera simple way to upgrade from 5.1.0?
thanx for great mod!
best
janne a.

joeydee
Registered User
Posts: 292
Joined: Tue Mar 07, 2006 2:05 am

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by joeydee »

For some reason my aligning doesn't work

have a look here: http://www.pumatalk.com/forum/viewtopic.php?t=1931

What should i do?

-Joey

joeydee
Registered User
Posts: 292
Joined: Tue Mar 07, 2006 2:05 am

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by joeydee »

Does anyone have any Stylish Icons we can replace instead of the default ones that come with the mod? They look too simple and I would like to know if someone knows where I can download some new icons (im not too fond of the grey color and the style of the icons).

So let me know please.
Thanks,
-JOey

User avatar
tahoebuff
Registered User
Posts: 1429
Joined: Tue Jul 20, 2004 12:33 am
Location: Nevada
Name: Michael
Contact:

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by tahoebuff »


User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by freddie »

crap, i didn't noticed all the posts in this topic.

moderation function:
check this topic: http://phpbb-testforum.tactic.be/viewtopic.php?t=184

wiki function
check this topic: http://phpbb-testforum.tactic.be/viewtopic.php?t=180

off topic function
check this topic: http://phpbb-testforum.tactic.be/viewtopic.php?t=181

hide function
check this topic: http://phpbb-testforum.tactic.be/viewtopic.php?t=3

i'm not a great coder myself, so use of this addons is at own risk ;)
if you notice some mistakes, plz report them and i will try to help and/or correct

test topic:
http://phpbb-testforum.tactic.be/viewtopic.php?t=183

User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by freddie »

joeydee wrote:For some reason my aligning doesn't work

have a look here: http://www.pumatalk.com/forum/viewtopic.php?t=1931

What should i do?

-Joey
other mods installed ?

User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by freddie »

New icon-set

original style:

Image

testforum-style:

Image

download:

here

note: on the new-style picture there are some new icons (moderation tag, off topic tag, wiki tag, ...) you can download these functions on my testboard http://phpbb-testforum.tactic.be

Fragster2001
Registered User
Posts: 31
Joined: Fri Sep 08, 2006 7:55 am

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by Fragster2001 »

I've noticed these new bbcodes don't work in signatures?

Would it be possible for them to work?

Shote
Registered User
Posts: 18
Joined: Fri Feb 17, 2006 12:19 am

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by Shote »

Hi.. I am trying to add one new button.. to show movies for this site: http://videos.sapo.pt/

I don't know how to. I've tried some things.. but nothing worked.

Url of one video: http://videos.sapo.pt/Zu1bOHf0MYQu3gnhggpz

Embed code:

Code: Select all

 <embed src="http://imgs.sapo.pt/sapovideo/swf/flvplayer-sapo.swf?file=http://rd3.videos.sapo.pt/Zu1bOHf0MYQu3gnhggpz/mov/1" type="application/x-shockwave-flash" width="400" height="325" wmode="transparent"></embed>
What must I change in bbcode.tpl and bbcode.php?

Example with youtube:

In bbcode.tpl

Code: Select all

<!-- BEGIN youtube -->
<br /><div style="text-align:center"><object width="525" height="420">
   <param name="movie" value="http://www.youtube.com/v/{YOUTUBEID}"></param>
   <embed src="http://www.youtube.com/v/{YOUTUBEID}" type="application/x-shockwave-flash" width="525" height="420"></embed>
</object><br />
<a href="http://youtube.com/watch?v={YOUTUBEID}" target="_blank">{YOUTUBELINK}</a><br /></div>
<!-- END youtube -->
In bbcode.php

Code: Select all

 // [youtube]YouTube URL[/youtube] code..
        $patterns[] = "#\[youtube\]http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
        $replacements[] = $bbcode_tpl['youtube'];

I just want that lines of code for the site I said.. I think i can do alll the other code at my own.. Thanks in advance

User avatar
Zaid
Registered User
Posts: 590
Joined: Thu Nov 08, 2007 2:06 pm
Location: South Pacific Ocean

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by Zaid »

This a very big mod and i was trying to install it using EASY MOD and this is what the error i get

maybe mod author can make it more EMC ??

Critical Error

FIND FAILED: In file [templates/subSilver/posting_body.tpl] could not find:

<script language="JavaScript" type="text/javascript">
<!--
// bbCode control by
// subBlue design
// http://www.subBlue.com
// Startup variables
var imageTag = false;
var theSelection = false;
// Check for Browser & Platform for PC & IE specific bits
// More details from: http://www.mozilla.org/docs/web-develop ... _type.html
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion); // Get browser version
var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
&& (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
&& (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;
var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);
// Helpline messages
b_help = "{L_BBCODE_B_HELP}";
i_help = "{L_BBCODE_I_HELP}";
u_help = "{L_BBCODE_U_HELP}";
q_help = "{L_BBCODE_Q_HELP}";
c_help = "{L_BBCODE_C_HELP}";
l_help = "{L_BBCODE_L_HELP}";
o_help = "{L_BBCODE_O_HELP}";
p_help = "{L_BBCODE_P_HELP}";
w_help = "{L_BBCODE_W_HELP}";
a_help = "{L_BBCODE_A_HELP}";
s_help = "{L_BBCODE_S_HELP}";
f_help = "{L_BBCODE_F_HELP}";
// Define the bbCode tags
bbcode = new Array();
bbtags = new Array('','','','','','','
','
','

Code: Select all

','
','
  • ','
','
  • ','
','[img]','[/img]','','');
imageTag = false;
// Shows the help messages in the helpline window
function helpline(help) {
document.post.helpbox.value = eval(help + "_help");
}
// Replacement for arrayname.length property
function getarraysize(thearray) {
for (i = 0; i < thearray.length; i++) {
if ((thearray == "undefined") || (thearray == "") || (thearray == null))
return i;
}
return thearray.length;
}
// Replacement for arrayname.push(value) not implemented in IE until version 5.5
// Appends element to the array
function arraypush(thearray,value) {
thearray[ getarraysize(thearray) ] = value;
}
// Replacement for arrayname.pop() not implemented in IE until version 5.5
// Removes and returns the last element of an array
function arraypop(thearray) {
thearraysize = getarraysize(thearray);
retval = thearray[thearraysize - 1];
delete thearray[thearraysize - 1];
return retval;
}
function checkForm() {
formErrors = false;
if (document.post.message.value.length < 2) {
formErrors = "{L_EMPTY_MESSAGE}";
}
if (formErrors) {
alert(formErrors);
return false;
} else {
bbstyle(-1);
//formObj.preview.disabled = true;
//formObj.submit.disabled = true;
return true;
}
}
function emoticon(text) {
var txtarea = document.post.message;
text = ' ' + text + ' ';
if (txtarea.createTextRange && txtarea.caretPos) {
var caretPos = txtarea.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
txtarea.focus();
} else {
txtarea.value += text;
txtarea.focus();
}
}
function bbfontstyle(bbopen, bbclose) {
var txtarea = document.post.message;
if ((clientVer >= 4) && is_ie && is_win) {
theSelection = document.selection.createRange().text;
if (!theSelection) {
txtarea.value += bbopen + bbclose;
txtarea.focus();
return;
}
document.selection.createRange().text = bbopen + theSelection + bbclose;
txtarea.focus();
return;
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
mozWrap(txtarea, bbopen, bbclose);
return;
}
else
{
txtarea.value += bbopen + bbclose;
txtarea.focus();
}
storeCaret(txtarea);
}
function bbstyle(bbnumber) {
var txtarea = document.post.message;
txtarea.focus();
donotinsert = false;
theSelection = false;
bblast = 0;
if (bbnumber == -1) { // Close all open tags & default button names
while (bbcode[0]) {
butnumber = arraypop(bbcode) - 1;
txtarea.value += bbtags[butnumber + 1];
buttext = eval('document.post.addbbcode' + butnumber + '.value');
eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
}
imageTag = false; // All tags are closed including image tags :D
txtarea.focus();
return;
}
if ((clientVer >= 4) && is_ie && is_win)
{
theSelection = document.selection.createRange().text; // Get text selection
if (theSelection) {
// Add tags around selection
document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
txtarea.focus();
theSelection = '';
return;
}
}
else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
{
mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]);
return;
}
// Find last occurance of an open tag the same as the one just clicked
for (i = 0; i < bbcode.length; i++) {
if (bbcode == bbnumber+1) {
bblast = i;
donotinsert = true;
}
}
if (donotinsert) { // Close all open tags up to the one just clicked & default button names
while (bbcode[bblast]) {
butnumber = arraypop(bbcode) - 1;
txtarea.value += bbtags[butnumber + 1];
buttext = eval('document.post.addbbcode' + butnumber + '.value');
eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
imageTag = false;
}
txtarea.focus();
return;
} else { // Open tags
if (imageTag && (bbnumber != 14)) { // Close image tag before adding another
txtarea.value += bbtags[15];
lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list
document.post.addbbcode14.value = "Img"; // Return button back to normal state
imageTag = false;
}
// Open tag
txtarea.value += bbtags[bbnumber];
if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
arraypush(bbcode,bbnumber+1);
eval('document.post.addbbcode'+bbnumber+'.value += "*"');
txtarea.focus();
return;
}
storeCaret(txtarea);
}
// From http://www.massless.org/mozedit/
function mozWrap(txtarea, open, close)
{
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
if (selEnd == 1 || selEnd == 2)
selEnd = selLength;
var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd)
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + open + s2 + close + s3;
return;
}
// Insert at Claret position. Code from
// http://www.faqts.com/knowledge_base/vie ... 52/fid/130
function storeCaret(textEl) {
if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
//-->
</script>

Peter77sx
Registered User
Posts: 3259
Joined: Wed Nov 09, 2005 2:51 pm

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by Peter77sx »

Easy MOD is evil.

all you have to do is open posting_body.tpl and that java scripit code is the first thing you'll see.. get rid of it and replace it with

Code: Select all

<script language="javascript" type="text/javascript" src="mods/bbcode_box/bbcode_box.js"></script>
Just like the instructions say. :)

intrebulon
Registered User
Posts: 8
Joined: Thu Jan 17, 2008 3:54 pm

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by intrebulon »

i'm looking to increase the displayed height of the code/quote boxes in contracted state.

users can only read 2.5 lines of the quotes until expanded, it would be nice if they could read at LEAST 6 or so lines before having to expand the quote.

i have very little experience with php/javascript and after lots of poking around in add_bbcode.js, posting_body.tpl and some other files that turned out to not be related, i wasn't able to figure out how to increase the height.

if someone could point me to the right file and/or variable, i would greatly appreciate it.

jomasaco
Registered User
Posts: 32
Joined: Tue Dec 04, 2007 1:59 pm

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by jomasaco »

Shote wrote:Hi.. I am trying to add one new button.. to show movies for this site: http://videos.sapo.pt/

I don't know how to. I've tried some things.. but nothing worked.

Url of one video: http://videos.sapo.pt/Zu1bOHf0MYQu3gnhggpz

Embed code:

Code: Select all

 <embed src="http://imgs.sapo.pt/sapovideo/swf/flvplayer-sapo.swf?file=http://rd3.videos.sapo.pt/Zu1bOHf0MYQu3gnhggpz/mov/1" type="application/x-shockwave-flash" width="400" height="325" wmode="transparent"></embed>
What must I change in bbcode.tpl and bbcode.php?

Example with youtube:

In bbcode.tpl

Code: Select all

<!-- BEGIN youtube -->
<br /><div style="text-align:center"><object width="525" height="420">
   <param name="movie" value="http://www.youtube.com/v/{YOUTUBEID}"></param>
   <embed src="http://www.youtube.com/v/{YOUTUBEID}" type="application/x-shockwave-flash" width="525" height="420"></embed>
</object><br />
<a href="http://youtube.com/watch?v={YOUTUBEID}" target="_blank">{YOUTUBELINK}</a><br /></div>
<!-- END youtube -->
In bbcode.php

Code: Select all

 // [youtube]YouTube URL[/youtube] code..
        $patterns[] = "#\[youtube\]http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
        $replacements[] = $bbcode_tpl['youtube'];

I just want that lines of code for the site I said.. I think i can do alll the other code at my own.. Thanks in advance

OK try this one works for me.
##############################################################
## MOD Title: Add videos.sapo.pt video to Advanced BBCode Box MOD
## MOD Author: Disturbed One < anthony@anthonycoy.com > (Anthony Coy) http://www.hvmdesign.com
## MOD Author: AL Tnen <al_tnen@hotmail.com> (N/A) http://www.tnen.zzn.com
## MOD Author: jomasaco <jomasaco2005@yahoo.com.br> http://share-rapid.org
## MOD Description: This MOD adds the tag [SVideo] [/SVideo] to your bbcode box enabling the videos from videos.sapo.pt.
## This is based on Google Videos MOD so the credits goes to the original autor.
##
## MOD Version: 1.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: (5)
## language/lang_english/lang_main.php
## includes/bbcode.php
## templates/subSilver/bbcode.tpl
## templates/subSilver/posting_body.tpl
## templates/subSilver/subsilver.css
##
## Included Files: (1)
## bbcode_box/images/sapovid.gif
This image rename to sapovid.gif
(http://i11.tinypic.com/7wymadv.gif)
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files ## Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['bbcode_f_help']

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

$lang['bbcode_help']['SVideo'] = 'SVideo: [SVideo]Sapo URL[/SVideo]';

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<img border="0" src="mods/bbcode_box/images/code.gif" name="code" type="image" onClick="BBCcode()" onMouseOver="helpline('code')" class="postimage" alt="Code">
#
#-----[ IN-LINE FIND ]------------------------------------------
#
<img border="0" src="mods/bbcode_box/images/ram.gif" name="ram" type="image" onClick="BBCram()" onMouseOver="helpline('ram')" class="postimage" alt="Real Media">
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<img border="0" src="mods/bbcode_box/images/sapovid.gif" name="SVideo" type="image" onClick="BBCSVideo()" onMouseOver="helpline('sapovid')" class="postimage" alt="SapoVid">
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]------------------------------------------
#
</EMBED></OBJECT><!-- END flash -->

#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN SVideo by jomasaco-->
<object width="425" height="350">
<param name="movie" value=""http://imgs.sapo.pt/sapovideo/swf/flvpl ... 1"></param>
<embed style="width:400px; height:326px;" id="VideoPlayback"
align="center" type="application/x-shockwave-flash"
src="http://imgs.sapo.pt/sapovideo/swf/flvpl ... OID}/mov/1"
allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff"
scale="noScale" salign="TL" FlashVars="playerMode=embedded">
</embed>
</object><br />
<a href="http://videos.sapo.pt/{SVIDEOID}" target="_blank"></a><br />
<!-- END SVideo by jomasaco-->

#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);

#
#-----[ AFTER, ADD ]------------------------------------------
#
$bbcode_tpl['SVideo'] = str_replace('{SVIDEOID}', '\\1', $bbcode_tpl['SVideo']);

#
#-----[ FIND ]------------------------------------------
#
// user@domain.tld code..
$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
// [SVideo]SVideo URL[/SVideo] code..
$patterns[] = "#\[SVideo\]http://videos.sapo.pt/([0-9A-Za-z-_]*)[^[]*\[/SVideo\]#is";
$replacements[] = $bbcode_tpl['SVideo'];

#
#-----[ OPEN ]------------------------------------------
#
mods/bbcode_box/bbcode_box.js
#
#-----[ FIND ]------------------------------------------
#
symbol_help = "Insert Symbol Into Post";
#
#-----[ AFTER, ADD ]------------------------------------------
#
sapovid_help = "Post an Sapo Video";
#
#-----[ FIND ]------------------------------------------
#
var symbol = 0;

#
#-----[ AFTER, ADD ]------------------------------------------
#
var SVideo = 0;

#
#-----[ FIND ]------------------------------------------
#
function helpline(help) {

#
#-----[ BEFORE, ADD ]------------------------------------------
#
function BBCSVideo() {
var FoundErrors = '';
var enterURL = prompt("Give the URL of the page containing the movie", "http://");
if (!enterURL) {
FoundErrors += "Didn't enter an URL";
}
if (FoundErrors) {
alert("Error:"+FoundErrors);
return;
}
var ToAdd = "[SVideo]"+enterURL+"[/SVideo]";
PostWrite(ToAdd);
}

#
#-----[ OPEN ]------------------------------------------
#
mods/bbcode_box/add_bbcode.js
#
#-----[ FIND ]------------------------------------------
#
symbol_help = "Insert Symbol Into Post";
#
#-----[ AFTER, ADD ]------------------------------------------
#
sapovid_help = "Post an Sapo Video";
#
#-----[ FIND ]------------------------------------------
#
var symbol = 0;

#
#-----[ AFTER, ADD ]------------------------------------------
#
var SVideo = 0;
#
#-----[ FIND ]------------------------------------------
#
function helpline(help) {

#
#-----[ BEFORE, ADD ]------------------------------------------
#
function BBCSVideo() {
var FoundErrors = '';
var enterURL = prompt("Give the URL of the page containing the movie", "http://");
if (!enterURL) {
FoundErrors += "Didn't enter an URL";
}
if (FoundErrors) {
alert("Error:"+FoundErrors);
return;
}
var ToAdd = "[SVideo]"+enterURL+"[/SVideo]";
PostWrite(ToAdd);
}

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


rodsand guns
Registered User
Posts: 16
Joined: Thu Jan 17, 2008 4:06 pm

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by rodsand guns »

Hi, I have just installed the mod and have a problem.
When I hit post reply what I see is the following.

Image

I have double checked the code changes and can't find anything wrong, and believe I have uploaded the included files to the correct place.

I created a folder called mods (as it wasn't present) @ public_html>forum>mods and inside that added a folder named bbcode_box. To that I uploaded the included files.

Any suggestions?
Thanks.

User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Re: [BETA] Advanced BBcode Box Mod 5.1.0c

Post by freddie »

right click on the place where an image should be, check properties, maybe not everything is uploaded ?

Post Reply

Return to “[2.0.x] MODs in Development”