vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   The Itemshop v5 (Original) (https://vborg.vbsupport.ru/showthread.php?t=38090)

Royston 09-07-2002 06:27 PM

Quote:

Originally posted by Colon33
Ok, i installed this hack on my board. Everything went great. The shop works great. But when someones goes into there profile and edits something in there profile ALL THERE Money dissappears from the item shop. Can someone help me? HELP ANGRY MEMBERS :)
Indeed, Im having the same problem, Anyone have any ideas?

GaleForce 09-09-2002 01:55 AM

How can I specify an amount of a certian item for sale?

Colon33 09-09-2002 07:45 AM

I am having a BUG here that i need help fixing guys'. When i deleted a category lets say i deleted category #5 in the itemshop and want to add another one..when i add a new category it displays add category #5. Ok no problem there. But when i want to add ITEMS it wants to add items into category #6. Those links keep climbing in numbers and dont match the number of actual categories. I have tried entering a manual URL pointing to CAT #5 but still doesnt add the items i want. Any help? :)



Also how can i display MORE than 5 images? I currently own 6 items but it only displays 5.

GaleForce 09-09-2002 08:00 PM

up

GaleForce 09-09-2002 08:00 PM

up

GaleForce 09-09-2002 08:00 PM

up

GaleForce 09-09-2002 08:04 PM

lol whoops... hit submit too many times... SORRY :(

GaleForce 09-10-2002 02:18 AM

How can you set the quantity of an item?

QiQme 09-11-2002 11:03 AM

Hi,

Installed this hack and works great.

Is it possible to show the credits/points in the postbit template ?

If yes, how can i do this ?

Regards Michel Vermaat

NuclioN 09-11-2002 03:43 PM

I can't understand why you are writing "works great" while this is generating hundreds of query's in the "showthread"

Or i am missing an update that is solving this problem, or some members here don't look at the query's. I will uninstall this if there's no solution for it. :(

Grealm 09-11-2002 08:28 PM

btw, how to uninstall this hack?

Gohan 09-11-2002 09:11 PM

step back of tutorial those hack ;) or you was make a backup before make add to vb?

azork 09-17-2002 12:39 PM

Quote:

Originally posted by Apok2002
1) How can I change the interest rate for the Bank, from 10% to 5%?



in itemshop.php find at the beginning:


$bankval=floor($bankval*(pow(1.1,$presenttime)));


the interest rate is definied by this number: 1.1

if you want 5% write 1.05
if you want 2% xrite 1.02
if you want 25% write 1.25

etc...

dirtymerc 09-18-2002 03:46 AM

Whats the code to add what you have bought into your postbit??

Learner29 09-21-2002 04:04 AM

Merjawy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I don't know if this works for everyone or not.. but I have managed to make
two admin folders.. one is old like vB2.0.0 or something like that.. and
when I need to check passwords I use that side making show command line to
show password in config is there and set to 2. and I was able to see the
passwords both ways.. crypted and also have seen the plain text on vB2.2.6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

now that is interesting.....

how did you do that ?? could you please tell with some more details ???

QiQme 09-21-2002 11:29 AM

Quote:

Originally posted by QiQme
Hi,

Installed this hack and works great.

Is it possible to show the credits/points in the postbit template ?

If yes, how can i do this ?

Regards Michel Vermaat

Nobody ??

DraX 09-22-2002 05:56 AM

Okay, I hope this wasn't already asked... is it possible to allow access to certain items based upon values from the user info, such as a custom field? I'm running a board for multiple different games, where the job classes are related to what game they play, and their ranks are affected accordingly.

However, these games are of drastically different natures. One occurs in a fantasy setting while the next is modern warfare, and another 2 are sci-fi futuristic. I'd like to have users be able to gain only equipment appropriate to their setting, so that there won't be a fantasy elf with a rocket launcher, or an alien conquerer fighting with Sword and shield.

Any ideas?

Riddel 09-22-2002 05:49 PM

Quote:

Originally posted by azork



in itemshop.php find at the beginning:


$bankval=floor($bankval*(pow(1.1,$presenttime)));


the interest rate is definied by this number: 1.1

if you want 5% write 1.05
if you want 2% xrite 1.02
if you want 25% write 1.25

etc...

why is an exponential funtion? so what if I want to take away people's money in the bank, like a .9 or something? i think something weird happened when i tried to do that.

Ninth Dimension 09-22-2002 06:13 PM

Riddel, I don't know the answer to your question, but i'm curious as to why you would want to take peoples money away from them for using the bank? If you done this, no one would use the bank!!! :)

Riddel 09-22-2002 06:17 PM

because there is a huge inflation... and so i decided the stock market should crash for a day

leah_zero 09-25-2002 08:56 AM

*LAUGHS*

That's priceless. Riddel, you're great.

SONOFSAM 09-27-2002 04:33 AM

Im hoping someone might be helping, because im sure viv isnt giving an y more support on this. Im getting a database error when a user trys to donate. i have this on 2 of my other forums and have no problems what so ever. I have un-installed and re-installed hoping it would fix 4 times with no success!

heres there error im getting:

[php}Database error in vBulletin 2.2.7:

Invalid SQL: SELECT field9 FROM userfield WHERE userid=MjpbUktdU09OT0ZTQU06ZTA5Mjc4ZmM0NDlhNjI1MTY 0N2IwZDExMGIzMjIyMjA6MTA6OjA6MDowOjA6OjQwOTY=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

Date: Friday 27th of September 2002 01:31:00 AM
Script: http://www.clanbrats.com/forums/forums/itemshop.php
Referer: http://www.clanbrats.com/forums/item...=donate&user=7[/php]

i know nothing about PHP....but looking at the error, looks like there is a problem with the $iddonate somehow. the userid doesnt look like its coming up right.

also, where the script URL is...i dont know how or why it has forums twice in the URL...could that cause the problem?

please offer any help or ideas how to fix :(

SONOFSAM 09-28-2002 04:01 PM

please anyone have an idea??

Kurayami 10-07-2002 07:33 AM

Quote:

Originally posted by alwaysweb
can some one tell me how:

when a user buys a personal shop ...and add items how can i get images to be displayed...i tried doing it in the admin cp but it wont work or show...any ideas?

*Sigh* I'm having the same problem. Heh, I haven't had as much luck with hacks as I would like...

Edit: I just tried the fix posted earlier in the thread, and it still doesn't work. =/

thenickwinder 10-11-2002 05:28 PM

Nevermind all of that

I think I got it to work fine

^_^
thanks a lot, a great hack

supersimon 10-12-2002 04:25 AM

Database error in vBulletin 2.2.7:

Invalid SQL: SELECT field5 FROM userfield WHERE userid=1
mysql error: Unknown column 'field5' in 'field list'

mysql error number: 1054

Date: Saturday 12th of October 2002 01:20:34 AM
Script: http://www.liquidflo.com/rap/rap/itemshop.php
Referer:


the fields are rite i dunno whats wrong installed many haks before so i knwo what iam doing but ia dunno what this is ?
can someoen help (this happens when i try to go to teh item shop which would be www.liquidflo.com/rap/itemshop.php)

GaleForce 10-20-2002 11:02 PM

Hmmm, this was working all good for me, until recently when my members stopped earning interest. Is there a reason why they aren't getting their interest in the bank anymore?

girlzclan 10-22-2002 12:06 AM

this happens everytime i try to donate, iv'e installed this hack on 4 different forums and im getting the same thing everytime :(

Database error in vBulletin 2.2.8:

Invalid SQL: SELECT field5 FROM userfield WHERE userid=Array
mysql error: Unknown column 'Array' in 'where clause'

mysql error number: 1054

Date: Monday 21st of October 2002 09:06:06 PM
Script: http://www.girlzclan.com/forums/forums/itemshop.php
Referer: http://www.girlzclan.com/forums/item...donate&user=11

Jacko 10-22-2002 01:20 PM

is it possible to show your points on the postbit??

hypedave 10-22-2002 04:23 PM

Quote:

Originally posted by Jacko
is it possible to show your points on the postbit??
##### add this where you want your points to appear:<br>

$points[points]

Jacko 10-22-2002 05:43 PM

i tried that but i get nothing there.. same with the items.

Jacko 10-22-2002 05:55 PM

ok i fixed the items not showing on the postbit.. but i still can get my points to show up..

Frank-kun 10-26-2002 06:18 PM

Hello everyone,

Well, this one's been a much-traveled hack. I installed this on version 2.2.8, even knowing there were problems, because I wanted to see if I could find out some way of helping with a couple of the problems - this is a very cool hack and I hate to see it go to waste.

One of the main concerns appears to be the query load. Because of the way the hack works, even with Link's fix, there is an insane amount of queries -per post- to process the display of items.

Vivi actually saw that this was a problem and posted a fix wayyy back in the early pages of the thread. However, the fix missed a step, and I wasn't able to properly get a good display going without the load until recently.

Basically, I applied Vivi's fix, and included the one step he missed when he first posted it. I believe this should help on the server load and reduce the queries to nil.

Since I have limited experience with php and mySQL, try this out at your own risk. Be sure to backup the files you're hacking.

1. showthread.php edits (do this step TWICE since there are two instances in the code)

In showthread.php, find the following:

Quote:

post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,".iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
replace it with:

Quote:

post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,items_user.*,".iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
find:

Quote:

LEFT JOIN userfield ON userfield.userid=user.userid
add this BELOW:

Quote:

LEFT JOIN items_user ON items_user.userid=user.userid
2. admin/functions.php edits

find the original hack of functions.php for the item shop, as instructed by the installer. It should be something like this (link's fix is similar-looking):

Quote:

global $DB_site;
$nr=1;
while ($nr <= 50) {
$catstuff=$DB_site->query_first("SELECT * FROM items_cats WHERE id=$nr");
$its=$DB_site->query("SELECT * FROM items WHERE cat=$nr ORDER BY name $asds");
if(sizeof($catstuff)==16) {
if($catstuff[type]==1) {
$uid=$DB_site->query_first("SELECT item0,points0,description0,icon0,itid0 FROM items_user WHERE userid=$post[userid]");
if($uid[0]!='No Item') {
$post[items] .= "<a href=\"itemshop.php?action=view&id=$uid[4]\"><img src=\"https://vborg.vbsupport.ru/greentek/itemshop/prs.gif\" border=\"0\"></a> ";
} else {
$post[items] .= "<img src=\"https://vborg.vbsupport.ru/greentek/itemshop/No Item.gif\" border=\"0\"> ";
}
} else {
$uid=$DB_site->query_first("SELECT item$nr,points$nr,description$nr,icon$nr,itid$nr FROM items_user WHERE userid=$post[userid]");
if($uid[0]!='No Item') {
if(empty($uid[3])) {
$post[items] .= "<a href=\"itemshop.php?action=view&id=$uid[4]\"><img src=\"https://vborg.vbsupport.ru/greentek/itemshop/$uid[0].gif\" border=\"0\"></a> ";
} else {
$post[items] .= "<a href=\"itemshop.php?action=view&id=$uid[4]\"><img src=\"https://vborg.vbsupport.ru/greentek/itemshop/$uid[3].gif\" border=\"0\"></a> ";
}
} else {
$post[items] .= "<img src=\"https://vborg.vbsupport.ru/greentek/itemshop/No Item.gif\" border=\"0\"> ";
}
}
} else {
break;
}

$nr++;
}
replace it with:

Quote:

if($post[item0]!='No Item') {
$post[items] .= "<a href=\"itemshop.php?action=view&id=$post[itid0]\"><img src=\"https://vborg.vbsupport.ru/greentek/itemshop/prs.gif\" border=\"0\"></a> ";
} else {
$post[items] .= "<img src=\"https://vborg.vbsupport.ru/greentek/itemshop/No Item.gif\" border=\"0\"> ";
}


$nr=1;
while ($nr <= 3) {
$xc="item$nr";
if($post[$xc]!='No Item') {
$xvv = "item$nr";
$xv = "itid$nr";
$xvvv = "icon$nr";
if(empty($post[$xvvv])) {
$post[items] .= "<a href=\"itemshop.php?action=view&id=$post[$xv]\"><img src=\"https://vborg.vbsupport.ru/greentek/itemshop/$post[$xvv].gif\" border=\"0\"></a> ";
} else {
$post[items] .= "<a href=\"itemshop.php?action=view&id=$post[$xv]\"><img src=\"https://vborg.vbsupport.ru/greentek/itemshop/$post[$xvvv].gif\" border=\"0\"></a> ";
}
} else {
$post[items] .= "<img src=\"https://vborg.vbsupport.ru/greentek/itemshop/No Item.gif\" border=\"0\"> ";
}
$nr++;
}
(NOTE: be sure to change https://vborg.vbsupport.ru/greentek to imagesfolder, i.e. the word "imagesfolder" enclosed in curly braces, when you cut and paste this!)

You should now have a less bloated bunch of code to process the images and items for each poster in a thread. As an added bonus, since the items_user is now LEFT JOIN'd to the $post array, you can individually call items by fieldname in the array. I do this because I don't like to see icons, but names. It varies depending on your categories and such, but if you use

$post[item1]

When editing your postbit, you should get the text name for the item in that category in your postbit, if you want a different one, try [item2], [item3], etc.

I hope this works and that it helps some of you out. :)

Jacko 10-27-2002 11:58 PM

is it possible to show the users items in a seperate page with no other PHP at all???

will use a button then to pop up a window displaying the items...

any help would be appreciated...

and wont this lower the amount of query loads on the showthread????

and if this can go into a new page what can i delete of the old hacked php code to gt rid or reduce the query load??

all thanks :)

mewgood 10-28-2002 10:14 PM

can anyone make an add on to this hack
like when a memner is opening a store, he can upload mini images his self which will put beside the item he wants it to be.

mewgood 10-29-2002 05:34 AM

anyone?

Jacko 10-29-2002 08:20 AM

i think this thread is dead mate... try posting a new topic??

Jacko 10-29-2002 08:37 PM

can i not mod this hack so that all the users items can be viewable in a pop up page??

if anyone can please tell me,

Thanx

LOD-squa 11-05-2002 11:46 PM

question how can I reset the money on the bank?

Ninth Dimension 11-05-2002 11:52 PM

Quote:

Originally posted by Jacko
can i not mod this hack so that all the users items can be viewable in a pop up page??

if anyone can please tell me,

Thanx

Do you mean insted of the postbit??? I'm sure that this can be done, but would require some coding of your own, unless you can somehow grab the function that generates the items and use it in a diffrent file for the pop-up.

so basicly, in theory, yes, but it would need some work on your behalf.


All times are GMT. The time now is 09:12 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.01764 seconds
  • Memory Usage 1,838KB
  • 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
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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