Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Add-Ons & Blocks ⇒ DF_Multimedia modding


DF_Multimedia modding
Need help creating a block or add-on, or you have created or modified a block/add-on that works in Dragonfly CMS and it meets the CPG Security Requirements? Do you have feedback about a specific add-on? Here is the place to post. Read the announcements here first!.
Go to page 1, 2, 3, 4, 5  Next
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & Blocks

View previous topic :: View next topic  
Author Message
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Fri Nov 07, 2008 2:20 pm
Post subject: DF_Multimedia modding

Update: I've added a mod for fullscreen with the embedded media player, see the end of this thread. Works with v3, and probably v2 as well.

Update: DF_Multimedia v3 has been released and it already contains most of the mods and fixes posted in this thread. You can view details about the new version here, and download it here. (requires registration)

I'll leave these up for people who just want to fix-up the older release. (v2.0.6)

-Andy


Original Post:

I created a new block for the DF_Multimedia module, it shows preview images of the most popular, and newest videos, and then lists the next 5 most popular and newest. I use it on my frontpage.

I also hacked up the news RSS script to make an RSS feed for the DF_Multimedia module.

It has not been tested much, but seems to work fine.

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1


Last edited by personman on Wed Feb 11, 2009 4:54 pm; edited 4 times in total
Back to top
View user's profile Visit poster's website
macavity
Heavy poster
Heavy poster

Offline Offline
Joined: Jun 23, 2004
Posts: 199

PostPosted: Wed Dec 10, 2008 12:28 pm
Post subject: Re: DF_Multimedia block, RSS writer

Hi,

Thanks for this - looks really good!

I'm about to leave for the airport and don't have time to look at the attached files in detail but was just wondering if the block continues to work well (and if there have been any issues addressed in an update since you posted last month) and also ask if any of the included files actually replace files from the orginal DF_Multimedia module (or are they just in addition to it)?

Thanks in advance - I'll check in again when I land!

Cheers,

Mac

_________________
Note: WWW Private Listing - Staff Only

macavity's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD/Apache 2.0/MySQL 5.0.77/PHP 5.2.10/Dragonfly 9.2.1
Back to top
View user's profile
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Wed Dec 10, 2008 1:20 pm
Post subject: Re: DF_Multimedia block, RSS writer

Heya,

Quite welcome!

I haven't run in to any problems with it. So far, so good.

It doesn't replace any files from the original module. You copy one of the files in to /rss, and the other in to /blocks. The RSS output should just work as soon as the file is copied, the block will have to be set up though (as you would any other block)

I'm also working on an experimental video podcast output for the module. I personally want it to make a MythTV Station that will play the YouTube and Google videos out of the archive. I have it working, but needs some polish.

-Andy

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1
Back to top
View user's profile Visit poster's website
macavity
Heavy poster
Heavy poster

Offline Offline
Joined: Jun 23, 2004
Posts: 199

PostPosted: Thu Dec 11, 2008 9:13 pm
Post subject: Re: DF_Multimedia block, RSS writer

Thanks Andy, appreciate the reply. Please shout out with any further developments!

Cheers,

Mac

_________________
Note: WWW Private Listing - Staff Only

macavity's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
FreeBSD/Apache 2.0/MySQL 5.0.77/PHP 5.2.10/Dragonfly 9.2.1
Back to top
View user's profile
MikieMouse
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Jun 27, 2004
Posts: 500
Location: South Dakota
PostPosted: Sun Dec 14, 2008 5:56 pm
Post subject: Re: DF_Multimedia block, RSS writer

personman,

Would you mind if I include this block/hack in the next release of my mod (due out in 2009)? Credit, as always, is given to those that provide enhancements, etc that are included in the download.

Let me know if you'd allow me to do that. Thank you, and it looks pretty damn slick Big grin

_________________
EHP Webmaster
www.ehpdesigns.com

MikieMouse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux OS / Apache 1.3.34 / MySQL 4.1.22 / PHP 4.4.7/ DF 9.1.2.1
Back to top
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Mon Dec 15, 2008 2:49 pm
Post subject: Re: DF_Multimedia block, RSS writer

Not at all, have at it. Smile Thanks.

I have some other little mods I've done to it over the last months, more notably to add the fullscreen button to the embedded media player. I think I just hacked it in rather than trying to fix the option, but I'm a bit better with php now, so I might take another look.

I was thinking about waiting and releasing a modded version of the mod, but if you might be interested in merging some of the changes up-stream, even better.

I've spent a little bit of time trying to track down a couple bugs. One bug makes all the text on multimedia pages react to the mouse pointer in IE, but haven't had any luck yet, also looked briefly at the sql bug that causes the random videos to occasionally choose a blank video, but nothing yet. I think if I spend some serious time on it I could find some ugly workaround or another.

-Andy

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1
Back to top
View user's profile Visit poster's website
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Mon Dec 15, 2008 4:59 pm
Post subject: Re: DF_Multimedia block, RSS writer

Seem to be a couple bugs that are probably contributing to the sql issue. One seems to be flaws in the randomizing code. I THINK I've fixed it, but it seems to be a hard bug to reproduce, particularly because I happen to have a lot of multimedia in the multimedia section.

I made some changes and I've been refreshing for an hour, so far so good.

Another issue is the multimedia pages link to "previous" and "next" media without checking to make sure it's actually a valid page. I'm thinking this might be where most of the bot errors are coming from. I'll probably just have to try fixing it and see if I quit getting error e-mails in the coming weeks.

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1
Back to top
View user's profile Visit poster's website
MikieMouse
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Jun 27, 2004
Posts: 500
Location: South Dakota
PostPosted: Mon Dec 15, 2008 5:04 pm
Post subject: Re: DF_Multimedia block, RSS writer

personman wrote:
Not at all, have at it. Smile Thanks.

Excellent. I will look to add that to the latest release with you being credited in the README file.

personman wrote:
I have some other little mods I've done to it over the last months, more notably to add the fullscreen button to the embedded media player. I think I just hacked it in rather than trying to fix the option, but I'm a bit better with php now, so I might take another look.

I was thinking about waiting and releasing a modded version of the mod, but if you might be interested in merging some of the changes up-stream, even better.

I've spent a little bit of time trying to track down a couple bugs. One bug makes all the text on multimedia pages react to the mouse pointer in IE, but haven't had any luck yet, also looked briefly at the sql bug that causes the random videos to occasionally choose a blank video, but nothing yet. I think if I spend some serious time on it I could find some ugly workaround or another.

I too have been looking at ways of fixing that blank, random video. No such luck at this time either. But I would love to work with you on this. The others that I used to work with appear to have stopped interest in this mod.

_________________
EHP Webmaster
www.ehpdesigns.com

MikieMouse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux OS / Apache 1.3.34 / MySQL 4.1.22 / PHP 4.4.7/ DF 9.1.2.1
Back to top
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Mon Dec 15, 2008 5:26 pm
Post subject: Re: DF_Multimedia block, RSS writer

I redid the random blocks with some borrowed code from elsewhere in the mod that seemed to do the job. The change involved commenting a few lines, and changing the SQL query, here is what I'm messing with:

PHP:
// Get Random Video
//$result = $db->sql_query("SELECT * FROM ".$prefix."_multimedia");
//$numrows = $db->sql_numrows($result);//find number of rows in table
//$randvid = rand(0,$numrows);//get a random number within the number of rows
// Get video information and display it.
$result = $db->sql_query("SELECT * FROM ".$prefix."_multimedia WHERE request=0 ORDER BY RAND() LIMIT $limit");

So far so good. Haven't been able to reproduce it since I made the change, but it's an illusive one...

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1
Back to top
View user's profile Visit poster's website
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Mon Dec 15, 2008 8:20 pm
Post subject: Re: DF_Multimedia block, RSS writer

I think I have the previous/next link bug fixed.

Between these 2 fixes, this should get rid of most or all of the SQL errors.

Here is the code, goes in to watch.php somewhere around line 211:

Code::
       //Get previous media page if it exists, else do nothing.
	if($id - 1 != 0) {
		$result = $db->sql_query("SELECT id FROM ".$prefix."_multimedia WHERE request=0 AND id<$id ORDER BY id DESC LIMIT 1");
		$row = $db->sql_fetchrow($result);
		if($row)
		{
			echo "		<a href=\"".getlink('&amp;page=watch&amp;id='.$row[0])."\">"._PREVIOUSID."</a> |";
		}
	}
	
	// Play in pop-up link I didn't touch. -Andy
	echo "		<a href=\"javascript:loadvidpop(".$id.", ".$popheight.", ".$popwidth.", ".$leo.")\">"._PLAYINPOPUP."</a>";

	// Get next multimedia page if it exists, else do nothing.
	$result = $db->sql_query("SELECT id FROM ".$prefix."_multimedia WHERE request=0 AND id>$id ORDER BY id LIMIT 1");
	$row = $db->sql_fetchrow($result);
	if($row)
	{
		echo "		| <a href=\"".getlink('&amp;page=watch&amp;id='.$row[0])."\">"._NEXTID."</a>";
	}

The PHP code tag didn't seem to like it, so I just used the Code tag.

Schwew...now if this all works well, maybe I can tackle the mouse-over bug. Think that's the last big annoyance.

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1


Last edited by personman on Thu Dec 18, 2008 4:25 pm; edited 1 time in total
Back to top
View user's profile Visit poster's website
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Wed Dec 17, 2008 9:19 pm
Post subject: Re: DF_Multimedia block, RSS writer

Alright Very Happy

Took me a couple days, but I finally managed to track down the bug that causes text on multimedia pages to react to the mouse pointer, in IE and Konqueror. The fix is surprisingly simple.

Open watch.php, look around line 64 for:

PHP:
echo "<a name=\"VStop\">";

Comment this line or delete it... That's it.

I don't know what it does, or why it's there, or what it is, but after killing it, I no longer get annoying underlining of all the text on mouse-over. Doesn't seem to break anything either.

I guess I'm on a roll. That takes care of the 3 biggest, hairiest, and most annoying bugs I've experienced in the module.

If you want me to package these fixes together somehow, perhaps as a patch against df_multimedia 2.0.6, let me know.

-Andy

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1
Back to top
View user's profile Visit poster's website
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Thu Dec 18, 2008 1:17 pm
Post subject: Re: DF_Multimedia block, RSS output, and bug fixes

Here is a .zip file with the bug fixed files and instructions, for testing and feedback.

Updated: 12/28/08

Bug Fixes for DF_Multimedia 2.0.6

Bugs fixed:

Invalid IDs cause SQL errors
Random video blocks sometimes display blank videos
Multimedia pages "previous" and "next" links sometimes link invalid videos
All text on multimedia pages reacts oddley to the mouse pointer in IE and Konqueror (possibly others)

To uninstall, re-extract the original files from DF_Multimedia 2.0.6.

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1


Last edited by personman on Sun Dec 28, 2008 6:17 pm; edited 2 times in total
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Thu Dec 18, 2008 3:42 pm
Post subject: Re: DF_Multimedia block, RSS output, and bug fixes

Replace

Code::
$row = mysql_fetch_row($result);

with

Code::
$row = $db->sql_fetchrow($result);

if you want to maintain proper database compatibility.

Code::
echo "<a name=\"VStop\">";

is probably used because there's a link with #VStop on the end somewhere and that's the anchor to take you to it. Removing it solves your problem, but it probably breaks a link somewhere else.

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Thu Dec 18, 2008 4:01 pm
Post subject: Re: DF_Multimedia block, RSS output, and bug fixes

Thanks. The file has been updated, as well as the forum post.

I'll investigate the VStop matter further. The "Back to Top" link still seems to function, which is where I'd think it would go wrong, but I'll keep an eye out.

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1
Back to top
View user's profile Visit poster's website
personman
Heavy poster
Heavy poster

Offline Offline
Joined: May 29, 2007
Posts: 152

PostPosted: Sat Dec 27, 2008 2:15 pm
Post subject: Re: DF_Multimedia block, RSS output, and bug fixes

Well, I think I'm still getting some sql errors, though it could just be some bots have the old links cached.

I'll probably take another look at it. Thinking maybe if we have invalid videos just return errors rather than empty pages, the bots will lose interest, and we'll be cutting the sql errors off at the source.

_________________
My site

personman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux 2.6.24.5/Apache 2.2.9/MySQL 5.0.67/PHP 5.2.6/DragonflyCMS 9.2.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & Blocks
Page 1 of 5
All times are GMT
Go to page 1, 2, 3, 4, 5  Next



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
You cannot attach files in this forum
You cannot download files in this forum


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

Číta ďalej...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy