Showing one custom field while hiding another

Discussion forum for MOD Writers regarding MOD Development.
Locked
newbie_niles
Registered User
Posts: 26
Joined: Thu Dec 11, 2008 10:44 am

Showing one custom field while hiding another

Post by newbie_niles » Tue Mar 17, 2009 7:49 am

I currently use one custom field as an anti-spam measure and have configured the board to never ever show it anywhere to anyone, admins included, after the registration page.

However, I would like to use another custom field for board-related purposes and have its value displayed everywhere.

The problem is that I can't figure out how to accomplish this, since the only way to hide the anti-spam custom field was to disable the displaying of custom fields in general through the General/Load settings page in the ACP.

Is there any way to have one custom field visible to everyone and another custom field hidden from everyone at the same time?

newbie_niles
Registered User
Posts: 26
Joined: Thu Dec 11, 2008 10:44 am

Re: Showing one custom field while hiding another

Post by newbie_niles » Tue Mar 17, 2009 3:48 pm

Rephrased the question as I figured it out but came across another problem because of the solution to the first problem.

User avatar
MichaelTunnell
Registered User
Posts: 211
Joined: Fri Apr 29, 2005 9:46 pm
Location: don't rush me
Name: Michael Tunnell
Contact:

Re: Showing one custom field while hiding another

Post by MichaelTunnell » Wed Mar 18, 2009 6:11 am

you can choose to display certain fields or not inside each fields' custom permission settings...if i read your question let me know but I think that's what you are needing

hope this helps

newbie_niles
Registered User
Posts: 26
Joined: Thu Dec 11, 2008 10:44 am

Re: Showing one custom field while hiding another

Post by newbie_niles » Wed Mar 18, 2009 6:38 am

The problem is that the only setting which completely removes the custom field from view (untoggled "Display profile field") also removes it from the registration process, where it is needed for the sake of stopping spambots, even though I check the box that toggles whether it should be displayed during the registration process (Display at registration screen).

(I do this on the Custom Fields page under Users and Groups in the ACP.)

User avatar
MichaelTunnell
Registered User
Posts: 211
Joined: Fri Apr 29, 2005 9:46 pm
Location: don't rush me
Name: Michael Tunnell
Contact:

Re: Showing one custom field while hiding another

Post by MichaelTunnell » Wed Mar 18, 2009 8:45 pm

newbie_niles wrote:The problem is that the only setting which completely removes the custom field from view (untoggled "Display profile field") also removes it from the registration process, where it is needed for the sake of stopping spambots, even though I check the box that toggles whether it should be displayed during the registration process (Display at registration screen).

(I do this on the Custom Fields page under Users and Groups in the ACP.)
Miles you shouldn't uncheck the stuff to show you should make the custom fields that go in a particular order not show and then do the manual edits to show the ones that you want.

For example by default all the custom fields will be shown in the order to made them with the code

for viewtopic_body.html

Code: Select all

					<!-- BEGIN custom_fields -->
					<br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE}
					<!-- END custom_fields -->
replace that with code that will make those calls not be used (or just delete if you want)

code for removing the calls

Code: Select all

					<!-- BEGIN custom_fields -->
					<!-- <br /><b>{postrow.custom_fields.PROFILE_FIELD_NAME}:</b> {postrow.custom_fields.PROFILE_FIELD_VALUE} -->
					<!-- END custom_fields -->
Here is a link to where I describe how to use individual fields at a time so you can have full control where they display.

http://www.phpbb.com/community/viewtopi ... 5#p8968835

Locked

Return to “[3.0.x] MOD Writers Discussion”