Activity Stream
48,167 MEMBERS
6601 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 6 of 6
  1.     
    #1
    Member

    Default Rss Images Help

    Hey
    Hey Guys
    My rss is not showing images the rss code is listed below and the url to the feed is Rss Feed


    Code: 
    <?php
    @set_time_limit(0);
    @extract($_GET);
    
    require_once("vars.php");
    require_once("includes/show.class.php");
    $show = new Show();
    
    if (@$all){
    	$limit = 10000000;
    } else {
    	$limit = 20;
    }
    
    $episodes = $show->getLastAdditions($limit,@$perma);
    
    if (count($episodes)){
    	$content = '';
    	$content.= '<?xml version="1.0" encoding="UTF-8"?>'."\n";
    	$content.= '<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?>'."\n";
    	$content.= '<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?>'."\n";
    	$content.= '<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">'."\n";
    	
    	$now = date("D, d M Y H:i:s T");
    	
    	$content.= "<channel>\n";
    	$content.= "	<title>$sitename</title>\n";
    	$content.= "	<link>$baseurl</link>\n";
    	$content.= "	<description>TV show and movie resource</description>\n";
    	$content.= "	<lastBuildDate>$now</lastBuildDate>\n";
    	$content.= "	<language>en</language>\n";
    	$content.= "	<generator>http://tvstreamscript.com</generator>\n";
    
    	foreach($episodes as $key=>$val){
    		extract($val);
    		$pubdate = date("D, d M Y H:i:s T",strtotime($date_added));
    		
    		if (@$all) $description.="\n\nEMBED:\n$embed";
    		
    		$content.= "	<item>\n";
    		if (@$pics){
    			if (@$val['thumbnail']){
    				$thumb = $val['thumbnail'];
    			} else {
    				$thumb = $val['show_thumbnail'];
    			}
    			
    			$thumb = $baseurl."/thumbs/".$thumb;
    			$content.="		<thumbnail>$thumb</thumbnail>\n";
    		}
    		$content.= "		<title>".htmlspecialchars(stripslashes(utf8_encode($showtitle)))." - ".htmlspecialchars(utf8_encode(stripslashes($title)))."</title>\n";
    		$content.= "		<link>$baseurl/$perma/season/$season/episode/$episode</link>\n";
    		$content.= "		<comments>$baseurl/$perma/season/$season/episode/$episode</comments>\n";
    		$content.= "		<pubDate>$pubdate</pubDate>\n";
    		$content.= "		<description><![CDATA[".htmlspecialchars(utf8_encode($description))."]]></description>\n";
    		$content.= "		<content:encoded><![CDATA[".htmlspecialchars(utf8_encode($description))."]]></content:encoded>\n";
    		$content.= "	</item>\n";
    	}
    	
    	$content.="</channel>\n";
    	$content.="</rss>";
    	header ("content-type: text/xml");
    	print($content);
    
    }
    ?>
    msk19994 Reviewed by msk19994 on . Rss Images Help Hey Hey Guys My rss is not showing images the rss code is listed below and the url to the feed is Rss Feed <?php @set_time_limit(0); @extract($_GET); require_once("vars.php"); Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    I dont see any image in any of your posts
    They all contains text and then video embedded link

  4.     
    #3
    Member
    Ok
    So this is grabbing the pics from the episode page
    but the thing is that the images show on the episodes page
    Page
    is there a code that i can place on the videos page that would show the images on it
    or can u do some changes to the rss code so that it grabs images of title from episode list page

  5.     
    #4
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Try this code:

    PHP Code: 
    <?php
    @set_time_limit(0);
    @
    extract($_GET);

    require_once(
    "vars.php");
    require_once(
    "includes/show.class.php");
    $show = new Show();

    if (@
    $all){
        
    $limit 10000000;
    } else {
        
    $limit 20;
    }

    $episodes $show->getLastAdditions($limit,@$perma);

    if (
    count($episodes)){
        
    $content '';
        
    $content.= '<?xml version="1.0" encoding="UTF-8"?>'."\n";
        
    $content.= '<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?>'."\n";
        
    $content.= '<?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?>'."\n";
        
    $content.= '<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">'."\n";
        
        
    $now date("D, d M Y H:i:s T");
        
        
    $content.= "<channel>\n";
        
    $content.= "    <title>$sitename</title>\n";
        
    $content.= "    <link>$baseurl</link>\n";
        
    $content.= "    <description>TV show and movie resource</description>\n";
        
    $content.= "    <lastBuildDate>$now</lastBuildDate>\n";
        
    $content.= "    <language>en</language>\n";
        
    $content.= "    <generator>http://tvstreamscript.com</generator>\n";

        foreach(
    $episodes as $key=>$val){
            
    extract($val);
            
    $pubdate date("D, d M Y H:i:s T",strtotime($date_added));
            
            if (@
    $all$description.="\n\nEMBED:\n$embed";
            
            
    $content.= "    <item>\n";
            if (@
    $pics){
                if (@
    $val['thumbnail']){
                    
    $thumb $val['thumbnail'];
                } else {
                    
    $thumb $val['show_thumbnail'];
                }
                
                
    $thumb $baseurl."/thumbs/".$thumb;
                
    $content.="        <thumbnail>$thumb</thumbnail>\n";
            }
            
            
    // Get image link from the base link
            
    $imglink file_get_contents("$baseurl/$perma");
            
    preg_match('@\<img src="(.*)" alt="" style="width:100%"/>@Uims'$imglink$matches); // match here now - modify regex later on
            
    $imglink $matches[1];
            
    $content.= "        <title>".htmlspecialchars(stripslashes(utf8_encode($showtitle)))." - ".htmlspecialchars(utf8_encode(stripslashes($title)))."</title>\n";
            
    $content.= "        <link>$baseurl/$perma/season/$season/episode/$episode</link>\n";
            
    $content.= "        <comments>$baseurl/$perma/season/$season/episode/$episode</comments>\n";
            
    $content.= "        <pubDate>$pubdate</pubDate>\n";
            
    $content.= "        <description><![CDATA[<img src='$imglink' /><br />".htmlspecialchars(utf8_encode($description))."]]></description>\n";
            
    $content.= "        <content:encoded><![CDATA[".htmlspecialchars(utf8_encode($description))."]]></content:encoded>\n";
            
    $content.= "    </item>\n";
        }
        
        
    $content.="</channel>\n";
        
    $content.="</rss>";
        
    header ("content-type: text/xml");
        print(
    $content);

    }
    ?>
    Its using file_get_contents to first get the html from http://www.streaming-series.com/house (for example) and then using regex to match first image.

    It might not be matching the image correctly
    But if you want to do so, then add a image id while posting and modify the regex like that so that it matches the exact image which you want to

    Or else if you are already getting info of the base news from db then u can match the image in there

  6.     
    #5
    Member
    I have replaced the code in the file with yours but it still shows the same thing ie without images

  7.     
    #6
    Member
    Here i am providing the two codes one of the main tv show page and the other one is of the episode page if some 1 could implement the images in the episode page then it would be great i tried but was getting alot of errors

    Here is the show page code

    Code: 
    {config_load file=test.conf section="setup"}
    {include file="header.tpl" title=header}
    
    {if $thisshow neq ''}
    	{foreach from=$thisshow key=id item=val}
    <div class="post">
    	<div class="title">
    		<h2>
    			<span style="float:left;">{$val.title}</span>
    			<div class="seasonselect">
    				{if $seolinks eq 1}
    				<a href="{$baseurl}/{$val.permalink}">All</a>
    				{else}
    				<a href="{$baseurl}/index.php?menu=show&perma={$val.permalink}">All</a>
    				{/if}
    				{if $thisseasons neq ''}
    					{foreach from=$thisseasons key=k item=v}
    						{if $seolinks eq 1}
    						<a href='{$baseurl}/{$val.permalink}/season/{$v}'>Season {$v}</a>
    						{else}
    						<a href='{$baseurl}/index.php?menu=show&perma={$val.permalink}&season={$v}'>Season {$v}</a>
    						{/if}
    					{/foreach}
    				{/if}
    			</div>
    			<br style="clear:both;" />
    		</h2>
    		<br style="clear:both;" />
    	</div>
    
    	<div class="featured">
    		{if $seolinks eq 1}
    			<a href="{$baseurl}/{$val.permalink}"><img src="{$baseurl}/thumbs/m_{$val.thumbnail}" alt="" style="width:100%"/></a>
    		{else}
    			<a href="{$baseurl}/index.php?menu=show&perma={$val.permalink}"><img src="{$baseurl}/thumbs/m_{$val.thumbnail}" alt="" style="width:100%"/></a>
    		{/if}
    	</div>
    	<div class="box">
    		<div style="padding:10px;">
    			<strong>Show summary: </strong><br />
    			{$val.description}
    		</div>
    	</div>
    
    	{/foreach}
    	
    	<br style="clear:both;" />
    	<div class="box">
    		{if $thisepisodes neq ''}
    			{foreach from=$thisepisodes key=id item=val}
    				<div class="box">
    					{if $seolinks eq 1}
    					<a href="{$baseurl}/{$val.perma}/season/{$val.season}/episode/{$val.episode}"><img alt="" src="{$baseurl}/thumbs/{$val.thumbnail}" class="postim"></a>
    					<div class="title" style="padding-top: 10px;">
    							<h3><a href="{$baseurl}/{$val.perma}/season/{$val.season}/episode/{$val.episode}">{$val.showtitle} - Season {$val.season} Episode {$val.episode}</a></h3>
    					</div>
    					{else}
    					<a href="{$baseurl}/index.php?menu=episode&perma={$val.perma}&season={$val.season}&episode={$val.episode}"><img alt="" src="{$baseurl}/thumbs/{$val.thumbnail}" class="postim"></a>
    					<div class="title" style="padding-top: 10px;">
    							<h3><a href="{$baseurl}/index.php?menu=episode&perma={$val.perma}&season={$val.season}&episode={$val.episode}">{$val.showtitle} - Season {$val.season} Episode {$val.episode}</a></h3>
    					</div>
    					{/if}
    					<div class="cover">
    						<div class="entry">
    							<p>{$val.description}</p>
    						</div>
    					</div>
    				</div>
    			{/foreach}
    		{/if}
    	</div>
    </div>
    {else}
    <div class="post">
    	<div class="title">
    		<h2>Error</h2>
    	</div>
    	<p style="text-align:center;">Invalid ID provided</p>
    </div>
    
    {/if}
    
    {include file="footer.tpl" title=footer}


    And Here is the episode page code
    Code: 
    {config_load file=test.conf section="setup"}
    {include file="header.tpl" title=header}
    {if $thisepisode neq ''}
    
    <div class="post">
    	<div class="title">
    		<h2> {$thisepisode.showtitle} - {$thisepisode.title} </h2>
    	</div>
    	<div class="cover">
    		<div class="entry">
    			<div style="float:left;">
    				<strong style="display:block; float:left;padding-top: 1px;">Rate this episode:&nbsp;&nbsp; </strong>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 0.25}checked='checked'{/if} value="0.25"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 0.5}checked='checked'{/if} value="0.5"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 0.75}checked='checked'{/if} value="0.75"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 1}checked='checked'{/if} value="1"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 1.25}checked='checked'{/if} value="1.25"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 1.5}checked='checked'{/if} value="1.5"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 1.75}checked='checked'{/if} value="1.75"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 2}checked='checked'{/if} value="2"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 2.25}checked='checked'{/if} value="2.25"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 2.5}checked='checked'{/if} value="2.5"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 2.75}checked='checked'{/if} value="2.75"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 3}checked='checked'{/if} value="3"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 3.25}checked='checked'{/if} value="3.25"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 3.5}checked='checked'{/if} value="3.5"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 3.75}checked='checked'{/if} value="3.75"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 4}checked='checked'{/if} value="4"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 4.25}checked='checked'{/if} value="4.25"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 4.5}checked='checked'{/if} value="4.5"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 4.75}checked='checked'{/if} value="4.75"/>
    				<input class="auto-submit-star {literal}{split:4}{/literal}" type="radio" name="star" {if $thisepisode.rating eq 5}checked='checked'{/if} value="5"/>	
    			</div>
    			<div class="brokenlink"><a href='javascript:void(0);' onclick="reportEpisode();">Report broken episode</a></div>
    			<br style="clear:both;" /><br /><br />
    			
    			{if $graboidad}
    				{$graboidad}
    			{/if}
    
    			<p>{$thisepisode.description}</p>
    			<br style="clear:both" />
    	
    	
    			{if $videoad}
    			<center>
    				{$videoad}
    			</center>
    			<br style="clear:both;" />   
    			{/if}
       
    			<div class="multi-selector">
    				<ul style="list-style:none !important">
    					{foreach from=$thisepisode.embeds key=id item=val name=titles}
    						<li class="selector {if $smarty.foreach.titles.first} selected {/if}" id="selector{$val.id}" style="list-style:none !important;">
    							<a href="javascript:void(0);" onclick="changeEmbed({$val.id});"><span>{$val.type}</span></a>
    						</li>
    					{/foreach}
    				</ul>
    				<div style="clear:both;"></div>
    				<div class="embeds" style="padding:0px !important; overflow: hidden !important; width:100% !important;">
    					<ul>						
    						<li id="embedcontainer" style="margin:0px !important;">
    							
    						</li>
    					</ul>
    				</div>
    			</div>
    			<br style="clear:both;" />
    			<iframe src="http://www.facebook.com/plugins************href={$fullurl}&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;colorscheme=light&amp;height=40" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:40px;" allowTransparency="true"></iframe>
    		</div>
    	</div>
    	
    	<script>
    		var embeds = [];
    		{foreach from=$thisepisode.embeds key=id item=val name=embeds}
    		embeds[{$val.id}] = '{$val.embed|replace:"'":'"'}';
    		{/foreach}
    		changeEmbed(0);
    	</script>
    	
    	<div id="commentsbox">
    		<div id="respond" class="rounded">
    			<h3 id="comments">Submit a link for this episode</h3>
    			{if $loggeduser_id eq 0}
    				<center><br />You must be logged in to submit a link<br /><br /><br /></center>
    			{else}
    				<form action="{$current_url}" method="post" id="commentform" class="comments">
    					{if $linkerror neq ''}
    						<span style="color:#aa0000">{$linkerror}</span><br style="clear:both;" /><br />
    					{/if}
    					{if $linksuccess eq 1}
    						<span style="color:#00aa00">Thank you! We will review your submission shortly</span><br style="clear:both;" /><br />
    					{/if}
    					<label for="linktitle">Link title: </label><input type="text" name="linktitle" style="width: 96%"/>
    					<label for="link">URL: </label><input type="text" name="link" style="width: 96%" />
    					<input type="submit" value="Submit link" name="addlink" id="commentSubmit" />
    				</form>
    			{/if}
    		</div>
    	</div>
    	
    	{if $links neq ''}
    	<div id="commentsbox">
    		<div id="respond" class="rounded">
    			<h3 id="comments">{$link_title}</h3>
    			<ol class="commentlist">
    				{foreach from=$links key=key item=val}
    					<li class="comment even thread-even depth-1">
    						<div class="comment-body">
    							<div class="comment-author vcard">
    								<cite class="fn"><strong>{$val.username}</strong> submitted: </cite>
    							</div>
    							<p><a href="{$val.link}" target="_blank">{$val.linktitle}</a> (on {$val.linkdomain})</p>
    						</div>
    					</li>
    				{/foreach}
    			</ol>
    			<br style="clear:both;" />
    		</div>
    	</div>
    	{/if}
    	
    	<div id="commentsbox">
    		<div id="respond" class="rounded">
    			<h3 id="comments">What do you think?</h3>
    			{if $loggeduser_id eq 0}
    				<center><br />You must be logged in to leave a comment<br /><br /><br /></center>
    			{else}
    				<form action="{$current_url}" method="post"  class="comments" id="commentform">
    					<textarea name="comment" style="width:98%; height: 80px"></textarea><br /><br />
    					<input type="submit" value="Leave comment" name="addcomment" id="commentSubmit" />
    				</form>
    			{/if}
    		</div>
    	</div>
    	
    	{if $comments neq ''}
    	<div id="commentsbox">
    		<div id="respond" class="rounded">
    			<h3 id="comments">{$comment_title}</h3>
    			<ol class="commentlist">
    				{foreach from=$comments key=key item=val}
    
    
    					<li class="comment even thread-even depth-1">
    						<div class="comment-body">
    							<div class="comment-author vcard">
    								<cite class="fn"><strong>{$val.username}</strong> says:</cite>
    							</div>
    							<p>{$val.comment}</p>
    						</div>
    					</li>
    				{/foreach}
    			</ol>
    			<br style="clear:both;" />
    		</div>
    	</div>
    	{/if}
    </div>
    
    <div id="modal" style="display:none">
     <a href='javascript:void(0)' onclick="$('#backgroundPopup').hide(); $('#modal').hide(); $('object').show(); $('iframe').show();" style="float:right;margin-right: 10px; margin-bottom: 10px;">Close</a>
     <br style="clear: both;" />
     <div id="reportcontent">
     Please describe the problem in few words<br style="clear:both;" />
     <input type="text" id="problem" style="width:98%" /> <input type="button" value="Submit" onClick="doReportEpisode({$thisepisode.episodeid});" />
     </div>
    </div>
    <div id="backgroundPopup"></div>
    
    {else}
    	<center><br /><br />Invalid episode ID</center>
    {/if}
    
    <script>
    {literal}$(function(){{/literal}
    {literal}$('.auto-submit-star').rating({{/literal}
    {literal}callback: function(value, link){{/literal}
      $.get("{$baseurl}/ajax/addrating.php",
    {literal}{{/literal}
    		episode: {$thisepisode.episodeid},
    		rating: value
    {literal}}, function(resp) {{/literal}
    {literal}}); {/literal}
    {literal}}{/literal}
    {literal}});{/literal}
    {literal}});{/literal}
    </script>
    {include file="footer.tpl" title=footer}

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CH Images
    By BlueError in forum Graphics Area
    Replies: 1
    Last Post: 24th Apr 2012, 10:51 PM
  2. Broken Images overlapping New Images
    By Leeds in forum vBulletin
    Replies: 8
    Last Post: 17th Apr 2012, 08:57 PM
  3. Replies: 11
    Last Post: 11th Feb 2011, 11:58 PM
  4. Images Watermarker of my Images and Upload it!!
    By Bytes in forum Completed Transactions
    Replies: 11
    Last Post: 5th Aug 2010, 11:24 AM

Tags for this Thread

BE SOCIAL