[DEV] Item Shop

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
User avatar
janine
Registered User
Posts: 345
Joined: Sun Mar 24, 2002 6:38 pm
Location: Pa

Post by janine » Sat Apr 05, 2003 11:44 pm

question....

I have the shop mod installed and I love it :) I'm trying to add the scratch card mod too, but here's my problem...

You say to find this in shop.php

Code: Select all

<img src=\"shop/images/$itemarray[$xe].".$itemfilext."\" title=\"$itemlinktxt$itemarray[$xe]\" alt=\"$itemarray[$xe]\" border=\"0\">
But the only thing I have that's close to that is

Code: Select all

<img src=\"shop/images/$itemarray[$xe].".$itemfilext."\" title=\"$itemarray[$xe]\" alt=\"$itemarray[$xe]\">
So I tried replacing that with the code that you said too, and the scratch card isn't clickable :(

Any idea what's up?
Thanks in advance :D

User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede » Sun Apr 06, 2003 12:11 am

one thing I noted Janine was that the name of the script, the name of the item and the name of the item in the shop itself must all be the same as far as capital letters - ie: if it is Scratch Card.jpg, then it must be Scratch Card as the item name in the shop, Scratch Card.php as the script name and in Scratch Card.php the variable must be $itemname="Scratch Card"

if it's not that, then it might be something else, but I had the same problem till I checked to make sure all was consistent and then my scratchcards were linkable :)

Hope that helps!

User avatar
janine
Registered User
Posts: 345
Joined: Sun Mar 24, 2002 6:38 pm
Location: Pa

Post by janine » Sun Apr 06, 2003 12:15 am

I have them all lowercase

item name= scratch.jpg
item name in shop=scratch
scriptname =scratchcard.php
itemname="scratchcard"


Thanks for trying though :D
Last edited by janine on Sun Apr 06, 2003 12:19 am, edited 1 time in total.

User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede » Sun Apr 06, 2003 12:18 am

hrmm I cant seem to sell items back anymores? anybody else have this happening?

hehe only scratch cards can be sold back for some reason :)

User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede » Sun Apr 06, 2003 12:21 am

janine wrote: I have them all lowercase

item name= scratch.jpg
item name in shop=scratch
scriptname =scratchcard.php
itemname="scratchcard"


Thanks for trying though :D


try:

item name= scratchcard.jpg
item name in shop=scratchcard

*crosses fingers*

User avatar
janine
Registered User
Posts: 345
Joined: Sun Mar 24, 2002 6:38 pm
Location: Pa

Post by janine » Sun Apr 06, 2003 1:27 am

no that didn't work either :(

User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede » Sun Apr 06, 2003 1:41 am

just registered on your site [hope you dont mind!] and saw that the Casino still has
scratch' with 'scratch.jpg' as the image - try resending up the scratch.jpg as scratchcard.jpg and edit the item in your shop to be called scratchcard janine, hopefully that fixes it for ya :)

User avatar
janine
Registered User
Posts: 345
Joined: Sun Mar 24, 2002 6:38 pm
Location: Pa

Post by janine » Sun Apr 06, 2003 1:46 am

I had to reupload it thanks so much for double checking my silly mistakes :D

It works fine now :D

User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede » Sun Apr 06, 2003 1:49 am

yay! :) Have fun :)

masterlogan
Registered User
Posts: 77
Joined: Sat Oct 19, 2002 4:58 pm
Location: UK
Contact:

Post by masterlogan » Sun Apr 06, 2003 2:35 am

The installs just too confusing and doesnt explain itself well enough.

You say you only had this:

Code: Select all

<img src=\"shop/images/$itemarray[$xe].".$itemfilext."\" title=\"$itemarray[$xe]\" alt=\"$itemarray[$xe]\">
I dont even have that, i have something extra on the end.

Shouldnt this be made into its own topic now as it really has nothing to do with zaraths shop mod. :roll:

User avatar
Suede
Registered User
Posts: 342
Joined: Sat Dec 14, 2002 7:40 pm

Post by Suede » Sun Apr 06, 2003 2:54 am

Suede wrote: hrmm I cant seem to sell items back anymores? anybody else have this happening?

hehe only scratch cards can be sold back for some reason :)


ok tracked this down I think - what I noted was the link to the item in my inventory didn't provide a Sell back link even though I had the item - but if I went to the Shop itself and looked at the item, if I had the item I had the option to sell it back. The difference was, in the Inventory, the Item name is capitalized, whereas the item itself is actually all lowercase

I think this code snippet in shop.php may be the cause of the dynamic link for the item in the inventory to be capitalized: [was the snippet Moogie wrote to make items names in a users inventory click directly to the Shop so folks can buy one]

Code: Select all

a href=\"shop_iteminfo.php?action=displayitem&item=".ucwords($itemarray[$xe])."\">".ucwords($itemarray[$xe])."</A>
hehe so I dont have an answer - but I think I see whats happening ;) Short fix would of course be to capitalize everything with an initial cap.. but you may want to reexamine that code to see if a better variable for the HREF could be used so as to allow for lowercase spelled items :)

www.pittt.tk
Registered User
Posts: 167
Joined: Tue Mar 18, 2003 7:33 pm

Post by www.pittt.tk » Sun Apr 06, 2003 8:00 am

i agree with masterlogan someone make a separate topic for this (whoever made it)
check out http://www.pittt.tk

A msg board with loads of mods

Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Post by Antony » Sun Apr 06, 2003 5:26 pm

What extra addons can I get for the shop? I can't really be bothered searching over 50 pages.

I would like a random item purchase and a buy item for another user.

Spider Slay
I am too lazy to register

Post by Spider Slay » Sun Apr 06, 2003 6:32 pm

Yes, can someone please make a list off all the extra stuff for the Item Shop?

Antony
Registered User
Posts: 529
Joined: Wed Feb 12, 2003 9:06 am

Post by Antony » Sun Apr 06, 2003 6:36 pm

Exactly.

Locked

Return to “[2.0.x] MODs in Development”