Sorry for posting again. This time, I'm sharing my store integration fix for your hack:
Instead of...
Quote:
// ###################### User Buy & Create Own Forum #######################
if ($action=="userforum") {
$stores = $DB_site->query_first("SELECT * FROM store WHERE action='userforum'");
$storeid = $stores[id];
$cost = $stores[costs];
$need = $points - $cost;
$users = $DB_site->query_first("SELECT userforum FROM user WHERE userid='$bbuserinfo[userid]'");
$forums = $users[userforum];
$forumsallow = $users[userforum]+1;
if ($forums==1) {
$unote="Forum";
} else {
$unote="Forum's";
}
if ($forumsallow==1) {
$anote="Forum";
} else {
$anote="Forum's";
}
if ($cost>$points) {
eval("standarderror(\"".gettemplate('store_error') ."\");");
}
// ###################### Start User Buy & Create Own Forum #######################
if ($action=="buyuserforum") {
if ($cost>$points) {
eval("standarderror(\"".gettemplate('store_error') ."\");");
} else {
$forumsbuy=$DB_site->query("UPDATE user SET storep=storep-$cost WHERE userid='$bbuserinfo[userid]'");
$changestoresold=$DB_site->query("UPDATE store SET sold=sold+1 WHERE id=$storeid");
$changeuserforums=$DB_site->query("UPDATE user SET userforum=userforum+1 WHERE userid='$bbuserinfo[userid]'");
$moneycheck = $DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
$money = $moneycheck[storep];
// ###################### User Buy & Create Own Forum #######################
if ($action=="userforum") {
$stores = $DB_site->query_first("SELECT * FROM store WHERE action='userforum'");
$storeid = $stores[id];
$cost = $stores[costs];
$need = $points - $cost;
$users = $DB_site->query_first("SELECT forums FROM user WHERE userid='$bbuserinfo[userid]'");
$forums = $users[userforum];
$forumsallow = $users[userforum]+1;
if ($forums==1) {
$unote="Forum";
} else {
$unote="Forum's";
}
if ($forumsallow==1) {
$anote="Forum";
} else {
$anote="Forum's";
}
if ($cost>$points) {
eval("standarderror(\"".gettemplate('store_error') ."\");");
}
// ###################### Start User Buy & Create Own Forum #######################
if ($action=="buyuserforum") {
if ($cost>$points) {
eval("standarderror(\"".gettemplate('store_error') ."\");");
} else {
$forumsbuy=$DB_site->query("UPDATE user SET storep=storep-$cost WHERE userid='$bbuserinfo[userid]'");
$changestoresold=$DB_site->query("UPDATE store SET sold=sold+1 WHERE id=$storeid");
$changeuserforums=$DB_site->query("UPDATE user SET forums=forums+1 WHERE userid='$bbuserinfo[userid]'");
$moneycheck = $DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
$money = $moneycheck[storep];
Edit: Bahh!! Found another problem. For some reason, users can go ahead and fill out the form and create a subforum, whether they did or did not purchase the pass. Any ideas?
Alright then, I helped myself to a solution. I put all of the info in the "makeforum" template into the "store_buyuserforum_brought" and included the code in your php file in the store.php file.
I would really like to see this completed for that version, or at least what was done. I really would like my users to have the ability to create their own forums.