Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
  #1  
Old 08-13-2002, 09:36 PM
yzztik's Avatar
yzztik yzztik is offline
 
Join Date: Feb 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Random Group Sort & Store Hack Thing Request

Hello, I am a new vb user and have a request for those lovely hack makers out there

what I need is a point system, store, groups thing. Read on to see what I mean. I hope one of you kind souls can help me

- When a new user signs up, they get randomly placed in 1 of 6 groups.

- Each of these groups would have a special access to a hidden forum, (one hidden forum per group) which should be granted automatically upon being placed in that group.

- individual members earn "money" (points) by "working" (performing actions ... like in the store hack)

- in addition to that, in each group, there needs to be a total ammount of "money" that group has. (aka add up all the "money" from individual users in the group)

- a page that shows how much "money" each group has, the "richest" people, etc.

- a page that alows members to see their "money" and spend it and share it (like the store hack).

- allow admins/mods to give users and groups "money".

OK, I think that's it. Questions? Feel free to ask. Thank you in advance to whomever can help me
Reply With Quote
  #2  
Old 08-13-2002, 10:34 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, i think most of this can be done by modifying the store hack...

you can sum the money of a group when you use for example this code:
PHP Code:
$group=$DB_site->query_first("SELECT SUM(money) AS summoney FROM user WHERE usergroupid=XX"
then you should be able to use $group[summoney] for groups money..

register in a random group:

open register.php

find:
PHP Code:
  $DB_site->query("INSERT INTO user (userid,username,password,email,".$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,timezoneoffset,emailnotification,receivepm,emailonpm,options,birthday,maxposts,startofweek,ipaddress,pmpopup,referrerid,nosessionhash,avatarid) VALUES (NULL,'".addslashes(htmlspecialchars($username))."','".addslashes(md5($password))."','".addslashes(htmlspecialchars($email))."',".$newstyleval."'".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','".time()."','$cookieuser','".addslashes($prunedays)."','".time()."','".time()."','$newusergroupid','".addslashes($timezoneoffset)."','$emailnotification','$receivepm','$emailonpm','$options','".addslashes($birthday)."','".addslashes($umaxposts)."','".addslashes($startofweek)."','".addslashes($ipaddress)."','$pmpopup','".addslashes($testreferrerid['userid'])."','$nosessionhash','$avatarid')"); 
before that add:
PHP Code:
$newusergroupid=rand(xx,yy); 
replace xx, with usergroupid of lowest group, and yy with id of the upper group (be sure all groups are in a block bigger than 7)
Reply With Quote
  #3  
Old 08-14-2002, 01:08 AM
yzztik's Avatar
yzztik yzztik is offline
 
Join Date: Feb 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the quick reply. I got one more question ... Where should I put that first sequence for it to work? Because I just tried and didn't work
Reply With Quote
  #4  
Old 08-14-2002, 01:36 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh, this sounds interesting

if only my board got more than 2 posts a day
Reply With Quote
  #5  
Old 08-17-2002, 05:58 PM
yzztik's Avatar
yzztik yzztik is offline
 
Join Date: Feb 2002
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I got the store working and members having individual money. I also got to automatically place them into groups upon sign on. The only thing I need is a way to display the total money of one group ... aka ... add up all their money and display that. In addition, I would like to be abe to add money to the group and it distribute it evenly to each individual.

Anyone got any ideas?
Reply With Quote
  #6  
Old 11-30-2003, 08:46 PM
VirtualHogwarts VirtualHogwarts is offline
 
Join Date: Nov 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BUMP! HOw do you get the ..

$group=$DB_site->query_first("SELECT SUM(money) AS summoney FROM user WHERE usergroupid=XX")

to work what do you find? i have 4 usergroups for it to work with 8 9 10 and 11 ... and then what would I do to post it in like a thread or something? I don't know how to make a php file and im not using the store so it's just the point system but this is perfect for me thanks! I also needed the random registar! and that worked prefect. So ... any ideas on that? (To get group money)
Reply With Quote
  #7  
Old 11-30-2003, 09:03 PM
VirtualHogwarts VirtualHogwarts is offline
 
Join Date: Nov 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You helped him with this and I am sure your help was right but where should we put it and can you be a little more detailed to it?

What i got from it is you put this ...

Code:
$group=$DB_site->query_first("SELECT SUM(money) AS summoney FROM user WHERE usergroupid=XX")
in store.php somewhere? (but where)

and then change the XX to the usergroup you want to total their points right?

then in a template or whereever in the vB put ...

$group[summoney] and it will what? show all their points put together?

So you could do

Group 1: $group[summoney]
Group 2: $group[summoney] ... ahh ha! Problem .. its only 1 userid so i figured ...

back to this ...


Code:
$group=$DB_site->query_first("SELECT SUM(money) AS summoney FROM user WHERE usergroupid=XX")

lets say the usergouws were ... 8 9 10 and 11

Code:
$group=$DB_site->query_first("SELECT SUM(money) AS gryffindors FROM user WHERE usergroupid=8")
Code:
$group=$DB_site->query_first("SELECT SUM(money) AS slytherins FROM user WHERE usergroupid=9")
Code:
$group=$DB_site->query_first("SELECT SUM(money) AS ravenclaws FROM user WHERE usergroupid=10")
Code:
$group=$DB_site->query_first("SELECT SUM(money) AS hufflepuffs FROM user WHERE usergroupid=11")
put them somewhere in store and then ... put

$group[hufflepuffs]
$group[ravenclaws]
$group[slytherins]
$group[gryffindors]

right??? or what please either PM me back or reply! Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:44 PM.


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.05004 seconds
  • Memory Usage 2,242KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete