SMF Shop

SMFShop => Completed Additions => Items => Topic started by: Daniel15 on April 23, 2006, 11:45:57 am

Title: 'Profile Image' item
Post by: Daniel15 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 (http://www.dansoftaustralia.net/downloads/file/21/'Profile-Image'-item.html) 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_flag, MYSQL_ASSOC);
           
            if($row_flag['shop_Flag'] !== "") {
                echo "Flag: <img src='{$boardurl}/Sources/shop/flag_images/{$row_flag['shop_Flag']}'><br>";
            }
            //END SMFShop Flag Item
Title: Re: 'Profile Image' item
Post by: tazpot 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
Title: Re: 'Profile Image' item
Post by: Daniel15 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)
Title: Re: 'Profile Image' item
Post by: TechnoDragon 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.
Title: Re: 'Profile Image' item
Post by: tazpot on May 11, 2006, 07:15:05 pm
There is already a post about this HERE (http://www.daniel15.com/forum/index.php?topic=101.15)   8)
Title: Re: 'Profile Image' item
Post by: Daethian on May 25, 2006, 01:01:12 pm
Where are the flags stored at so that I can add or replace?
Title: Re: 'Profile Image' item
Post by: tazpot on May 25, 2006, 05:25:12 pm
I think they are at     smf/sources/shop/flag_images  8)
Title: Re: 'Profile Image' item
Post by: Daethian on May 25, 2006, 11:03:54 pm
Yup that's where they are! Thank you :D
Title: Re: 'Profile Image' item
Post by: Daethian 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?
Title: Re: 'Profile Image' item
Post by: Daniel15 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 :)
Title: Re: 'Profile Image' item
Post by: Vinspire on May 28, 2006, 03:01:04 pm
Can only display flag in the profile image ?
Title: Re: 'Profile Image' item
Post by: elise 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?
Title: Re: 'Profile Image' item
Post by: Daethian 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?
Title: Re: 'Profile Image' item
Post by: Daethian 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?
Title: Re: 'Profile Image' item
Post by: Daethian 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.
Title: Re: 'Profile Image' item
Post by: Daethian on June 12, 2006, 05:46:38 pm
I managed to get past the permissions problem.

I have another problem.  When I edit/delete the Profile Image item it is pointing to:
 Images are stored in Sources/shop/item_images/. Feel free to add more images!

Instead of flag_images

Now I can't figure out how to change it back!!

I've uninstalled and reinstalled the package to no avail.   I'm so close to being able to use this.
Title: Re: 'Profile Image' item
Post by: Daniel15 on June 16, 2006, 09:27:20 pm
Quote
I have another problem.  When I edit/delete the Profile Image item it is pointing to:
Images are stored in Sources/shop/item_images/. Feel free to add more images!
That's only for the image displayed next to the item in the Shop 'Buy Stuff' listing. That doesn't actually refer to the profile images (which are stored in flag_images).
Title: Re: 'Profile Image' item
Post by: Daethian on June 20, 2006, 04:48:14 am
But how do I fix it so it stops looking in the wrong folder for the images?  It's not looking in the flag_images anymore it's looking at the shop item icons.  I must have done this but I don't know how to undo it now :(
Title: Re: 'Profile Image' item
Post by: Daniel15 on June 23, 2006, 10:15:53 pm
Hmmm... Very interesting!

Have you tried uninstalling and reinstalling the item?
Also, are you sure it's looking in the wrong folder? You could have just uploaded the wrong images ;)
Title: Re: 'Profile Image' item
Post by: MyFSI on June 26, 2006, 07:48:53 pm
Hey,

This is a great mod in general and i really like it but there is one problem and it is on the performance side.
In your code, you're adding 2 sql queries for each post, one for the flag and the other for the credits, which is really a lot. just look at page 1 of this topic and you'll see that there are 57 queries being made where 30 of them are for the flags and credits.
Don't get me wrong, i really like this mod, that's why i love to see it improve more.

Thank You.
Title: Re: 'Profile Image' item
Post by: Daethian on July 10, 2006, 09:05:15 am
Here's a screen shot:

www.foreverpurple.com/profileimage.jpg
Title: Re: 'Profile Image' item
Post by: nicole on July 18, 2006, 11:29:31 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?

yea, is this possible? :)
Title: Re: 'Profile Image' item
Post by: the fat boy on August 01, 2006, 11:58:01 pm
This is not working for me in 2.2 now.  Any ideas?
Title: Re: 'Profile Image' item
Post by: LisaTFG on August 10, 2006, 09:34:18 pm
Can anyone tell me how I can move the flag image from above the avatars to below them?

Also where do I rename this if I don't want flags?

TIA!
Title: Re: 'Profile Image' item
Post by: JRSofty on August 10, 2006, 10:07:02 pm
I believe the file you are looking for is the Display.template.php file.

I would suggest running a search in your text editor for "Flag:" without the quotes and that should take you to where the code sits. Then just move it to where you want and change the word Flag to something else.
Title: Re: 'Profile Image' item
Post by: littleone on January 07, 2007, 05:00:54 pm
Say I want to modify this to display more than one image.  What do i do?  Do I just remove the Limit 1? or do have to set it at like Limit 10 or whatever?

How would you go about removing an image once purchased and placed next to their name?  In the Database? and if so where in the DB?
Title: Re: 'Profile Image' item
Post by: perplexed on February 14, 2007, 09:36:13 pm
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 (http://www.daniel15.com/index.php?ind=downloads&op=section_view&idev=2) of this site. Have fun!


Hi Daniel,

I clicked on the above downloads link and just get your news front page. :( Where has the download page gone?
Title: Re: 'Profile Image' item
Post by: Daniel15 on February 17, 2007, 09:31:51 am
Sorry, the download moved (a while ago) to http://www.dansoftaustralia.net/downloads/file/21/'Profile-Image'-item.html

Quote
Say I want to modify this to display more than one image.  What do i do?  Do I just remove the Limit 1? or do have to set it at like Limit 10 or whatever?
This would require quite a bit of code editing ;)
Title: Re: 'Profile Image' item
Post by: GhostWriter on March 19, 2007, 05:13:50 am
How can I remove images from next to the post, for example, I got three flags and want to go down to one?
Title: Re: 'Profile Image' item
Post by: Daniel15 on March 30, 2007, 07:27:17 pm
Quote
for example, I got three flags and want to go down to one?
It sounds like the code has been added 3 times. Open Themes/default/Display.template.php, and find the flag code. If it is duplicated, remove the duplicates.
EDIT: Or have you modified the item to allow multiple images?
Title: Re: 'Profile Image' item
Post by: GhostWriter on March 30, 2007, 09:12:28 pm
No modifications, if I even tried to do that with my lack of PHP knowledge I would probably make it more then duplicate....Lol...

Thanks for the help Daniel15......I will look into the display.template.php...Hopefully that will work....

Thanks again..
Title: Re: 'Profile Image' item
Post by: bigrossco on April 22, 2007, 10:56:00 pm
how can i modify this item to send the image to someone else? i.e. I would select the flag and then put in username and it would then show it on that users profile, it should also show more then one flag on their profile!

I am going ot change it from flags to other images and just wondering how to do this :)

Thanks
Title: Re: 'Profile Image' item
Post by: perplexed on April 22, 2007, 11:39:40 pm
how can i modify this item to send the image to someone else? i.e. I would select the flag and then put in username and it would then show it on that users profile, it should also show more then one flag on their profile!

I am going ot change it from flags to other images and just wondering how to do this :)

Thanks

I suppose it would work like the other items in that, you purchase the item you want to send to someone, and then they 'use' it, after which it will display in their profile or whatever it is meant to do.

As for your second question, Daniel said this on page 2

Sorry, the download moved (a while ago) to http://www.dansoftaustralia.net/downloads/file/21/'Profile-Image'-item.html

Quote
Say I want to modify this to display more than one image.  What do i do?  Do I just remove the Limit 1? or do have to set it at like Limit 10 or whatever?
This would require quite a bit of code editing ;)


there is another item that is being discussed here concerning 'gifts' with multiple image displays, do a search and you will find it.  I will post the link here if I get time to look for it :)
Title: Re: 'Profile Image' item
Post by: bigrossco on April 23, 2007, 04:11:33 am
yes ive seen these posts but nothing has seem to be done about it, your suggestion re sending the image the only prob is that is when you would send it they would be able to select in this instant any FLAG they wish where i want to send them a flag i pick, surly from what i know a box could be added before or after the flag sallection, where you enter their username, and you would then select the flag then click on submit or what ever its called which would then inturn update the database and added it to that user?
Title: Re: 'Profile Image' item
Post by: preddy25 on May 04, 2007, 07:43:03 pm
i got a question , after using the profile item , it shows ...but what should the user do if i wanna remove it from the profile post? i dont see any options other than admin going to database to remove it? its not in the inventory anymore?
Title: Re: 'Profile Image' item
Post by: Daniel15 on May 04, 2007, 08:57:11 pm
i got a question , after using the profile item , it shows ...but what should the user do if i wanna remove it from the profile post? i dont see any options other than admin going to database to remove it? its not in the inventory anymore?

If you want the user to be able to remove their image, please install and add this item: http://www.dansoftaustralia.net/smfshop_wiki/Items/Remove_Profile_Image :). It will add a new item to your shop. A user can use this item to reset their profile image.
Title: Re: 'Profile Image' item
Post by: preddy25 on May 05, 2007, 10:06:12 am
tyvm daniel ! ya da best! ;D
Title: Re: 'Profile Image' item
Post by: puma on May 19, 2007, 08:09:28 pm
Hi Daniel
i like an item look like Profile Image but it will show all items which i buy it.
and it will be show under signature, and in Profile.
Thanks u
Title: Re: 'Profile Image' item
Post by: perplexed on June 05, 2007, 04:08:11 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?

yea, is this possible? :)

Is this how this item works or is this different?

Is it possible to have a hover over tooltip display thingy so that when you hold your cursor over the image it tells you what it is.  eg if it was a flag it would say 'Australian Flag' when you hovered on it.

Can I install this item multiple times for different groups of images?  (I'm sure I can but I dont feel very smart today)

And is there a way to set a limit for how many images a person can have on their posts?  Is that what the LIMIT 1 in the code is for?

thank again

*feeling dense today*
Title: Re: 'Profile Image' item
Post by: Celdric on July 14, 2007, 02:55:58 am
Hi.  :) For unknown reasons I cannot install the profile image item via package manager. I get always a modification parse error. When I install nonetheless, the uploaded files are empty.
Well, that's not big problem. I can upload the files manually and also add the code in display.template. Although I don't know how to add the required database fields manually.
Perhaps anyone could be so nice to post it here in a form that I could import via phpmyadmin?


Update: well, I guess the problem was Internet Explorer. Installing with Firefox worked fine. Problem solved. Thanks anyway for reading this post.  :)
Title: Re: 'Profile Image' item
Post by: lilgoldfish on December 02, 2007, 01:22:31 pm
anyone want to edit this file so that more than 1 image can be displayed at a time? im trying the best i can to edit it...but its so hard and i keep running into problems..sigh


~Edit~ ive made it so that you could have more than one image shown up at the same time....but it applies for all members...like this is f***ed


~Edit2~ is there anyway we could make it so that there would be two Flag.php files but just different names?

eg

flag.php

and

flag2.php


and in the two files, they have like the same codes...because i tried duplicating the flag.php and renaming one to flag2.php...and then when i uploaded the item, it would have an error saying that they cant identifiy which one is the flag file or w.e i really need this mod upgraded...pls and thanks
Title: Re: 'Profile Image' item
Post by: adicrst on October 15, 2008, 11:32:41 pm
This package is not compatible with smf 2.0 beta 4. Can you please fix it ?
Title: Re: 'Profile Image' item
Post by: adicrst on October 25, 2008, 08:11:05 pm
anyone ?
Title: Re: 'Profile Image' item
Post by: faldegort on March 15, 2009, 06:09:58 am
I cant download the "profile Image" file. The links has errors... :'(
Title: Re: 'Profile Image' item
Post by: steve51184 on February 08, 2010, 02:06:45 pm
update for smf 2.0 rc2? :-)
Title: Re: 'Profile Image' item
Post by: steve51184 on August 22, 2010, 07:57:36 am
6.5 month bump ;)
Title: Re: 'Profile Image' item
Post by: Calaquendi on June 28, 2011, 07:16:36 pm
Can't install this mod to SMF 2.0. Please update it :)

(http://img16.imageshack.us/img16/9127/profileimage.png)
Title: Re: 'Profile Image' item
Post by: daygo on August 09, 2011, 01:00:48 pm
se ve muy interesante este tema  :D
Title: Re: 'Profile Image' item
Post by: jomyza on April 24, 2012, 08:12:02 pm
Code: [Select]
Fatal error: Call to undefined function db_query() in /home/.../webboard/installScript.php on line 9
Code: [Select]
Fatal error: Call to undefined function db_query() in /home/.../webboard/Sources/shop/items/Flag.php on line 78
Sorry. How to fix this.  >:(
Title: Re: 'Profile Image' item
Post by: Raiel on March 07, 2016, 07:48:59 am
I wanted to download this is and see if I could edit it to run on my site but the link takes me to a 404 error. Is this still available somewhere?