Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Spacer Bbcode 
 
Hi

Is mod possible to add to icy... I have spent some time looking at the code but cannot find anything similar in the files....

Spoiler: [ Show ]


thank you for any help...
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
Last edited by DWho on Fri 28 Mar, 2008 10:15; edited 1 time in total 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post 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 [spacer] 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....

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

OPEN includes/bbcode.php
FIND
Code: [Download] [Hide] [Select]
    var $self_closing_tags

INLINE FIND
Code: [Download] [Hide] [Select]
'[url=docs/readme_english.html#license]Readme[/url]',

INLINE AFTER ADD
Code: [Download] [Hide] [Select]
'[spacer]',

FIND
Code: [Download] [Hide] [Select]
            'ipstaff' => array(
                    'nested' => true,
                    'inurl' => true,
                    'allow_empty' => true,
                    )

AFTER ADD
Code: [Download] [Hide] [Select]
            'spacer' => array(
                    'nested' => true,
                    'inurl' => true,
                    'allow_empty' => true,
                    ),

FIND
Code: [Download] [Hide] [Select]
        // Easter Eggs - START
        // Single tags: xs or ipstaff
        if( ($tag === 'xs') || ($tag === 'ipstaff') )
        {
            $html = $lang['BBC_IP_Credits'];
            return array(
                'valid' => true,
                'html' => $html
            );
        }

BEFORE ADD
Code: [Download] [Hide] [Select]
                if($tag == 'spacer')
        {
            $html = ' ';
                    return array(
                'valid' => true,
                'html' => $html
            );
        }

FIND
Code: [Download] [Hide] [Select]
            $tag_ok = false;
            if( ($tag === '*') || ($tag === '[*]') || ($tag === '[hr]') || ($tag === '[url=docs/readme_english.html#license]Readme[/url]') || ($tag === '[url=docs/readme_english.html#license]Readme[/url]') || ($tag === '[url=docs/readme_english.html#license]Readme[/url]') || ($tag === '[url=docs/readme_english.html#overview]Readme[/url]') || ($tag === '[url=docs/readme_english.html#license]Readme[/url]') || ($tag === '[url=docs/readme_english.html#requirements]Readme[/url]') || ($tag === '[url=docs/readme_english.html#fresh_installation]Readme[/url]') || ($tag === '[url=docs/readme_english.html#upgrade_phpbb]Readme[/url]') || ($tag === '[url=docs/readme_english.html#upgrade_phpbb]Readme[/url]') || ($tag === '[url=docs/readme_english.html#upgrade_xs]Readme[/url]') || ($tag === '[url=docs/readme_english.html#upgrade_ip]Readme[/url]') )

INLINE FIND
Code: [Download] [Hide] [Select]
  ($tag === '[url=docs/readme_english.html#license]Readme[/url]') ||

INLINE AFTER ADD
Code: [Download] [Hide] [Select]
($tag === '[spacer]') ||


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...
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Spacer Bbcode 
 
Thanks DWho, this MODification working in IP 1.2.0.27?

Greets
 




____________
ThE KuKa - www.phpBB-Es.COM - Custom Installations phpBB
 
ThE KuKaSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Spacer Bbcode 
 
DWho wrote: [View Post]
Code: [Download] [Hide] [Select]
                if($tag == 'spacer')
        {
            $html = ' ';
                    return array(
                'valid' => true,
                'html' => $html
            );
        }

Replace this code with:
Code: [Download] [Hide] [Select]
        // SPACER
        if($tag === 'spacer')
        {
            $html = '';
            if(isset($item['params']['param']))
            {
                for ($i=0; ($i < intval($item['params']['param'])); $i++)
                {
                    $html .= '&nbsp;';
                }
            }
            else
            {
                $html = '&nbsp;';
            }
            return array(
                'valid' => true,
                'html' => $html
            );
        }


It seems it is a bug and you can't set [spacer=5] or [hr=#FF0000] (the second one should be working)...

This code I've posted will not work until the bug is fixed.

Greets!
 




____________
Gabriel Anca
 
KasLimonSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Spacer Bbcode 
 
Hi

So as soon as the bug is fixed it should work as discribed?  Does that mean you can add a number after space=? and that many spaces will appear in the text box...?

thanks for looking and correctly correcting my code....

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Spacer Bbcode 
 
Yes, nut only if the bug is corrected.

Greetings
 




____________
Gabriel Anca
 
KasLimonSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Spacer Bbcode 
 
Excellant....

So how do we fix the bug or is that for the main developers of the site to look at..?

Do I need to post a bug report..?

   
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Spacer Bbcode 
 
I've already reported the bug, but we have to wait until Luca reads it
 




____________
Gabriel Anca
 
KasLimonSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Spacer Bbcode 
 
ok cool

Thank you

 
 




____________
Mods and themes for Icy Phoenix 1.3

IcyPhoenix UK is off-line permanently due to lack of time to update mods.
if anyone is interested in my templates I will upgrade them to Icy 2.0.
 
DWhoSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron