[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.
the_sim
Registered User
Posts: 166
Joined: Sun Apr 20, 2003 3:31 pm
Location: Minnesota

Post by the_sim »

Here is the link of my image aragorn http://members.lycos.co.uk/shireville/s ... ragorn.gif
But when i go to the shop, the image has Aragorn http://members.lycos.co.uk/shireville/shop.php
Plus the images won't show up from my server, but they do for the Avatar galleries.
Image
the_sim
Registered User
Posts: 166
Joined: Sun Apr 20, 2003 3:31 pm
Location: Minnesota

Post by the_sim »

[quote="the_sim"]Here is the link of my image aragorn http://members.lycos.co.uk/shireville/s ... ragorn.gif
But when i go to the shop, the image has Aragorn http://members.lycos.co.uk/shireville/shop.php
Plus the images won't show up from my server, but they do for the Avatar galleries.


Lol, i found my problem! i had /shireville/Shop/ instead of /shireville/shop/
i347i
Registered User
Posts: 1
Joined: Fri Sep 19, 2003 1:53 am
Contact:

Post by i347i »

this is out of the topic, but how come i get this error?

Code: Select all

Template->make_filename(): Error - file does not exist
EDIT: i found the problem :oops: hehe i made an ez mod compatiable version for shop mod. it works now :D
Earthk
Registered User
Posts: 19
Joined: Wed Aug 13, 2003 7:21 am

Post by Earthk »

I'm using the v1.20 of the item shop mod. When I buy a custom title at
the special shop, the mod does not accept any other texts other than
English texts. Since I'm running a foreign language site, is there a way
to make it accept other characters? Thanks :)

---Edit Typo error---
Last edited by Earthk on Sun Sep 21, 2003 5:03 am, edited 1 time in total.
scottjl
Registered User
Posts: 5
Joined: Wed Mar 12, 2003 4:20 am
Location: Milwaukee, Wisconsin, USA
Contact:

access forum id

Post by scottjl »

hi..

i'm trying to add a private forum that you need to buy an item to get to and i'm a little confused. what do i set "access forum id" to for the item?

thanks!
scottjl
Registered User
Posts: 5
Joined: Wed Mar 12, 2003 4:20 am
Location: Milwaukee, Wisconsin, USA
Contact:

nevermind.. new question

Post by scottjl »

found out what to set the forum id to, and when a user has the item it shows up on the forum index, but when they select it they get the error
The forum you selected does not exist.


the admin user has no problem seeing the forum (without the item), reading, and posting to it. the forum permissions are set to "Private [Hidden]".

i am using phpbb 2.06 and shop 2.50. i'll upgrade to 2.60 tonight.

thanks!
henry_s
Registered User
Posts: 144
Joined: Sat May 18, 2002 7:20 pm
Location: London, UK
Contact:

Post by henry_s »

[edit: eh, just me being stupid :oops: ]
Henry
niksa
Registered User
Posts: 612
Joined: Mon Sep 08, 2003 7:20 pm
Location: Future birthplace of James T. Kirk
Contact:

Post by niksa »

I have two problems that I have not found solutions for in shop 1.2:

- (Minor problem) If I select colored title or name in the effects shop, it comes out like Myname[/b], ')">Myname on the post. I know this has probably been talked about before, but I couldn't search for that string of symbols on this site for some reason (kept giving me a time out/404)

- (Main problem) In ACP I go to shop settings, and try to set up a new shop, and I get a "Fatal Error" message every time. After I disabled the colors in the effects store, I'd get a "Error in Shop Name!" message when trying to actually go in the store from the main forum page.

I'm using cash 202, no other mods, 2.0.6. The site is faerun-nights.com/forum.

Any help is appreciated.. if nothing else, I will just uninstall it all and reinstall again.
Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath »

Please read my signature, I clearly state _no_ support will be given to previous versions of the shop... this is because most of the problem pertaining to the old version are already fixed.

However,

Earthk: I see your problem, unfortunately the reason I had to restrict titles to the english characters is because people can do stuff like <script>alert();</script> and exploit the title. If you want to edit it, you need to open shop_effects, search for a-zA-Z and add your characters directly after it. Make sure you don't allow < >.


Zarath
niksa
Registered User
Posts: 612
Joined: Mon Sep 08, 2003 7:20 pm
Location: Future birthplace of James T. Kirk
Contact:

Post by niksa »

Yes, I have seen your signature many times. I still need help since my ultimate end for this is to use it with Moogie's RPG, which does not work with your new mod. Most of it works with new patches on her Dev thread, but not the sql for the shop_admin, otherwise I would be using it. Her mod only supports your older version, and no one has yet found a way to totally integrate the newest shop into the Moogie rpg mod.

I was hoping someone else who uses the old version would be able to help, since I know that a significant amount of people are still using the old version so they can use Moogie's RPG as well.

I understand that you have fixed this for the new version of the shop mod, and I will probably end up just going to the newest version and waiting for the new sql tables for Moogie's mod anyway.

Sorry to bother you with yet another question about the old version. I do appreciate all your work on it though, even if it's not supported by you anymore.
Earthk
Registered User
Posts: 19
Joined: Wed Aug 13, 2003 7:21 am

Post by Earthk »

Zarath wrote: Earthk: I see your problem, unfortunately the reason I had to restrict titles to the english characters is because people can do stuff like <script>alert();</script> and exploit the title. If you want to edit it, you need to open shop_effects, search for a-zA-Z and add your characters directly after it. Make sure you don't allow < >.

Zarath

Thank you for the pointer Zarath. I'll check it out. :)
Mastro
Registered User
Posts: 52
Joined: Mon Dec 16, 2002 12:08 am
Location: Tampa, FL
Contact:

Shop 2.6.0 and MSSQL

Post by Mastro »

* Version : 2.6.0
* released : Tuesday, August 19th, 2003


Has anyone gotten the Shop mod to work with MSSQL?

I installed, it and ran the SQL entries manually that where in the shop_install.php

Everything seems to installed pretty good only I can't add Shops, and get wierd errors...

1) Adding a shop
Name: Testing
Type: Weapons
Restock :0
Restock :10
-Then I hit submit-

I get
Fatal Error Adding Shop
PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ...\forummod\admin\admin_shop.php on line 189



2) When I go to Shop Settings in the Admin Panel, at the very bottom it shows...

PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ...\forummod\admin\admin_shop.php on line 71



3) and last.. at the bottom of every page on the forum.. I receive...

PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in ...\forummod\shop.php on line 107
PHP Warning: Cannot modify header information - headers already sent in ...\forummod\includes\page_header.php on line 466
PHP Warning: Cannot modify header information - headers already sent in ...\forummod\includes\page_header.php on line 468
PHP Warning: Cannot modify header information - headers already sent in ...\forummod\includes\page_header.php on line 469




I know some problems might be realted to using MSSQL. Thought maybe I could change the SQL commands if I could find where they were for MSSQL, but maybe someone can point me in the direction where I could try and fix it myself, anything would help.
Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath »

To the person who was getting </b> after the username in 1.2.0, it's because of advanced quick reply. It's a conflict and you need to remove the advanced quick reply's piece of code around the username.


To the MSSQL person, those are all SQL problems and replacing mysql_ with mssql should fix it? (I've never used MSSQL so I'm not sure if syntaxes are different.)


Zarath
Mastro
Registered User
Posts: 52
Joined: Mon Dec 16, 2002 12:08 am
Location: Tampa, FL
Contact:

Post by Mastro »

Well I replaced all mysql_ with mssql_ in the admin_shop.php and I still get the error of..

PHP Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in
admin_shop.php on line 71


Here's the snipet of code around the error line. I've marked it with // <---- Error Line <------

Code: Select all

if (empty($_REQUEST['action']))
{
	$template->set_filenames(array(
		'body' => 'admin/shop_config_body.tpl')
	);
	$sql = "select * from phpbb_shops order by id";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_MESSAGE, 'Fatal Error: '.mssql_error());
	}
	$shops = '<span class="genmed"><select name="shopid">';
	for ($x = 0; $x < mssql_num_rows($result); $x++) // <-----  ERROR LINE 71 <-----
	{
		$row = mssql_fetch_array($result);
		$shops .= '<option value="'.$row['id'].'">'.$row['shopname'].'</option>';
	}
So it seems that it is now pulling the mssql because I didn't get an error like function not found. But something is still wrong, trying to figure out "not a valid MS SQL-result " means.

Maybe someone can tell me where that function is.

Edit: Well I found the function. Seems that whatever uses that function isn't sending the right information. Hence: "...supplied argument is not a valid..." Any thoughts?

Edit: When I try and add a shop I get:
mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource

Is this maybe a phpbb problem? or a shop problem? Doesn't matter if I change it to mysql or mssql_ I get the same type error.
Mastro
Registered User
Posts: 52
Joined: Mon Dec 16, 2002 12:08 am
Location: Tampa, FL
Contact:

Post by Mastro »

Zarath, if you want to add MSSQL commands to your Install file for just if someone wants them. You can add these. They are the same only not indexed.

Code: Select all

create table phpbb_shopitems (id INT NOT NULL IDENTITY, 
name CHAR (32) NOT NULL, 
shop CHAR (32) NOT NULL, 
sdesc CHAR (80) NOT NULL, 
ldesc TEXT NOT NULL, 
cost INT DEFAULT 100, 
stock TINYINT DEFAULT 10, 
maxstock TINYINT DEFAULT 100, 
sold INT NOT NULL DEFAULT 0, 
accessforum INT DEFAULT 0, PRIMARY KEY(id))

create table phpbb_shops (id INT NOT NULL IDENTITY, shopname CHAR (32) NOT NULL, shoptype CHAR (32) NOT NULL, PRIMARY KEY(id), type char (32) NOT NULL, restocktime INT DEFAULT 86400, restockedtime INT DEFAULT 0, restockamount INT DEFAULT 5, amountearnt INT DEFAULT 0) 

alter table phpbb_users add user_effects CHAR (255)

alter table phpbb_users add user_privs CHAR (255)

alter table phpbb_users add user_custitle TEXT

alter table phpbb_users add user_specmsg TEXT

alter table phpbb_users add user_items TEXT

alter table phpbb_users add user_trade TEXT
Locked

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