vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Default points for registering addon to store hack (https://vborg.vbsupport.ru/showthread.php?t=47631)

ChurchMedia 01-12-2003 05:45 AM

Default points for registering addon to store hack
 
This is an addon for Lesane's Store Hack. It will give a new forum member a default amount of points for registering.

In register.php find:

PHP Code:

// activate account 

Under that add:

PHP Code:

// add points for registering
$DB_site->query("UPDATE user SET storep=storep+100 where userid='$userinfo[userid]'"); 

Change the "100" to however many points you want them to start out with.

Easy! :)

-------Update--------

As mentioned below, you could also just make the default for storep what ever you want by changing the table....

alanvo 01-12-2003 07:56 AM

very cool
let me try

alanvo 01-12-2003 07:59 AM

very nice! worked perfectly...

John 01-12-2003 09:35 AM

Or you could just set a default value for storep in the database - it would be one less query...

Chris M 01-12-2003 12:58 PM

By that john, do you mean adding it to the "INSERT INTO user" query?

If so, then that would be better:)

Satan

Link14716 01-12-2003 10:37 PM

As john said, you could just run this query instead of editing register.php:

[sql]ALTER TABLE `user` CHANGE `storep` `storep` SMALLINT(5) DEFAULT 'X';[/sql]

Change X to what you want.

ChurchMedia 01-13-2003 12:51 AM

Yeah, I guess that does work better.

OT - when I try to run queries like that in phpMyAdmin I always get an error. I usually have to do something like that manually, using the program. Any ideas why?

Davey 01-13-2003 11:02 AM

Would be nice if you could release this in the options part so you can set a default value ;).

Dave.

PS: Cheers, I've been looking(/hoping) for this for ages now lol.

EcpHosting 01-13-2003 04:52 PM

Great Hack! Thanks!

EcpHosting 01-13-2003 04:57 PM

Quote:

Originally posted by Davey
Would be nice if you could release this in the options part so you can set a default value ;).

Dave.

PS: Cheers, I've been looking(/hoping) for this for ages now lol.

Yes, I like this idea as well. Better organization here.


All times are GMT. The time now is 12:22 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.01000 seconds
  • Memory Usage 1,727KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete