TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-05-2009, 09:39 PM   #1 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default Added a YouTube BBCode

Now you can share your most sordid programming videos with the TalkPHP community! I added the [youtube] BBCode which accepts the YouTube ID (not the entire URL).

For example, with the following YouTube video link: http://www.youtube.com/watch?v=WWhWV8lt_1I you would add it to your post like so: [youtube]WWhWV8lt_1I[/youtube]

In action:



(Incidentally, if anybody can think of any useful BBCodes they would like to see, I will add them.)
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 06-06-2009, 10:24 PM   #2 (permalink)
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

not sure if this would work but i did something like this before,
add, -> php.net/<value>,

Then like -> for example[phptag]print[/phptag]

and that will then end up where the value is so in the end it will in a post
echo out php.net/print etc..
codefreek is offline  
Reply With Quote
Old 06-06-2009, 11:24 PM   #3 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

codefreek, we already have the [function] bbcode for that. Using the text editor (not in quick reply) there is a "func" button beside the "php" button.

Thanks for the addition WH, though is there really much demand for embedding YouTube videos? Either way, it will be very handy for the occasion when people do want a video on their post.
Salathe is offline  
Reply With Quote
Old 06-06-2009, 11:39 PM   #4 (permalink)
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

ops, i forgot. Well i might look for other useful BBcode,
maybe wiki search BBcode could be good to have ;)

PS: one thing you could do for lazy people hehe :D
add the function tag -> on sidebar of Quick Reply. ;)
codefreek is offline  
Reply With Quote
Old 06-07-2009, 12:07 AM   #5 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Hehe. I haven't had any need until a couple of days ago when I wanted to embed a Bing video.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 06-07-2009, 12:50 AM   #6 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Hopefully there will be many more, videos provide a nice change to plain text.
Salathe is offline  
Reply With Quote
Old 06-07-2009, 01:06 AM   #7 (permalink)
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Very interesting, I'll have to find some youtube clips now...
allworknoplay is offline  
Reply With Quote
Old 06-07-2009, 04:18 PM   #8 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

And if anybody wants to do some PHP video tutorials then by all means!
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 06-07-2009, 04:23 PM   #9 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by Wildhoney View Post
And if anybody wants to do some PHP video tutorials then by all means!
Be sure to allow hd support for the media tag, I can't bare to see youtube video code tutorials that have such bad quality that you can't even read the code.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote
Old 06-07-2009, 05:08 PM   #10 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Quote:
Originally Posted by Orc View Post
Be sure to allow hd support for the media tag, I can't bare to see youtube video code tutorials that have such bad quality that you can't even read the code.
Good point ! I'll be sure to add that ability.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 06-07-2009, 07:03 PM   #11 (permalink)
The Addict
 
Join Date: May 2009
Posts: 287
Thanks: 5
adamdecaf is on a distinguished road
Default

I have made some of these for my personal forum. They are just ideas and have popped a few responses.

Wikipedia Tag:

Just input the /wiki/{Text To Search} between the tags and it creates a Wikipedia link that opens in a new tab/window.

Code:
The BB Code

[wikipedia]{TEXT}[/wikipedia]
HTML Code:
<!-- The HTML to replace and use with the link. -->

<img src="http://forum.decafproductions.com/images/wikipedia_favicon.png" alt="Wikipedia Favcon" title="Wikipedia Article on {TEXT}" /><b> : </b><a href="http://en.wikipedia.org/wiki/{TEXT}" target="_blank">{TEXT}</a>
I would suggest that you change the forum.decaf.... to a relative URI on your server to quicken load performance.
------------------------------------------

Google Search:

The same idea as the Wikipedia only this uses Google. I would suggest that other search engines be used for equality.

Code:
The BB Code

[google]{TEXT}[/google]
HTML Code:
<!-- The HTML to replace and use with the link. -->
<!-- The colors should/can be changed to match with Google's official colors more accurately. -->

<a href="http://google.com/search?q={TEXT}" target="_blank" title="A Google search on {TEXT}."><b><span style="color:#0000FF;">G</span><span style="color:#FF0000;">o</span><span style="color:#FFFF00;">o</span><span style="color:#0000FF;">g</span><span style="color:#00FF00;">l</span><span style="color:#FF0000;">e</span>:</b> {TEXT}</a>
Just Some ideas and they can be viewed on my forum.
__________________
My Site
adamdecaf is offline  
Reply With Quote
Old 06-11-2009, 08:59 PM   #12 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

Thank you very much for the ideas I like the idea of the Google and Wikipedia BB codes.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
Old 06-11-2009, 10:00 PM   #13 (permalink)
The Addict
 
Join Date: May 2009
Posts: 287
Thanks: 5
adamdecaf is on a distinguished road
Default

Quote:
Originally Posted by Wildhoney View Post
Thank you very much for the ideas I like the idea of the Google and Wikipedia BB codes.
Not a problem, I just wish they were seen more on my forum. ( I have to grab the defibrillator and shock it back to life this summer. )
__________________
My Site
adamdecaf is offline  
Reply With Quote
Old 11-07-2011, 11:25 PM   #14 (permalink)
HersheysBlog.com
 
Hershey's Avatar
 
Join Date: Nov 2011
Posts: 15
Thanks: 0
Hershey is on a distinguished road
Default vBulletin Spoiler Code

Any way you could add a spoiler code?

Maybe an advance one. Here is one I just typed up. I'm not sure if it works because I haven't tested it.

Here is the replacements:
Code:
<div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler!</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElements ByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline'){ this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }else{ this.parentNode.parentNode.getElementsByTagName('d iv')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset ; padding: 6px;">
<div class="spoiler" style="display: none;"></div>
</div>
</div>
Send a message via MSN to Hershey Send a message via Skype™ to Hershey
Hershey is offline  
Reply With Quote
Old 01-14-2012, 05:26 PM   #15 (permalink)
The Wanderer
 
Germanium's Avatar
 
Join Date: Nov 2007
Posts: 9
Thanks: 0
Germanium is on a distinguished road
Default

Also code syntaxing when using the code tags for javascript/html/php/xml
Send a message via ICQ to Germanium Send a message via MSN to Germanium Send a message via Yahoo to Germanium
Germanium is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
BBCode using Preg_Replace mortisimus Advanced PHP Programming 30 12-10-2008 02:43 AM
eShop v1 quantumkangaroo Show Off 15 05-01-2008 07:13 PM
BBCode bugs wGEric Feedback 1 03-05-2008 10:33 PM
BBCode preg_match => str_replace ReSpawN Advanced PHP Programming 5 01-13-2008 09:41 PM
Function BBCode CreativeLogic News and Announcements 0 04-13-2005 04:05 AM


All times are GMT. The time now is 09:49 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design