+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: ATS Importer - Get 10%-20% more plugs from traders.

  1. #1
    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

    ATS Importer - Get 10%-20% more plugs from traders.

    Hey All,

    I wrote this update for my own sites, but thought that others using ATS importer might find it useful.

    Please make sure to backup your DB and you files before testing this update.

    The way to test the update is to:

    1, Import plugs for all your traders before installing this update.
    (This will fill your db with all the plugs available from the old/current version of the importer)

    2, Install the update and then repeat step 1. Count how many new plugs it finds and post back here your results.

    ok, to the mod:

    Open admin/get-plugs.php

    find

    PHP Code:
        for ($i=0;$i<count($gamePages);$i++) {
            
    $tempArray explode(" {%sep%} "$gamePages[$i]);
            
    $gameArray[strtolower($tempArray[0])] = $tempArray[1];
        }
        
        
    $plugsFound 0;
        
    $result mysql_query("SELECT * FROM ats_games WHERE tradeType = '1'") or die(mysql_error());
        if (
    mysql_num_rows($result)) {
            while (
    $row mysql_fetch_array($result)) {
                
    $gameID $row['gid'];
                
    $gameName strtolower(remove_slashes($row['gName']));
                
                if (
    $gameArray[$gameName] == "0" || $gameArray[$gameName] == "") {
                    
                } else {
                    
    $gamePage $gameArray[$gameName]; 
    replace with

    PHP Code:
        for ($i=0;$i<count($gamePages);$i++) {
            
    $tempArray explode(" {%sep%} "$gamePages[$i]);
            
    $tempArrayLower strtolower($tempArray[0]);
            
    $gameArray[$tempArrayLower] = $tempArray[1];
            
    $tempArrayLower2 str_replace(array("-","_","'",'"'),"",seo_str(str_replace(" ","",$tempArrayLower)));
            
    $gameArray[$tempArrayLower2] = $tempArray[1];
        }
        
        
    $plugsFound 0;
        
    $result mysql_query("SELECT * FROM ats_games WHERE tradeType = '1'") or die(mysql_error());
        if (
    mysql_num_rows($result)) {
            while (
    $row mysql_fetch_array($result)) {
                
    $gameID $row['gid'];
                
    $gameName strtolower(remove_slashes($row['gName']));
                
    $gameName2 str_replace(array("-","_","'",'"'),"",seo_str(str_replace(" ","",$gameName)));
                
                
    $gamePage $gameArray[$gameName];
                if(empty(
    $gamePage))
                {
                    
    $gamePage $gameArray[$gameName2];
                }
                
                if (
    $gamePage == "0" || $gamePage == "") {
                    
                } else { 
    Basically, it uses the SEO string internal cleaning function to remove all special chars from the game name. This removes all left over space, underscores, dashes etc.

    So say there are variations of names, with spaces, some have dashes some dont.

    Like

    Vinnie's - Shooting Yard
    vs

    Vinnies Shooting Yard
    would not be a match on the older importer due to the ' and -

    but if you then apply the mod above you would be left with

    vinniesshootingyard
    vs

    vinniesshootingyard
    so now we have a new match.
    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.

  2. #2
    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
    I test it, WOW I found about 5 - 10% more plugs on big trade sites (8k + games)
    Thanks for this very useful mod!

    I will update all my sites with it

  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

    Thanks Stephan, glad you find it useful and does what it says on the tin :P
    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: 3,536, Level: 39
    Level completed: 24%, Points required for next Level: 114
    Overall activity: 0%
    Achievements:
    Three FriendsTagger First Class1000 Experience PointsRecommendation Second Class1 year registered
    Awards:
    Community Award
    ZyPhiX's Avatar
    Join Date
    Jul 2010
    Location
    the netherlands
    Posts
    112
    Points
    3,536
    Level
    39
    Downloads
    1
    Uploads
    4
    My Mood
    Chatty
    nice! gonna try it asap, I'll let you know


    thanks mate!

  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

    Cool, let me know the stats you get so we can compare :P

    Got a new mod on the way, cron job to import traders plugs :P

    Will be posting soon once I get it in the online shop :P
    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: 3,536, Level: 39
    Level completed: 24%, Points required for next Level: 114
    Overall activity: 0%
    Achievements:
    Three FriendsTagger First Class1000 Experience PointsRecommendation Second Class1 year registered
    Awards:
    Community Award
    ZyPhiX's Avatar
    Join Date
    Jul 2010
    Location
    the netherlands
    Posts
    112
    Points
    3,536
    Level
    39
    Downloads
    1
    Uploads
    4
    My Mood
    Chatty
    Just tried it, first updated the plugs, then changed the code and run it again result:

    updated 14 trade partners
    added 81 plugs total
    I've got 561 games on my site




    really nice piece of code, thanks!

  7. #7
    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

    WOW, so it found quite a few extra for you then :P

    Thanks
    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.

  8. #8
    Senior Member
    Points: 3,536, Level: 39
    Level completed: 24%, Points required for next Level: 114
    Overall activity: 0%
    Achievements:
    Three FriendsTagger First Class1000 Experience PointsRecommendation Second Class1 year registered
    Awards:
    Community Award
    ZyPhiX's Avatar
    Join Date
    Jul 2010
    Location
    the netherlands
    Posts
    112
    Points
    3,536
    Level
    39
    Downloads
    1
    Uploads
    4
    My Mood
    Chatty
    yes it did :-)


    will do the rest of the trade partners soon, but it takes some time to click all those links... bit boring :P


    really appriciate this mod :-)

  9. #9
    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

    If you dont want the manual updating, then wait for the CRON system ive built to do the imports for you :P

    If you can think of other manual task that can be automated, send me a PM.
    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.

  10. #10
    Senior Member
    Points: 3,536, Level: 39
    Level completed: 24%, Points required for next Level: 114
    Overall activity: 0%
    Achievements:
    Three FriendsTagger First Class1000 Experience PointsRecommendation Second Class1 year registered
    Awards:
    Community Award
    ZyPhiX's Avatar
    Join Date
    Jul 2010
    Location
    the netherlands
    Posts
    112
    Points
    3,536
    Level
    39
    Downloads
    1
    Uploads
    4
    My Mood
    Chatty
    Ok nice, would be nice to have :-)


    What a cool mod would be, is an automatic backup from the DB. Since I got some malware problems recently and I didn't had a backup of the day before...

    I also got a SAS site, got a mod for that one that automatically sends a DB backup as an email every day. If something like that is possible that would be cool. I have to check the code for that, perhaps it's easy to add it to ATS as well since it's more a DB option/mod :-)

+ 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