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 - ICash, Simple, stand alone point system. (https://vborg.vbsupport.ru/showthread.php?t=119086)

Blaine0002 02-13-2007 07:57 PM

Go to your edit plugins in your admincp, you should see one that says icash money system or somthing. click edit, and then hook location click the drop down, newpost_complete should be only a few down from what its at.

waller99 02-13-2007 09:38 PM

Quote:

Originally Posted by Blaine0002 (Post 1181785)
Go to your edit plugins in your admincp, you should see one that says icash money system or somthing. click edit, and then hook location click the drop down, newpost_complete should be only a few down from what its at.


Worked like a charm. I tested it and i previewed my post a few times and clicked submit. It gave me the correct points. Thanks again. :up:

Blaine0002 02-13-2007 09:42 PM

ok cool, ill update the default value and reupload the mod :D

JustinBr 02-14-2007 01:17 AM

Quote:

Originally Posted by JustinBr (Post 1178545)
I'd like to have an option in the admincp that lets me select a certain usergroup/usergroups, to which I can reset/override each member's money to whatever I want it to be.

I'm using icash as my money system on vb 3.6.4.

I see that icash already has a feature that lets you donate to certain members/usergroups from the admincp. The difference being is that with the current feature you are "adding to" the users current money, rather than "overriding with" the new value.

Is this possible?


Any comments on this?

hitboy 02-14-2007 02:48 PM

Quote:

Originally Posted by Blaine0002 (Post 1181389)
yeah ill make that plugin next,

and i added point donation log.

thats great news I am new to vbulletin and the reason i bought it was to use all the great plugins lol my new forum will revolve around a point system so I really need that plugin lol. Vbbux and ebux are messed up I just want something that works or isnt full of hacks.. Can you give me any idea when this new plugin will arrive?

By the way nice job on the donation log it looks good!

slipondajimmy 02-16-2007 01:33 AM

Hey I just installed this it was a breeze. Thanks a bunch

Blaine0002 02-16-2007 03:20 PM

Yes justin i will add that with my next update.

JustinBr 02-17-2007 12:12 AM

Blaine - thx much, I actually got someone here form the community to help with it. (Dankness) He made a few changes to the icashadmin.php file. If you'd like to implement these changes you are more than welcome to do so.

PHP Code:

<?php
  
/*======================================================================*\
   || #################################################################### ||
   || # ICash                                                            # ||
   || # Copyright Blaine0002(C) 2005 All rights reserved.                # ||
   || # Modifyed by Dankness to Override Money Values                    # ||
   || # ---------------------------------------------------------------- # ||
   || # For use with vBulletin Version 3.5.3                             # ||
   || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
   || # Discussion and support available at                              # ||
   || # https://vborg.vbsupport.ru/showthread.php?t=100344           # ||
   || #################################################################### ||
   \*======================================================================*/
error_reporting(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT''icashadmin');
require_once(
'./global.php');
// ###################### Donate To All Members ########################
if ($_GET['act'] == "donate_to_all")
{
  
print_cp_header("Donate To Members");


  
$uoption="<option value='All'>All Usergroups</option>";
  
$usergroups $db->query("SELECT * FROM " TABLE_PREFIX "usergroup ORDER BY title");
  while (
$usergroup $db->fetch_array($usergroups))
  {
    
$uoption.="<option value='{$usergroup['usergroupid']}'>{$usergroup['title']}</option>";
  }


    
print_form_header('icashadmin''do_donate_all');
    
print_table_header("Donate To Members");

    
print_input_row("Amount of {$vbphrase['money']} to donate"'amount','0');
    
print_label_row("Choose Usergroup<dfn>Will only donate to members within this usergroup</dfn>"'<select name="usergroup" class="bginput">'.$uoption.'</select>');

    
print_submit_row("Donate {$vbphrase['money']} To Members"0);
    
    
//member
    
print_form_header('icashadmin''do_donate_member');
    
print_table_header("Donate To Member");

    
print_input_row("Amount of {$vbphrase['money']} to donate"'amount2','0');
    
print_input_row("Choose Username"'username','');

    
print_submit_row("Donate {$vbphrase['money']} To Member"0);

    
//member
    
print_form_header('icashadmin''do_set_member');
    
print_table_header("Set Member Cash");

    
print_input_row("Amount of {$vbphrase['money']} to set to"'amount2','0');
    
print_input_row("Choose Username"'username','');

    
print_submit_row("Set {$vbphrase['money']} To Member"0);

    
print_form_header('icashadmin''do_set_all');
    
print_table_header("Set Money of Usergroups");

    
print_input_row("Amount of {$vbphrase['money']} to set"'amount','0');
    
print_label_row("Choose Usergroup<dfn>Will only donate to members within this usergroup</dfn>"'<select name="usergroup" class="bginput">'.$uoption.'</select>');

    
print_submit_row("Set {$vbphrase['money']} To Members"0);


    
print_cp_footer();
    exit;
}

// ###################### Do Donate To All Members ########################
if ($_POST['do'] == "do_donate_all")
{
  
print_cp_header("Donate To Members");

  if(
$_POST['usergroup']!="All")
  {
    if(!
$db->query_first("SELECT * FROM " TABLE_PREFIX "usergroup where usergroupid='{$_POST['usergroup']}'"))
  {
    echo 
"Invalid Usergroup Specified. [ <a href='javascript:history.go(-1)'>Back</a> ]";
    exit;
  }
}

$_POST['amount']=(int)$_POST['amount'];

if(
$_POST['usergroup']=="All")
{
  
$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$_POST['amount']}'");
} else {
  
$mcol=$db->query("select * from ".TABLE_PREFIX."user where usergroupid='{$_POST['usergroup']}'");
  
$membersc=array();
  while(
$them $db->fetch_array($mcol))
  {
    
$membersc[]=$them;
  }
    if(
$membersc[0])
  {
        foreach(
$membersc as $the_memberg){
        
$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$_POST['amount']}' where userid='{$the_memberg['userid']}'");
        }
    }
}

    
define('CP_REDIRECT''icashadmin.php?act=donate_to_all');
    
print_stop_message('icash_donate_members');
}

// ###################### Do Donate To Member ########################
$_POST['amount2']=(int)$_POST['amount2'];

if (
$_POST['do'] == "do_donate_member")
{
  
print_cp_header("Donate To Member");

  
$_POST['amount2']=(int)$_POST['amount2'];
  
$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$_POST['amount2']}' where username='{$_POST['username']}'");
  
define('CP_REDIRECT''icashadmin.php?act=donate_to_all');
  
print_stop_message('icash_donate_members');
}


if (
$_POST['do'] == "do_set_member")
{
  
print_cp_header("Set Members Cash");

  
$_POST['amount2']=(int)$_POST['amount2'];

  
$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}='{$_POST['amount2']}' where username='{$_POST['username']}'");
  
define('CP_REDIRECT''icashadmin.php?act=donate_to_all');
  
print_stop_message('icash_donate_members');
}

if (
$_POST['do'] == "do_set_all")
{

  
print_cp_header("Set Usergroups Moneys");
  if(
$_POST['usergroup']!="All")
  {
    if(!
$db->query_first("SELECT * FROM " TABLE_PREFIX "usergroup where usergroupid='{$_POST['usergroup']}'"))
    {
    echo 
"Invalid Usergroup Specified. [ <a href='javascript:history.go(-1)'>Back</a> ]";
    exit;
    }
  }
  
$_POST['amount2']=(int)$_POST['amount2'];

  if(
$_POST['usergroup']=="All")
  {
    
$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}='{$_POST['amount']}'");
    
define('CP_REDIRECT''icashadmin.php?act=donate_to_all');
    
print_stop_message('icash_donate_members');
  }
  else
  {
    
$grp $_POST['usergroup'];
    
$grpa $grp ',';

    
$mcol=$db->query("select * from ".TABLE_PREFIX."user where usergroupid='{$_POST['usergroup']}'");
    
$membersc=array();
    while(
$them $db->fetch_array($mcol))
    {
        
$membersc[]=$them;
    }
      if(
$membersc[0])
    {
        foreach(
$membersc as $the_memberg)
        {
            
$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}='{$_POST['amount']}' where userid='{$the_memberg['userid']}'");
        }

  }
    
$mcol =$db->query_read("SELECT * FROM ".TABLE_PREFIX."user as a WHERE FIND_IN_SET('{$_POST['usergroup']}', a.membergroupids) ");

    
$membersc=array();
    while(
$them $db->fetch_array($mcol))
    {
        
$membersc[]=$them;
    }
      if(
$membersc[0])
    {
        foreach(
$membersc as $the_memberg)
        {
          
$db->query("update " TABLE_PREFIX "user set {$vbulletin->options['icashf']}='{$_POST['amount']}' where userid='{$the_memberg['userid']}'");
        }

    }


    
define('CP_REDIRECT''icashadmin.php?act=donate_to_all');
    
print_stop_message('icash_donate_members');
}
}
?>


Blaine0002 02-17-2007 02:18 AM

Thx for the contribution!

Remember to click install!

2meplie 02-17-2007 08:09 AM

Really great hack! I posted a thread looking for this just yesterday and found this this morning! YAY! I just read all the pages and I was wondering if it is possible, like it was asked earlier in this thread, to receive points for specific clicking on certain URL. I also too use the thank you hack and I would like peoples getting points when they receive a thank you. And also when they vote.


Is it possible?

Thanks again for this hack. :D


All times are GMT. The time now is 12:46 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.01679 seconds
  • Memory Usage 1,844KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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