Extending funtionality of dmSecUI_UserCreateEdit.cfm

1 view
Skip to first unread message

Beenish

unread,
Jan 19, 2006, 12:39:10 AM1/19/06
to farcry-dev
Hi,

I'm still pretty new to FarCry so please forgive my lack of
understanding.

I wanted to extend the Create/Edit User section in the Admin under the
Security Tab to include extra fields such as "EmailAddress" which would
update dmProfile. I want to do this without having to change the core
code which would affect other sites.

Would I be right in changing
"farcry_core/tags/security/ui/dmSecUI_UserCreateEdit.cfm" or is there a
better way?

I know that if I wanted to redo the login page I would just do a copy
and paste to [site_name]/customadmin/login/ and make any changes to the
new file but this redirect is controlled by
farcry_core/admin/login.cfm. That part makes sense to me, its this next
part that doesn't. Now, so that I don't have to change the core file
dmSecUI_UserCreateEdit.cfm, I'm confused as to where under my site I
would copy this to and how I would get it to look at this file rather
then the one under farcry_core.. Again without making any changes to
the core code (if possible).

I hope I'm making sense. Any help would be much appreciated.
Thanks

Beenish

Shib71

unread,
Jan 19, 2006, 1:14:49 AM1/19/06
to farcr...@googlegroups.com
G'day Beenish

  1. Go to packages/types in the farcry_core directory, and copy dmProfile.cfc and _dmProfile directory to the same directory in your application directory.
  2. Change the cfc so that it extends the origonal file - extends="farcry.farcry_core.packages.dmProfile" - instead of types .
  3. Add the attribute bCustomType=1 to the component tag as well.
  4. Take out all of the properties, and put in any EXTRA ones you want.
  5. Take out all the methods except edit.
  6. Go into farcry admin->COAPI->types
  7. You should see an "error" saying that a property doesn't exist. Choose deploy from the drop-down list, and go. You'll need to do this for each property you've added.
  8. Go into the copy of _dmProfile you made, and delete all the files except edit.cfm.
  9. Open that file (edit.cfm). Change the form so that it includes fields for editing the properties you added.
  10. At the top where the form is being processed and the contents of stProperties are being set, add code that adds your properties from form as well.

Your user profiles now have the extra editable properties.
If you also want users to be able to edit these properties through "Edit my Profile" you'll have to do some digging yourself, as I haven't done that.

Cheers
Blair

Geoff Bowers

unread,
Jan 19, 2006, 2:45:22 AM1/19/06
to farcr...@googlegroups.com
Beenish wrote:

>Would I be right in changing
>"farcry_core/tags/security/ui/dmSecUI_UserCreateEdit.cfm" or is there a
>better way?
>
>

The best approach to changing these interfaces would be to write your
own under ../projectname/customadmin and use the customadmin.xml to hide
the old interface and present links to your interface instead.

Info on customadmin.xml here:
http://bugs.farcrycms.org:8080/confluence/display/FCDEV30/Custom+Admin

Hope that helps,

-- geoff
http://www.daemon.com.au/
--
Message protected by MailGuard: e-mail anti-virus, anti-spam and content filtering.
http://www.mailguard.com.au/mg


Beenish

unread,
Jan 19, 2006, 9:18:02 PM1/19/06
to farcry-dev
Thanx. Thats given me a clearer idea on what to do.

One more newbie question as a follow on. I've set up the
Customadmin.xml file to include

<section id="security" mergetype="merge"
permission="MainNavSecurityTab"
label="application.adminBundle[session.dmProfile.locale].Security">
<subsection id="users" mergetype="merge"
label="application.adminBundle[session.dmProfile.locale].Usermanagement"
labelType="evaluate" content="inc/content_overview.html">
<menu id="secusers"
label="application.adminBundle[session.dmProfile.locale].Users"
mergetype="merge" >
<menuitem id="usersearch"
label="application.adminBundle[session.dmProfile.locale].SearchForUser"
labelType="evaluate"
link="/farcry/admin/customadmin.cfm?module=ctSecurity/UserSearch.cfm"
/>
<menuitem id="usercreate"
label="application.adminBundle[session.dmProfile.locale].CreateAUser"
labelType="evaluate"
link="/farcry/admin/customadmin.cfm?module=ctSecurity/UserCreateEdit.cfm"
/>
</menu>
</subsection>
</section>

I've set up 2 files called UserSearch.cfm and UserCreateEdit.cfm under
customadmin/ctSecurity just by copying and pasting
dmSecUI_UserSearch.cfm and dmSecUI_UserCreateEdit.cfm. But when I click
through to these new pages I'm not getting the same look and feel in
the content area as the rest of the admin. You mentioned once before
that I should use the typeadmin tag but in this case I don't know where
I should use it to have it display properly.

Is this even the right way to do it or should I be creating a
ctSecurity.cfc for it under /projectname/pacakges/types/ and then
directing it to the right file (under packages/types/ctSecurity/) from
there?
I'm still trying to get my head around where I'm supposed to put
certain things.

Thanks

Beenish

Shib71

unread,
Jan 19, 2006, 9:52:23 PM1/19/06
to farcr...@googlegroups.com
My impression of the security packages is that they aren't designed to be extended or modified.

Blair
Reply all
Reply to author
Forward
0 new messages