Author Topic: 'Profile Image' item  (Read 34030 times)

Offline Daniel15

'Profile Image' item
« on: April 23, 2006, 11:45:57 am »
The 'Profile Image' item is an item for SMFShop that allows your members to show an image next to their posts. This item is a standard SMF package, so please install it using the package manager.

This item comes with a set of flag images, although you can delete the original images and use whatever image you'd like.

You may downlaod the item via the 'SMFShop Items' downloads section of the DanSoft Australia site. Have fun!

EDIT: If you'd like to get this working in other themes, here's how:
Open Themes/[themename]/Display.template.php
Find:

	
	
	
if (!empty(
$settings['show_gender']) && $message['member']['gender']['image'] != '')
	
	
	
	
echo 
'
	
	
	
	
	
	
	
	
'
$txt[231], ': '$message['member']['gender']['image'], '<br />';

Add after:

            
//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_array($result_flagMYSQL_ASSOC);
            
            if(
$row_flag['shop_Flag'] !== "") {
                echo 
"Flag: <img src='{$boardurl}/Sources/shop/flag_images/{$row_flag['shop_Flag']}'><br>";
            }
            
//END SMFShop Flag Item
« Last Edit: February 17, 2007, 09:30:45 am by Daniel15 »

Offline tazpot

Re: 'Profile Image' item
« Reply #1 on: April 24, 2006, 04:19:38 am »
 :D  i Have just bought a flag on this site and it looks exactly what i was looking for.  Good work Daniel and thanks O0

Offline Daniel15

Re: 'Profile Image' item
« Reply #2 on: April 25, 2006, 04:12:48 pm »
No problem :)

As I said before, I already had the code. I just needed to do some bug fixes to it (some of the code was from September 2005 :P)

Offline TechnoDragon

Re: 'Profile Image' item
« Reply #3 on: May 11, 2006, 01:35:05 pm »
would it be possible to tweak this a bit?  The idea is to use images of small animals "pets" but I would like a page to display all of the available "pets" as images and then allow the buyer to name it.
Don't tell me to get into shape...I have a shape...It is round!


Offline tazpot

Re: 'Profile Image' item
« Reply #4 on: May 11, 2006, 07:15:05 pm »
There is already a post about this HERE   8)

Offline Daethian

Re: 'Profile Image' item
« Reply #5 on: May 25, 2006, 01:01:12 pm »
Where are the flags stored at so that I can add or replace?

Offline tazpot

Re: 'Profile Image' item
« Reply #6 on: May 25, 2006, 05:25:12 pm »
I think they are at     smf/sources/shop/flag_images  8)

Offline Daethian

Re: 'Profile Image' item
« Reply #7 on: May 25, 2006, 11:03:54 pm »
Yup that's where they are! Thank you :D

Offline Daethian

Re: 'Profile Image' item
« Reply #8 on: May 26, 2006, 12:30:19 pm »
I can't add or delete from that folder.  Any time I try it fails and when I try to change the folder permissions I get this:

550 Could not change perms on flag_images: Bad file descriptor


If I want to create a new folder with my own images how do I edit the file to show my folder instead of the flag folder?

Offline Daniel15

Re: 'Profile Image' item
« Reply #9 on: May 26, 2006, 09:41:38 pm »
OK, Try to change the permissions via cPanel.

Failing that, create a file called 'chmod.php'. Put this code in it:
Code: [Select]
<?php
chmod
("Sources/shop/flag_images""0777");
?>

and then run it. I was experiencing this problem on a website I was working on (A demo site - www.examples.cwhnetworks.com) and I found that if the folder 'owner' is set to Apache, and the permissions aren't set to 0777, you'll get the "Bad file descriptor" error.

Please tell me if you are still encountering problems with it :)

Offline Vinspire

Re: 'Profile Image' item
« Reply #10 on: May 28, 2006, 03:01:04 pm »
Can only display flag in the profile image ?

Offline elise

Re: 'Profile Image' item
« Reply #11 on: May 30, 2006, 06:02:50 am »
Would there be any way to do something similar to this but instead of buying a profile image and getting all of them, then choosing one to display like it is now... would it be possible to have to buy each individual graphic item and display all of them next to the post? More like how XMB does it?

For example: http://www.disastermb.org/viewthread.php?tid=18577 Look how under the avatar the poster has multiple images under shop items... would it be possible to do something like that for SMF?

Offline Daethian

Re: 'Profile Image' item
« Reply #12 on: June 01, 2006, 10:38:02 am »
daniel the cpanel was no go so I will try this.

I attempted to create a new folder with my new items in it.  Then edit the file to point to that folder.  It seemed to work at first but not it's not.  So I've done something wrong there.  Ideally I would like to have SEVERAL folders so I could sort my icons by category and the users could find them quickly.  Is that possible?

Offline Daethian

Re: 'Profile Image' item
« Reply #13 on: June 01, 2006, 10:45:08 am »
No go on the chmod.php file ... it gives me a 403 permission denied error.  I set the chmod.php permissions to 777.   Any other ideas?

Offline Daethian

Re: 'Profile Image' item
« Reply #14 on: June 01, 2006, 10:45:38 am »
BTW.. I had this SAME problem with my smilie directories.  They won't let me write to the default folder or change their permissions.