Version: 1.00, by Vivi Ornitier
Developer Last Online: Mar 2008
Version: 2.2.x
Rating:
Released: 02-16-2002
Last Update: Never
Installs: 10
Is in Beta Stage
No support by the author.
Hehe. I put this little thing together. It's nothing fancy, but it does it's job.
It works together with the points hack. Your items and the cost (in points) are kept in an array inside itemshop.php. You'll have to edit the file each time you want to add a new item.I might add database support for items later and a cp interface, but right now, it's good.
First, you'll need to add another profile field.
Title: Item or whatever you want to call it
Description: up to you
Max Input: 100
Field Length: 25
Display Order: current fields +1
Required: no
Hidden: no
Editable: no
it's basically just like the points. Remember the field number and change it in the file. Default is(if you haven't added any other fields before):
points: 5
item: 6
in itemshop.php you may want to change the $loop variable. Associated images should be put in the https://vborg.vbsupport.ru/images/itemshop/ direcotry, and have the same name you gave the item in the array.
if you don't want associated images, you must take them out in the file and in the itemshop template.
upload the file itemshop.php
make a template called itemshop, and put in the contents of the itemshop.txt file
in the postbit template:
under: <a href="moderator.php?s=$session[sessionhash]&action=points&userid=$userinfo[userid]" target=_blank>Points:</a> $post[field5]<br> (or whatever you have for your points)
put: <a href="itemshop.php">Item:</a> $post[field6]<br>
if you wish any new user to have "No Item" instead of nothing in the postbit template, run this query:
ALTER TABLE `forums`.`userfield` CHANGE `field6` `field6` CHAR(250) DEFAULT 'No Item' NOT NULL
change forums to the name of the database, and field6 to the number of your item field.
please note that it won't modify any existing users. Just users that register after you run the query.
That's about all. I'll edit this if i forgot anything.
Enjoy!
scroll down for attachement
screenshots included in the zip
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Afterlabs version of the hack is pretty sweet. I was playing around with it last night. I want to make it into a table driven format to add stats and such. Now lets see if I can find the time.
err.... afterlab.... you just copied my code 3 times....
and i also think you have a bug somewhere in your (my) code, like Sano said: "Hahahaha! I totally exploited that bug. I now have the most expensive item in every category, and 9,300 RP. Go me!"
right now, i'm planning on adding AdminCP integration and database, which would allow multiple categories and items, descriptions, etc, etc, etc.