[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
Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath » Sun Dec 15, 2002 8:22 am

L0cke wrote: Basically, I've got everything looking how I want it now.. this shop is shweeeeet. My members are all joygasming, it's great to make people happy. :)

Is there a way to get it to say "This user has no items in their inventory" when you have the image option selected? So it's not just a blank space?


Yup, written down for next version.


Auction won't be done until either the version after next, or the one after that. Auctioning isn't easy at all, it would take a couple of days of coding at least.

The next 1-2days of my time will be on making a bank mod (that I might not release, since not many people seem to want it.) and then I'll be working on the shop again.

User avatar
L0cke
Registered User
Posts: 426
Joined: Sat Aug 24, 2002 7:57 pm
Location: Missouri

Post by L0cke » Sun Dec 15, 2002 8:27 am

There's no simple code for "there are no items in this inventory"?

I figured it'd just be something like

if user.items = 0
{say "No itam! GO away!"
}

But I don't know PHP.. at all.. so.. lol

Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath » Sun Dec 15, 2002 8:30 am

Something like if (strlen($xx) < 2) { $xx = "This user has no items!"; }

I'll release the updated version with that tomorrow. I don't feel like coding tonight, sorry.

User avatar
L0cke
Registered User
Posts: 426
Joined: Sat Aug 24, 2002 7:57 pm
Location: Missouri

Post by L0cke » Sun Dec 15, 2002 8:49 am

Bleh, okay.. :wink:
I'll have to pull bits and stuff from the code cause I dont think I wanna update.. I've already styled the shop how I want it to look and stuff. heh

I bet that code you put there would work. Just no idea where to put it, rofl.

Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath » Sun Dec 15, 2002 9:00 am

I wrote this FAQ for my site, for the shop & points mods, it's only short, but it answers the main questions. So if anyone wants to use it feel free to.

open
/language/*/lang_faq.php

find
$faq[] = array("--","Login and Registration Issues");

add, before
$faq[] = array("--","Shop and Gold Pieces");
$faq[] = array("How do I earn gold pieces?", "Currently posting is the only way to gain gold pieces. You gain more for creating a new topic than you do for replying to a post.");
$faq[] = array("How do I buy stuff?", "Simply click on the shop button, then into the shop you want. The list of items is there, click on the item you want then click buy item!");
$faq[] = array("How do I sell stuff?", "The same way as you buy stuff. Once you own an item a Sell link will appear in the item description area allowing you sell your item back at a % of the original cost");
$faq[] = array("How do I get effects on my name?", "Goto the special store in the shop list. In there are options for you to change your username and add various effects");
$faq[] = array("How do I get rid of effects on my name?", "The same way you bought it, but you won't be refunded anything for selling it back");
$faq[] = array("Is the shop going to be updated?", "Yes, the shop will be updated as new versions of the mod are released.");

Ghyste
Registered User
Posts: 38
Joined: Sun Sep 15, 2002 10:32 pm

Post by Ghyste » Sun Dec 15, 2002 9:04 am

Got the updated Shop working
sadly some of the topics died and when you click they turned white
no biggy just kinda wierd

anyway
I would like to see a Bank mod
and I think other people would too :wink:

The_Best_Ever
Registered User
Posts: 21
Joined: Sun Sep 01, 2002 12:28 pm
Location: UK,Birmingham
Contact:

Post by The_Best_Ever » Sun Dec 15, 2002 10:45 am

Parse error: parse error in /home/jay/public_html/private/shop_mod_update1.php on line 3


That comes up when i click the link

?

User avatar
IceMan_35
Registered User
Posts: 118
Joined: Sun Nov 24, 2002 10:09 pm

Post by IceMan_35 » Sun Dec 15, 2002 10:52 am

IceMan_35 wrote: where? I tried but didnt find the link for selling the items.


my bad sorry I got it. Thanks.


But I am using a search for users post link in the viewtopic_bdy.tpl so when I purchase glow, because both have USERNAME, the link for the search gets broken.

So is there a way to instead of using username, using userid or something.

other than that, it works like a charm and it is really a great MOD.

Thank you.

Xycius
Registered User
Posts: 11
Joined: Fri Nov 22, 2002 8:00 pm

Post by Xycius » Sun Dec 15, 2002 11:10 am

The_Best_Ever wrote:
Parse error: parse error in /home/jay/public_html/private/shop_mod_update1.php on line 3


That comes up when i click the link

?


I get the same error, can you give me the right update.

Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath » Sun Dec 15, 2002 11:43 am

urg crap, sorry. I was updating it... check again in a few minutes

Narc0sis
Registered User
Posts: 662
Joined: Tue Apr 09, 2002 12:59 am
Contact:

Post by Narc0sis » Sun Dec 15, 2002 12:16 pm

the special effects part in viewtopic seems to be a little query intensive so i just disabled it and took out

Code: Select all

	$usql = "select user_privs, user_effects from " . USERS_TABLE . " where username='$ususername'";
	if ( !($uresult = $db->sql_query($usql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Getting User Info!'); }
	$urow = mysql_fetch_array($uresult);
	$usereffects = explode("ß", $urow['user_effects']);
	$userprivs = explode("ß", $urow['user_privs']);
	$userbs = array();
	$usercount = count($userprivs);
	for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $userprivs[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
	$usercount = count($usereffects);
	for ($x = 0; $x < $usercount; $x++) { $temppriv = explode("Þ", $usereffects[$x]); $userbs[] = $temppriv[0]; $userbs[] = $temppriv[1]; }
	$sql = "select config_value from " . CONFIG_TABLE . " where config_name='specialshop'";
	if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error Getting Item Info!'); }
	$row = mysql_fetch_array($result);
	$shoparray = explode("ß", $row['config_value']);
	$shoparraycount = count ($shoparray);
	$shopstatarray = array();
	for ($x = 0; $x < $shoparraycount; $x++)
	{
		$temparray = explode("Þ", $shoparray[$x]);
		$shopstatarray[] = $temparray[0];
		$shopstatarray[] = $temparray[1];
	}
	if (($userbs[10] == on) && ($shopstatarray[12] == on)) { $poster = "<font color=\"".$userbs[11]."\">".$poster."</font>"; }
	if ((($userbs[12] == on) && ($shopstatarray[14] == on)) || (($userbs[14] == on) && ($shopstataray[16] = on))) {
		$nameeffects = "<span style=\"width:100";
		if (($userbs[12] == on) && ($shopstatarray[14] == on)) { $nameeffects .= "; filter:shadow(color=#".$userbs[13].", strength=5)"; }
		if (($userbs[14] == on) && ($shopstatarray[16] == on)) { $nameeffects .= "; filter:glow(color=#".$userbs[15].", strength=5)"; }
		$nameeffects .= "\">".$poster."</span>";
		$poster = $nameeffects;
	}
	if (($shopstatarray[6] == on) && ($userbs[2] != on) && ($poster_rank != "Site Admin")) { $poster_avatar = ""; }
	if (($shopstatarray[8] == on) && ($userbs[4] != on) && ($poster_rank != "Site Admin")) { $user_sig = ""; }
	if (($shopstatarray[10] == on) && ($userbs[6] != on) && ($poster_rank != "Site Admin")) { $poster_rank = "None"; $rank_image = ""; }
from viewtopic.php. It seems to run fine without that part since i have the effects shop disabled. do u think doing that would cause any problems? i dont notice any but i thought id ask to make sure. it uses about 25 less queries per topic view this way.

Zarath
Registered User
Posts: 736
Joined: Fri Dec 06, 2002 9:01 am
Contact:

Post by Zarath » Sun Dec 15, 2002 12:35 pm

I don't think that would do anything...

Dave2
Registered User
Posts: 86
Joined: Thu Oct 17, 2002 12:42 pm

Post by Dave2 » Sun Dec 15, 2002 4:51 pm

Zarath wrote:
L0cke wrote:Basically, I've got everything looking how I want it now.. this shop is shweeeeet. My members are all joygasming, it's great to make people happy. :)

Is there a way to get it to say "This user has no items in their inventory" when you have the image option selected? So it's not just a blank space?


Yup, written down for next version.


Auction won't be done until either the version after next, or the one after that. Auctioning isn't easy at all, it would take a couple of days of coding at least.

The next 1-2days of my time will be on making a bank mod (that I might not release, since not many people seem to want it.) and then I'll be working on the shop again.
what, i know a ton of people who want the bank mod, me being thee most important one 8) i hope u decide to release it
Anyone looking for a mod to work on? i really would like it if someone could make a mod with these specifics

http://www.phpbb.com/phpBB/viewtopic.php?t=61111

Image

kip2001
Registered User
Posts: 313
Joined: Sun Sep 15, 2002 9:44 am

Post by kip2001 » Sun Dec 15, 2002 5:46 pm

I want the bank mod! :wink:

Xycius
Registered User
Posts: 11
Joined: Fri Nov 22, 2002 8:00 pm

Post by Xycius » Sun Dec 15, 2002 5:56 pm

Can somewhone help me with this mod, it doesn't work fine on my forum
This is the error:

phpBB : Critical Error

Error Getting Shop Items!

If I visit shop.php I get this error.

Another error I get when I view a topic en click on Item than it says: No Such Shop Exists!

Can somewhone also tell me how all the things in /admin/ must be filled in because the mod is a little bit different than de vbulliten one ??

Locked

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