Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2003, 11:18 PM
bgray bgray is offline
 
Join Date: Jan 2003
Location: Houston, TX
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Store question/request (Mass donate)

Does anyone know if there is a hack to award everyone on your forum a certain amount of Lesane's store points at one time?

If so, does anyone know how it can be done?

Thanks!
Reply With Quote
  #2  
Old 08-13-2003, 03:58 AM
Giveit2u43 Giveit2u43 is offline
 
Join Date: Jun 2003
Location: Liverpool
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I guess you could do some editing to the admin side of the lottery hack and just set it up to give a user a set amount?!
Reply With Quote
  #3  
Old 08-13-2003, 10:03 AM
Orphen Orphen is offline
 
Join Date: Aug 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes you can first you need to install.

Paycheck Hack for Lesane's Store by Eander

After that then you need to edit paycheck.php file.

When you edit it put this in you will be able to send it to all the default groups including regular users. If you need to get a certain group that you have added you can edit the file to add that group.


Code:
<?

/* Paycheck Hack By Eander
Save this as paycheck.php and upload it to your admin directory */
require("./global.php");

cpheader();

if (isset($action)==0) {
  echo "Nothing to see here. Have a nice day!";
}

if ($action=="pay1") {
?>
<form method=post action=paycheck.php?action=pay2>
Amount to pay: <input type=text name=amount><br>
Usergroups to pay: 
<ul>
<li><input type=checkbox name=admins value=6 checked>Administrators
<li><input type=checkbox name=regus value=2 checked>Reg users
<li><input type=checkbox name=mods value=7 checked>Moderators
<li><input type=checkbox name=megas value=5 checked>Mega Moderators
</ul>
<input type=submit value="Pay Now">
<?
die;
}
elseif ($action=="pay2") {
	if (!$amount) {
		?>You provided a null amount. <a href=javascript:history.go(-1)>Back</a><?
		die;
	}
	else {
		$who=get_defined_vars();
		if ($who["admins"]==6 or $who["regus"]==2 or $who["mods"]==7 or $who["megas"]==5) {
			$myquery="UPDATE user SET storep=storep+$amount WHERE";
			$myqueryadd="";
			if ($who["admins"]==6) {
				$myqueryadd.=" usergroupid=6";
				$add=" OR";
			}
			if ($who["regus"]==2) {
				$myqueryadd.=$add." usergroupid=2";
				$add=" OR";
			}
			if ($who["mods"]==7) {
				$myqueryadd.=$add." usergroupid=7";
				$add=" OR";
			}
			if ($who["megas"]==5) {
				$myqueryadd.=$add." usergroupid=5";
			}
			$payquery=$DB_site->query($myquery.$myqueryadd);
			$checkquery=$DB_site->query("SELECT userid,username FROM user WHERE" . $myqueryadd);
			for ($x=1;$checkrow=mysql_fetch_array($checkquery);$x++) {
				$pmgivemessage="Dear " . $checkrow[username] . ",\n\nYour paycheck for helping administer these forums has been paid. You have been given $amount store points for your efforts. Keep up the good work!";
				$sendpm=$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,messageread,folderid) VALUES (NULL,'$checkrow[userid]','$checkrow[userid]','$bbuserinfo[userid]','Your Paycheck','".addslashes($pmgivemessage)."',".time().",0,0)");
				echo "PM sent to $checkrow[username] <br>";
			}
			echo "Success.";
			die;
		}
		else {
			echo "You didn't specify a usergroup to pay.";
			die;
		}
	}
}
?>
Reply With Quote
  #4  
Old 08-13-2003, 11:43 PM
bgray bgray is offline
 
Join Date: Jan 2003
Location: Houston, TX
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome! Thanks man!
Reply With Quote
Reply


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 09:53 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.03593 seconds
  • Memory Usage 2,192KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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_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