Add cover to profile

Before starting to develop a plugin, I'd like to make sure this has not been done yet. I'd like to have users add cover photo's on top of profile pages

If is has not been done yet, I'd like to have some starting help. It should work with profile manager. Should I register a page handler to the orignal profile and add the ability to upload files ?

How to best scale the uploaded image ?

  • It has not been done yet. It is quite complex, you need to make an action to handle the file and resize it there. I've seem some plugins that handle all that in actions. Take a look at the 'files' plugin action, see how it handles images.

    Then you need to add a form to upload a cover to the profile.

    Rodolfo Hernandez

    Arvixe/Elgg Community Liaison

  • are you talking about adding an image to the header background......kinda like the facebook timeline?

  • @rjcalifornia, I will take a look at files and avatar since it also scales photos.

    @costakisc. Yes, something like the facebook timeline.

  • i was thinking of doing something like that in custom profile, but havent decided yet.  take a look at easy theme, its set up just like that but as a theme not controlled by the user.  it actually doesnt look that hard.

  • look at custom style adding the image, then you will just have to figure out the picture scaling part.  custom style has an option to for users to add background images but doesnt scale them.  the code should give you a head start on adding images.  

  • It is a bit complicated - you need to get a hang on uploading and cropping. You will need some kind of cropping form (like avatar cropping) to enable users to crop in the right aspect ratio, otherwise users need to premake cover images in the exact right size before uploading.  - did this cover image thing for a site I built some time ago - can't share the code though, it belongs to the site owner :(

     

  • @Slyhne I've seen your resizing in your market plugin. I think that you only either need to resize it via actions, or may be you could just use html auto width, fixed width. It resizes automatically and you don't need to worry about the aspect ratio.

    Rodolfo Hernandez

    Arvixe/Elgg Community Liaison

  • @rjcalifornia

    I believe you would need something a bit more advanced than that from the market plugin. You could let people upload a 4:3 photo and by css make sure only the top of was shown. Your load times will suffer, since the whole image is loaded.

    when I did this I let people upload any picture, then crop a section that fits (aspect wise) - got some pretty good results. See screenshots below:

    Profile

    Upload

    Crop

     

     

  • Hey, don’t reinvent the wheel! I think what you need is this example just like facebook timeline  if that is true, then you need to integrate  Wordpress and Elgg so that when a user has signed in or logged in on your Elgg site, the top profile picture can be uploaded on the users profile. Why use this method? The wordpress will maintain its own user’s database, and Elgg will maintain its own database. When users are accessing their profiles, they will only hit the Wordpress database and when they are on Elgg sites pages and other Elgg contexts, Your users will be only be loading Elgg databases. This way, the speed won’t be an issue.