Jump to content

Training Notes Field [solved]


Aaron

Recommended Posts

<?php
if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN))
{
	echo '<li><a href="'.fileurl('/admin').'" target="_blank">Admin Center</a></li>';
}
?>

Change ("/admin") to the tpl file you want to lock to non-admin.

Change "Admin Center" to the title of the page your are linking to.

Link to comment
Share on other sites

I've made the custom field, I want only admins to be able to see it but it still shows up in the edit user profile page in the pilot center, I dont want it to show up ther so what do I do, I think it's something in here I need to change: /core/common/SettingsData.class.php

Link to comment
Share on other sites

In the /admin/index.php/settings/customfields you will see two drop-down boxes in there when adding a custom field.

Show in User Profile?

Show During Registration?

Answer "Yes" if you want those fields shown on those pages.

Answer "No" if you do not want those fields shown on those pages.

Link to comment
Share on other sites

Found this in the settingsdata, notice the section in comments, I tryed using that but it kept giving syntax error, I put a 0 on the end of the public and showinregister, so that when the numbers in there are equal to or greater than 0 I want it to show up in profile, the training notes I already put to -1 for both. Any ideas?

	public static function getField($fieldid)
{
	$fieldid = intval($fieldid);
	return DB::get_row("SELECT * FROM '.TABLE_PREFIX.'customfields WHERE fieldid='.$fieldid'");
}


  /* Edit a custom field to be used in a profile

  $data= array('fieldid'=>,
				 'title'=>,
				 'value'=>,
				 'type'=>,
                                        'public'=>,
				 'showinregistration'=>);
 */

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...