SMF Shop
SMFShop => Completed Additions => Items => Topic started 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
-
: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
-
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)
-
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.
-
There is already a post about this HERE (http://www.daniel15.com/forum/index.php?topic=101.15) 8)
-
Where are the flags stored at so that I can add or replace?
-
I think they are at smf/sources/shop/flag_images 8)
-
Yup that's where they are! Thank you :D
-
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?
-
OK, Try to change the permissions via cPanel.
Failing that, create a file called 'chmod.php'. Put this code in it:
<?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 :)
-
Can only display flag in the profile image ?
-
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?
-
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?
-
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?
-
BTW.. I had this SAME problem with my smilie directories. They won't let me write to the default folder or change their permissions.
-
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.
-
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).
-
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 :(
-
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 ;)
-
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.
-
Here's a screen shot:
www.foreverpurple.com/profileimage.jpg
-
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? :)
-
This is not working for me in 2.2 now. Any ideas?
-
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!
-
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.
-
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?
-
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?
-
Sorry, the download moved (a while ago) to http://www.dansoftaustralia.net/downloads/file/21/'Profile-Image'-item.html
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 ;)
-
How can I remove images from next to the post, for example, I got three flags and want to go down to one?
-
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?
-
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..
-
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
-
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
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 :)
-
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?
-
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?
-
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.
-
tyvm daniel ! ya da best! ;D
-
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
-
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*
-
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. :)
-
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
-
This package is not compatible with smf 2.0 beta 4. Can you please fix it ?
-
anyone ?
-
I cant download the "profile Image" file. The links has errors... :'(
-
update for smf 2.0 rc2? :-)
-
6.5 month bump ;)
-
Can't install this mod to SMF 2.0. Please update it :)
(http://img16.imageshack.us/img16/9127/profileimage.png)
-
se ve muy interesante este tema :D
-
Fatal error: Call to undefined function db_query() in /home/.../webboard/installScript.php on line 9
Fatal error: Call to undefined function db_query() in /home/.../webboard/Sources/shop/items/Flag.php on line 78
Sorry. How to fix this. >:(
-
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?