Can someone create or possibly point me in the direction for creating a photo field in the profile?
I'm creating an website for professionals in a particular industry and I would like to modify the profile to look like a business card type of thing. I would like to allow the person to upload a photo to be placed in their profile. Any ideas on how to go about doing this?
can't you use the avatar? I mean if people are willing to put their face in their profile...they can use the avatar-field for that purpose just as well...it's not like it's securely hidden in their profile or anything?
Kimmo Wrote:can't you use the avatar? I mean if people are willing to put their face in their profile...they can use the avatar-field for that purpose just as well...it's not like it's securely hidden in their profile or anything?
I anticipated a post or two along these lines.
I didn't want to use their avatar. Maybe they don't want to look at their own mug everytime they post.
Thanks for the suggestion, though.
I created a plugin like this for the next version of my website
http://www.msgweb.nl, you can find a preview
here. It's not fully automated though, the templates required are not included in the plugin. Tell me whether you are interested.
Juzzi, I'm absolutely interested.
Thanks!
Sorry I didn't reply, I've been busy setting up the next version of my website...
I'd like to make this plugin fully automatically, but as I said there will be some manual changes needed for now. Anyway, if you can code a bit, you should be able to use it on your forums. I attached the main plugin, and will list some other changes which will be needed here:
Make a file 'photo.php' in your main forums folder:
<?php
if(@mysql_connect("localhost", "root", "")){
mysql_select_db("forum");
$res = mysql_query("SELECT * FROM mybb_photos WHERE uid='".intval($_GET['uid'])."'") or die(mysql_error());
$photo = mysql_fetch_assoc($res);
if($photo['photo'])
{
$photo['photo'] = stripslashes($photo['photo']);
header("Content-Type: " . $photo['type']);
header("Content-Length: " . strlen($photo['photo']));
echo $photo['photo'];
}
mysql_close();
}
?>
You need to edit the usercpnav template to add a link 'edit photo' which links to usercp.php?action=photo
And you of course need to add a place on the profile, $photo will contain the photo data ('<img src=.....' etc), and $lang->photo_title 'photo of ....'.
Hope you can install it, otherwise just ask
Fantastico! Thanks, homie.
I'll let you know how it goes. I wish I had something to offer in return, in terms of modifications, but... I'm not as proficient in coding as you may be. I can tweak somethings here and there.
I modded the portal to serve as an article management system.
http://www.iprosnetwork.com/forums/articles.php That's about it.
Anyways, thanks again.
No problem, just tell me the results
Playing with it now...
stupid question #1... can you give me an idea of how the template should look for "edit photo"?
stupid question #2... any SQL queries need to be done? (i.e. creating mybb_photos table)
stupid question #3... any other files need to be changed?
... more stupid questions to come.
Thanks in advance.