Earnshaw24 Posted February 8, 2007 Share Posted February 8, 2007 Heyo People. Have been desperately searching for some help. Well, I have set up this site - www.uk-rewards.com Using a script, I have adjusted the script countless times for tweaks and such however, there is one major thing that is in the way. This being, the code that determines how many referalls you need per product. However, when you edit it, it changes the amount so all products require that amount of referalls. So I can't have products with different amounts. Here is the constants.inc, Hopefully you can help! <?php define('MAX_INT',2147483647); define('FE_USER_EMAIL_EXISTS', 'e-mail exists in database'); define('FE_EMPTY_EMAIL', 'Empty email'); define('FE_USER_DOMAIN', 'Invalid email'); define('FE_USER_PASSWORD', 'Passwords are required and must be at least 3 letters long'); define('FE_USER_SELECT_IPOD', 'You must select a free gift'); define('FE_ERROR_REF', 'You must to enter at least one correct email.'); define('USERS_ON_PAGE', 20); define('COUNT_SELF', 1); define('COUNT_REFERALS', 5); $ipods = array( 1=> '80gb Video iPod', 'Xbox 360 Premium', 'Nintendo Wii', ); // you may modify this strings ?> Quote Link to comment https://forums.phpfreaks.com/topic/37607-free-ipod-script-tweaking-constantsinc/ Share on other sites More sharing options...
ToonMariner Posted February 8, 2007 Share Posted February 8, 2007 COUNT_REFERALS needs to be replaced by an array and the number of referals for each plromotion should be entered in teh same order as in the ipods array; $count_referals = array( 5, // 80g ipod 12, // Xobx 9, //Wii ); $ipods = array( '80gb Video iPod', 'Xbox 360 Premium', 'Nintendo Wii', ); You will then have to search your code for COUNT_REFERALS and replace it with $count_referal[$ipodkey] ($ipodkey) is the index of the promotion from the array $ipods which you can grab using array_keys(); Feel free to send me Nintendo Wii for solving this..... Quote Link to comment https://forums.phpfreaks.com/topic/37607-free-ipod-script-tweaking-constantsinc/#findComment-179833 Share on other sites More sharing options...
Earnshaw24 Posted February 8, 2007 Author Share Posted February 8, 2007 My god, I love you. You can have 2 free referrals if you sign up then Quote Link to comment https://forums.phpfreaks.com/topic/37607-free-ipod-script-tweaking-constantsinc/#findComment-179837 Share on other sites More sharing options...
Earnshaw24 Posted February 8, 2007 Author Share Posted February 8, 2007 You will then have to search your code for COUNT_REFERALS and replace it with $count_referal[$ipodkey] ($ipodkey) Do you mean replace it in this file constants.inc? or in another :| Quote Link to comment https://forums.phpfreaks.com/topic/37607-free-ipod-script-tweaking-constantsinc/#findComment-179850 Share on other sites More sharing options...
ToonMariner Posted February 8, 2007 Share Posted February 8, 2007 I don't know where you will find it but when you do it will be in an if statement like... if ($something == COUNT_REFERALS) or it may be if ($something != COUNT_REFERALS) Quote Link to comment https://forums.phpfreaks.com/topic/37607-free-ipod-script-tweaking-constantsinc/#findComment-179925 Share on other sites More sharing options...
Earnshaw24 Posted February 8, 2007 Author Share Posted February 8, 2007 Right, this is what the constants looks like now <?php define('MAX_INT',2147483647); define('FE_USER_EMAIL_EXISTS', 'e-mail exists in database'); define('FE_EMPTY_EMAIL', 'Empty email'); define('FE_USER_DOMAIN', 'Invalid email'); define('FE_USER_PASSWORD', 'Passwords are required and must be at least 3 letters long'); define('FE_USER_SELECT_IPOD', 'You must select a free gift'); define('FE_ERROR_REF', 'You must to enter at least one correct email.'); define('USERS_ON_PAGE', 20); $count_referals = array( 8, // 80g ipod 12, // Xobx 10, //Wii ); $ipods = array( 1=> '80gb Video iPod', 'Xbox 360 Premium', 'Nintendo Wii', ); // you may modify this strings ?> Then the only code I could find that was similar to what you said. Was in the 'editinfo.tpl' and that looks like so: {if $session.user_id == 1} Referer: <a href="account.php?id={$referer_id}">{$cache_userdata.$referer_id.email|default:"none"}</a><br><br> {/if} Offers complete: {$cache_userdata.$id.count_self} {if $session.user_id == 1 && !($cache_userdata.$id.count_self)} <br><a href="add_approved.php?user_id={$id}">[ Add completion record ]</a> {/if} <br> Friends accomplished: [b]{$cache_userdata.$id.count_referals}[/b]<br> <br> {if $cache_userdata.$id.assigned} Prize assigned.<br> Prize recived: {$cache_userdata.$id.recieved_date|default:"not yet"} {if !($cache_userdata.$id.recieved_date) && $session.user_id == 1} <input type=submit name="send" value="Mark sent"> {/if} Quote Link to comment https://forums.phpfreaks.com/topic/37607-free-ipod-script-tweaking-constantsinc/#findComment-179983 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.