Skip to Content Skip to Menu

Profile and Canvas Pictures

  • MAYASIMA
  • MAYASIMA
  • OFFLINE
  • Posts: 183
  • Thanks: 22
  • Karma: 5
9 years 6 months ago #263463 by MAYASIMA
Profile and Canvas Pictures was created by MAYASIMA
  1. Is it possible to change the configuration of the location where the individual user uploads his/her profile picture and canvas? And if not, I will have to hack one of the files because it is kind of important for a project I am doing. Can you tell me the files I will need to change?
  2. Also I know it is possible to change the gallery folder location of the canvas gallery, is this also possible for the avatars/profile pictures? And if not, can you please let me know which files to modify to make this work for me?

Thanks,

Sima

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 6 months ago #263465 by krileon
Replied by krileon on topic Profile and Canvas Pictures

Is it possible to change the configuration of the location where the individual user uploads his/her profile picture and canvas? And if not, I will have to hack one of the files because it is kind of important for a project I am doing. Can you tell me the files I will need to change?

Location where? A different page or just move it to a different tab? You can move it to a different tab then substitute the canvas field into the correct tab using a Custom HTML field so you can have edit and profile display on 2 different tabs. If you mean on a separate page then you'd need to implement one.

Also I know it is possible to change the gallery folder location of the canvas gallery, is this also possible for the avatars/profile pictures? And if not, can you please let me know which files to modify to make this work for me?

No you can't change them. I really don't want to even suggest their path construction location because it basically means "everywhere". There's multiple locations the path is hardcoded. Changing it means hacking the entire core, which we do not support and can not help you with. At any rate the majority of the pathing is done in the files at the following location.

components/com_comprofiler/plugin/user/plug_cbgallery/
components/com_comprofiler/plugin/user/plug_cbcore/

You will lose all your changes every time you upgrade CB though, which is going to be an absolute nightmare to maintain. Eventually we'll probably have the path as a parameter and possibly even support external storage (e.g. we've had some requests regarding amazon storage). I've added a feature ticket for this so it's not forgotten.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • MAYASIMA
  • MAYASIMA
  • OFFLINE
  • Posts: 183
  • Thanks: 22
  • Karma: 5
9 years 6 months ago #263467 by MAYASIMA
Replied by MAYASIMA on topic Profile and Canvas Pictures

Location where? A different page or just move it to a different tab? You can move it to a different tab then substitute the canvas field into the correct tab using a Custom HTML field so you can have edit and profile display on 2 different tabs. If you mean on a separate page then you'd need to implement one.

Sorry, I wasn't clear. I meant the configuration settings as to the path were the actual physical image file gets uploaded.

No you can't change them. I really don't want to even suggest their path construction location because it basically means "everywhere". There's multiple locations the path is hardcoded. Changing it means hacking the entire core, which we do not support and can not help you with. At any rate the majority of the pathing is done in the files at the following location.

components/com_comprofiler/plugin/user/plug_cbgallery/
components/com_comprofiler/plugin/user/plug_cbcore/

You will lose all your changes every time you upgrade CB though, which is going to be an absolute nightmare to maintain. Eventually we'll probably have the path as a parameter and possibly even support external storage (e.g. we've had some requests regarding amazon storage). I've added a feature ticket for this so it's not forgotten.

Ok, thanks. I'll see what I will do.
Just as additional feedback and in regards to future CB versions. Yes please, add path parameters and multiple external storage options (not just amazon), there is big demand for this and right now we have to do all types of workarounds that are not ideal. It is critical for scalability and performance.

Please Log in or Create an account to join the conversation.

  • codesigns
  • codesigns
  • OFFLINE
  • Posts: 6
  • Thanks: 0
  • Karma: 0
9 years 6 months ago #263506 by codesigns
Replied by codesigns on topic Profile and Canvas Pictures
I too feel the ability to change the upload dir should be an integral part of cbgallery/cbcore and I've been racking my brain trying to figure out a workaround without modifying any core code.

I myself would also like the ability to select a profile and canvas image from images within a users gallery, similar to facebook, rather than having to upload the same image twice or selecting it from a standard shared directory full of teddy bears and elephants. I love cb but this standard shared galley is the most useless feature I have seen.

I have tried using the [user_id] substitution in the path params, but the substitutions coding does not appear to be incorporated into the param values.

/images/comprofiler/plug_cbgallery/[user_id]/photos - does not work
/images/comprofiler/plug_cbgallery/101/photos - does appear to work, but images only appears with image title in the preview images.

I think adding the substitution coding to the param values would be a good, quick workaround to allow users to select images they have already uploaded across all folders within their gallery, but for some reason the images only appear to load as placeholders. When navigating to the directory and downloading a specific image via ftp images load fine on pc. I can only assume this is permission related as viewing the image via contextual menu in browser gives an ERROR 403, but nothing seems to be out of the norm, all folders leading to gallery images are 755 and images in the users dir are 644. I've even tried setting all images to 755 and 777 and they still don't load properly and I still get an ERROR 403.

Any help on this matter would be greatly appreciated as this ability will be crucial to my site and users.

Thanks
Ryan

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
9 years 6 months ago #263553 by krileon
Replied by krileon on topic Profile and Canvas Pictures
The paths do not support substitutions. It's the same issue as above. We'd have to rewrite all of the pathing code. I've a feature ticket to implement pathing parameters as well as external storage, but that won't be implemented for quite some time. Likely won't be implemented until we refactor the field code as of right now it's all still pretty legacy and piling legacy onto legacy is not ideal (we're already having problems with this now; see cb.core.php.. it's loaded with duplicate code due to these issues). Once we rewrite the field code we can look into this further. We also need to write a universal file handling API to support external storage.

I understand your needs, but it is just not as simple as you want it to be. It requires massive complete rewrites. Supporting substitutions in file paths could prove extremely dangerous and prone to abuse so I'm not keen on doing that, but will look into a more secure way when we refactor the fields. There's no workaround for this other than messing around with the core code, which we can not help you with as we do not support core edits.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum