Thank you Simon! That code was brilliant!
I was wondering if it was okay with you for me to expand on to that code. Digg.com also has the digg button within the pop up video playing window. I think I can figure out how to add that in there as well to make it resemble Digg.com's video feature more.
With your permission of course.
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| Good Job Simon! |
| The Following User Says Thank You to mryder For This Useful Post: | ||
| ||||
|
Very cool feature. One more thing I've saved to look at this weekend :P
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| |||
|
What you just describe is great, but it will be more helpful if you share the codes here. That way someone else can pick it up for further development. I look forward t the complete files. great work.
|
| The Following User Says Thank You to timusa For This Useful Post: | ||
| |||
| Quote:
![]() I was thinking the final goal should be "media" in general, not just limited to videos....music files and images can easily be included too. Take a look at bandbuzz for example (not based on pligg) for an example of how to deal with music. Last edited by Simon; 03-23-2007 at 02:18 PM.. |
| |||
|
While I was at it, I added in the ability to display other types of media files (image and music), using this mediaplayer as a start. Demo here. Play.php becomes something like: Code: <?php
include('config.php');
$id = mysql_real_escape_string(strip_tags($_GET['id']));
$play_query = mysql_query("SELECT link_votes,link_url,link_type FROM " . table_links . " WHERE link_id=\"$id\" AND (link_status='published' OR link_status='queued') AND link_type!='0' LIMIT 1");
$play_array = mysql_fetch_array($play_query);
$play = $play_array['link_url'];
$votes = $play_array['link_votes'];
$type = $play_array['link_type'];
?>
<?php if($type == 1) { ?>
<div>
<center>
<object width="425" height="350">
<param name="movie" value="<?php echo $play ?>" />
<param name="wmode" value="transparent" />
<embed src="<?php echo $play ?>&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350" />
</object>
<br /><br />
<b>Total Votes for this Video File:</b> <?php echo $votes ?>
</center>
</div>
<?php } ?>
<?php if($type == 2) { ?>
<div style="margin-top:15px">
<center>
<object width="425" height="350">
<embed src="/flash/mediaplayer.swf" flashvars="file=<?php echo $play ?>&autostart=true" width="425" height="350" quality="high" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<br /><br />
<b>Total Votes for this Media File:</b> <?php echo $votes ?>
</center>
</div>
<?php } ?>
What I currently have looks bad (no nice looking previews etc) and has nothing like url checks to make sure the correct urls are entered. The reason I outlined some initial instructions on the 1st page was to hopefully get a couple of people (coders) interested in taking it further. Last edited by Simon; 03-23-2007 at 10:17 PM.. |
| |||
|
Thank you Simon for this mod ! Can you tell us how do you made your video link to display only the video stories here : http://news.oioplus.com/videos/ ? Thanks |
| |||
|
I have put together a short tutorial, with some modified files (although others you will have to modify yourself when following the instructions), to allow people to add this kind of video submission functionality. Remember: this isn't finished, since there are elements like url checking missing, and it has only been tested with youtube videos. Any further modifications you would like to make are fine. I will not be developing this further, as I have no time to. Latest download package here. Last edited by Simon; 04-19-2007 at 09:44 AM.. |
| |||
|
I am getting an damaged .zip file.....
|
| ||||
|
I think the permissions are messed up for attachments on the server. I'll notify yank so we can get this fixed.
__________________ I accept donations for my time helping users like you on the forum and IRC. |
| |||
| Quote:
Simon, can you or someone else break this down for me. I am really not a coder at all. I'm pretty amateur, still learning. |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |






Linear Mode
