vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vB User Add Forums 1.0 (https://vborg.vbsupport.ru/showthread.php?t=54050)

kaotic 06-13-2003 06:50 PM

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') ."\");");
}

eval("dooutput(\"".gettemplate("store_buyuserforum _verify")."\");");
}

// ###################### 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];

eval("dooutput(\"".gettemplate("store_buyuserforum _brought")."\");");
}
}
I use...
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 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') ."\");");
}

eval("dooutput(\"".gettemplate("store_buyuserforum _verify")."\");");
}

// ###################### 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];

eval("dooutput(\"".gettemplate("store_buyuserforum _brought")."\");");
}
}
... and it works perfectly. Great hack, wolfe!

Edit: Bahh!! Found another problem. :p 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?

kaotic 06-13-2003 08:03 PM

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

Hobbes 06-14-2003 06:47 PM

is it just me or is the zip wrong.....:s

sebastian406 06-15-2003 12:47 AM

No, it's not you. Hope he fixes it soon.

wolfe 06-21-2003 12:03 AM

i will be fixing this very soon sorry for the long wait but i have been very busy getting to terms with vB 3.0 code lol and making hacks for it ;)

M.C. 07-25-2003 11:06 PM

cool! that what i was looking for few days!

can possible in first post write all features that hack does!

If it not done, i want give you some ideas (may be some of them already made, but... ;)):

https://vborg.vbsupport.ru/showthrea...threadid=55494

wolfe 07-26-2003 12:43 AM

when i am allowed to release vB 3 hacks i will convert it to vb3.

untill then no more work will be done on this hack SORRY!

M.C. 07-26-2003 01:31 AM

wolf... i hope RC will be soon ;) very useful hack - for me at least ;)

keep cool

Ravish 09-08-2003 05:29 PM

Attachment: hit counter plus.zip
Its hit counter hack. Where can i download the vB User Add Forums?

TheComputerGuy 09-16-2003 03:48 PM

What about version 2.3.2?

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.


All times are GMT. The time now is 11:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01311 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete