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

 main


automatic conversion of url's
Newbies Posted by Whitey on Wednesday February 06, 02:43PM, 2002
from the dept.
How can I place URLs in a posting in a more comfortable way?

Hi,

I am currently setting up multiple Squishdot-Sites for a rather mixed audience.
To place a URL in posting I use the standard . Has anyone ever found a way to do this easier? Like just typing in a url (http://... )and Squishdot automatically converts it into a workling link?

Regards and thanks in advance,

Whitey

<  |  >

 

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

    Re: automatic conversion of url's
    by Drew on Thursday February 14, 09:23PM, 2002
    Sounds hard, but it may not be too bad.

    I am a Zope newbie, but have had a squishdot site for a year now. But I have recently become very interested in Zope and Python and thus my recent studies.

    This is just an off-handed guess, but there is probably a piece of code somewhere that handles the submission of articles. When you press the submit button, Zope takes that text and via either a stored object method in Zope, or a buried script somewhere, and the article gets "handled" before it is shoved into the database.

    So in your quest, trace down in the code what happens when you press the button on the post form and from there you should be able to find a place to insert your code.

    Gasp, did I say code? Yes, you will have to probably write something that looks for http:\\ and then makes sure there is not a "> immediatly before it, then grab the http:\\ string (to the whitespace) and slap it into a varible and place the URL within and so forth.

    The reason I think this is possible is because I have viewed the CMF demos on http://www.zope.com and it seems to infer methods for taking html templates and formatting raw text into the templates. If that is possible, then what you ask shoud be as well.

    Have fun!

    Drew - a newbie

    [ Reply to this ]
    • Re: automatic conversion of url's
      by Danny Yoo on Thursday February 28, 04:30AM, 2002

      It's possible: check the code in SquishSite.py, around line 860 or so. There's a method called render() that processes the body of a message right before it's displayed. We can insert a step in there to add html links.

      Good luck!


      [ Reply to this ]
      • render is the way forward :-)
        by Chris Withers on Friday March 29, 07:19PM, 2002

        Yup, Danny's onto the right tracks. You don't have to hack the file system code as you can just create a Script (Python) called render that does whatever you need it to...

        cheers,

        Chris


        [ Reply to this ]
    • Re: automatic conversion of url's
      by David on Wednesday June 12, 04:17PM, 2002
      uigfuj
      [ 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.