vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Major Additions - vBCredits - Ultimate Points System (https://vborg.vbsupport.ru/showthread.php?t=151924)

DeMiNe0 07-15-2007 05:23 PM

Well i'm more or less trying to figure out a way to give points to a user without actually having to reward a post. I have users who don't post on the site, but do alot of other really helpful things for us, that i would like to give points to. Then they can buy items that represent actual items in a game through the shop.

DeMiNe0 07-15-2007 05:33 PM

BTW, You could try using this code in place of your current PM code. I replaced it in my credits.php and it seems to notify me now.

PHP Code:

            $dsender $db->query_first("SELECT userid, username FROM " TABLE_PREFIX "user WHERE userid = " $vbulletin->options['credits_pmid']);
            
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_ARRAY);         
            
$pmdm->set('fromuserid'$dsender['userid']);
            
$pmdm->set('fromusername'$dsender['username']);
            
$pmdm->set_info('receipt'false);
            
$pmdm->set_info('savecopy'false);
            
$pmdm->overridequota true;                   // Force pm send even if recipient's mailbox is full
            
$pmdm->set('title'$vbphrase['credits_pm_post_subject']);
            
$pmdm->set('message'construct_phrase($vbphrase['credits_pm_post_body'], $userinfo['username'], vb_number_format(( $vbulletin->GPC['dir'] == 'pos' : -) * $vbulletin->GPC['amount'], $vbulletin->options['credits_decimals']), $vbphrase['credits'], ( $vbulletin->GPC['anonymous'] ? $vbphrase['anonymous'] : $vbulletin->userinfo['username'] ), fetch_censored_text($vbulletin->GPC['reason']), $vbphrase['credits_log']));
            
$pmdm->set('dateline'TIMENOW);
            
$pmdm->set('allowsmilie'true);            
            
$pmdm->set_recipients($userinfo['username'], $permissions);
            
$pmdm->save(); 


Darkwaltz4 07-15-2007 06:01 PM

Well what you basically did was stick in quotaoverride, which indicates the reason you didnt get any PMs -- the userid you specified to send the alert PMs must have run out of room. I wanted to kind of obey that but I guess it wouldnt hurt to change it to that.

Also, in the usercp you can edit user credits directly in the user editor.

You might have some trouble with adding it to the profile because the control for it is tied to the posts. Like I said I will look into it for the next release.

DeMiNe0 07-15-2007 06:04 PM

Problem is, i have moderators who can't access that, that i would like to be able to be able to have them give points to users who don't post often.

Darkwaltz4 07-15-2007 06:06 PM

For the time being you could grant your moderators large amounts of credits which they could then go and donate to the other users?

cheat-master30 07-15-2007 06:17 PM

For some reason, the donate part does not work. The gaining of credits via posts, activity, etc works fine though. Any fix to that?

cheat-master30 07-15-2007 06:18 PM

Fixed when I uploaded the new version of the donating page...

Darkwaltz4 07-15-2007 06:20 PM

:D glad to help!

DeMiNe0 07-15-2007 06:20 PM

Then the problem is, they can't take credits away :P Thats a really important part of this addon im trying to develop.

Let me give you a better image of what im doing. I run a 300 person World of Warcraft Guild. Instead of using a convential DKP(A type of points system many games use). I'm trying to make my own Point system.

Users are rewarded for signing up on the website, referring other members, posting ect. But points are also given and taken based on what these players do in game. For example, if they do something helpful, a moderator will give them points. If the member does somthing bad (like harrass a member, or miss an event) they take points away. I'm the only person who has admincp access, and too many point edits need to be made when I am not on.

I'm basicly trying to make credits.php?p=POSTID work like credits.php?u=USERID. I made a new if statement to add the ?u in. Doesn't need any ajax or anything. I've allready started working on it, but i've ran into a few problems, with points not being updated, and ID variables not being passed.

sunrise2006 07-15-2007 07:21 PM

Wow, Thanks for this update, it's very good, peradventure when I browse this mod to offer some possibilities such as "earn per character" and "PM alert when received point from anyone" that I see the new version is released and I very happed.
I will go to translate it to Persian and update on my board.


All times are GMT. The time now is 06:13 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.02291 seconds
  • Memory Usage 1,756KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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