Discussion:
[CalendarX-users] CX_props question for Plone 3.x
Keith Schonrock III
2008-09-18 20:25:09 UTC
Permalink
I am investigating moving to Plone 3.x from Plone 2.x and I noticed one
thing that changed was that all of the CX_props properties appear to
have moved into the CalendarXFolder.py file instead of being located in
the database now. I was curious why this changed?

The main question I have is that in Plone 2.5.x I had added some custom
boolean variables for the popup text box (like 'showPOPTitle',
showPOPTrainer (custom), etc.). I was able to do this by customizing
the CX_props_popup folder and then moving it into the instance of
CalendarX that I wanted to use these boolean variables. Since in Plone
3.x and CalendarX 0.9.x these appear to have moved into the
"CalendarXFolder.py" file, can I still place the custom ones in the
instance of CalendarX in the database instead of modifying the hard code
of the ".py" file? How do you do this if it is possible?

Keith
Lupa Zurven
2008-09-18 20:44:32 UTC
Permalink
Good question! It was changed because of the many changes to Plone 3
that pretty nearly required using Archetypes throughout CalendarX. I
can answer that.

What I can't answer without trying it a bit myself first is how best
to add custom properties like was readily possible in CalendarX for
Plone 2.x. You definitely can do it via changes to
CalendarXFolder.py... but obviously that seems like a wrong-headed
approach overall, requiring an ugly path for upgrading to newer
versions of CalendarX!

It should be quite possible to do this... and I won't answer exactly
how before I get in and play with it. If anyone has some quick
suggestions, PLEASE post them here to the list and we'll get this
going on... I'll try to get into it soon myself, although I'll be
headed out of town this weekend.

Cheers,
+lupa+

On Thu, Sep 18, 2008 at 4:25 PM, Keith Schonrock III
Post by Keith Schonrock III
I am investigating moving to Plone 3.x from Plone 2.x and I noticed one
thing that changed was that all of the CX_props properties appear to
have moved into the CalendarXFolder.py file instead of being located in
the database now. I was curious why this changed?
The main question I have is that in Plone 2.5.x I had added some custom
boolean variables for the popup text box (like 'showPOPTitle',
showPOPTrainer (custom), etc.). I was able to do this by customizing
the CX_props_popup folder and then moving it into the instance of
CalendarX that I wanted to use these boolean variables. Since in Plone
3.x and CalendarX 0.9.x these appear to have moved into the
"CalendarXFolder.py" file, can I still place the custom ones in the
instance of CalendarX in the database instead of modifying the hard code
of the ".py" file? How do you do this if it is possible?
Keith
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
CalendarX-users mailing list
https://lists.sourceforge.net/lists/listinfo/calendarx-users
Lupa Zurven
2008-09-21 23:42:41 UTC
Permalink
Hey Keith,
It was almost trivial to add the custom properties functionality
back into CalendarX, and now it will be better than ever. I'll post
the changes into SVN soon, but in short, there's a new
CustomAttributes.py file where you add the custom Archetype attributes
that you want to add to the system. Then I changed CalendarXFolder.py
to import the custom schema from CustomAttributes.py and add those
attributes in when Zope is started/restarted. The custom attributes
you add can go into a new schemata (a new "Custom Options" page in the
'manage' area) or into one of the standard CalendarX schemata
("Calendar Options", "Pop up properties", etc).

Thanks for spotting that omission from the new-for-Plone3 CalendarX.
+lupa+
Post by Lupa Zurven
Good question! It was changed because of the many changes to Plone 3
that pretty nearly required using Archetypes throughout CalendarX. I
can answer that.
What I can't answer without trying it a bit myself first is how best
to add custom properties like was readily possible in CalendarX for
Plone 2.x. You definitely can do it via changes to
CalendarXFolder.py... but obviously that seems like a wrong-headed
approach overall, requiring an ugly path for upgrading to newer
versions of CalendarX!
It should be quite possible to do this... and I won't answer exactly
how before I get in and play with it. If anyone has some quick
suggestions, PLEASE post them here to the list and we'll get this
going on... I'll try to get into it soon myself, although I'll be
headed out of town this weekend.
Cheers,
+lupa+
On Thu, Sep 18, 2008 at 4:25 PM, Keith Schonrock III
Post by Keith Schonrock III
I am investigating moving to Plone 3.x from Plone 2.x and I noticed one
thing that changed was that all of the CX_props properties appear to
have moved into the CalendarXFolder.py file instead of being located in
the database now. I was curious why this changed?
The main question I have is that in Plone 2.5.x I had added some custom
boolean variables for the popup text box (like 'showPOPTitle',
showPOPTrainer (custom), etc.). I was able to do this by customizing
the CX_props_popup folder and then moving it into the instance of
CalendarX that I wanted to use these boolean variables. Since in Plone
3.x and CalendarX 0.9.x these appear to have moved into the
"CalendarXFolder.py" file, can I still place the custom ones in the
instance of CalendarX in the database instead of modifying the hard code
of the ".py" file? How do you do this if it is possible?
Keith
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
CalendarX-users mailing list
https://lists.sourceforge.net/lists/listinfo/calendarx-users
Loading...