2009-04-03, 01:45 PM
hi, I want to add more promotion group methods,
I'm newbie so I dont understand a lot of this.
I have searched, and I found this in the "inc\tasks\promotions.php" file:
with this... , can I add new colum like this?:
is something like this? or am I wrong?
the question is "VAR_OF_NEW_METHOD" how to do it?,
i mean if you see in:
$sql_where .= "{$and}postnum {$promotion['posttype']} '{$promotion['posts']}'";
postnum is the variable of posts but i dont know how it create it
or call it.
I think I have to do another table with the id and var of each user,
or use some variable , for example ehm , pm's recived,
"a promotion for who recived 34533 pm's xd",
how could I put something like this there?
s: i know is very crazy , and my english is so bad...xd
but i want to try it.
I'm newbie so I dont understand a lot of this.
I have searched, and I found this in the "inc\tasks\promotions.php" file:
$and = "";
$sql_where = "";
// Based on the promotion generate criteria for user selection
$requirements = explode(',', $promotion['requirements']);
if(in_array('postcount', $requirements) && intval($promotion['posts']) > 0 && !empty($promotion['posttype']))
{
$sql_where .= "{$and}postnum {$promotion['posttype']} '{$promotion['posts']}'";
$and = " AND ";
}
if(in_array('reputation', $requirements) && intval($promotion['reputations']) > 0 && !empty($promotion['reputationtype']))
{
$sql_where .= "{$and}reputation {$promotion['reputationtype']} '{$promotion['reputations']}'";
$and = " AND ";
}
with this... , can I add new colum like this?:
{
$sql_where .= "{$and}VAR_OF_NEW_METHOD {$promotion['MY_COLUMNtype']} '{$promotion['MY_COLUMN']}'";
//simplify: $sql_where .= "{$and}VAR_OF_NEW_METHOD > 5 ";
$and = " AND ";
}
is something like this? or am I wrong?
the question is "VAR_OF_NEW_METHOD" how to do it?,
i mean if you see in:
$sql_where .= "{$and}postnum {$promotion['posttype']} '{$promotion['posts']}'";
postnum is the variable of posts but i dont know how it create it
or call it.
I think I have to do another table with the id and var of each user,
or use some variable , for example ehm , pm's recived,
"a promotion for who recived 34533 pm's xd",
how could I put something like this there?
s: i know is very crazy , and my english is so bad...xd
but i want to try it.