By Ingeniweb. A Django site.
Octobre 21, 2008
» 3 Colors Theme : a collective phantasy based theme


Since Plone base properties style could seems too rich for a standard use case, phantasy skin edit forms could be also too complex.

When i saw how easy it is to change some skin properties in a blog system like word press ( …),  i thought we need the same feature in Plone.

Collective Phantasy is done for that.

Building a new skin product with a standard static theme and a customized skin schema is something you can do easily with collective phantasy.

If you want an example, just test the “3 colors theme” plone product.

In your buildout :

in instance eggs section add :

    collective.threecolorstheme

in zcml section add :

    collective.threecolorstheme
    collective.threecolorstheme-overrides

Relaunch your buildout.
Launch your zope instance.

In plone_control_panel you will get :

Check for “Three Colors Theme” Product, this will install the product and its dependencies :

Go back to the home page, of course the “static” theme has changed (my poor contribution to plone themes community)

We want to change the dynamic properties, so we click on “Contents” tab, and we can see that everybody is here : the dynamic root skin for portal, and the phantasy skins repository (read previous posts …) :

We want to build a new skin, so as we have seen in previous posts, in phantasy skins repository we add a new skin :

In this form you could see differences with a classic phantasy skin form (for developpers/integrators look at the code it’s just some easy Archetypes bidouille) :

- 3 colors only + mutators to change all colors

- an entire fieldset removed

- many fields unuseful in this theme are hidden

- some skin attributes added in schema

Go back to reality : just change some colors

Now we will import a skin sample provided in “three colors theme product”.

In alternate_skin folder you will find a zip file and a txt file (howtouseit.txt).

Click on “import images and files”, choose the alternate_skin.zip file

Read howtouseit.txt and change some colors or properties

Use plone kss power to change images’ names quickly

CTRL-F5 to refresh the page, of course you need some design feeling to understand what’s happen here, but it’s not so complicated (…)

In the product you will find another example with another howtouseit.txt, here, then just add a folder and choose the good phantasy skin and you will get :

Loving Plone :-)

      

Février 4, 2008
» Let’s get Plone 3 support for Plone4ArtistsVideo


I am starting an active support to Plone4ArtistsVideo because I like this product. More, I think Plone 3 and beyond needs it as an important add-on. It means we can all reuse its pieces in our projects.

Thanks to Nate Aune for starting this effort. I just pledged to help make that happen.

Then I am going to contribute, at least by testing and documenting (not sure if it was already done) how you can use it as part of your development (integrating, adaptation/subtyping and all).

Septembre 20, 2007
Cyrille Lebeaupin
cyrille
Clebeaupin's Weblog is about »
» How to edit remote files with your favorite editor ?


This how-to only works on Linux OS and has been tested on a recent Ubuntu release.

In many cases, you have a simple SSH access to edit files on a remote server. Because this is a remote server you can only use remote editors like vi and sometimes emacs. These editors are not so bad but if you are not at your ease using them you can quickly become like this nervous guy.

Maybe you prefer to use one of your local editor like bluefish, gedit or kate. So just do it …

Assume that you have an access with user clebeaupin to the remote server named remote.server.com. To connect, you just have to type this following line in a terminal:

clebeaupin@atalante:~$ ssh clebeaupin@remote.server.com

Then if you want to edit a file :

clebeaupin@remote.server.com:~$ vi /etc/httpd/httpd.conf

What’s this fucking editor for geek guys ?
If you want to relax and forget vi in the dark side of your brain, just use fuse kernel module with sshfs plugin. Fuse+sshfs allows you to mount on your local filesystem a remote filesystem. To install it, just open a shell and type the following lines:

clebeaupin@atalante:~$ sudo apt-get install sshfs

Before mounting a remote filesystem, you must add the fuse group to your user like this:

clebeaupin@atalante:~$ sudo adduser clebeaupin fuse

And check that fuse module is loaded at kernel boot:

clebeaupin@atalante:~$ ls -la /dev/fuse
crw-rw—- 1 root fuse 10, 229 2007-09-20 00:46 /dev/fuse

If not just add it to /etc/modules file.

Then to make sure everything goes right, just reboot your system.

After re-booting and re-logging, you can mount a remote filesystem on your local computer. For example, if you want to mount all remote filesystem of remote.server.com in the directory /home/clebeaupin/mnt, type this:

clebeaupin@atalante:~$ sshfs clebeaupin@remote.server.com:/ /home/clebeaupin/mnt

If you want to restrict the mounted filesystem to a specific directory like /etc, do this:

clebeaupin@atalante:~$ sshfs clebeaupin@remote.server.com:/etc /home/clebeaupin/mnt

At this time you can list, view and edit all files of the remote server. You can use all command lines like ls, rm, mkdir and of course gedit in /home/clebeaupin/mnt:

clebeaupin@atalante:~$ gedit /home/clebeaupin/mnt/modules &

It works. And if you have enough permissions you can break all config files of the remote server with your favorite editor :-)

Septembre 17, 2007
» Improving your Plone site’s performance


Plone experts know this. But the others need to know it too. After all, we’re all on the same boat !

You’re in the testing phase of your Plone project, and you find it slow ? Take the following corrective actions, and stop worrying !

  • Use a ZEO-based setup. This is important ! You can distribute the load on 2 or more ZEO clients. (Note that the ZEO server and clients can all be on the same machine.)
    It is possible to bind a ZEO client to a special type of requests such as “content contribution requests”. This way, you keep the other ZEO client(s) responsive for the “normal” requests.
    If you need automatic load balancing, add a load-balancer software such as Pound in front of the ZEO clients.
  • Take advantage of Zope’s HTTP Cache Managers.
    • A simple fix you can do for Plone 2’s default HTTP Cache Manager ; go on the HTTPCache object, and uncheck the “Cache anonymous connections only?” option. There is no reason you should not cache static content such as skin images/files for Authenticated users.
    • Invest a little more to go further with CacheFu-based caching policy management tools.
  • Install a Squid proxy-cache. It is recommended to serve the site with Zope behind Squid (or Zope behind Squid behind Apache).
    There is also Varnish as an alternative to Squid, though I haven’t yet tested it.

Août 28, 2007
» Started using OpenID


In about 10 mn, I created my account @ claimID.com, and then tested by logging on twitterfeed.com and adding the feed of my blog for the twitter account I created a couple of days ago. We’ll see how it works !

Next thing to do : test it on a Plone 3.0 site (which has support for OpenID OOTB.) Yeah !