Not Allow Photo Change in Profile Edit

Post

Posted
Rating:
#6678 (In Topic #1528)
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!

Post

Posted
Rating:
#6682
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.

Post

Posted
Rating:
#6683
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.

Post

Posted
Rating:
#6689
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.
 

Post

Posted
Rating:
#6690
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?

Post

Posted
Rating:
#6691
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!
0 guests and 0 members have recently viewed this.