Not Allow Photo Change in Profile Edit

Post

Posted
Rating:
#7643 (In Topic #2251)
Avatar
Standard member
starfish is in the usergroup ‘Fan in action’
I don't want a member to change their photo in Profile Edit (I created a php page in "Pages" where the member is charged points to make any photo changes).  In photo Profile Edit, I need to get rid of the Upload, URL, and the Save button (as seen below).

I also need to change the text, "You can upload a new photo below".

I thought I needed to look at /sources/hooks/systems/profiles_tabs_edit/photo.php  but I can't see what I need to change.  I also did not see a profiles_tab_edit folder in the sources_custom folder, to make those changes safely.

How do I edit this?

Thanks so much!

Online now: No Back to the top

Post

Posted
Rating:
#7650
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
If there's no hook directory under sources_custom you can always make it and it'll definitely be read.

In this case, I'd just edit the CNS_EDIT_PHOTO_TAB template though. EDIT: This is wrong, bear with me.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#7651
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
As well as editing that template, also edit CNS_MEMBER_PROFILE_EDIT to change:

Code

               {+START,IF,{TAB_SINGLE_FIELD}}
                  {TAB_FIELDS}
               {+END}
to:

Code

               {+START,IF,{TAB_SINGLE_FIELD}}
                  {+START,IF,{$NEQ,{TAB_CODE},photo}}
                     {TAB_FIELDS}
                  {+END}
               {+END}

because this template puts things together from individual data returned by the hook.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#7658
Avatar
Standard member
starfish is in the usergroup ‘Fan in action’
Thank you so much, Chris!

I'm sorry but I was not able to understand how to edit the CNS_EDIT_PHOTO_TAB.tpl

I then tried editing the /sources_custom/hooks/systems/profiles_tabs_edit/photo.php page again.  I was able to get rid of the two sections, however, the textboxes on the other tabs/pages were shortened (it changed the way the other pages were viewed).  Conclusion....that idea doesn't work.

I was also unable to find where I could edit the text.
 
Online now: No Back to the top

Post

Posted
Rating:
#7659
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Do you mean you don't know how to edit templates in general, or what to edit in that template?
There are lots of tutorials we have on template editing in general but basically under Style > Themes you'll find an edit templates link for each theme. To edit that template specifically, well you're probably removing some stuff, and I guess adding a link to your page?


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#7660
Avatar
Standard member
starfish is in the usergroup ‘Fan in action’
Hi Chris,

I meant I did not know what to edit in that page.  I am comfortable using common, basic php.  In fact, I have added more than 20 php pages to my site. 

I love the program!  It isn't the program; it is me.  I have difficulty understanding how to edit the pages the way the pages are set up.

In the meantime, I got rid of the photo tab and its contents by adding a page in: sources_custom/hooks/systems/profiles_tabs_edit/photo.php.

Thank you, Chris!
Online now: No Back to the top
1 guest and 0 members have just viewed this.
Back to Top