Skip to Content Skip to Menu

Conditions plugin

  • p9939068
  • p9939068
  • OFFLINE
  • Posts: 186
  • Thanks: 0
  • Karma: 117
17 years 9 months ago #30608 by p9939068
Replied by p9939068 on topic Re:Conditions plugin
Attached to this post is an updated conditions plugin. A few changes:
- includes an installer file that will include the column conditionid if it doesnt exist in fields and field_values.
- modified the .xml and remove the uninstall queries (good idea if it's for upgrading)
- modified conditions.php so it works during registration without the need for hacking.

One problem about the plugin is that whenever the admin re-saves a cb field, all conditions in that field disappears. This can be pretty inconvenient in the case of a dropdown list, with different values appearing for different selection made in another dropdown list. The user will have to re-enter every conditionid in field_values all over again.

I managed to get around this with alot of CB core files hacks, but it'll be great if the changes are made in the next CB release. Basically what's causing this is whenever the admin re-saves a field, CB will totally remove the existing field, and then create a new one. Probably a better idea if a row update is done.

Regards, Mike

Attachment conditions-ff1272b73ac58f3580626875e3fcd9d1.zip not found



Post edited by: p9939068, at: 2007/02/06 06:33


Mike Feng
Creator of SIMGallery, SIMAnswers, and ParaInvite
www.simbunch.com
twitter.com/simbunch
Attachments:

Please Log in or Create an account to join the conversation.

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
17 years 9 months ago #30612 by mikko
Replied by mikko on topic Re:Conditions plugin
Karma for this!

You seem to have a version which loads the required javascripts at tab header instead of after all tabs through a hack. The plugin used to work like this, but some people (including me) did not like the extra tab created by the plugin.

I created a bug report about the field management. forge.joomla.org/sf/tracker/do/viewArtifact/projects.cb/tracker.bugs/artf7506?_message=1170744988318

mikko

Please Log in or Create an account to join the conversation.

  • p9939068
  • p9939068
  • OFFLINE
  • Posts: 186
  • Thanks: 0
  • Karma: 117
17 years 9 months ago #30613 by p9939068
Replied by p9939068 on topic Re:Conditions plugin
Oh i do end up with a tab when user's edit their profiles. What i did was place the tab as the first one, then write some neat instructions on how to edit their profiles, and name the tab "Editing your profile".

Well you get the idea ;)


Mike Feng
Creator of SIMGallery, SIMAnswers, and ParaInvite
www.simbunch.com
twitter.com/simbunch

Please Log in or Create an account to join the conversation.

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
17 years 9 months ago #30614 by mikko
Replied by mikko on topic Re:Conditions plugin
p9939068 wrote:

Oh i do end up with a tab when user's edit their profiles. What i did was place the tab as the first one, then write some neat instructions on how to edit their profiles, and name the tab "Editing your profile".


How did you get it to work in the first tab, because it really should no work at all if put in there. In registration this does not matter because all fields managed by CB are drawn before plugin.

But on edit this would mean that you are printing out javascript to manipulate fields before the fields are drawn. Since browser (at least my firefox) executes and renders the page as it gets the code, this would mean that the javascript which hides the fields and options cannot "see" the fields which come after it resulting in an error. How did you get around this?

mikko

Please Log in or Create an account to join the conversation.

  • p9939068
  • p9939068
  • OFFLINE
  • Posts: 186
  • Thanks: 0
  • Karma: 117
17 years 9 months ago #30615 by p9939068
Replied by p9939068 on topic Re:Conditions plugin
hmmm good point. well then, just show it as the last tab, and add some privacy and legal statement in it.


Mike Feng
Creator of SIMGallery, SIMAnswers, and ParaInvite
www.simbunch.com
twitter.com/simbunch

Please Log in or Create an account to join the conversation.

  • Raj
  • Raj
  • OFFLINE
  • Posts: 191
  • Thanks: 0
  • Karma: 30
17 years 9 months ago #30706 by Raj
Replied by Raj on topic Re:Conditions plugin
Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'plug_conditions_install' was given in /home/.babe/omni/MyOwnCharity.com/administrator/components/com_comprofiler/plugin.class.php on line 1452

Using PHP 4

Roger

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum