Jump to content

Heath

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Heath's Achievements

Member

Member (2/5)

0

Reputation

  1. I am working on converting my rss feed to suit the truveo video sitemap needs but I am getting a error. For those who would like to help, or develop their own, the directions can be found here http://developer.truveo.com/DirectorDocumentation.php This is their sample rss document.... A sample Media RSS file is shown below. Required tags are in red. <?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:av="http://www.searchvideo.com/schemas/av/1.0"> <channel> <title>Metacafe</title> <link>http://www.metacafe.com/rss/today_videos/mrss.xml</link> <description>Today's Videos, Movies and Funny Clips by Metacafe</description> <item> <author>mooncat56</author> <title>Making Of 300-The Movie</media:title> <link>http://www.metacafe.com/watch/504132/making_of_300_the_movie/</link> <description>Actors work and train as ONE in the fight scenes. Six weeks of training to learn the moves devised for this movie. </description> <guid isPermaLink="true">http://www.metacafe.com/watch/504132/making_of_300_the_movie/</guid> <pubDate>Tue, 17 Apr 2007 02:50:07 +0000</pubDate> <media:description>Actors work and train as ONE in the fight scenes. Six weeks of training to learn the moves devised for this movie.</media:description> <media:content url="http://www.metacafe.com/fplayer/504132/making_of_300_the_movie.swf" type="application/x-shockwave-flash" medium="video" height="345" width="400" duration="243" /> <media:player url="http://www.metacafe.com/watch/504132/making_of_300_the_movie/" /> <media:thumbnail url="http://images.metacafe.com/thumb/504132/3445872/4/rss_feed5/0/ making_of_300_the_movie.jpg" width="120" height="90" /> <media:title>Making Of 300-The Movie</media:title> <media:keywords>spartans,300,fight</media:keywords> <media:credit>mooncat56</media:credit> <media:rating scheme="urn:simple">nonadult</media:rating> <media:category>Entertainment</media:category> </item> </channel> </rss> Here is the line that is giving me a bit of a issue. <media:player url="http://www.metacafe.com/watch/504132/making_of_300_the_movie/" /> Here is how I have it in my php... <media:player url=\"http://www.metacafe.com/watch/504132/making_of_300_the_movie/"\ /> any thing I am doing wrong?
  2. Awesome, that worked! How ever now there is no space between things that had a br.... any way to add a space or something? Here is my what I am editing.. while ($row = $DB->fetch_row($query)) { $id = $row['id']; $name = str_replace("´", "", $row['name']); $name = preg_replace('/&(?!(#[0-9]+|[a-z]+);)/si', '&', $name); $description = str_replace("<br />", "", $row['description']); $description = preg_replace('/&(?!(#[0-9]+|[a-z]+);)/si', '&', $description); $pic = $row['pic']; $content .= "
  3. DarkWater can u wrap that in the code thing so I can see it all please? Thank you very much!
  4. <url> <loc>http://mydomain.com/index.php?ind=media&op=file_view&iden=281656</loc> <video:video> <video:title>How to Make Fire Balls&#33; Really Cool&#33;</video:title> <video:description>How to make fireballs that you can hold in your hands. Be careful though, it&#39;s still fire and can still burn you. Found this vid and thought it was cool.<br /></video:description> <video:thumbnail_loc>http://mydomain.com/mkportal/modules/media/pics/mk_281656.jpg</video:thumbnail_loc> </video:video> </url> That is one of the video sitemap outputs that has a <br / > in it that continues to cause problems. There are over 100+ that also have this problem. So its imperative I get it worked out using php or else it is a lot of manual labor.
  5. I have a video sitemap that is including br's in my description and giving me error messages on google. Is there a way to use one of these lines to remove the </ br> Here are the 2 lines of code i have been playing with to remove them. This is all I have so far. $description = str_replace("´", "", $row['description']); $description = preg_replace('/&(?!(#[0-9]+|[a-z]+);)/si', '&', $description);
  6. This has been puzzling me for months now. Every time I try to edit it to match what google says here... http://www.google.com/support/webmasters/bin/answer.py?answer=80472&topic=10079 Here is what they say the format they want is. <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.0"> <url> <loc>http://www.site.com/videos/some_video_landing_page.html</loc> <video:video> <video:content_loc>http://www.site.com/video123.flv</video:content_loc> <video:player_loc allow_embed="yes">http://www.site.com/videoplayer.swf?video=123</video:player_loc> <video:title>My funny video</video:title> <video:thumbnail_loc>http://www.site.com/thumbs/123.jpg</video:thumbnail_loc> </video:video> </url> <url> <loc>http://www.site.com/videos/some_other_video_landing_page.html</loc> <video:video> <video:content_loc>http://www.site.com/videos/video1.mpg</video:content_loc> <video:description>A really awesome video</video:description> </video:video> </url> </urlset> Which looks pretty simple to me. But converting the RSS/PHP i have now to match that is were I keep running into problems. Here is my current Php that creates my rss. case 'rss': $this->rss(); function rss() { global $mkportals, $DB, $mklib; $content = "<?xml version='1.0' encoding='iso-8859-1'?>\n <rss version='2.0'> <channel> <title>$mklib->sitename</title> <link>$mklib->siteurl</link> <description>MkMedia Generated</description> <generator>MkMedia</generator> <language>Multi-Lang</language> <copyright>MkMedia 2004 - ".date("Y")."</copyright>"; $query = $DB->query("SELECT id, name, description, data, author FROM mkp_media WHERE validate = '1' AND visible = '1' ORDER by `data` DESC LIMIT 0,10"); if (!$DB->get_num_rows($query)) { $content .= " <item> <title>Sorry There Are Currently No Feeds</title> <link></link> <pubDate></pubDate> <author></author> <description></description> </item> </channel> </rss>"; $rsslength = strlen($content); header("Content-Type: text/xml"); header("Content-Length: ".$rsslength); header("Cache-Control: no-cache"); echo $content; exit; } while ($row = $DB->fetch_row($query)) { $id = $row['id']; $date = $mklib->create_date($row['data']); $name = str_replace("´", "", $row['name']); $name = preg_replace('/&(?!(#[0-9]+|[a-z]+);)/si', '&', $name); $description = str_replace("´", "", $row['description']); $description = preg_replace('/&(?!(#[0-9]+|[a-z]+);)/si', '&', $description); $author = $row['author']; $content .= " <item> <title>{$name}</title> <link>$mklib->siteurl/index.php?ind=media&op=file_view&iden={$id}</link> <pubDate>{$date}</pubDate> <author>{$author}</author> <description>{$description}</description> </item>"; } $content .= " </channel> </rss>"; $rsslength = strlen($content); header("Content-Type: text/xml"); header("Content-Length: ".$rsslength); header("Cache-Control: no-cache"); echo $content; exit; } My question is what exactly am I supposed to do to replicate the requirements for googles video sitemap with some thing written for RSS Output? I am new to the whole php thing still, very little time to work on it, but from what I do know, every thing i've tried seems to be along the lines of what I was suggested to do with no luck. So if you could provide any help I would greatly appreciate it. Thank you.
  7. I have been working on this one for a few weeks now, before that on and off and I have come to the conclusion I just don't understand php enough to get how to change this to get it working properly. First - I was trying to add the ability to give each category in my media section its own RSS feed. I am not really sure if I am providing enough of the code, if I am not, please just let me know what else I need to include. (the code will be posted below). Currently the code allows for me to see the newest over all. I was trying to make it so it would be like media=rss=sectionID . Right now its just media=rss. This one has been boggling my mind for some time now. Second, I wanted to also convert the code below to produce a proper google video sitemap. If this is possible could some one PLEASE explain it, I have been working on getting this one working for weeks now with no luck. It seems really simple to do, but apparently I just can't figure it out. So if any one could please explain how to do it I would be highly great full. I really do not know much so I would really appreciate any one willing to help me with this as well as give me some little tips if possible in order to help me better understand how it works. Here is the code I am trying to play with that creates my current RSS feed for my video section. function rss() { global $mkportals, $DB, $mklib; $content = "<?xml version='1.0' encoding='iso-8859-1'?>\n <rss version='2.0'> <channel> <title>$mklib->sitename</title> <link>$mklib->siteurl</link> <description>MkMedia Generated</description> <generator>MkMedia</generator> <language>Multi-Lang</language> <copyright>MkMedia 2004 - ".date("Y")."</copyright>"; $query = $DB->query("SELECT id, name, description, data, author FROM mkp_media WHERE validate = '1' AND visible = '1' ORDER by `data` DESC LIMIT 0,10"); if (!$DB->get_num_rows($query)) { $content .= " <item> <title>Sorry There Are Currently No Feeds</title> <link></link> <pubDate></pubDate> <author></author> <description></description> </item> </channel> </rss>"; $rsslength = strlen($content); header("Content-Type: text/xml"); header("Content-Length: ".$rsslength); header("Cache-Control: no-cache"); echo $content; exit; } while ($row = $DB->fetch_row($query)) { $id = $row['id']; $date = $mklib->create_date($row['data']); $name = str_replace("´", "", $row['name']); $name = preg_replace('/&(?!(#[0-9]+|[a-z]+);)/si', '&', $name); $description = str_replace("´", "", $row['description']); $description = preg_replace('/&(?!(#[0-9]+|[a-z]+);)/si', '&', $description); $author = $row['author']; $content .= " <item> <title>{$name}</title> <link>$mklib->siteurl/index.php?ind=media&op=file_view&iden={$id}</link> <pubDate>{$date}</pubDate> <author>{$author}</author> <description>{$description}</description> </item>"; } $content .= " </channel> </rss>"; $rsslength = strlen($content); header("Content-Type: text/xml"); header("Content-Length: ".$rsslength); header("Cache-Control: no-cache"); echo $content; exit; } For the sitemap my goal is to replicate this. http://www.google.com/support/webmasters/bin/answer.py?answer=80472&topic=10079 Again, any help would be highly appreciated, both of these issues are really annoying for me to accomplish.
  8. popuplace.com sorry i didn't want to seem like a spammer or some thing by putting a link. its under the "New Pictures" section on the front page.
  9. Here is every thing I have. Currently. When it outputs. What should be the 2nd table in the 2nd part of this still pulls every thing from query2 and i can't figure out why. <?php $limit = 10; $cut = 1000; $content = ""; $query = $DB->query("SELECT id, titolo, file FROM mkp_gallery where validate = '1' ORDER BY `id` DESC LIMIT $limit"); while ($row = $DB->fetch_row($query)) { $idu = $row['id']; $umes = ""; $message = substr($row['description'], 0, $cut); $message = str_replace("<br>", " ", $message); $message = explode(" ", $message); foreach ($message as $value) { if (strlen($value) > 20) { $value = substr($value, 0, 22); } $umes .= $value." "; } $content.= " <td><tr> <td class=\"frontpics\"><a href=\"$this->siteurl/index.php?ind=gallery&op=foto_show&ida=$idu\" class=\"uno\"><img src=/images/front-page-bullet.jpg> {$row['titolo']}</a> </td> </tr>"; } if($idu == NULL) { $content = " <tr> <td align=\"center\"> There are no Files </td> </tr> "; } if(!$mkportals->member['g_access_cp'] && !$this->member['g_access_gallery']) { $content = " <tr> <td align=\"center\"> {$this->lang['gallery_noallow']} </td> </tr><td> "; } unset($row); unset($umes); unset($message); unset($idu); //2nd part $query = $DB->query("SELECT id, titolo, file FROM mkp_gallery where validate = '1' ORDER BY `id` DESC LIMIT $limit"); $query2 = $DB->query("SELECT id, evento FROM mkp_gallery_events ORDER BY `id` DESC LIMIT $limit; "); while ($row2 = $DB->fetch_row($query2)) { $idu = $row2['id']; $idb = $row['id']; $umes = ""; $message = substr($row['description'], 0, $cut); $message = str_replace("<br>", " ", $message); $message = explode(" ", $message); foreach ($message as $value) { if (strlen($value) > 20) { $value = substr($value, 0, 22); } $umes .= $value." "; } $content.= " <td> <tr> <td class=\"frontpics\"><a href=\"$this->siteurl/index.php?ind=gallery&op=section_view&idev=$idu\" class=\"uno\"><img src=/images/front-page-bullet.jpg> {$row2['evento']}</a></td> <td class=\"frontpics\"><a href=\"$this->siteurl/index.php?ind=gallery&op=foto_show&ida=$idb\" class=\"uno\"><img src=/images/front-page-bullet.jpg> {$row['titolo']}</a> </td> </tr>"; } if($idu == NULL) { $content = " <tr> <td align=\"center\"> There are no Files </td> </tr> "; } if(!$mkportals->member['g_access_cp'] && !$this->member['g_access_gallery']) { $content = " <tr> <td align=\"center\"> {$this->lang['gallery_noallow']} </td> </tr><td> "; } unset($row); unset($umes); unset($message); unset($idu); ?> I am trying to get the content to show up side by side, opposed to one long list. So it would look like this (Block One ) (Block 1 2nd Query ) (Block Two ) (Block 2 2nd Query ) Right now its just straight down 10, then the 2nd Queries 10. With empty fields with just the image and empty tables with no title like it should be. Thank you. I appreciate the help.
  10. I have been trying to merge 2 seperate codes I made to show up side by side. In order to do this though, I need to be able to run multiple mysql queries... Here are the 2 queries. Query 1- $query = $DB->query("SELECT id, titolo, file FROM mkp_gallery where validate = '1' ORDER BY `id` DESC LIMIT $limit"); Query 2- $query2 = $DB->query("SELECT id, evento FROM mkp_gallery_events ORDER BY `id` DESC LIMIT $limit; "); Any clue how to accomplish this?
  11. I am looking to make or find some sort of referral script that will save the hits and domains that send my sites hits. I would like it to automatically store and display the top sites of the day and week and be able to embed the script easily in my current cms. Any help would be greatly appreciated. I've been looking for 2 days and can't seem to find any thing with a demo.
  12. The MySpace one? What about the Yahoo one? Do you have any links to examples or tutorials??
  13. go to myspace.com, see the top search, see beside the search field you have a drop down with more choices. Thats what I would want to accomplish if I had to go with the MySpace style search. But my goal was to get the kind like Yahoo.com uses. Go there, at the top. Click Images, see how the search button changes to "Image Search". Then click Video, and the button will again change to "Video Search" Thats my goal. But either will do.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.