WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Embed youtube request

 
Post new topic   Reply to topic    WiiLi.org Forum Index -> Website
View previous topic :: View next topic  
Author Message
fortunzfavor



Joined: 13 Jun 2007
Posts: 95

Digg It
PostPosted: Sat Jul 14, 2007 4:15 pm    Post subject: Embed youtube request

The idea is to be able to wrap [youtube][/youtube] around a youtube id code or full url, and then have it playable from within a post. This would allow users to demonstrate stages of development, changes, scripts, etc more effectively and more smoothly within the forums.

This forum is ideal for this type of feature. It'd be great to be able to embed youtube videos directly into a post.

Here's a link describing how to create the tag. There are several options (including similar codes for other video sites like gametrailers), and there are apparently some bugs in phpbb, so there are workarounds posted. If this isn't effective, but you were still interested in adding support, I'd be happy to do the legwork to find code that does work.

I am copying the relevant portions for a phpbb rc2 board (that's what this is, right?) to wrap the tags around the full youtube url.

Leozak wrote:
Step 1:
Under BBCodes, in the ACP:

BBCode Usage, add:

Code:
    [Youtube]{TEXT}[/Youtube]




HTML Replacement, add:

Code:

    <object width="425" height="350"><param name="movie" value="{TEXT}"></param><param name="wmode" value="transparent"></param><embed src="{TEXT}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>




Step 2:
Open viewtopic.php:

Look for:


Code:
// Parse the message and subject
       $message = censor_text($row['post_text']);

       // Second parse bbcode here
       if ($row['bbcode_bitfield'])
       {
          $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
       }

       $message = str_replace("\n", '<br />', $message);



ADD, AFTER:

Code:

       $message = str_replace("watch?v=", 'v/', $message);



SAVE and REPLACE. (Make sure you have a backup of viewtopic.php Wink )
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> Website All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group