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)

AnkisethGallant 05-01-2002 07:47 PM

I know that controls overall stock, but I want to change the stock for each particular item, to make some items rarer than others.

ceo_tfw 05-01-2002 07:57 PM

Here is what it looks like on my site, my members love it, they say a great addition

AnkisethGallant 05-01-2002 08:02 PM

Looks pretty good, hilariously looking images for your items.

If anyone could help me, I'd praise you and plug your site at my forums. What I need is:
To fix personal shops to only resell their items.
To be able to buy multiple items in a category.

ender 05-01-2002 08:10 PM

To fix the negative donation replace your ###Donate### section in itemshop.php with this. FYI, this also penalizes anyone who tries to enter a negative amount 10 points.

Replace the ### Donate ### section with this in itemshop.php.
Code:

// ###################### donate #######################

if($action==donate && isset($user)) {
        if ($bbuserinfo['userid']==0) {
        eval("dooutput(\"".gettemplate("error_notreg")."\");");
        } else {
                if($user == $bbuserinfo[userid]) {
                eval("dooutput(\"".gettemplate("itemshop_donate-self")."\");");
                exit;
                } else {
                        if($points > 0) {
                        eval("dooutput(\"".gettemplate("itemshop_donate")."\");");
                        exit;
                        } else {
                        eval("dooutput(\"".gettemplate("itemshop_donate-error")."\");");
                        exit;
                        }
                }
        }
}
if (isset($iddonate)) {
        if($amount < 1) {
        eval("dooutput(\"".gettemplate("itemshop_donate-less")."\");");
        $penalty = ($points - 10);
        $DB_site->query("UPDATE userfield SET $pointfield='$penalty' WHERE userid=$bbuserinfo[userid]");
        exit;
        }
        if($points >= $amount) {
        $dpointss=$DB_site->query_first("SELECT $pointfield FROM userfield WHERE userid=$iddonate");
        $dpoints = (int) $dpointss[$pointfield];
        $donated = ($dpoints + $amount);
        $substr = ($points - $amount);
        $DB_site->query("UPDATE userfield SET $pointfield='$donated' WHERE userid=$iddonate");
        $DB_site->query("UPDATE userfield SET $pointfield='$substr' WHERE userid=$bbuserinfo[userid]");
        eval("dooutput(\"".gettemplate("itemshop_donate-thanks")."\");");
        exit;
        } else {
        eval("dooutput(\"".gettemplate("itemshop_donate-more")."\");");
        exit;
        }
}

Make the template: itemshop_donate-less
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
$metarefresh
<title>$bbtitle - Itemshop</title>
$headinclude
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
  <tr>
    <td valign="middle" align="center">
<smallfont>You are trying to donate a negative amount!  Stealing is not allowed!  You have been penalized $10.</smallfont></td>
  </tr>
</table>


Vivi Ornitier 05-01-2002 08:49 PM

the bank is already there. no future project. it's working.

heretic 05-01-2002 09:53 PM

very nice...and you don't mind if I modify it, right ;)

ender 05-01-2002 10:23 PM

Vivi, you need to update the installion script to delete the bank templates.

AnkisethGallant 05-01-2002 10:55 PM

Sounds like it's all working good, but does anyone have any suggestions for my problems?

Is the bank useful, besides getting everyone richer?

Also, What changes do I have to do to go from Itemshop 5.0 to 5.2?

ender 05-01-2002 11:17 PM

You just need to upload the new files.

Vivi: It's possible to permanently mess up the personal shop system. If you buy a personal shop, then delete that shop, then buy a personal shop again it will not work because the ids are auto_incremented. I'm not good at coding so it's a little hard for me to understand the layout of the system but my guess would be that the display mechanism is working on an increment method as well and when it sees: 1,2,3,5 it will only display 1,2,3 because it missed 4 and stopped prematurely.

My guess would be that if one person deletes their shop after a few people make stead it will stop displaying everyone.

Webmasta XT 05-01-2002 11:25 PM

Vivi, One more thing, and nice hack, the thing is how can It display members Items on Postbit, like the old Itemshops??

AnkisethGallant 05-01-2002 11:38 PM

Nice question, I meant to ask that Webmasta.

I might update to 5.2 then. That still doesn't help my previous questions, any ideas anyone?

geniuscrew 05-02-2002 01:16 AM

I got an error :(

PHP Code:

Invalid SQLSELECT FROM items WHERE catORDER BY name 
mysql error
You have an error in your SQL syntax near 'ORDER BY name ' at line 1 

Can somebody help?

Thanx

Kaelon 05-02-2002 01:25 AM

This sounds like a fairly serious problem.

Quote:

Vivi: It's possible to permanently mess up the personal shop system. If you buy a personal shop, then delete that shop, then buy a personal shop again it will not work because the ids are auto_incremented. I'm not good at coding so it's a little hard for me to understand the layout of the system but my guess would be that the display mechanism is working on an increment method as well and when it sees: 1,2,3,5 it will only display 1,2,3 because it missed 4 and stopped prematurely.

My guess would be that if one person deletes their shop after a few people make stead it will stop displaying everyone.
Any way to fix it?

Kaelon

AnkisethGallant 05-02-2002 01:29 AM

Geniuscrew, I'd double-check your tables, and make sure all your Items and categories are done correctly. I'm not real good at this, but that's my guess.

geniuscrew 05-02-2002 01:31 AM

The error email says the referrer is itemshop.php - could it still be my fault ? 0:-)

thanx

AnkisethGallant 05-02-2002 01:44 AM

I highly doubt it, but it's probably trying to call an errored table or template or item. I'd check what I said, if that doesn't work, yell at Vivi.

AnkisethGallant 05-02-2002 02:45 AM

This thing was working good...
PHP Code:

Database error in vBulletin 2.2.5:

Invalid SQLSELECT field5 FROM user WHERE userid=
mysql errorYou have an error in your SQL syntax near '' at line 1

mysql error number
1064

Date
Wednesday 01st of May 2002 10:45:26 PM
Script
: [url]http://www.punkmusicrocks.com/boards/boards/itemshop.php[/url]
Referer

What is up with that?

ALSO: Do I have to change any of the templates or anything if I DON'T use the points hack?

Velocd 05-02-2002 03:37 AM

/me notices in a earlier post that FFrepublic mewtwo is Vivi *gasp*

Don't use the points hack??? How do you expect to buy items, remember it does not work with Lesanes integrated pointsystem and itemshop. You probably would have to modify some code to get it to work without points..but I can't imagine how you would buy items then..

ender 05-02-2002 04:22 AM

FYI, I integrated this hack to work with the Store Hack by Lesane by finding all instances of userfield in itemshop.php and replacing it with user. Then in the admin panel change the field name to storep.

Velocd 05-02-2002 04:37 AM

Interesting....(I think)

Question to Vivi: I still have the original itemshop hack of yours, is there anyway to safely remove or modify the original one with the new one without having to delete everyones items?

Vivi Ornitier 05-02-2002 06:55 AM

To anser previous questions: THE PERSONAL SHOPS DO WORK. the category id is auto_increment, the ownerid isn't.

you can run it without the points installed, it just needs a custom user field.

Velocd: No, it is not possible to keep the earlier items.

BTW, the new script has a few bugs, but i'm leaving today, i'll be back on tuesday! Until then i'll remove the attachement in the first post.

Check back tuesday. :rambo:

Kaelon 05-02-2002 09:07 AM

Awww, you removed it! :p Well, if you noticed bugs, it's probably better to do that =).

I look forward to seeing a fixed version when you next release it.

Kaelon

FFMania 05-02-2002 09:25 AM

Need another help here ;)....what code should I include in postbit template in order to show the items and stuff which they have bought? >_<

geniuscrew 05-02-2002 10:41 AM

Help Help

/me cries referring to earlier post *

That SQL statement, it looks like something to do with the variables in it (the one's that have the dollar sign before them) since those don't show in the error :-/

geniuscrew 05-02-2002 02:05 PM

It's seems to be working on this computer for some reason - is it possible to show *all* the items you have in the post bit and also on the main itemshop page?

Thanx

geniuscrew 05-02-2002 02:54 PM

Quote:

Originally posted by FFMania
Need another help here ;)....what code should I include in postbit template in order to show the items and stuff which they have bought? >_<
IU'm sure it said $post[items] but it's not working for me either :-/ Oh well, until next Tuesday

Forgot to say that it's a brilliant hack, Vivi!

ender 05-02-2002 05:24 PM

Yes, the personal shops will still work but if you delete and recreate it won't display. However, you can, of course, direct link, but that defeats the purpose.

AnkisethGallant 05-02-2002 07:36 PM

Can anyone help me with what I was asking, about allowing users to buy multiple items from a category, and about making personal shops only resell items?

I'm still having the problem with:
Quote:

Database error in vBulletin 2.2.5:

Invalid SQL: SELECT field5 FROM user WHERE userid=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

Date: Thursday 02nd of May 2002 05:40:31 PM
Script: http://www.punkmusicrocks.com/boards...s/itemshop.php
Referer:
What's going on here? Why is it not working? Everything is in right.

AnkisethGallant 05-03-2002 03:48 AM

Is there a way to take out restocking permanently?

AnkisethGallant 05-03-2002 06:53 PM

Is there anyone here that can help me with that error? Anybody?

geniuscrew 05-03-2002 07:43 PM

i'm not that good at PHP - mine started working after i tried it from a different PC.

is this your only custom field?

AnkisethGallant 05-03-2002 08:24 PM

It's my second one, but I have it set as field5, because the points hack was already programmed for five, it was easier that way. I checked the store, it's pointed to field5.

geniuscrew 05-03-2002 10:44 PM

i dunno to be honest - sorry :-/

Have you tried it from a different computer?

AnkisethGallant 05-03-2002 11:25 PM

Yes, and it still has an error. I've tried re-installing itemshop.php, and I've reinstalled all the tables. I haven't touched the templates or anything either.

Velocd 05-04-2002 02:31 AM

Here are some very good REQUESTS TO VIVI for the fixed-itemshop he plans to release on Tuesday:

Important:
1. Pleeeaaasssseee make it so itemshops are in their own page, like you had in the first itemshop. I was disappointed to see all the items on one long page, its not as appealing that way. Also when they do "loop" on the itemshop page, it also shows the header buttons over again.

2. User can choose an icon for their custom item in their personal item shop. Maybe a drop down list beside the item description field where they could select an icon.

3. Category specific personal-items, for example, if the default itemshop has 3 types of items (helmet, weapon, shield), then when a user creates their own shop the only items they can make are either helmets, weapons, shields. This way when someone buys an item from a personal shop, it won't create another field for the new item, it will simply place it in the original spot under that type.

4. How do you display items in the postbit? Like the previous itemshop, are they still located in a profile field? Because displaying the item in the postbit is muy importante.

Would be nice:
1. User can select a URL image for their personal item shop, that could be displayed on their itemshop page. (centered at top).

-----------------

The ones under important I think are crucial to have, as it gives it a wayyy more appealing style. Some of these you may have already decided to do or fix (if its a bug). I just hope you can integrate some of these in your upcoming version. :D

Neo 05-04-2002 03:03 AM

Wow... well I am sure he has alot to do.. dont push him or he my not re-release it at all..

Velocd 05-04-2002 06:07 AM

Yeah you're right about that, so I won't bother him anymore. I simply wanted to suggest a few things ^_^

AnkisethGallant 05-04-2002 06:40 AM

While you're thinking about the Itemshop, why not think on how to solve my problem?!?!?!? I want to use this thing, but it's not working.

(the error is in a previous post of mine)

FFMania 05-04-2002 06:44 AM

What Velocd suggested were the important stuff which everyone would love to use :D I hope Vivi is going to consider the points which were suggested by Velocd, and I forgot to say that this is a great hack! :D

AnkisethGallant 05-04-2002 02:41 PM

I like his first suggestion, and the one about making users have to pick items in the same category. However, I think that users should only be able to resell items they have bought, because if users just get to make up items, that would kinda suck in my opinion.


All times are GMT. The time now is 04:20 AM.

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.01696 seconds
  • Memory Usage 1,831KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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