vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Petz: Give users points. (https://vborg.vbsupport.ru/showthread.php?t=69094)

daniely 09-04-2004 10:00 PM

Petz: Give users points.
 
Yay my first real hack! Er.... addon. Basicly this lets you give points to users via admincp. Okay, installation is simple.

File Edits: 3

First open admincp/user.php

Find:
PHP Code:

        // PROFILE FIELDS SECTION
    
print_table_header($vbphrase['user_profile_fields']);
    
$profilefields $DB_site->query("SELECT * FROM " TABLE_PREFIX "profilefield ORDER by displayorder");
    while (
$profilefield $DB_site->fetch_array($profilefields))
    {
        
print_profilefield_row($profilefield$userfield);
    } 

And add under:
PHP Code:

//Give users points
    
print_table_break(''$INNERTABLEWIDTH);
    
print_table_header("Petz");
    
print_input_row("Points""money"$user['money']);
//Give users points 

Now Find:
PHP Code:

        'options'

And add under:
PHP Code:

        'money' => INT

Finally, find:
PHP Code:

    if ($modifyavatar)
    {
        
define('CP_REDIRECT'"usertools.php?do=avatar&userid=$userid");
    } 

And add above:
PHP Code:

if ( $money ) {
$DB_site->query("UPDATE " TABLE_PREFIX "user SET money = '".$money."' WHERE userid = '".$userid."'");


And your done. Now enjoy the ability to give out points on will.

bonken 09-05-2004 03:44 AM

any demo

Intex 09-05-2004 07:25 AM

Nice work daniely.

Bonken - I don't think you're likely to get a demo as it's access to the AdminCP. Might be a good idea to show a quick screenshot though daniely.

daniely 09-05-2004 10:12 AM

Your wish is my command

Intex 09-05-2004 11:19 AM

Works a treat and saves me going into the DB to edit these. Good job daniely :cool:.

[high]* Intex clicks INSTALL.[/high]

bad-dvir 09-05-2004 12:07 PM

not work when i gave point and click save that do a db error.

daniely 09-05-2004 12:58 PM

Send me the error and I will try to fix it.

Asso 09-06-2004 08:22 AM

very nice :)

thanks for sharing

daniely 09-07-2004 06:44 PM

Okay, bad-dvir your problem is in the third file edit. I think you placed it below rather then above.

TTG 09-11-2004 08:12 PM

Am I missing something .. installed the new file changes and see nothing extra in AdminCP ... ?


All times are GMT. The time now is 08:42 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.01901 seconds
  • Memory Usage 1,742KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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