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

 main


Inline Photos With Articles
Squishdot Posted by Bill on Sunday October 13, 08:23PM, 2002
from the almost works dept.
I'm trying to post an article with a photo in it and I'm having problems...

The photo is in the "Images/" folder of the squishdot site. When I'm entering the article I used the following syntax:

<IMG src="Images/picture">

When I preview the article it works as expected. However, once I post the article, squishdot truncates the whole IMG tag and then it's hosed.

Any ideas how to pull this off?

<  |  >

 

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

    Re: Inline Photos With Articles
    by Chris Withers on Monday October 14, 12:50PM, 2002
    When you say 'trancates the whole image tag', what do you mean?
    [ Reply to this ]
    • Re: Inline Photos With Articles
      by Bill on Monday October 14, 01:45PM, 2002
      I figured it out. After doing a thorough search here on Squishdot, I found an article that described adding a "valid_tags" entry to the property folder of my site. I listed all the tags that I wish to have available, including "img" and now it works just fine.
      [ Reply to this ]
      • warning
        by Manuel Aristarán on Wednesday October 30, 06:44PM, 2002

        Adding the 'img' tag to the list of valid tags allows comments to have images.

        This happens because a Posting is both a Comment and an Article (due to inheritance)

        This should be changed for future releases...

        BTW, is swishdot alive?

        Cheers,

        Manuel Aristarán
        http://jazzido.freezope.org/jazzido/

        [ Reply to this ]
        • ?
          by Chris Withers on Thursday October 31, 03:30PM, 2002
          What do you mean 'allow comments to have images'?

          Why is this a problem?

          Why should it be changed?

          Swishdot is still on my mind, and coudl be taken out of my mind and into code if someone could sponsor it...

          cheers,

          Chris

          [ Reply to this ]
          • Re: ? Images in articles
            by Dean on Wednesday November 13, 04:55AM, 2002
            Attachments buried in the ZODB and not available via the ZMI seems to be part of the problem.

            BUT...
            The primary annoyance is when a user uploads an image intending to display it in their post.

            The most intuitive way would be to simply: <img src="NameOfImageJustUpload.ext" /> (or other STX terminology)

            Currently users can do that, but then have to edit the post later (to get the article id):

            <img src="##POSTID##/NameOfImageJustUpload.ext" />

            Adding in the id via &dtml may not work due to weird treatment of the ampersand. (Edit a post, type &dtml-var REQUEST; for the lead, then Save and notice the change to: &amp;dtml-var REQUEST;

            [ Reply to this ]
            • Re: ? Images in articles
              by Chris Withers on Wednesday November 13, 02:00PM, 2002
              I think your assessment of the attachment's location in the ZODB is incorrect.

              Also, you've never been able to use DTML is postings, that would be a huge horrible security hole ;-)

              Finally, I don't see what difference adding the post id would make.

              That said, yeah, just putting an image tag like that in the body of a reply will not really work since the URL won't be correct when the reply is shown in the thread view of it's parent article, for example.

              I don't have a quick and easy solution to this, since HTML doesn't allow multiple <base href=""> tags per page :-(

              Chris
              [ Reply to this ]
              • Re: ? Images in articles
                by Dean on Thursday November 14, 01:05AM, 2002
                >> I think your assessment of the attachment's
                >> location in the ZODB is incorrect.

                Quite likely....

                >> Finally, I don't see what difference
                >> adding the post id would make.
                the image does seem to be sitting in the posts ID namespace.

                >> Also, you've never been able to use DTML is
                >> postings, that would be a huge horrible
                >> security hole ;-)

                Security measures implemented for public products are often hindrinces in intranet implementations, a popular venue for Zope.

                That said, yeah, just putting an image tag like that in the body of a reply will not really work >> the URL won't be correct when the
                >> reply is shown in the thread view of it's parent article, for example.

                Interesting. Even more reason to upload files to a single, known folder.


                >> I don't have a quick and easy solution to
                >> this, since HTML doesn't allow multiple
                >> <base href=""> tags per page :-(

                Thanks for giving it some thought. I didn't give it any thought beyond a hope for some acquisition magic.

                For a quick hack, on my intranet site I exposed the ZMI's Add an Image method in a link on left. 2 steps, but straightforward. :-}

                Thanks for the feedback.
                [ Reply to this ]
      • Re: Inline Photos With Articles
        by shayne on Saturday November 02, 08:55AM, 2002
        Hey cool, after beating my head on the monitor for about fifteen minutes , got it to work.

        One question tho.... Is there a way to convince the system to sorta "know" where to find the image, in the sense that , say the user submits an image called "nuts.jpg", the system can insert the correct path, so that the image tage <img src="nuts.jpg"> points to the right spot.....
        Otherwise I *may* have to figure out some sort of ext method for getting outside images to work. . . . .
        [ Reply to this ]
        • Re: Inline Photos With Articles
          by Chris Withers on Monday November 04, 01:35PM, 2002
          <img src="&dtml.url-file;"> may well work in posting_html.

          cheers,

          Chris
          [ 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.