https://www.icyphoenix.com/viewtopic.php?f=35&t=3825&p=26183#p26183
-----------------------------------
DWho
Sat 15 Mar, 2008 17:51

Re: Spacer Bbcode
-----------------------------------
ok after spending a few hours studying  bbcode parsing and through trial and error I have managed to get part of this to work....

Basically to enable to add spaces between words using [b][spacer][/b] bbcode.... I have not managed to get the extra part working as yet whee a user can add a number up to 100 for the amount of spaces they require...

well this is the first bit if there are any errors please let me know....

[b]This does not come with an image you have to type the bbcode into the text box...[/b]

OPEN [b]includes/bbcode.php[/b]
FIND
[codeblock]	var $self_closing_tags[/codeblock]
INLINE FIND
[codeblock] '[url=docs/readme_english.html#license]Readme',[/codeblock]
INLINE AFTER ADD
[codeblock] '[spacer]',[/codeblock]
FIND
[codeblock]			'ipstaff' => array(
					'nested' => true,
					'inurl' => true,
					'allow_empty' => true,
					)[/codeblock]
AFTER ADD
[codeblock] 			'spacer' => array(
					'nested' => true,
					'inurl' => true,
					'allow_empty' => true,
					),[/codeblock]
FIND
[codeblock] 		// Easter Eggs - START
		// Single tags: xs or ipstaff
		if( ($tag === 'xs') || ($tag === 'ipstaff') )
		{
			$html = $lang['BBC_IP_Credits'];
			return array(
				'valid' => true,
				'html' => $html
			);
		}[/codeblock]
BEFORE ADD
[codeblock]				if($tag == 'spacer')
		{
			$html = '&nbsp;';
					return array(
				'valid' => true,
				'html' => $html
			);
		}[/codeblock]
FIND
[codeblock]			$tag_ok = false;
			if( ($tag === '*') || ($tag === '[*]') || ($tag === '[hr]') || ($tag === '[url=docs/readme_english.html#license]Readme') || ($tag === '[url=docs/readme_english.html#license]Readme') || ($tag === '[url=docs/readme_english.html#license]Readme') || ($tag === '[url=docs/readme_english.html#overview]Readme') || ($tag === '[url=docs/readme_english.html#license]Readme') || ($tag === '[url=docs/readme_english.html#requirements]Readme') || ($tag === '[url=docs/readme_english.html#fresh_installation]Readme') || ($tag === '[url=docs/readme_english.html#upgrade_phpbb]Readme') || ($tag === '[url=docs/readme_english.html#upgrade_phpbb]Readme') || ($tag === '[url=docs/readme_english.html#upgrade_xs]Readme') || ($tag === '[url=docs/readme_english.html#upgrade_ip]Readme') )[/codeblock]
INLINE FIND
[codeblock]  ($tag === '[url=docs/readme_english.html#license]Readme') ||[/codeblock]
INLINE AFTER ADD
[codeblock] ($tag === '[spacer]') ||[/codeblock]

Thats it

if you need to add extra spaces just use [spacer] 

if anyone could help with the other part I will be very grateful...


