Author Topic: User Icons  (Read 6346 times)

Offline gfxangel

User Icons
« on: December 29, 2006, 11:38:29 pm »
Hey sorry if this is in the wrong section but I dont know where else it would go. What I want to know is, is there a way to make items in the shop which you buy that will then appear in the user's sidepanel (where their avatar, username, rank etc is)

Similar to the profile image item but you can have as many items as you want in the sidepanel

If you don't know what i mean then checkout http://planetrenders.net/forum and go into any topic and look at the user sidepanel
« Last Edit: January 02, 2007, 02:39:49 am by gfxangel »

Offline Razor Heretic

Re: User Icons
« Reply #1 on: January 01, 2007, 12:41:28 pm »
yep! I did it!

Offline gfxangel

Re: User Icons
« Reply #2 on: January 02, 2007, 02:35:51 am »
What do you mean?

Offline littleone

Re: User Icons
« Reply #3 on: January 07, 2007, 04:50:15 pm »
Yes this look awesome.  No offense but this shop mod is one of the best mods out there but there is practically nothing to it. Daniel I know your busy and stuff, but you have done the Askmet and the Flash integration mods, how about some items for the shop now, like a lottery system, that long asked for Pets mod, or these icon things.  These icons look like a fantastic idea, although Id rather see them under the signature than on the left side.

Offline Dragoness

Re: User Icons
« Reply #4 on: February 17, 2007, 05:24:42 am »
This is exactly what we want for our board, did someone create it? If so where can I find it? Thanks!

Offline Daniel15

Re: User Icons
« Reply #5 on: February 17, 2007, 08:43:55 am »
I may work on something like this in the future...
Quote
Daniel I know your busy and stuff, but you have done the Askmet and the Flash integration mods, how about some items for the shop now, like a lottery system, that long asked for Pets mod, or these icon things.
Yeah, sorry, I needed a break from SMFShop coding to do coding for other things ;). I'll try to work on SMFShop soon (although I get close to no free time anymore, school has taken over all my free time :()

My main development efforts are usually focused on the core of SMFShop.
« Last Edit: February 17, 2007, 08:51:22 am by Daniel15 »

Offline littleone

Re: User Icons
« Reply #6 on: March 04, 2007, 12:23:00 pm »
Well I created this item using a variant of Daniel's Flag item.  So if you have the flag item then you CANT use my version.  But I have a bunch of icons there, and they displace underneath your signature.  I added it via the package manager but it seems to have a problem doing the modificiation of the template so you will have to do that manually yourself, its only a couple of lines and all ur doing is adding it in, but it works perfectly other than that.

Its attached, download it, upload it via package manager, it WILL give you an error on Display.template.php, go ahead and do the install anyways.  Once done, go to your Display.template.php and find

Code: [Select]
<div class="signature">', $message['member']['signature'], '</div>';
After that add:

Code: [Select]
//BEGIN SMFShop Profile Images Item 0.1 Beta
    global $db_prefix, $boardurl;
$result_flag = db_query("SELECT shop_Flag
FROM {$db_prefix}members
WHERE ID_MEMBER = {$message['member']['id']}
LIMIT 1", __FILE__, __LINE__);
$row_flag = mysql_fetch_assoc($result_flag);

// Is there a flag set?
if ($row_flag['shop_Flag'] !== '')
{
// Output the text at the start
echo '
<hr width="100%" size="1" class="hrcolor" />';
                                echo 'Icons: <br />' ;

// Get the flags into an array
$flags = explode(',', $row_flag['shop_Flag']);
// Loop through the array
foreach ($flags as $flag)
{
// Is the flag real (not a blank string)?
if ($flag != '')
echo '<img src="', $boardurl, '/Sources/shop/flag_images/', $flag, '"> ';
}

// Insert a line break
echo '<br />';
}
//END SMFShop Icon Item

AGAIN!  If you have the FLAG Item that was provided by Daniel installed, do NOT attempt to install this item.  I did not bother to rename any of the tables or otherwise.  If someone wants to do so please feel free.  This is my first attempt at php coding and all i really did was modify the flag item's code.

The item comes with over 100 icons already in place.  If you want to add ur own, just FTP to the flag_images folder on ur server and add the images.  They will automatically appear on the drop down list of icon selections.

There isnt a way to remove an icon ones a member has purchased and added it to their name unless u go into the MySQL data base and find the member and manually remove it.  Once its there its pretty much permanent.
« Last Edit: March 04, 2007, 12:24:34 pm by littleone »