Jump to content

'Free iPod Script' Tweaking, Constants.inc.


Earnshaw24

Recommended Posts

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

?>
   

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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}

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.