Seite 1 von 1

Konflikt BBCode Box-Mod und Table BBCode-Mod

Verfasst: 29.01.2006 15:42
von Lux
Es geht um diese beiden Mods.

Code: Alles auswählen

########################################################
## MOD Title:  [color=green]Table BBCode[/color]
## MOD Author:  SlapShot434 < slapshot434@gmail.com > (Matt Halpin) http://slapshot.termee.com 
## MOD Description:  This hack enables users to easily create tables in their posts without requiring you to allow the table, tr and td HTML tags. 
## MOD Version: 1.3.1 

Code: Alles auswählen

#################################################################
## Mod Title:	[color=green]bbcode_box for phpBB2[/color]
## Mod Version:	v 4.5.0
## Author:	AL Tnen <al_tnen@hotmail.com> - http://www.tnen.zzn.com
## Description: This will cahnge bbcode buttons in postung_body
##		with images like in MS-Word and add a lot of new&useful bbcode
##		this mod make adding smiles very easy&you can add smile in the
##		center of text
##		Now it's easly to add bbcode(Just select the text and press on
##		the bbcode to add it to the selected text)
Den BBCode Box-Mod habe ich schon seit langem installiert. Nun wollte ich den für mich sehr interessanten Table BBCode-Mod einbauen.

Ich kann allerdings die notwendigen Einträge in meiner posting_body.tpl nicht finden und glaube, dass dies mit dem BBCode Box-Mod zusammenhängt.

Code: Alles auswählen

#-----[ OPEN ]------------------------------------------
# 
templates/subSilver/posting_body.tpl
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE: the full line to look for is: 
#f_help = "{L_BBCODE_F_HELP}"; 
# 
f_help = 
# 
#-----[ AFTER, ADD ]------------------------------------------
# 
g_help = "{L_BBCODE_G_HELP}";
# 
#-----[ 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 ]--------------------------------- 
# 
,'[table]','[/table]'
# 
#-----[ FIND ]------------------------------------------
# 
			<td><span class="genmed"> 
			  <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>
# 
#-----[ AFTER, ADD ]------------------------------------------
# 
#Be sure to increase the "addbbcode" numbers by 2 if neccessary 
# 
			<td><span class="genmed"> 
			  <input type="button" class="button" accesskey="g" name="addbbcode18" value="Table" style="width: 40px" onClick="bbstyle(18)" onMouseOver="helpline('g')" />
			  </span></td>
			<td>
			  <a href="{U_BBCODE_G_FAQ}" target="_blank"><img align="top" src="templates/subSilver/images/icon_tablebbcode.gif" border=0 /></a></td>
# 
#-----[ FIND ]------------------------------------------
# 
# NOTE: This is NOT the full line. Some coding comes after the "'[/color]')" at the end of the line 
# 
					<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]')
# 
#-----[ IN-LINE FIND ]------------------------------------------
# 
<select name="addbbcode18"
# 
#-----[ IN-LINE REPLACE WITH ]--------------------------------- 
# 
<select name="addbbcode20"
# 
#-----[ IN-LINE FIND ]------------------------------------------
# 
addbbcode18.options
# 
#-----[ IN-LINE REPLACE WITH ]--------------------------------- 
# 
addbbcode20.options
# 
#-----[ IN-LINE FIND ]------------------------------------------
# 
addbbcode18.selectedIndex
# 
#-----[ IN-LINE REPLACE WITH ]--------------------------------- 
# 
addbbcode20.selectedIndex
# 
#-----[ FIND ]------------------------------------------
# 
					</select> &nbsp;{L_FONT_SIZE}:<select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')">
# 
#-----[ IN-LINE FIND ]------------------------------------------
# 
<select name="addbbcode20"
# 
#-----[ IN-LINE REPLACE WITH ]--------------------------------- 
# 
<select name="addbbcode22"
# 
#-----[ IN-LINE FIND ]------------------------------------------
# 
addbbcode20.options
# 
#-----[ IN-LINE REPLACE WITH ]--------------------------------- 
# 
addbbcode22.options
# 
#-----[ IN-LINE FIND ]------------------------------------------
# 
addbbcode20.selectedIndex
# 
#-----[ IN-LINE REPLACE WITH ]--------------------------------- 
# 
addbbcode22.selectedIndex
Könnte mir jemand helfen, wie ich den Table BBCode-Mod trotzdem zum laufen kriege?

Verfasst: 30.01.2006 15:51
von dopppeldecker
Schau mal...mit dem nachfolgenden Text hast du eine gute Erklärung wie du BB-Codes nachträglich in den BBCode Box-Mod einbauen kannst:

Code: Alles auswählen

############################################################## 
## MOD Title: BB-Code Button for BBCode-Box
## MOD Author: Max
## MOD Description:Hiermit kann man neue BBcode-Buttons in die posting_body.tpl einfügen, wenn man den BBcode-Box - MOD verwendet 	
##		   This mod adds BBcode-Button for new BBcodes in posting_body.tpl in forums with BBcode-Box - MOD
##
## Um das richtig nutzen zu können, muss überall das Wort NEU gegen die Bezeichnung des neuen BB-Codes ausgetauscht werden
## Exchange please everyone NEU against your new BB-Code
##
##
##
## MOD Version: 1.0.0
## 
## Installation Level: Easy
## Installation Time: 5 Minutes
## 
## Files To Edit: 	
##			
##			bbcodebox/add_bbcode.js
##			templates/subSilver/posting_body.tpl
##			
##			
## 
## Included Files: */*
############################################################## 
##
## Um das richtig nutzen zu können, muss überall das Wort NEU gegen die Bezeichnung des neuen BB-Codes ausgetauscht werden
##
## Exchange please everyone NEU against your new BB-Code
##
############################################################## 
## MOD History: 
## 
##   2005-07-10 - Version 1.0.0
## 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 



#
## Exchange please everyone NEU against your new BB-Code
#
#-----[ OPEN ]------------------------------------------
#

bbcodebox/add_bbcode.js

#
#-----[ FIND ]------------------------------------------
#

fade_help = "Fade text: [fade]text[/fade]";


#
#-----[ AFTER, ADD ]------------------------------------------
#// das was an Stelle von [NEU]beschreibung[/NEU] eingetragen wird, ergibt die Beschreibung
#// replace [NEU]beschreibung[/NEU] for your discription
#
#

NEU_help = "[NEU]beschreibung[/NEU]";


#
#-----[ FIND ]------------------------------------------
#

var php = 0;


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

var NEU = 0;



#
#-----[ FIND ]------------------------------------------
#

function BBCimg() {
	var FoundErrors = '';
	var enterURL   = prompt("Enter the image URL","http://");
	if (!enterURL) {
		FoundErrors += "You didn't write the image URL";
	}
	if (FoundErrors) {
		alert("Error :"+FoundErrors);
		return;
	}
	var ToAdd = "[img]"+enterURL+"[/img]";
	document.post.message.value+=ToAdd;
	document.post.message.focus();
}



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

function BBCNEU() {
	if ((clientVer >= 4) && is_ie && is_win) {
		theSelection = document.selection.createRange().text;
		if (theSelection != '') {
		document.selection.createRange().text = "[NEU]" + theSelection + "[/NEU]";
		document.post.message.focus();
		return;
		}
	}
	if (Underline == 0) {
		ToAdd = "[NEU]";
		document.post.NEU.src = "bbcode_box/images/NEU1.gif";
		Underline = 1;
	} else {
		ToAdd = "[/NEU]";
		document.post.NEU.src = "bbcode_box/images/NEU.gif";
		Underline = 0;
	}
	PostWrite(ToAdd);
}


#
#-----[ OPEN ]------------------------------------------
#

/templaltes/subSilver/posting_body.tpl


#
#-----[ FIND ]------------------------------------------
#

<img border="0" src="bbcode_box/images/ram.gif" name="ram" type="image" onClick="BBCram()" onMouseOver="helpline('ram')" style="border-style: outset; border-width: 1" alt="Real Media">&nbsp;&nbsp;



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


<img border="0" src="bbcode_box/images/NEU.gif" name="NEU" type="image" onClick="BBCNEU()" onMouseOver="helpline('NEU')" style="border-style: outset; border-width: 1" alt="NEU">


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


Verfasst: 30.01.2006 19:25
von Lux
Damit habe ich es schon versucht. Der Table Mod besteht aber anscheinend aus mehr als dem tag [table]. Den einzufügen habe ich mit o.g. Mod hinbekommen. Man muss aber auch eben einstellen können wieviele Zeilen und Spalten die Tabelle bekommen soll. :-?

Verfasst: 30.01.2006 19:36
von dopppeldecker
Ich habe den Table-Mod auch eingebaut und er funzt prima.

Du mußt dir mal die Faq vom Table-Mod durchschauen...denn du gibst nicht von vornherein die Reihen und Spalten an sondern mußt für jede Reihe und Spalte den dazugehörigen Code nutzen.

Code: Alles auswählen

[row] für jeden neue Reihe
[col] für jede neue Spalte 

Beispiel:

[table]
[row color=ff8800] Reihe 1 [col] Spalte 1 [col] Spalte2
[row] Reihe 2 [col] Spalte 1 [col] Spalte2
[row color=ff8800] Reihe 3 [col] Spalte 1 [col] Spalte2
[row] Reihe 4 [col] Spalte 1 [col] Spalte2
[/table]
Beim Einbauen solltest du die Änderungen an der language/lang_english/lang_bbcode.php gemacht haben....da stehen sämtliche Befehle drin. ;-)