Welcome to Squishdot Websites Squishdot How-To
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


Customizing Squishdot
Squishdot Posted by Oscar Picasso on Friday October 08, 08:58PM, 1999
from the i-am-never-happy dept.
Great sofware but I would like a much more customizable Squishdot.

For example I wanted to make a multlingual version of Squishdot. My first need was to make a news Web Site in French. I started to look at the DTML code and check all the words and phrases that should had to be translated in French like "Posted by" which becomes "Posté par".

I soon realized how boring it was to do this. And as I also planned to make a spanish version of the site, I try to find another solution.

So instead of replacing each word or phrase that needed to be translated by its translation, I started to replace these words by a dtml var tag.
For example "Posted by" becomes "<dtml-var posted_by>".

The idea is to put all these words in properties of an object, and according to the current language, choosen by the viewer or the desginer (if it is a unilingual site), the words would be displayed in the right language.

It's not always abvious to choose which phrase to replace. For example : in "from the <!--#var dept--> dept." we cannot replace "from the " by a tag because the order of the complete phrase in French is different (as I guess, in other languages to. The French phrase would be: "du dept. de <dtml-var dept>".

Maybe it could be nice to store all these phrases and words in some kind of objects in python. I'm not an experienced programmer but I feel better the object oriented programing in python than in DTML.

I tried also to change the look and feel of my Squishdot site, and began changing the various DTML code by including some "CLASS" attributes in various HTML tags in order to use Cascading Style Sheets. So the viewer could easily change the look and feel of his new Site.

As for the translation I'm not sure that just changing the DTML code is the good approach. Maybe we should use python or ZClasses.

The last degree of customization is a step beyond the previous. Each post should be treated as an object, not only the text itself but all it's elements (header, summary...). We could have also a Class "Collection of posts". I think that doing this way would make it easier to cutomize.

As I said, I'm not a guru in python or dtml programing but if someone would like to work with me on these ideas, I would greatly appreciate.

Please don't flame me for my english, it's not my native language... and feel free to write me in Spanish or French ;)

<  |  >

 

Related Links
  • Articles on Squishdot
  • Also by Oscar Picasso
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Re: Customizing Squishdot
    by Butch Landingin on Friday October 08, 10:20PM, 1999
    Yes, this is also the direction I want to develop Squishdot into. In order to correctly do this kind of internationalization/localization feature (as well as several fulfill other requirements), will require an architectural overhaul of Squishdot in order to make these kinds of things possible.

    Zope also has a similar problem and a Zope Internationalization Project has been initiated to study the problem and recommend/build possible solutions.

    As for updating the HTML code and using CSS, This is one of my priorities also -- I am planning to overhaul the HTML code generated and make it more HTML 4.0 compliant and use CSS for its look-and-feel customization.

    -- Butch


    [ Reply to this ]
    • Re: Customizing Squishdot
      by Oscar Picasso on Saturday October 09, 12:10PM, 1999
      Just a few words to thank you for your quick and precise answer.

      I'm very please of the direccion you take in the development of Squishdot.

      And again: great job you've done!

      [ Reply to this ]
    • Re: Customizing Squishdot
      by Caroline Wise on Wednesday October 13, 03:40AM, 1999
      I have another problem with customizing Squishdot: I'm embedding the whole thing in a page on another server. Once somebody is done with a reply, Squishdot wants to return him to /posting_html, but I want him to be redirected back to the home page. Where can I change that?

      Thanks,

      Caroline

      (I tried to find it but.... can't figure it out)

      [ Reply to this ]
      • Re: Customizing Squishdot
        by Butch Landingin on Wednesday October 13, 07:37PM, 1999
        If you're using version 0.3.0, you could modify the ShowMessage dtml method to check if the action dtml variable is equal to "posting_html" or something like it and if it is, then set your ACTION html attribute to point to wherever you want -- This way, pressing OK on that page will transfer you to the page you want.

        If you're using an earlier version, you're out of luck -- unless you want to modify the python code itself and modify the addPosting methods...

        --Butch



        [ Reply to this ]
    Re: Customizing Squishdot
    by Scott Hanson on Saturday October 09, 06:29AM, 1999
    Count me in for helping with internationalization. My site is a mixture of German and American English (just like my marriage ;). I've changed a few phrases directly in the template, and applied Lalo Martins date_posted patch, but I haven't yet bothered to check for all instances that could be made customizable.

    Having the user choose the site language would be cool. It would also be cool to be be able have multiple language versions of certain posts, and have the user decide which version to display.

    I can program some in Perl, but I'm new to both Zope and Python (brackets? what do you mean there are no brackets... :).

    [ Reply to this ]
    • Re: Customizing Squishdot
      by Oscar Picasso on Saturday October 09, 12:33PM, 1999
      > Count me in for helping with internationalization.
      Butch in the comment of my post said he was working on the same direccion. As is surely a far better programmer than me I'm waiting for what he will in terms of new design.

      However, I think we could help maybe as testers or by making some real multilingual site, let say in english, german, french andspanish.

      Depending on the availability of the new Squishdot, we could going on changing the DTML code.

      However this solution seems to me quite boring and unefficient, so I would like to know before if Butch has an idea of when he can release the first versions of an "international" Squishdot.

      >...and applied Lalo Martins date_posted patch,
      Could you explain me it's purpose and where to find it?

      [ Reply to this ]
      • Re: Customizing Squishdot
        by Lalo Martins on Wednesday October 13, 09:20PM, 1999
        >...and applied Lalo Martins date_posted patch,

        Could you explain me it's purpose and where to find it?

        It turns the date_posted function calling convention from <dtml-var date_posted> to <dtml-var date_posted(strfmt_format)> so that you can control the format your dates are displayed in. A better description and the patch itself were posted to the Squishdot mailing list.

        [ Reply to this ]
    • Re: Customizing Squishdot
      by deekayen on Sunday October 10, 12:22AM, 1999
      I'd like to see improvements as much as the next guy but international language support seems like something lower on the list of priorities. Adding a poll or making the code more server load friendly seems more important.

      [ Reply to this ]
      • Re: Customizing Squishdot
        by Lalo Martins on Wednesday October 13, 09:10PM, 1999
        What? You are American, right?

        Come to think of it. Locking squishdot to English ties its usefulness to about 20% of the possible uses it would have. The US and other English-speaking countries are already well internetworked; the greatest growth rates are in places like Brazil, China, all of Europe except UK and Germany, etc.

        Then again this is a Free Software project. By incorporating the RDF code and promising to add my date_posted patch on the next release, Butch demonstrated that the development is truly open. So whoever wants to add more i18n may do so and leave Butch to code whatever is on the top of _his_ priority list. That's one of the powers of Free Software (Open Source) development; priorities are in practice dictated by demand.

        [ Reply to this ]

     
    The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Powered by Zope  Squishdot Powered
      "Any system that depends on reliability is unreliable." -- Nogg's Postulate
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 Butch Landingin, ©2000-2002 Chris Withers.