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??


All times are GMT. The time now is 06:59 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.02194 seconds
  • Memory Usage 1,742KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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