<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Come inserire un'immagine in php?]]></title><description><![CDATA[<p dir="auto">Ciao a tutti, vi scrivo perchè dopo aver effettuato una modifica apportata alla core di joomla vorrei completarla ma non so come. In particolare avendo seguito una guida sono riuscito a mostrare nella visualizzazione delle categorie e dell'articolo il numero delle visite ricevute da ogni articolo (cosa che di default non appare). Vorrei però inserire accanto al testo visite un'icona con un immagine delle statistiche (al posto dei caratteri <em>|</em> che ho inserito per ora per distanziare il testo dalla votazione). Non so però come poter fare questo in php (in html sarebbe semplice). Vi do il codice del file da modificare qui di seguito</p>
<pre><code class="language-php">&lt;?php // no direct access
defined('_JEXEC') or die('Restricted access');

$canEdit    = ($this-&gt;user-&gt;authorize('com_content', 'edit', 'content', 'all') || $this-&gt;user-&gt;authorize('com_content', 'edit', 'content', 'own'));
?&gt;
&lt;?php if ($this-&gt;params-&gt;get('show_page_title', 1) &amp;&amp; $this-&gt;params-&gt;get('page_title') != $this-&gt;article-&gt;title) : ?&gt;
    &lt;div class="componentheading&lt;?php echo $this-&gt;params-&gt;get('pageclass_sfx')?&gt;"&gt;
        &lt;?php echo $this-&gt;escape($this-&gt;params-&gt;get('page_title')); ?&gt;
    &lt;/div&gt;
&lt;?php endif; ?&gt;
&lt;?php if ($canEdit || $this-&gt;params-&gt;get('show_title') || $this-&gt;params-&gt;get('show_pdf_icon') || $this-&gt;params-&gt;get('show_print_icon') || $this-&gt;params-&gt;get('show_email_icon')) : ?&gt;
&lt;table class="contentpaneopen&lt;?php echo $this-&gt;params-&gt;get( 'pageclass_sfx' ); ?&gt;"&gt;
&lt;tr&gt;
    &lt;?php if ($this-&gt;params-&gt;get('show_title')) : ?&gt;
    &lt;td class="contentheading&lt;?php echo $this-&gt;params-&gt;get( 'pageclass_sfx' ); ?&gt;" width="100%"&gt;
        &lt;?php if ($this-&gt;params-&gt;get('link_titles') &amp;&amp; $this-&gt;article-&gt;readmore_link != '') : ?&gt;
        &lt;a href="&lt;?php echo $this-&gt;article-&gt;readmore_link; ?&gt;" class="contentpagetitle&lt;?php echo $this-&gt;params-&gt;get( 'pageclass_sfx' ); ?&gt;"&gt;
            &lt;?php echo $this-&gt;escape($this-&gt;article-&gt;title); ?&gt;&lt;/a&gt;
        &lt;?php else : ?&gt;
            &lt;?php echo $this-&gt;escape($this-&gt;article-&gt;title); ?&gt;
        &lt;?php endif; ?&gt;
    &lt;/td&gt;
    &lt;?php endif; ?&gt;
    &lt;?php if (!$this-&gt;print) : ?&gt;
        &lt;?php if ($this-&gt;params-&gt;get('show_pdf_icon')) : ?&gt;
        &lt;td align="right" width="100%" class="buttonheading"&gt;
        &lt;?php echo JHTML::_('icon.pdf',  $this-&gt;article, $this-&gt;params, $this-&gt;access); ?&gt;
        &lt;/td&gt;
        &lt;?php endif; ?&gt;

        &lt;?php if ( $this-&gt;params-&gt;get( 'show_print_icon' )) : ?&gt;
        &lt;td align="right" width="100%" class="buttonheading"&gt;
        &lt;?php echo JHTML::_('icon.print_popup',  $this-&gt;article, $this-&gt;params, $this-&gt;access); ?&gt;
        &lt;/td&gt;
        &lt;?php endif; ?&gt;

        &lt;?php if ($this-&gt;params-&gt;get('show_email_icon')) : ?&gt;
        &lt;td align="right" width="100%" class="buttonheading"&gt;
        &lt;?php echo JHTML::_('icon.email',  $this-&gt;article, $this-&gt;params, $this-&gt;access); ?&gt;
        &lt;/td&gt;
        &lt;?php endif; ?&gt;
        &lt;?php if ($canEdit) : ?&gt;
        &lt;td align="right" width="100%" class="buttonheading"&gt;
            &lt;?php echo JHTML::_('icon.edit', $this-&gt;article, $this-&gt;params, $this-&gt;access); ?&gt;
        &lt;/td&gt;
        &lt;?php endif; ?&gt;
    &lt;?php else : ?&gt;
        &lt;td align="right" width="100%" class="buttonheading"&gt;
        &lt;?php echo JHTML::_('icon.print_screen',  $this-&gt;article, $this-&gt;params, $this-&gt;access); ?&gt;
        &lt;/td&gt;
    &lt;?php endif; ?&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;?php endif; ?&gt;

&lt;?php  if (!$this-&gt;params-&gt;get('show_intro')) :
    echo $this-&gt;article-&gt;event-&gt;afterDisplayTitle;
endif; ?&gt;
&lt;?php echo $this-&gt;article-&gt;event-&gt;beforeDisplayContent; ?&gt;
&lt;table class="contentpaneopen&lt;?php echo $this-&gt;params-&gt;get( 'pageclass_sfx' ); ?&gt;"&gt;
&lt;?php if (($this-&gt;params-&gt;get('show_section') &amp;&amp; $this-&gt;article-&gt;sectionid) || ($this-&gt;params-&gt;get('show_category') &amp;&amp; $this-&gt;article-&gt;catid)) : ?&gt;
&lt;tr&gt;
    &lt;td&gt;
        &lt;?php if ($this-&gt;params-&gt;get('show_section') &amp;&amp; $this-&gt;article-&gt;sectionid &amp;&amp; isset($this-&gt;article-&gt;section)) : ?&gt;
        &lt;span&gt;
            &lt;?php if ($this-&gt;params-&gt;get('link_section')) : ?&gt;
                &lt;?php echo '&lt;a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this-&gt;article-&gt;sectionid)).'"&gt;'; ?&gt;
            &lt;?php endif; ?&gt;
            &lt;?php echo $this-&gt;article-&gt;section; ?&gt;
            &lt;?php if ($this-&gt;params-&gt;get('link_section')) : ?&gt;
                &lt;?php echo '&lt;/a&gt;'; ?&gt;
            &lt;?php endif; ?&gt;
                &lt;?php if ($this-&gt;params-&gt;get('show_category')) : ?&gt;
                &lt;?php echo ' - '; ?&gt;
            &lt;?php endif; ?&gt;
        &lt;/span&gt;
        &lt;?php endif; ?&gt;
        &lt;?php if ($this-&gt;params-&gt;get('show_category') &amp;&amp; $this-&gt;article-&gt;catid) : ?&gt;
        &lt;span&gt;
            &lt;?php if ($this-&gt;params-&gt;get('link_category')) : ?&gt;
                &lt;?php echo '&lt;a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this-&gt;article-&gt;catslug, $this-&gt;article-&gt;sectionid)).'"&gt;'; ?&gt;
            &lt;?php endif; ?&gt;
            &lt;?php echo $this-&gt;article-&gt;category; ?&gt;
            &lt;?php if ($this-&gt;params-&gt;get('link_category')) : ?&gt;
                &lt;?php echo '&lt;/a&gt;'; ?&gt;
            &lt;?php endif; ?&gt;
        &lt;/span&gt;
        &lt;?php endif; ?&gt;
    &lt;/td&gt;
&lt;/tr&gt;
&lt;?php endif; ?&gt;
&lt;?php if (($this-&gt;params-&gt;get('show_author')) &amp;&amp; ($this-&gt;article-&gt;author != "")) : ?&gt;
&lt;tr&gt;
    &lt;td valign="top"&gt;
        &lt;span class="small"&gt;
            &lt;?php JText::printf( 'Written by', ($this-&gt;article-&gt;created_by_alias ? $this-&gt;article-&gt;created_by_alias : $this-&gt;article-&gt;author) ); ?&gt;
        &lt;/span&gt;
        &amp;nbsp;&amp;nbsp;
    &lt;/td&gt;
&lt;/tr&gt;
&lt;?php endif; ?&gt;

&lt;?php if ($this-&gt;params-&gt;get('show_hits')) : ?&gt;
    _|_Visite :&lt;?php echo $this-&gt;article-&gt;hits; ?&gt;
&lt;?php endif; ?&gt;

&lt;?php if ($this-&gt;params-&gt;get('show_create_date')) : ?&gt;
&lt;tr&gt;
    &lt;td valign="top" class="createdate"&gt;
        &lt;?php echo JHTML::_('date', $this-&gt;article-&gt;created, JText::_('DATE_FORMAT_LC2')) ?&gt;
    &lt;/td&gt;
&lt;/tr&gt;
&lt;?php endif; ?&gt;

&lt;?php if ($this-&gt;params-&gt;get('show_url') &amp;&amp; $this-&gt;article-&gt;urls) : ?&gt;
&lt;tr&gt;
    &lt;td valign="top"&gt;
        &lt;a href="http://&lt;?php echo $this-&gt;article-&gt;urls ; ?&gt;" target="_blank"&gt;
            &lt;?php echo $this-&gt;article-&gt;urls; ?&gt;&lt;/a&gt;
    &lt;/td&gt;
&lt;/tr&gt;
&lt;?php endif; ?&gt;

&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;?php if (isset ($this-&gt;article-&gt;toc)) : ?&gt;
    &lt;?php echo $this-&gt;article-&gt;toc; ?&gt;
&lt;?php endif; ?&gt;
&lt;?php echo $this-&gt;article-&gt;text; ?&gt;
&lt;/td&gt;
&lt;/tr&gt;

&lt;?php if ( intval($this-&gt;article-&gt;modified) !=0 &amp;&amp; $this-&gt;params-&gt;get('show_modify_date')) : ?&gt;
&lt;tr&gt;
    &lt;td class="modifydate"&gt;
        &lt;?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this-&gt;article-&gt;modified, JText::_('DATE_FORMAT_LC2'))); ?&gt;
    &lt;/td&gt;
&lt;/tr&gt;
&lt;?php endif; ?&gt;
&lt;/table&gt;
&lt;span class="article_separator"&gt;&amp;nbsp;&lt;/span&gt;
&lt;?php echo $this-&gt;article-&gt;event-&gt;afterDisplayContent; ?&gt;
</code></pre>
<p dir="auto">Le righe che ho aggiunto io sono dalla 103 alla 105 comprese. Grazie</p>
]]></description><link>https://dev.connect.gt/topic/94124/come-inserire-un-immagine-in-php</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Dec 2026 07:36:59 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/94124.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Feb 2009 13:38:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Come inserire un'immagine in php? on Wed, 04 Feb 2009 22:19:08 GMT]]></title><description><![CDATA[<p dir="auto">Di nulla. Alla prossima. <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=2190ae3dadd" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://dev.connect.gt/post/806548</link><guid isPermaLink="true">https://dev.connect.gt/post/806548</guid><dc:creator><![CDATA[samyorn]]></dc:creator><pubDate>Wed, 04 Feb 2009 22:19:08 GMT</pubDate></item><item><title><![CDATA[Reply to Come inserire un'immagine in php? on Wed, 04 Feb 2009 22:15:00 GMT]]></title><description><![CDATA[<p dir="auto">Grazie mille dell'aiuto.<br />
Ho risolto.<br />
Ciao. <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=2190ae3dadd" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://dev.connect.gt/post/806552</link><guid isPermaLink="true">https://dev.connect.gt/post/806552</guid><dc:creator><![CDATA[bill152]]></dc:creator><pubDate>Wed, 04 Feb 2009 22:15:00 GMT</pubDate></item><item><title><![CDATA[Reply to Come inserire un'immagine in php? on Wed, 04 Feb 2009 20:44:09 GMT]]></title><description><![CDATA[<p dir="auto">Ciao BILL152</p>
<p dir="auto">Se non ho capito male dovresti semplicemente far così:</p>
<pre><code class="language-php">&lt;?php if ($this-&gt;params-&gt;get('show_hits')) : ?&gt;
     &lt;img src="urldellimmagine" /&gt; Visite :&lt;?php echo $this-&gt;article-&gt;hits; ?&gt;
</code></pre>
<p dir="auto">Vedi se va bene così, basta inserire, in puro HTML (dato che sei all'esterno del modulo PHP) il richiamo all'immagine. <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=2190ae3dadd" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>https://dev.connect.gt/post/806547</link><guid isPermaLink="true">https://dev.connect.gt/post/806547</guid><dc:creator><![CDATA[samyorn]]></dc:creator><pubDate>Wed, 04 Feb 2009 20:44:09 GMT</pubDate></item></channel></rss>