TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   News and Announcements (http://www.talkphp.com/news-announcements/)
-   -   Added a YouTube BBCode (http://www.talkphp.com/news-announcements/4485-added-youtube-bbcode.html)

Wildhoney 06-05-2009 09:39 PM

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

codefreek 06-06-2009 10:24 PM

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

Salathe 06-06-2009 11:24 PM

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

codefreek 06-06-2009 11:39 PM

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

Wildhoney 06-07-2009 12:07 AM

Hehe. I haven't had any need until a couple of days ago when I wanted to embed a Bing video.

Salathe 06-07-2009 12:50 AM

Hopefully there will be many more, videos provide a nice change to plain text. :-)

allworknoplay 06-07-2009 01:06 AM

Very interesting, I'll have to find some youtube clips now...

Wildhoney 06-07-2009 04:18 PM

And if anybody wants to do some PHP video tutorials then by all means!

Orc 06-07-2009 04:23 PM

Quote:

Originally Posted by Wildhoney (Post 25028)
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. *!*

Wildhoney 06-07-2009 05:08 PM

Quote:

Originally Posted by Orc (Post 25031)
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.

adamdecaf 06-07-2009 07:03 PM

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.

Wildhoney 06-11-2009 08:59 PM

Thank you very much for the ideas :-) I like the idea of the Google and Wikipedia BB codes.

adamdecaf 06-11-2009 10:00 PM

Quote:

Originally Posted by Wildhoney (Post 25245)
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. :-P )

Hershey 11-07-2011 11:25 PM

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>


Germanium 01-14-2012 05:26 PM

Also code syntaxing when using the code tags for javascript/html/php/xml


All times are GMT. The time now is 02:14 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0