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)

wolfe 06-10-2003 09:31 PM

i am working on implementing all of the above will get back to you all

narulure 06-10-2003 09:43 PM

O_O this hack would take up lots of database......if you have lots of members :p

wolfe 06-10-2003 10:39 PM

well upto now i have sorted it so the query is somethign like this

PHP Code:


SELECT forumid
,title,allowposting
FROM forum
WHERE forumid
='$parforumid'
AND title='$parforumtitle' 

$parforumid = (user selected forumid in the admin options)
$parforumtitle = (user selected forum title in the admin options)

i have also sorted the store intergration out here it is

First run this query

PHP Code:


INSERT INTO 
`store` (`id`,`action`,`title`,`costs`,`sold`,`imgurl`,`description`,`ok`,`quantity`) VALUES (NULL,'userforum','Buy a Create your own forum pass.','15000','0','images/buyforum.gif','With this action you can buy a create your own forum pass','Y','0'); 


then in store.php find:

PHP Code:


?>
 

and above add the following

PHP Code:


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


then add the following templates in the txt file


NOTE: You will have to have the new version of this hack installed to get the full benifits of this store intergration.

The General 06-11-2003 11:46 AM

Cool hack!

Is it also possible for the creator of the forum to make it a private forum AND give access to individual users?

I guess that's too much to ask, but hey! I can always try. =D

supernut 06-11-2003 02:01 PM

i hope its converted for version 3vb, i will install it then, i cannot wait for all the options ot be added and converted for 3

supernut 06-12-2003 11:27 AM

now we know that VB3 beta is out friday, any idea if you will convert it sooner then later to run on 3 ?

csidlernet 06-13-2003 06:11 AM

This is one to be installed :P

kaotic 06-13-2003 01:56 PM

Hey, found a small problem. The second query = bad.

Quote:

ALTER TABLE `forums` ADD `addedby` char( 50 ) NOT NULL
Should be changed to:

Quote:

ALTER TABLE `forum` ADD `addedby` char( 50 ) NOT NULL

wolfe 06-13-2003 02:11 PM

thanx d00d fixed updated zip :D

kaotic 06-13-2003 02:13 PM

One more problem. :D With the store integration update, I get the following error when I try to purchase a forum (the very first screen after clicking the buy button):
Quote:

Database error in vBulletin 2.3.0:

Invalid SQL: SELECT userforum FROM user WHERE userid='102'
mysql error: Unknown column 'userforum' in 'field list'

mysql error number: 1054

Date: Friday 13th of June 2003 08:12:29 AM
Script: http://www.mykewlsecretsite.com/foru...tion=userforum
Referer: http://forums.mykewlsecretsite.com/store.php
Notes: I did run the query, I edited store.php, and I'm running the latest version of this hack.

I'm sure I can find a solution on my own, I just thought you should know.


All times are GMT. The time now is 07:14 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.02328 seconds
  • Memory Usage 1,762KB
  • 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
  • (4)bbcode_php_printable
  • (3)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