Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - prisoner

Pages: [1]
1
Items / New Item "Set Leve xxxl" (Set Posts)
« on: October 25, 2006, 12:20:08 am »
Hi,

i have modified the DecrasePost.php like this:

Code: [Select]
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|  Â  Â  Â  Â (c) 2005 DanSoft Australia  Â  Â  Â  Â  Â |
|  Â  Â  http://www.dansoftaustralia.com/  Â  Â  Â  |
\**********************************************/

//File: SetPost.php
//  Â  Â  Item

//VERSION: 1.0 (Build 1)
//DATE: 24th October 2006
//Author: Prisoner/Darkshadow !!!

class item_SetPost extends itemTemplate {
  Â  function getItemDetails() {
  Â  Â  Â  $this->name "Set Posts to 500";
  Â  Â  Â  $this->desc "Sets <i>Someone else's</i> post count to 500!!";
  Â  Â  Â  $this->price 200;
  Â  }

  Â  function getUseInput() {
global $context$scripturl$settings$txt;
  Â  Â  Â  return "Member's Name: <input type='text' name='username'>
  Â  Â  Â  <a href='
{$scripturl}?action=findmember;input=username;quote=0;sesc={$context['session_id']}' onclick='return reqWin(this.href, 350, 400);'><img src='{$settings['images_url']}/icons/assist.gif' border='0' alt='{$txt['find_members']}' /> Find Member</a><br>";
  Â  }

  Â  function onUse() {
  Â  Â  Â  global $db_prefix$ID_MEMBER;

  Â  Â  Â  $result db_query("UPDATE {$db_prefix}members
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  SET posts = posts - posts
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  WHERE memberName = '
{$_POST['username']}'",
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  __FILE____LINE__);

  Â  Â  Â  $result db_query("UPDATE {$db_prefix}members
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  SET posts = posts + 500
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  WHERE memberName = '
{$_POST['username']}'",
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  __FILE____LINE__);

  Â  Â  Â  return "Successfully set {$_POST['username']}'s posts to 500!";
  Â  }

}

?>

In the first step it will decrase the posts from a choosen user to zero and then to 500 in this case.

What can you do with this ?
Well, i have a Forum with many posts related membergroups, the users will become more rights in a higher membergroup with more posts, i use 70 post releated usergroups. So my intention was an item to increase postcounter to a specified number of posts, this will enable a specified automatic "Level Up" for the users. Maybe in this case the next membergroups is at 501 posts, so the users have to do one more post and is in the next membergroup. When users buy an item "SetLevel_01" a user with higher "Level" is in danger...hehehe

You have to adjust the among of posts in this file (500) related to your settings in the membergroups and name it correct related to the affected membergroup. Here is the code that will reflect my membergroup "Level 03"

Code: [Select]
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|  Â  Â  Â  Â (c) 2005 DanSoft Australia  Â  Â  Â  Â  Â |
|  Â  Â  http://www.dansoftaustralia.com/  Â  Â  Â  |
\**********************************************/

//File: SetLevel_03.php
//  Â  Â  Item

//VERSION: 1.0 (Build 1)
//DATE: 24th October 2006
// $Id: SetLevel_03.php

class item_SetLevel_03 extends itemTemplate {
  Â  function getItemDetails() {
  Â  Â  Â  $this->name "Set User to Level 3 after 1 more Post";
  Â  Â  Â  $this->desc "Sets <i>Someone else's</i> Level 3 after 1 more Post!";
  Â  Â  Â  $this->price 200;
  Â  }

  Â  function getUseInput() {
global $context$scripturl$settings$txt;
  Â  Â  Â  return "Member's Name: <input type='text' name='username'>
  Â  Â  Â  <a href='
{$scripturl}?action=findmember;input=username;quote=0;sesc={$context['session_id']}' onclick='return reqWin(this.href, 350, 400);'><img src='{$settings['images_url']}/icons/assist.gif' border='0' alt='{$txt['find_members']}' /> Find Member</a><br>";
  Â  }

  Â  function onUse() {
  Â  Â  Â  global $db_prefix$ID_MEMBER;

  Â  Â  Â  $result db_query("UPDATE {$db_prefix}members
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  SET posts = posts - posts
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  WHERE memberName = '
{$_POST['username']}'",
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  __FILE____LINE__);

  Â  Â  Â  $result db_query("UPDATE {$db_prefix}members
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  SET posts = posts + 29
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  WHERE memberName = '
{$_POST['username']}'",
  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  __FILE____LINE__);

  Â  Â  Â  return "Successfully set {$_POST['username']}'s posts to end of Level 2";
  Â  }

}

?>

Maybe someone can edit it so that it will automatic change the membergroup without to do a 1 more post, i assume you have called the script post.php ????



2
SMFShop Announcements / Re: Bank interest without cron job? Read this!
« on: October 24, 2006, 09:55:11 pm »
Hello,

there is a misstake in the script by Daniel15, i have correct them...

<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
|         (c) 2005 DanSoft Australia           |
|      http://www.dansoftaustralia.com/        |
\**********************************************/

//File: dointerest.php
//      The file to add interest to member's bank

//VERSION: 1.31 (Build 7)
//DATE: 10th December 2005

include("/home/[username]/public_html/forum/SSI.php");
   
$interest_rate = $modSettings['shopInterest'] / 100;
db_query("UPDATE {$db_prefix}members
      SET moneyBank = moneyBank + (moneyBank*{$interest_rate})", __FILE__, __LINE__);
   
echo "Interest added at ".date("d/m/Y h:i:s A");
?>


The last "}" must be deleted, i assume he forgot this while editing original dointere4st.php

Now everything should working if you call the script from browser


3
Coding / Re: Some Items Ideas
« on: October 22, 2006, 06:02:54 pm »
Ok, but it is more confortable way when the comment will be in a string variable, editable in the shop administration for every Item, so every Item should have a "done event" variable... or called what ever you want

4
Coding / Some Items Ideas
« on: October 22, 2006, 05:37:00 am »

Hello,

i never have coded in PHP, but i have some ideas for items and shop modifications, maybe someone does the job ?

1. it will be nice when the admin can edit a message for every item. The message should apear when the item is used, so the admin can made item like This: Item Name: "unidentified item", after use the user will receive the message for this item like this: "Ups, your posts are now decrased by 10" or what ever the admin have typed in...

2. Enter the amount of given credits for every board seperatly

3. A pesonal Armageddon item (the user to harm are choosable from a list...)

4. A protection Item for all the harmfull items (protection item for steal credits, annother protection item for armageddon and so on...)

5. Time properties for the items... maybe the items lost from day to day power...

6. An pm to the member which was targeted by a bad item like steal credits with the information which member has done this...

7.An info under the avatar picture how strong a member is protected with protection items

8. Auktion for items in the trade center, for example: a member put a item in the tradecenter for a specified time (hours/days), the other members can bet, after the specified time, the member with the highest bet will receive the item

9. Item to bann a member from a specified among of time fom the trade center...

10. item to bann a member from a specified among of time from a choosen board...

I have a lot of more ideas but i think this time is enough....


Excuse my bad english, hope you understand...

Prisoner



5
ok daniel, that solves the problem, many thanks, everythink working fine.

Here are some suggestions for your next versions....

1. want be usefull if we can change the amount of credits given per board
2. Items which lost they power from day to day example: first day 100% protection from thiefs, next day 99% protection....
3. Display this protection items under the avatar, so others can see how strong protected a member (character is)
4. Maybe (but this suggestion is only usefull for users like me, when they use the shop in a RPG Game) you can add a popup window with images and stats of items the user is currently "wearing" (protection items) like the inventory inDiablo.

I have opened my forum officiel at 16.10.2006, i use your shop as a RPG Game. All my members are verry happy with it, i add from time to time "unidentified items" to the shop with only description like this "???", with the shop i can do most of thinks i need for the "RPG Game"

If you want, you can look at my forum at: www.crack-patches.com, dont worry about this url, there a no adverts or hijaakers or anything else on my side, only the Forum with the "RPG Game". But its a german Forum... (this should not be advert for my forum, i only want give you a idea what users can do with your shop)

Thanks again, ilove the shop...verry good work !

6
Thanks daniel, but i dont have problems with the button, they allredy fixed and working, i mean the text under the avatars for example: $ 100 Credits. This will not be shown in that Theme...

7
ok, if i know which files to update and what to update, any ideas ?


8
Hello,

i have successfull setup smf shop 2.2 with standard Theme, works well, than i changed to aA_New_Damage Theme, makes the source changes to get the shop button to work -> no problem, but: the credits no longer shown under the avatars image, in inventory the credits will hadled right, please help

I love the shop with this awesome theme...

Pages: [1]