+ Reply to Thread
Results 1 to 10 of 10

Thread: BFG - SGS rss feed not working?

  1. #1
    Senior Member
    Points: 933, Level: 17
    Level completed: 33%, Points required for next Level: 67
    Overall activity: 0%
    Achievements:
    Three FriendsRecommendation Second ClassCreated Blog entryTagger First Class1000 Experience Points
    Awards:
    Master Tagger
    Stephan's Avatar
    Join Date
    Jul 2010
    Location
    Sunny island
    Posts
    591
    Points
    933
    Level
    17
    Blog Entries
    1
    Downloads
    0
    Uploads
    6
    My Mood
    In Love

    BFG - SGS rss feed not working?

    Hi,
    I forgot about my BFG account and after a thread on TA I thought to try it out again.
    I found a nice domain (again 1 site, I never can stop to buy domains ) http://www.coolgamesdownload.com, now I got $5.26 in 2 days (one customer) with just some traffic I push to the site.

    I installed the SGS and try to submit the RSS to twitter thru twitterfeed, but there is a error with the date? And some other errors.

    Anybody knows how to fix this?

    You can see the errors here : Feed Validator

    Thanks

  2. #2
    Code Monkey
    Points: 4,025, Level: 42
    Level completed: 50%, Points required for next Level: 75
    Overall activity: 99.2%
    Achievements:
    Tagger First Class1000 Experience Points1 year registered
    Awards:
    User with most referrers
    lfhost's Avatar
    Join Date
    Jul 2010
    Posts
    313
    Points
    4,025
    Level
    42
    Downloads
    0
    Uploads
    0
    My Mood
    Bored
    hmm, a few things you need to do here

    1, open modules/rss/templates/page.xml

    replace contents with

    Code:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="{G_ABSOLUTE}rss.xsl" ?>
    
    <!-- generator="{GENERATOR} {VERSION}" -->
    
    <rss version="2.0">
      <channel>
        <title>{TITLE}</title>
    
        <link>{LINK}</link>
    
        <description>{DESCRIPTION}</description>
    
        <language>{LANGUAGE}</language>
    
        <copyright>{COPYRIGHT}</copyright>
    
        <pubDate>{PUBDATE}</pubDate>
    
        <lastBuildDate>{PUBDATE}</lastBuildDate>
        <docs>http://backend.userland.com/rss</docs>
        <generator>{GENERATOR}</generator>
    
        <ttl>60</ttl>
    {MAIN}
      </channel>
    </rss>
    2, open modules/rss/templates/item.xml

    replace contents with

    Code:
    	<item>
    	  <title>{ITEMTITLE}</title>
    
    	  <link>{ITEMLINK}</link>
    
    	  <description>{ITEMDESCRIPTION}</description>
    
    	  <pubDate>{ITEMRELEASEDATE}</pubDate>
    
    	  <guid>{ITEMLINK}</guid>
    	</item>
    Should fix most of the errors.
    Thanks
    Paul
    I code for FOOOOOD
    Your coding errors make me Orgasm LOL

    Arcade Themes and Mods
    Sniperz Login with Fb and submit your GAMES.
    $5 CPM Popunders, banners and more.

  3. #3
    Code Monkey
    Points: 4,025, Level: 42
    Level completed: 50%, Points required for next Level: 75
    Overall activity: 99.2%
    Achievements:
    Tagger First Class1000 Experience Points1 year registered
    Awards:
    User with most referrers
    lfhost's Avatar
    Join Date
    Jul 2010
    Posts
    313
    Points
    4,025
    Level
    42
    Downloads
    0
    Uploads
    0
    My Mood
    Bored
    I forgot 1 part lol.

    3, Open modules/rss/functions.php

    find

    Code:
    $pubdate = date("r",time());
    replace with

    Code:
    $pubdate = gmdate("r",time());
    Thanks
    Paul
    I code for FOOOOOD
    Your coding errors make me Orgasm LOL

    Arcade Themes and Mods
    Sniperz Login with Fb and submit your GAMES.
    $5 CPM Popunders, banners and more.

  4. #4
    Senior Member
    Points: 933, Level: 17
    Level completed: 33%, Points required for next Level: 67
    Overall activity: 0%
    Achievements:
    Three FriendsRecommendation Second ClassCreated Blog entryTagger First Class1000 Experience Points
    Awards:
    Master Tagger
    Stephan's Avatar
    Join Date
    Jul 2010
    Location
    Sunny island
    Posts
    591
    Points
    933
    Level
    17
    Blog Entries
    1
    Downloads
    0
    Uploads
    6
    My Mood
    In Love

    Hi Paul,

    nice you are back

    The feed works now but still there are some errors, also the images are not shown.

    http://twitter.com/CoolGamesDownlo

    Maybe you know this fix to?

    Thank a lot

  5. #5
    Code Monkey
    Points: 4,025, Level: 42
    Level completed: 50%, Points required for next Level: 75
    Overall activity: 99.2%
    Achievements:
    Tagger First Class1000 Experience Points1 year registered
    Awards:
    User with most referrers
    lfhost's Avatar
    Join Date
    Jul 2010
    Posts
    313
    Points
    4,025
    Level
    42
    Downloads
    0
    Uploads
    0
    My Mood
    Bored
    Are you positive you applied step 3 as the date is showing different to what my site creates using the same code as posted.
    You can ignore the recommendations, as the feed will be valid.

    For the images, does twitter support images ?
    Thanks
    Paul
    I code for FOOOOOD
    Your coding errors make me Orgasm LOL

    Arcade Themes and Mods
    Sniperz Login with Fb and submit your GAMES.
    $5 CPM Popunders, banners and more.

  6. #6
    Senior Member
    Points: 933, Level: 17
    Level completed: 33%, Points required for next Level: 67
    Overall activity: 0%
    Achievements:
    Three FriendsRecommendation Second ClassCreated Blog entryTagger First Class1000 Experience Points
    Awards:
    Master Tagger
    Stephan's Avatar
    Join Date
    Jul 2010
    Location
    Sunny island
    Posts
    591
    Points
    933
    Level
    17
    Blog Entries
    1
    Downloads
    0
    Uploads
    6
    My Mood
    In Love

    Hey,

    I think I did the edit right:

    PHP Code:
    <?php
    /**
     * SGS Module: RSS
     * File: functions.php
     *
     * Copyright (c) 2007 - 2010 Big Fish Games, Inc.
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * as published by the Free Software Foundation; either version 2
     * of the License, or (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program; if not, write to the Free Software
     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     *
     * @author William Moffett <william.moffett@bigfishgames.com>
     * @version 0.8
     * @package PNP Tools
     * @subpackage SGS
     *
     * @copyright Copyright (c) 2007 - 2010 Big Fish Games, Inc.
     * @license http://creativecommons.org/licenses/GPL/2.0/ Creative Commons GNU GPL
     */


    function toRSS($string){

        
    $search = array(" & ""\n");
        
    $replace = array(' &amp; ','');

        return 
    str_replace($search,$replace,$string);
    }

    function 
    create_rss($feed){

        global 
    $sl$config;

        
    $sl->class['site_parse']->settag('G_ABSOLUTE'g_ABSOLUTE);

        
    $genre $sl->class['site_genre']->getAllowedGenre();

        if(!
    $feed || !in_array($feedarray_merge($genre,array('new-download','top-download')))){
            
    $feed 'glrelease';
        }

        if(
    $feed == 'new-download'){
            
    $feed 'glrelease';
        }else if(
    $feed == 'top-download'){
            
    $feed 'glrank';
        }

        
    /**
         * get the current genreID and information
         */
        
    $genreId $sl->class['site_genre']->getGenreKey($feed);
        
    $ginfo $sl->class['site_genre']->getGenreInfo($genreId);

        
    /**
         * load templates
         */

        
    $sl->class['site_parse']->load_template(g_MODULES.'rss/templates/item.xml','item');

        
    $sl->class['site_parse']->load_template(g_MODULES.'rss/templates/page.xml','page');

        
    $domainPath str_replace(array($config['module_dir'].'/','rss/'),array('',''),g_ABSOLUTE);

        
    $agent $_SERVER['HTTP_USER_AGENT'];

        
    $pubdate gmdate("r",time());

            switch (
    $feed){

                    case 
    'glrelease':
                        
    $games $sl->class['site_download']->getDateList('10');
                    break;

                    case 
    'glrank':
                        
    $games $sl->class['site_download']->getRankList('10');
                    break;

                    default:

                        
    $genreId $sl->class['site_genre']->getGenreKey($feed);

                        if(!
    $genreId){
                            
    $genreId $sl->class['site_genre']->getGenreKey('glrelease');
                        }

                        
    $games $sl->class['site_download']->getRankList('10','0', array('genre'=>$genreId));

                }

                
    $search = array(" & ""\n");
                
    $replace = array(' &amp; ','');


                
    $sl->class['site_parse']->settag('TITLE',SITENAME.' - '.toRSS($ginfo['name']));
                
    $sl->class['site_parse']->settag('LINK',$domainPath);
                
    $sl->class['site_parse']->settag('LANGUAGE',LOCAL);

                
    $sl->class['site_parse']->settag('PUBDATE',$pubdate);

                
    $sl->class['site_parse']->settag('DESCRIPTION'toRSS($ginfo['description']));


    //            $featureGame = FALSE;

                
    $items '';

                foreach(
    $games as $key=>$game){

                    unset(
    $games[$key]);

                    
    $game array_change_key_case($gameCASE_LOWER);
                    
    $game $sl->class['site_game']->gameInfo($game);


    /*
                    if(!$featureGame){
                        $game['media'] = '<media:thumbnail url="'.$game['feature'].'"/>';
                        $featureGame = TRUE;
                    }else{

                        $game['media'] = '<media:thumbnail url="'.$game['med'].'"/>';
                    }

                    if($game['hasvideo'] == 'yes' && isset($game['video_url'])){
                        $game['media'] .= '<media:content type="video/x-flv" url="'.$game['video_url'].'"/>';
                    }else{

                        $game['media'] .= '<media:content url="'.$game['subfeature'].'"/>';
                    }
    */
                    
    $game['itemtitle'] =  $game['gamename'];

                    
    /**
                     * todo Sun, 19 May 2002 15:21:36 GMT
                     */
                    
    $game['itemreleasedate'] = $game['releasedate'];

                    
    $game['itemlink'] = $domainPath.$game['gameinfo_url'];


                    
    /**
                     *       <author>{ITEMAUTHOR}</author>
                     */

                    /**
                     * TODO COMMENT <comments>{ITEMCOMMENTS}</comments>
                     */
                    //$game['itemcomments'] = $domainPath.$game['gameinfo_url'];

                    /**
                     * todo do we really need this       <guid>{ITEMGUID}</guid>
                     */
                    //$game['itemguid'] = $domainPath.$game['gameinfo_url'];

                    
    $game['itemdescription'] = '<![CDATA['.$sl->class['site_elements']->imageTag($sl->class['site_game']->getImageAsset('small',$game), $game['itemtitle'], $id=''$class=''$height=''$width=''$js=''$longdesc='').']]>';
                    
    $game['itemdescription'] .= str_replace('&','&amp;',$game['longdesc']);

                    
    $items .= $sl->class['site_parse']->render_template('item',$game,TRUE);
                }
                return 
    $items;
    }
    ?>
    About the images, well I checked other account mmmm maybe you can not publish the images, so all is good

    Thank you
    Stephan

  7. #7
    Senior Member
    Points: 933, Level: 17
    Level completed: 33%, Points required for next Level: 67
    Overall activity: 0%
    Achievements:
    Three FriendsRecommendation Second ClassCreated Blog entryTagger First Class1000 Experience Points
    Awards:
    Master Tagger
    Stephan's Avatar
    Join Date
    Jul 2010
    Location
    Sunny island
    Posts
    591
    Points
    933
    Level
    17
    Blog Entries
    1
    Downloads
    0
    Uploads
    6
    My Mood
    In Love

  8. #8
    Code Monkey
    Points: 4,025, Level: 42
    Level completed: 50%, Points required for next Level: 75
    Overall activity: 99.2%
    Achievements:
    Tagger First Class1000 Experience Points1 year registered
    Awards:
    User with most referrers
    lfhost's Avatar
    Join Date
    Jul 2010
    Posts
    313
    Points
    4,025
    Level
    42
    Downloads
    0
    Uploads
    0
    My Mood
    Bored
    Ive done some code testing locally and the date is showing in the correct format, try overiding that file to make sure it has been uploaded.
    As it should be showing it in the format
    Code:
    Thu, 21 Dec 2000 16:01:07 +0200
    If it still doesnt work, send me the FTP infos and I will look into why.
    Thanks
    Paul
    I code for FOOOOOD
    Your coding errors make me Orgasm LOL

    Arcade Themes and Mods
    Sniperz Login with Fb and submit your GAMES.
    $5 CPM Popunders, banners and more.

  9. #9
    Junior Member
    Points: 2, Level: 1
    Level completed: 3%, Points required for next Level: 48
    Overall activity: 0%

    Join Date
    Sep 2011
    Posts
    1
    Points
    2
    Level
    1
    Downloads
    0
    Uploads
    0
    I was reading this post and I also had the same problem In BFG Feeds from EVERY category listed, so I did as you said and no it just has 1-2 problems that will not validate. Would you care to look at what my Feed Validator says and maybe its me doing something wrong? Thank you

  10. #10
    Banned
    Points: 121, Level: 2
    Level completed: 43%, Points required for next Level: 29
    Overall activity: 0%
    Achievements:
    100 Experience Points7 days registered
    Awards:
    Frequent Poster

    Join Date
    Jan 2012
    Posts
    50
    Points
    121
    Level
    2
    Downloads
    0
    Uploads
    0
    if your bfg leaks from the trigger/valve area its most propably the #38 orings on the valve pin, check if they're damaged or torn. if not just relube and that should do the trick.

    PM me if you need any more help

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts