Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
draxx
Involved
Involved



Joined: Nov 19, 2003
Posts: 282

PostPosted: Fri Sep 20, 2013 1:55 pm Reply with quote

I'm really confused about this. If i want to take a facebook picture and copy it to my server and then make it a users avatar which field do I use?
 
View user's profile Send private message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Fri Sep 20, 2013 6:48 pm Reply with quote

Did you mean in RavenNuke?

this is the store place for avatars

modules/Forums/images/avatars/gallery/
 
View user's profile Send private message
draxx







PostPosted: Fri Sep 20, 2013 8:54 pm Reply with quote

Thanks hicux - but I fear I was not very clear with my question.

Your reply contains half of the answer and that is where the picture gets copied onto the server - but which data table/field to I record it in? Do I record it in the forums datatable or the user account avatar data field.
 
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1774

PostPosted: Sat Sep 21, 2013 2:52 am Reply with quote

The Forums module is a bridge and the upload-script runs in the file: modules/iForums/includes/usercp_avatar.php. While uploading the file, the new avatar is storing in the _users table from the Your_Account module with a number for the avatar type:

table: nuke_users
------ field: user_avatar
------ field: user_avatar_type (1, 2, 3)

uploaded avatar (type 1): is using the avatar path from the board-config section + a random generated name for the uploaded filename
remote avatar (type 2): is using the full posted path
gallery avatar (type 3): is using the gallery path from the board-config section + the name of the gallery avatar file


I would suggest you to test it, what could be the best solution for you. Users with no avatar should get the gallery/blank.gif as path/filename and type 3. But i would also re-think the idea with the upload of the fb-profile-pic because the pictures could have different values for width and height. Facebook is not cutting the uploaded images from different resolutions. They are displaying only a cutted frame. Also make sure that you are not using chmod 777 for the upload directory on your server - that could be a highly security risk because every one can write in this directory . Try instead chmod 755.

Please note: The posted avatar-path from hicux is only the default setting and you can change it in the board-config section every time. Here the is best choice to query also the field avatar_path from the table _bbconfig. So you make sure to use every time the correct path and you can change it later without a hit.

_________________
Github: RavenNuke 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Sep 21, 2013 9:38 am Reply with quote

Whether 777 or 755 will depend upon how PHP is set up to run on the server. If its run as an embedded Apache module, then the directory will have to be 777 in order for Apache to write to it. If PHP is running in CGI mode or using some form of SuExec, then 755 is what will most likely be needed. Bottom line really is determine what user context the PHP executable will be run as and what permissions that user has within your web context.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
draxx







PostPosted: Wed Oct 23, 2013 9:21 pm Reply with quote

Thank you all for your information. It was very very useful to bring a resolution - Especially Neralex's detailed information.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©