Tim
Life is good
Joined: Nov 2007
Location: Kalamazoo
Making things even easier around the site
But there still not bugs...there unexplained features
With the amount of YouTube videos that get posted to the site, and the amount that will be posted in the future I figured I'd make things easier to post them. So last night I set off on that task and completed it. I also fixed a nagging bug feature with comments.
For what ever reason, when you had do not allow anonymous comments checked in either section of the site it would not allow any comments. This bug stems from a few releases ago when I combined comments into a single user control for easier maintenance. Because all the comments work the same, why repeat the code endlessly. And since there is more than 100 lines of code, maintaining it in three different areas was a real pain in the ass. Of course testing it is still a pain but that always is.
But the real reason to do updates was to make YouTube videos stupid simple to post. Because I'm using TinyMCE for my WYSIWYG editor of choice it had a few issues posting the HTML from the embed tag. You could do it, but it required knowing a little bit about HTML. So in keeping with the KISS principle (no not the nice version either) I made it even easier than before.
Before you needed the embed tag and needed to tear it down to just the URL for the video. Which to me is simple enough, but not everyone knows what to do. This was also some what hard to explain. You also could have used the URL from the video and carefully trimmed it to what was required but this too would difficult to explain. So here is all you have to do now. From the YouTube page it gives you two options to share a video, a URL and an embed, shown below.

Once you've copied the contents of the URL box go back to your article or collection and add in your youtube bracket like so: [ youtube ]
After you add that in, paste the YouTube URL and finish it off with a closing bracket like this ]/youtube[
So now your string should look like this: [ youtube ]http://www.youtube.com/watch?v=mzDQgfNHDI0[ / youtube ]
So far so good. Now just do a little trimming and remove the "http://www.youtube.com/watch?v=" from the tag (less the quotes). At this point your tag should look like this: [ youtube ]mzDQgfNHDI0[ / youtube ]
I've alo included this in the help section, and in the quick help link on the article page. I think I still need to update it for the collections. As a note, I've padded the examples above with spaces [ youtube ], should be [youtube], the same goes for the closing tag. If I would have not used spaces it would have turned into a YouTube video!
One other improvement I made was that any BBCode tags or youtube vids posted in the first paragraph you display as links, images and videos on the main page. The first paragraph is defined from teh first line break, or full break. So if you have a URL you can wrap it in [url] tags or images in [img] tags and it will display on the main page.
Enjoy