+ Reply to Thread
Page 4 of 4 FirstFirst ... 2 3 4
Results 31 to 40 of 40

Thread: RSS feed for ATS?

  1. #31
    Junior Member
    Points: 485, Level: 9
    Level completed: 70%, Points required for next Level: 15
    Overall activity: 20.0%
    Achievements:
    3 months registered250 Experience Points

    Join Date
    Jul 2011
    Posts
    7
    Points
    485
    Level
    9
    Downloads
    0
    Uploads
    0
    Hi

    Twitterfeed gives me this error Can you help me?

    "Your feed might be empty or missing publish dates or GUIDs. A feed needs to contain publish dates or GUIDs in order to work with twitterfeed"

    I used this rss.php code

    PHP Code:
     <?php 
    /* 
    ################################################################# 
    ## Script is copyrighted to ArcadeTradeScript.com and you are free 
    ## modify it as you wish as long as credit is given back to us. 
    ##  
    ## This is a free Script provided by Lfhost and 
    ## was made for arcades using ArcadeTradeScript. 

    ################################################################# 
    */ 
    include("./inc/main-func.php"); 
    include(
    "./admin/config.php"); 
    //############################################## 
    // You need to edit this part. 
    // What is the URL Structure for your  hosted game pages? 
    // Below are the default URL structures. If you have not  
    // changed them at all then you don't need to edit these. 

    if ($seoFriendly == 1) { 
        
    $preGameStructure "[basedir][category]/play-[gamename]"// The exact URL structure for your pre game pages. 
        
    $playGameStructure "[basedir][seodir]/[gamename]"// The exact URL structure for your play game pages. 
    } else { 
        
    $preGameStructure "[basedir]index.php?a=play&id=[gameid]"// The exact URL structure for your pre game pages. 
        
    $playGameStructure "[basedir]index.php?a=play&id=[gameid]&cont=1"// The exact URL structure for your play game pages. 


    /* 
    This is made easy to edit by the use of special variables. 
      [basedir] = this will be replace automatically with the base directory of  
      your arcade that you set in your admin. 
       
      [seodir] = this will be replace automatically with the SEO directory of  
      play game pages that you set in your admin. 
       
      [gameid] = this will be replace automatically with the ID of the game 
      that is found. 
       
      [gamename] = this will be replace automatically with the name of the game 
      that is found (ex: my-game-name-3). 
       
      [category] = this will be replace automatically with the name of the category 
      for the game that is found (ex: my-category-name). 
    */ 
    //############################################## 

    $result mysql_query("SELECT gid, gName, cat, tradeType, gDesc, addedOn FROM ats_games WHERE gStatus = 1 order by gid DESC limit 0,20 ") or die(mysql_error()); 
    if (
    mysql_num_rows($result)) { 
        while(
    $row mysql_fetch_array($result)) { 
            
    $gameID $row['gid']; 
            
    $gameName remove_slashes($row['gName']); 
            
    $catID $row['cat']; 
            
    $tradeType $row['tradeType']; 
             
            
    $gDesc remove_slashes($row['gDesc']); 
            
    $addedOn gmdate('r',$row['addedOn']); 
             
            
    $gameCat getGameCat($catID); 
            
    // Getting the actual game page URL 
            
    $preGameStructure2 str_replace("[basedir]"$baseDir$preGameStructure); 
            
    $preGameStructure2 str_replace("[seodir]"$seoDir$preGameStructure2); 
            
    $preGameStructure2 str_replace("[gameid]"$gameID$preGameStructure2); 
            
    $preGameStructure2 str_replace("[gamename]"seo_str_plain($gameName), $preGameStructure2); 
            if (
    preg_match("/\[category\]/",$preGameStructure2)) { 
                
    $preGameStructure2 str_replace("[category]"seo_str_plain($gameCat), $preGameStructure2); 
            } 
             
            
    $playGameStructure2 str_replace("[basedir]"$baseDir$playGameStructure); 
            
    $playGameStructure2 str_replace("[seodir]"$seoDir$playGameStructure2); 
            
    $playGameStructure2 str_replace("[gameid]"$gameID$playGameStructure2); 
            
    $playGameStructure2 str_replace("[gamename]"seo_str_plain($gameName), $playGameStructure2); 
            if (
    preg_match("/\[category\]/",$playGameStructure)) { 
                
    $playGameStructure2 str_replace("[category]"seo_str_plain($gameCat), $playGameStructure2); 
            } 
                
    $items_output .= "<item>  
                    <title><![CDATA[{$gameName}]]></title>  
                    <link>{$preGameStructure2}</link> 
                    <description>  
                        <![CDATA[{$gDesc}]]> 
                    </description>  
                    <category>{$gameCat}</category> 
                    <pubDate>{$addedOn}</pubDate>{$author} 
                    <guid>{$preGameStructure2}</guid> 
                </item> "

        } 

    $pageTitle seoMiscTitle($siteName,$homePageTitle); 
    $encoding    'ISO-8859-1';  
    $copyright   "<copyright>".date('Y')." ".$pageTitle."</copyright>";  
    $pubdate     "<pubDate>".gmdate('r')."</pubDate>";  
    $language    "<language>en-us</language>";  
    $output "<?xml version=\"1.0\" encoding=\"{$encoding}\" ?>  
    <rss version=\"2.0\">  
        <channel>  
            <title>{$pageTitle} Feed</title>  
            <link>"
    .$baseDir."</link>  
            <description>{$pageTitle}Feed</description>{$copyright}{$pubdate}{$language}{$items_output}  
        </channel>  
    </rss>  
    "
    ;  
    header("Content-type: application/rss+xml; charset={$encoding}");  
    echo 
    $output;  
    ?>

  2. #32
    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
    Hi,

    Whats the link to your site with the rss ?
    Not seeing anything obvious from the code posted.
    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. #33
    Junior Member
    Points: 485, Level: 9
    Level completed: 70%, Points required for next Level: 15
    Overall activity: 20.0%
    Achievements:
    3 months registered250 Experience Points

    Join Date
    Jul 2011
    Posts
    7
    Points
    485
    Level
    9
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by lfhost View Post
    Hi,

    Whats the link to your site with the rss ?
    Not seeing anything obvious from the code posted.
    Sorry about that. i forgot

    kisaoyun.com/rss.php

  4. #34
    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
    Hi,

    Your feed doesnt show any games which is why twitterfeed cannot find anything.

    So $items_output is always empty.
    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.

  5. #35
    Junior Member
    Points: 485, Level: 9
    Level completed: 70%, Points required for next Level: 15
    Overall activity: 20.0%
    Achievements:
    3 months registered250 Experience Points

    Join Date
    Jul 2011
    Posts
    7
    Points
    485
    Level
    9
    Downloads
    0
    Uploads
    0
    Hi,

    So how can i solve it?

  6. #36
    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
    Hi,

    You would need to test your DB to see why

    PHP Code:
    SELECT gidgNamecattradeTypegDescaddedOn FROM ats_games WHERE gStatus 1 order by gid DESC limit 0,20 
    is failing to create records. Run it in phpMyAdmin or similar.

    or pur some debug testing in like

    find

    PHP Code:
    $gameName remove_slashes($row['gName']); 
    add under
    PHP Code:
    echo $gameName
    If that outputs the game names, then it could be the $items_output is being reset somewhere.
    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.

  7. #37
    Junior Member
    Points: 485, Level: 9
    Level completed: 70%, Points required for next Level: 15
    Overall activity: 20.0%
    Achievements:
    3 months registered250 Experience Points

    Join Date
    Jul 2011
    Posts
    7
    Points
    485
    Level
    9
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by lfhost View Post
    Hi,

    You would need to test your DB to see why

    PHP Code:
    SELECT gidgNamecattradeTypegDescaddedOn FROM ats_games WHERE gStatus 1 order by gid DESC limit 0,20 
    is failing to create records. Run it in phpMyAdmin or similar.

    or pur some debug testing in like

    find

    PHP Code:
    $gameName remove_slashes($row['gName']); 
    add under
    PHP Code:
    echo $gameName
    If that outputs the game names, then it could be the $items_output is being reset somewhere.
    Hi,

    I try SQL code in phpmyadmin and it showing rows 0 - 19. I guess no problem the creating records.

    PHP Code:
    SELECT gidgNamecattradeTypegDescaddedOn FROM ats_games WHERE gStatus 1 order by gid DESC limit 0,20 
    I added echo in php code. So it stars downloading the rss.php !!
    PHP Code:
    echo $gameName
    I check the error records for site. So the error records showing PHP Notice: Undefined variable for rss.php. How can i solve this?

    PHP Code:
    PHP Notice:  Undefined variableitems_output in /.../kisaoyun.com/rss.php on line 115 

  8. #38
    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
    hi,

    heres a known working version, maybe theres a bug above im not seeing.

    PHP Code:
    <?php
    /*
    #################################################################
    ## Script is copyrighted to ArcadeTradeScript.com and you are free
    ## modify it as you wish as long as credit is given back to us.
    ## 
    ## This is a free Script provided by Lfhost and
    ## was made for arcades using ArcadeTradeScript.

    #################################################################
    */
    include("./inc/main-func.php");
    include(
    "./admin/config.php");
    //##############################################
    // You need to edit this part.
    // What is the URL Structure for your  hosted game pages?
    // Below are the default URL structures. If you have not 
    // changed them at all then you don't need to edit these.

    if ($seoFriendly == 1) {
        
    $preGameStructure "[basedir][category]/play-[gamename]"// The exact URL structure for your pre game pages.
        
    $playGameStructure "[basedir][seodir]/[gamename]"// The exact URL structure for your play game pages.
    } else {
        
    $preGameStructure "[basedir]index.php?a=play&id=[gameid]"// The exact URL structure for your pre game pages.
        
    $playGameStructure "[basedir]index.php?a=play&id=[gameid]&cont=1"// The exact URL structure for your play game pages.
    }

    /*
    This is made easy to edit by the use of special variables.
      [basedir] = this will be replace automatically with the base directory of 
      your arcade that you set in your admin.
      
      [seodir] = this will be replace automatically with the SEO directory of 
      play game pages that you set in your admin.
      
      [gameid] = this will be replace automatically with the ID of the game
      that is found.
      
      [gamename] = this will be replace automatically with the name of the game
      that is found (ex: my-game-name-3).
      
      [category] = this will be replace automatically with the name of the category
      for the game that is found (ex: my-category-name).
    */
    //##############################################

    $result mysql_query("SELECT gid, gName, cat, tradeType, gDesc, addedOn, gIcon1, gIcon1Hosted FROM ats_games WHERE gStatus = 1 order by gid DESC limit 0,20 ") or die(mysql_error());
    if (
    mysql_num_rows($result)) {
        while(
    $row mysql_fetch_array($result)) {
            
    $gameID $row['gid'];
            
    $gameName remove_slashes($row['gName']);
            
    $catID $row['cat'];
            
    $tradeType $row['tradeType'];
            
            
    $gDesc remove_slashes($row['gDesc']);
            
    $addedOn gmdate('r',$row['addedOn']);
            
            
    $gameCat getGameCat($catID);
            
    // Getting the actual game page URL
            
    $preGameStructure2 str_replace("[basedir]"$baseDir$preGameStructure);
            
    $preGameStructure2 str_replace("[seodir]"$seoDir$preGameStructure2);
            
    $preGameStructure2 str_replace("[gameid]"$gameID$preGameStructure2);
            
    $preGameStructure2 str_replace("[gamename]"seo_str_plain($gameName), $preGameStructure2);
            if (
    preg_match("/\[category\]/",$preGameStructure2)) {
                
    $preGameStructure str_replace("[category]"seo_str_plain($gameCat), $preGameStructure);
            }
            
            
    $playGameStructure2 str_replace("[basedir]"$baseDir$playGameStructure);
            
    $playGameStructure2 str_replace("[seodir]"$seoDir$playGameStructure2);
            
    $playGameStructure2 str_replace("[gameid]"$gameID$playGameStructure2);
            
    $playGameStructure2 str_replace("[gamename]"seo_str_plain($gameName), $playGameStructure2);
            if (
    preg_match("/\[category\]/",$playGameStructure)) {
                
    $playGameStructure str_replace("[category]"seo_str_plain($gameCat), $playGameStructure2);
            }
                
            if (
    $preGamePageStatus == "0" || ($preGamePageStatus == && $tradeType == "0")) {
                
    $items_output .= "<item> 
                    <title><![CDATA[{$gameName}]]></title> 
                    <link>{$preGameStructure2}</link>
                    <description> 
                        <![CDATA[{$gDesc}]]>
                    </description> 
                    <category>{$gameCat}</category>
                    <pubDate>{$addedOn}</pubDate>{$author}
                    <guid>{$preGameStructure2}</guid>
                </item> "
    ;
            } elseif ((
    $preGamePageStatus == || $preGamePageStatus == 2) && $tradeType == 1) {
                
    $items_output .= "<item> 
                    <title><![CDATA[{$gameName}]]></title> 
                    <link>{$playGameStructure2}</link>
                    <description> 
                        <![CDATA[{$gDesc}]]>
                    </description> 
                    <category>{$gameCat}</category>
                    <pubDate>{$addedOn}</pubDate>{$author}
                    <guid>{$playGameStructure2}</guid>
                </item> "
    ;
            } else {
            }
        }
    }
    $pageTitle seoMiscTitle($siteName,$homePageTitle);
    $encoding    'ISO-8859-1'
    $copyright   "<copyright>".date('Y')." ".$pageTitle."</copyright>"
    $pubdate     "<pubDate>".gmdate('r')."</pubDate>"
    $language    "<language>en-us</language>"
    $output "<?xml version=\"1.0\" encoding=\"{$encoding}\" ?> 
    <rss version=\"2.0\"> 
        <channel> 
            <title>{$pageTitle} Feed</title> 
            <link>"
    .$baseDir."</link> 
            <description>{$pageTitle}Feed</description>{$copyright}{$pubdate}{$language}{$items_output} 
        </channel> 
    </rss> 
    "

    header("Content-type: application/rss+xml; charset={$encoding}"); 
    echo 
    $output
    ?>
    let me know if that works
    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. #39
    Junior Member
    Points: 485, Level: 9
    Level completed: 70%, Points required for next Level: 15
    Overall activity: 20.0%
    Achievements:
    3 months registered250 Experience Points

    Join Date
    Jul 2011
    Posts
    7
    Points
    485
    Level
    9
    Downloads
    0
    Uploads
    0
    Hi,

    It doesnt work. İt gives same error message.

    PHP Code:
    PHP Notice:  Undefined variableitems_output in /.../kisaoyun.com/rss.php on line 113 

  10. #40
    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
    Hi,

    You can ignore the notice.

    Or try

    PHP Code:
    <?php
    /*
    #################################################################
    ## Script is copyrighted to ArcadeTradeScript.com and you are free
    ## modify it as you wish as long as credit is given back to us.
    ## 
    ## This is a free Script provided by Lfhost and
    ## was made for arcades using ArcadeTradeScript.

    #################################################################
    */
    include("./inc/main-func.php");
    include(
    "./admin/config.php");
    //##############################################
    // You need to edit this part.
    // What is the URL Structure for your  hosted game pages?
    // Below are the default URL structures. If you have not 
    // changed them at all then you don't need to edit these.

    if ($seoFriendly == 1) {
        
    $preGameStructure "[basedir][category]/play-[gamename]"// The exact URL structure for your pre game pages.
        
    $playGameStructure "[basedir][seodir]/[gamename]"// The exact URL structure for your play game pages.
    } else {
        
    $preGameStructure "[basedir]index.php?a=play&id=[gameid]"// The exact URL structure for your pre game pages.
        
    $playGameStructure "[basedir]index.php?a=play&id=[gameid]&cont=1"// The exact URL structure for your play game pages.
    }

    /*
    This is made easy to edit by the use of special variables.
      [basedir] = this will be replace automatically with the base directory of 
      your arcade that you set in your admin.
      
      [seodir] = this will be replace automatically with the SEO directory of 
      play game pages that you set in your admin.
      
      [gameid] = this will be replace automatically with the ID of the game
      that is found.
      
      [gamename] = this will be replace automatically with the name of the game
      that is found (ex: my-game-name-3).
      
      [category] = this will be replace automatically with the name of the category
      for the game that is found (ex: my-category-name).
    */
    //##############################################
    $items_output ='';
    $result mysql_query("SELECT gid, gName, cat, tradeType, gDesc, addedOn, gIcon1, gIcon1Hosted FROM ats_games WHERE gStatus = 1 order by gid DESC limit 0,20 ") or die(mysql_error());
    if (
    mysql_num_rows($result)) {
        while(
    $row mysql_fetch_array($result)) {
            
    $gameID $row['gid'];
            
    $gameName remove_slashes($row['gName']);
            
    $catID $row['cat'];
            
    $tradeType $row['tradeType'];
            
            
    $gDesc remove_slashes($row['gDesc']);
            
    $addedOn gmdate('r',$row['addedOn']);
            
            
    $gameCat getGameCat($catID);
            
    // Getting the actual game page URL
            
    $preGameStructure2 str_replace("[basedir]"$baseDir$preGameStructure);
            
    $preGameStructure2 str_replace("[seodir]"$seoDir$preGameStructure2);
            
    $preGameStructure2 str_replace("[gameid]"$gameID$preGameStructure2);
            
    $preGameStructure2 str_replace("[gamename]"seo_str_plain($gameName), $preGameStructure2);
            if (
    preg_match("/\[category\]/",$preGameStructure2)) {
                
    $preGameStructure str_replace("[category]"seo_str_plain($gameCat), $preGameStructure);
            }
            
            
    $playGameStructure2 str_replace("[basedir]"$baseDir$playGameStructure);
            
    $playGameStructure2 str_replace("[seodir]"$seoDir$playGameStructure2);
            
    $playGameStructure2 str_replace("[gameid]"$gameID$playGameStructure2);
            
    $playGameStructure2 str_replace("[gamename]"seo_str_plain($gameName), $playGameStructure2);
            if (
    preg_match("/\[category\]/",$playGameStructure)) {
                
    $playGameStructure str_replace("[category]"seo_str_plain($gameCat), $playGameStructure2);
            }
                
            if (
    $preGamePageStatus == "0" || ($preGamePageStatus == && $tradeType == "0")) {
                
    $items_output .= "<item> 
                    <title><![CDATA[{$gameName}]]></title> 
                    <link>{$preGameStructure2}</link>
                    <description> 
                        <![CDATA[{$gDesc}]]>
                    </description> 
                    <category>{$gameCat}</category>
                    <pubDate>{$addedOn}</pubDate>{$author}
                    <guid>{$preGameStructure2}</guid>
                </item> "
    ;
            } elseif ((
    $preGamePageStatus == || $preGamePageStatus == 2) && $tradeType == 1) {
                
    $items_output .= "<item> 
                    <title><![CDATA[{$gameName}]]></title> 
                    <link>{$playGameStructure2}</link>
                    <description> 
                        <![CDATA[{$gDesc}]]>
                    </description> 
                    <category>{$gameCat}</category>
                    <pubDate>{$addedOn}</pubDate>{$author}
                    <guid>{$playGameStructure2}</guid>
                </item> "
    ;
            } else {
            }
        }
    }
    $pageTitle seoMiscTitle($siteName,$homePageTitle);
    $encoding    'ISO-8859-1'
    $copyright   "<copyright>".date('Y')." ".$pageTitle."</copyright>"
    $pubdate     "<pubDate>".gmdate('r')."</pubDate>"
    $language    "<language>en-us</language>"
    $output "<?xml version=\"1.0\" encoding=\"{$encoding}\" ?> 
    <rss version=\"2.0\"> 
        <channel> 
            <title>{$pageTitle} Feed</title> 
            <link>"
    .$baseDir."</link> 
            <description>{$pageTitle}Feed</description>{$copyright}{$pubdate}{$language}{$items_output} 
        </channel> 
    </rss> 
    "

    header("Content-type: application/rss+xml; charset={$encoding}"); 
    echo 
    $output
    ?>
    PM me your FTP details and I will do some debugging for you if you wish,
    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.

+ 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