UBB.Dev
Posted By: drkknght Fyrebug BB Code - 12/20/2007 9:45 AM
About:
This mod, based on the YouTube one, adds a fancy little button to your Rich Text Panel button bar that when clicked prompts a user for a Fyrebug game code. The bbcode then embeds the requisite html to display the Fyrebug game inline of the users post.

Fyrebug.com
Fyrebug is a portal similar to Youtube, only Fyrebug features user-generated games, rather than videos.

Credits:
chillin
maybe a little drkknght

Files Altered:
* /templates/default/standard_text_editor.tpl
* /libs/ubbthreads.inc.php


Files Added:
[Linked Image]
fyrebug.gif

Directions:
Backup your files first.
Upload the fyrebug gif to your images/markup_panel/default/ directory


Here we go:
in standard_text_editor.pl

FIND:
Code
src="{$config.BASE_URL}/images/{$style_array.markup_panel}/smiley.gif" /></a>

ADD BELOW:
Code
<!-- fyrebug button -->
<a href="javascript: void(0)" onclick="formatText('[fyrebug]','[/fyrebug]');" title="{$lang.FYREBUG_ALT}" alt="{$lang.FYREBUG_ALT}"><img id="fyrebug" onmouseover="raiseButton(this.id);" onmouseout="normalButton(this.id);" onmousedown="lowerButton(this.id);" class="markup_panel_normal_button" src="{$config.BASE_URL}/images/{$style_array.markup_panel}/fyrebug.gif" /></a>
<!-- /// fyrebug button -->



in ubbthreads.inc.php

FIND:
Code
array( "#\[email:([+_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))\](.+?)\[/email]#i", '<a href="mailto:\1">\5</a>' ),

ADD BELOW:
Code
// fyrebug addition
array( "#\[fyrebug\](.+?)\[/fyrebug\]#i", '<object width=425 height=400><param name=movie value=http://www.fyrebug.com/embed.php?&gameid=\1></param><param name=wmode value=window></param><param name=allowFullScreen value=true></param><embed src=http://www.fyrebug.com/embed.php?&gameid=\1 type=application/x-shockwave-flash wmode=window allowFullScreen=true width=425 height=400></embed></object><br><a href=http://www.fyrebug.com/welcome.php?gameid=\1>Click here to make your own Fyrebug game</a><br>
done!!!

all users will have to do is grab the numeric game ID code from any fyrebug.com game, and its time to play!!! smile
Posted By: AllenAyres Re: Fyrebug BB Code - 12/21/2007 9:40 PM
And Rob releases another mod! Sweet! laugh
Posted By: drkknght Re: Fyrebug BB Code - 12/21/2007 10:53 PM
2 in 7 years. thats about right smile

(and i've made a ton of fyrebug games! rockon )
Posted By: Ian_W Re: Fyrebug BB Code - 12/22/2007 12:01 AM
Thanks Rob smile


Only another 3 1/2 years to wait for the next one wink

Posted By: sirdude Re: Fyrebug BB Code - 12/24/2007 6:11 AM
with the custom tags feature in 7.3, this will be easy to add to any 7.3 board with no code modifications.

good stuff smile
Posted By: Gizmo Re: Fyrebug BB Code - 12/24/2007 2:22 PM
Someone's bbcode addins for the 7.3 writeup may have already gotten this in as an example a ways back lol
Posted By: drkknght Re: Fyrebug BB Code - 01/14/2008 7:19 PM
quick update: its just a quick change to the very last part of the code -- use the following text in in ubbthreads.inc.php, instead of what is indicated in the first post (hope thats not confusing -- i can't edit the first post, cuz my time limit has expired frown )

change this:
Code
// fyrebug addition
array( "#\[fyrebug\](.+?)\[/fyrebug\]#i", '<object width=425 height=400><param name=movie value=http://www.fyrebug.com/fyrebugshell24.swf?&gameid=\1></param><param name=allowFullScreen value=true></param><param name=wmode value=window></param><embed src=http://www.fyrebug.com/fyrebugshell24.swf?&gameid=\1 type=application/x-shockwave-flash wmode=window allowFullScreen=true width=425 height=400></embed></object>' ),


to this:

Code
// fyrebug addition
array( "#\[fyrebug\](.+?)\[/fyrebug\]#i", '<object width=425 height=400><param name=movie value=http://www.fyrebug.com/embed.php?&gameid=\1></param><param name=wmode value=window></param><param name=allowFullScreen value=true></param><embed src=http://www.fyrebug.com/embed.php?&gameid=\1 type=application/x-shockwave-flash wmode=window allowFullScreen=true width=425 height=400></embed></object><br><a href=http://www.fyrebug.com/welcome.php?gameid=\1>Click here to make your own Fyrebug game</a><br>

(the old one uses the wrong value tags)
Posted By: drkknght Re: Fyrebug BB Code - 01/14/2008 7:19 PM
Originally Posted by sirdude
with the custom tags feature in 7.3, this will be easy to add to any 7.3 board with no code modifications.

good stuff smile


hooray!

Originally Posted by Gizmo
Someone's bbcode addins for the 7.3 writeup may have already gotten this in as an example a ways back lol


more hooray!
Posted By: Ian_W Re: Fyrebug BB Code - 01/14/2008 9:37 PM
I have updated your original post with the revised code smile
Posted By: Gizmo Re: Fyrebug BB Code - 01/15/2008 2:48 AM
i have a bbcode genned for 7.3; but it didn't make the cut for extended BBCode, so i'll have it in a thread somewhere for you all wink
Posted By: Gizmo Re: Fyrebug BB Code - 02/15/2008 3:24 PM
I posted a Custom BBCode for this for 7.3 in my CustomTags Thread. To be honest, I made it as one of the first ones for 7.3's when I was fiddling around with adding new codes months ago wink...
© UBB.Developers