[2.0.19] BBCode StrikeThrough

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
10
59%
Very Good
2
12%
Good
4
24%
Fair
0
No votes
Poor
1
6%
 
Total votes: 17

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28012
Joined: Sat Aug 16, 2003 7:36 am

[2.0.19] BBCode StrikeThrough

Post by Extensions Robot » Mon Aug 23, 2004 2:16 am

MOD Name: BBCode StrikeThrough
Author: Serj21
MOD Description: Adds the ability to add a line through text in your forum posts. Syntax is text


MOD Version: 1.3.0 (Updated 01/05/06)

Download File: bbcode_strikethrough_1.3.0.zip
mods overview page: View
File Size: 2345 Bytes

Security Score: 0

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.
Last edited by Extensions Robot on Mon Apr 30, 2007 12:30 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Wed Aug 25, 2004 1:23 pm

MOD Validated/Released

Notes:
A StrikeThrough bbcode when you use text during posting

Nomad [AS]
Registered User
Posts: 5
Joined: Sat Jul 17, 2004 8:52 pm
Location: Moskow, Russia
Contact:

Post by Nomad [AS] » Sun Aug 29, 2004 10:03 pm

<deleted by poster>

Ekul
Registered User
Posts: 1
Joined: Mon Aug 30, 2004 3:54 pm

Post by Ekul » Mon Aug 30, 2004 3:57 pm

Well i am having trouble with this MOD i have found everything easy to find but when i get to where you have to find

Code: Select all

#$EMBB_keys = array('') ;
#$EMBB_widths = array('') ;
#$EMBB_values = array('') ;
#
# ...but will look slightly different if other bbcode MODs have been installed
#
$EMBB_keys = array(''
$EMBB_widths = array(''
$EMBB_values = array('

i can not find this part of my posting.php page so what am i doing wrong? i have the latest version of phpbb
Please help,
Thanks in advance
Luke

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Mon Aug 30, 2004 10:35 pm

You need to install Multi BBCodes MOD first :wink:

~Mac

Serj21
Registered User
Posts: 137
Joined: Thu Apr 15, 2004 6:23 pm
Contact:

Post by Serj21 » Fri Sep 03, 2004 1:58 pm

Yeh thanks ycl6.
# IMPORTANT: you MUST first have already installed the Multi BBCode MOD
# available at http://www.phpbb.com/mods/


Ill be monitoring this thread now so can offer support here or at my forum thou its a simple mod so shouldnt really be need for it.

Demo of Feature: Click Here

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Mon Oct 11, 2004 8:35 pm

I'm also having trouble installing this MOD. I cannot find the following code in posting.php but a similar code segment is in bbcode.php. I do have Multi BBCodes MOD 1.4.0 installed as well. Should this part of the MOD be editing the bbcode.php file instead of posting.php? I also checked the Multi BBCodes MOD 1.4.0 and found that it never adds this code to the posting.php file...

Code: Select all

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

#
#-----[ FIND ]---------------------------------
#
# NOTE: the full lines to look for are:
#$EMBB_keys = array('') ;
#$EMBB_widths = array('') ;
#$EMBB_values = array('') ;
#
# ...but will look slightly different if other bbcode MODs have been installed
#
$EMBB_keys = array(''
$EMBB_widths = array(''
$EMBB_values = array(''
This is what my current bbcode.php file looks like at this point. Note the Hide, Google, and Flash MODs didn't need to modify the posting.php file...

Code: Select all

// 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('','40','55','50') ;
	$EMBB_values = array('','Hide','Google','Flash') ;
	for ($i=1; $i<count($EMBB_values); $i++)
	{
		// load BBcode MODs info
		$val = ($i*2)+16 ;
		$template->assign_block_vars('MultiBB', array(
			'KEY' => $hotkeys[$i],
			'NAME' => "addbbcode$val",
			'HELP' => sprintf($lang['bbcode_help'][(strtolower($EMBB_values[$i]))], $hotkeys[$i]),
			'WIDTH' => $EMBB_widths[$i],
			'VALUE' => $EMBB_values[$i],
			'STYLE' => "bbstyle($val)")
		);
	}
}
// MULTI BBCODE-end

.

Serj21
Registered User
Posts: 137
Joined: Thu Apr 15, 2004 6:23 pm
Contact:

Post by Serj21 » Mon Oct 11, 2004 8:48 pm

Multi BBCode was recently update and any bbCode mods had to be rewritten to support this upgrade. I have not yet had the time to update this bbCode mod to support the latest Multi BBcode mod. So untill then you will not be able to install this mod with new/update version of Multi BBCode.

Sorry about this but had been busy lately and ill look into doing it this weekend.

Thanks, Serj

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Mon Oct 11, 2004 9:57 pm

OK, thanks Serj. I will be patiently awaiting your latest release...


.

orochi527
Registered User
Posts: 6
Joined: Fri Dec 17, 2004 8:32 pm

Post by orochi527 » Thu Dec 23, 2004 2:48 am

I took the liberty of updating the MOD to be compliant with the latest version of the Multi BBCode MOD. I hope you don't mind Serj, but I had edited it so I could use it on my own forum, and I figured I'd share with others. I've installed and tested it on my own forums and it seems to work perfectly.

Code: Select all

############################################################## 
## MOD Title: BBCode StrikeThrough 
## MOD Author: Serj21 < mods@zcultfm.com > (Serj) http://zcultfm.com 
## MOD Description: Allows strikethrough of text using [s]text[/s] 
## MOD Version: 1.2.0
## 
## Installation Level: Easy
## Installation Time: ~3 Minutes 
## Files To Edit: 
##	includes/bbcode.php 
##	templates/subSilver/bbcode.tpl 
##	language/lang_english/lang_main.php 
##	templates/subSilver/posting_body.tpl
##	language/lang_english/lang_bbcode.php
## 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: Created for use on Z-Cult FM forum after HotRod and Al
## 		 requested such such a system on forum.
##		 Is EasyMod 0.1.13 Combatable :)
############################################################## 
## MOD History: 
## 
##   2004-08-21 - Version 1.0.0 
##      - Initial Release :)
##   2004-08-23 - Version 1.1.0
##	- Made code Multi BBCode MOD compliant
##	- Changed BBCode HotKey from Alt-k to Alt-9  
##   2004-12-22 - Version 1.2.0
##	- Made code compliant with latest version of Multi BBCode MOD (1.4.0c)
## 
############################################################## 
#
# IMPORTANT: you MUST first have already installed the Multi BBCode MOD
#    available at http://www.phpbb.com/mods/
#
##############################################################
# Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
############################################################## 

#
# IMPORTANT: you MUST first have already installed the Multi Quick BBCode MOD
#

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

#
#-----[ FIND ]---------------------------------
#
# NOTE: the actual lines may be longer if you have installed other BBCode MODs
#
   $EMBB_widths = array('');
   $EMBB_values = array('');

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

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

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

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

# 
#-----[ 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 ]------------------------------------
# 

	// [s] and [/s] for striking out text. 
	$text = str_replace("[s:$uid]", $bbcode_tpl['s_open'], $text); 
	$text = str_replace("[/s:$uid]", $bbcode_tpl['s_close'], $text); 

# 
#-----[ FIND ]------------------------------------------
# 
	// [b] and [/b] for bolding text.
	$text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text);

# 
#-----[ AFTER, ADD ]------------------------------------
# 
	// [s] and [/s] for striking out text. 
	$text = preg_replace("#\[s\](.*?)\[/s\]#si", "[s:$uid]\\1[/s:$uid]", $text); 


# 
#-----[ 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 s_open --><span><s><!-- END s_open --> 
<!-- BEGIN s_close --></s></span><!-- END s_close --> 

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

#
#-----[ FIND ]---------------------------------
#
# Note: This text will appear twice in the code. Make sure you have the one that is NOT a comment
#
$lang['bbcode_help']['value'] = 'BBCode Name: Info (Alt+%s)';

#
#-----[ AFTER, ADD ]---------------------------------
#
$lang['bbcode_help']['s'] = 'Strikethrough text: [s]text[/s] (alt+9)';

# 
#-----[ 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 ]---------------------------------
# 
,'[s]','[/s]'

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

#
#-----[ FIND ]---------------------------------
#
$faq[] = array("Can I combine formatting tags?", "Yes, of course you can; for example to get someones attention you may write:<br /><br /><b>[size=18][color=red][b]</b>LOOK AT ME!<b>[/b][/color][/size]</b><br /><br />this would output <span style=\"color:red;font-size:18px\"><b>LOOK AT ME!</b></span><br /><br />We don't recommend you output lots of text that looks like this, though! Remember that it is up to you, the poster, to ensure that tags are closed correctly. For example, the following is incorrect:<br /><br /><b>[b][u]</b>This is wrong<b>[/b][/u]</b>");

#
#-----[ BEFORE, ADD ]---------------------------------
#
// start mod [s] bbcode
$faq[] = array("What does the S BBCode do?", "The [s] [/s] tags will put a strikthrough (horizontal line) through the center of the text. For example using:<ul><li>[s]This text is struckthrough![/s]<br /><br />will display as:<br /><br /><s>This text is struckthrough!</s></li></ul>");
// end mod [s] bbcode

# 
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
# 
# EoM
Hopefully this will help out those with the latest version of Multi BBCode.
Last edited by orochi527 on Thu Dec 23, 2004 9:09 pm, edited 1 time in total.

starloft
Registered User
Posts: 7
Joined: Wed Dec 10, 2003 12:17 pm
Location: Alexandria, VA

Post by starloft » Thu Dec 23, 2004 7:02 am

Works great. Thanks! :D only trouble i had was with the last bit of code having backward slashes and an extra quote. here's what it should be...

Code: Select all

// start mod [s] bbcode
$faq[] = array("What does the S BBCode do?", "The [s] [/s] tags will put a strikthrough (horizontal line) through the center of the text. For example using:<ul><li>[s]This text is struckthrough![/s]<br /><br />will display as:<br /><br /><s>This text is struckthrough!</s></li></ul>");
// end mod [s] bbcode 

orochi527
Registered User
Posts: 6
Joined: Fri Dec 17, 2004 8:32 pm

Post by orochi527 » Thu Dec 23, 2004 9:10 pm

starloft wrote: Works great. Thanks! :D only trouble i had was with the last bit of code having backward slashes and an extra quote. here's what it should be...


Whoops, my bad. I edited the last post so the code is correct. Thanks for catching that.

User avatar
slackiller
Registered User
Posts: 36
Joined: Sat Aug 23, 2003 1:06 am
Contact:

Post by slackiller » Sun Jan 02, 2005 5:03 am

Thanks orochi527

Code worked great

ripthesystem
Registered User
Posts: 21
Joined: Tue Dec 14, 2004 5:21 am

Post by ripthesystem » Mon Jan 03, 2005 5:32 pm

OK, I have installed this mod and have the Multiple BBCode mod working and I have one other mod that uses the Multi BBCode mod as well (The Hide Mod)

My question has to do with layout.

Right now in my posting_body.tpl I have the following:

Code: Select all

<table width="450" border="0" cellspacing="0" cellpadding="2">
<tr align="center">
<td width="100%">
<input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" onmouseover="helpline('b')" />&nbsp;

<input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" onmouseover="helpline('i')" />&nbsp;

<input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" onmouseover="helpline('u')" />&nbsp;&nbsp;


<input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" onmouseover="helpline('q')" />&nbsp;

<input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" />&nbsp;

<input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" />&nbsp;

<input type="button" class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" />&nbsp;

<input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px"  onclick="bbstyle(14)" onmouseover="helpline('p')" />&nbsp;

<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="width: 40px" onclick="bbstyle(16)" onmouseover="helpline('w')" />&nbsp;



			<!-- BEGIN MultiBB -->
			<span class="genmed">
			  <input type="button" class="button" accesskey="{MultiBB.KEY}" name="{MultiBB.NAME}" value="{MultiBB.VALUE}" style="width: 40px" onClick="{MultiBB.STYLE}" onMouseOver="helpline('{MultiBB.VALUE}')" />
			  </span></td>
			<!-- END MultiBB -->
This looked fine until I added the Strikethrough Mod.
The Strikethrough Mod adds the button to the end (after the URL button) but I want it after the U (underline button), but I still want the other BBCode Mode [Hide] button at the end.


For example on this site we have:
[img]image removed (sorry)[/img]



I currently have:
[img]image removed (sorry)[/img]



But what I want is:
[img]image removed (sorry)[/img]



However I don't know how to get what I want since there is only one line in the posting_body.tpl that calls the Multi BBCode. This calls both the Strikethrough and the Hide Button.

Does anyone have any ideas?
Last edited by ripthesystem on Wed Sep 13, 2006 1:27 pm, edited 1 time in total.

Manipe
Former Team Member
Posts: 1146
Joined: Thu Jul 22, 2004 6:30 pm
Location: Éire
Contact:

Post by Manipe » Mon Jan 03, 2005 11:31 pm

It's just a matter of modifying the tpl file.
It seems as though you have it in a wrong table or something.
My MODs: [ Topics a user has started ] , [ Profile views ] , [ Colour on poll results ] , [ Topic posters ] , [ Add number to PM ] , [ Default avatar ] , [ View category name ] , [ Null vote ] , [ Forum description in viewforum ] , [ Resync forum ids ] , [ View PM while replying ] , [ Quick poll insert ] , [ Limit login attempts ] , [ Track PMs ]

www.ManipeF1.com

Post Reply

Return to “[2.0.x] MOD Database Releases”