CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Joomla Front End Profiles - view & edit control
Pages: [1]

Author Topic: Joomla Front End Profiles - view & edit control  (Read 1179 times)

rogerco

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 5
Joomla Front End Profiles - view & edit control
August 10, 2009, 06:59:28 am
Ok I have packaged up the modified files and uploaded them to the documentation wiki here:

http://wiki.civicrm.org/confluence/pages/viewpage.action?pageId=20643843 under Third Party Modules.

There are also some screenshots showing the parameter settings.

Obviously I produced this for my own requirements - a slightly more generalised use might want to slice things a bit differently in the way Joomla user groups and error messages are assigned.

To try this out simply install the package as a a standard Joomla component. It will overwrite the following files: (assume joonla_root prefix)

components/com_civicrm/civicrm.php   fairly substantial changes
components/com_civicrm/views/Profiles/tmpl/default.xml   xml file changes simply add parameters
components/com_civicrm/views/Profiles/tmpl/edit.xml
components/com_civicrm/views/Profiles/tmpl/search.xml
components/com_civicrm/views/Profiles/tmpl/view.xml
administrator/components/com_civicrm/config.xml   (new file) adds the component level parameters
administrator/components/com_civicrm/toolbar.civicrm.html.php   minor chnage to add the toolbar button
administrator/components/com_civicrm/civicrm/CRM/Profile/Form/Edit.php   CRM4668 replaced with Joomla specific code
administrator/components/com_civicrm/civicrm/CRM/Profile/Selector/Listing.php   CRM4668 replaced with Joomla specific code

also the install files get overwritten, but Civi should still uninstall ok.

administrator/components/com_civicrm/install.php
administrator/components/com_civicrm/uninstall.civicrm.php   (version from Civi 2.2.7)

The changes are all commented at least to the extent that you can see where they are, even if you have to work out what they are doing  ;)

There is an UNDO package which if you install as if it was a component should revert things back to 2.2.7 state - but please try this on a not live site before using in anger (or you may get angry!)

If you try it please let me know if you have any suggestions, comments or problems.

If the CiviCRM team get a chance to look at the changes you could consider the implications of folding them in to the core. I find this a useful bit of functionality which also addresses a security and privacy concern, but I fear that the changes in Edit.php and Listing.php might not be good for Drupal (although presumably you could detect that we are in a Joomla environment and wrap an if (joomla) {} around them.)

Cheers
RogerCO

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Joomla Front End Profiles - view & edit control
August 10, 2009, 01:09:49 pm

thanx for the contribution and the detailed wiki page. we'll take a look at incorporating some of the ideas in a future version of civicrm

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

rogerco

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 5
Re: Joomla Front End Profiles - view & edit control
August 13, 2009, 05:38:36 am
Modified version to work with v2.2.8 and also now allows smart groups to be used to control access posted in wiki.

Note that the use of Civi groups to control access only works for menu links - direct links passing in profile id can bypass this check (although they are still caught by the Joomla user level check)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Joomla Front End Profiles - view & edit control

This forum was archived on 2017-11-26.