images not showing up in joomla 1.7 in article using jumi tags

Posted on 2011-10-16
Last Modified: 2012-05-12
Could someone please have a look at the following forum post:

Question by:qeng
    LVL 5

    Expert Comment

    have you tried?

    <img src='../images/sampledata/fruitshop/apple.jpg' />

    Open in new window



    Accepted Solution

    Thanks for responding Mark.

    Yes I had tried that but the path syntax wasn't the issue (folder 'images' sits in the site's root directory so ../images/ and images/ are equivalent).

    I was able to figure out what the problem was.

    For some reason, somewhere in the Joomla 1.7 > Ja_Purity_ii > Jumi > PHP arena, html single quotes are not  working.


    <img src="images/mypic.jpg" />
    <img src='images/mypic.jpg' />

    would be equivalent statements in html.

    This would allow the following php code to be used (note use of single quotes in html portion):

    echo "<img src='images/mypic.jpg' />";

    (otherwise using double quotation marks inside the echo  statement, like so:  echo "<img src="images/mypic.jpg" />"; would fail due to the conflicts with the php double quotation mark and the html double quotation mark).

    For whatever reason, the Joomla 1.7 > Ja_Purity_ii > Jumi > PHP  combination ignores statements written like so:

    echo "<img src='images/mypic.jpg' />";

    In order to get this to work, I have to use the php heredoc syntax, viz:

    $myhtml = <<<SOMEHTML
    <img src="images/mypic.jpg" />
    echo $myhtml;

    Not sure if there is somewhere in the Joomla 1.7/JA_Purity_ii/Jumi/PHP chain whereI have to specify that html can use single quotes.

    Anyhow, using the heredoc syntax is a reasonable workaround for me at the moment.


    Author Comment

    How can I close-off my question, saving it for future reference in the process?

    Author Closing Comment

    I'm accepting my own solution:

    a) because it is the only valid solution 'received'
    b) as a means of closing this outstanding question (since I didn't receive a reply to  regarding 'how to close this question)

    Featured Post

    Training Course: Adobe Dreamweaver CC 2015

    Adobe Dreamweaver Creative Cloud is used by web designers and front-end developers and allows you to visualize your site in real-time as you code. This course covers exam objectives for the Adobe Certified Associate (ACA) certification.

    Join & Write a Comment

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now