<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Load an icon up only if a file has been loaded up</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Load-an-icon-up-only-if-a-file-has-been-loaded-up-79412</link>
        <description></description>
        <pubDate>Wed, 18 Nov 2026 20:00:35 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Load-an-icon-up-only-if-a-file-has-been-loaded-up-79412" rel="self" type="application/rss+xml" />

                <item>
          <title>Load an icon up only if a file has been loaded up</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2233665#post2233665</link>
          <description><![CDATA[<p>Hi,</p>
<p>Take a look at this tutorial with icon and code examples:</p>
<p><a href="http://askthecssguy.com/articles/showing-hyperlink-cues-with-css/" rel="nofollow">http://askthecssguy.com/articles/showing-hyperlink-cues-with-css/</a></p>
<p>CSS like this should get the results I think you are after:</p>
<p><code>a[href^="http:"] {    <br />    display:inline-block;    <br />    padding-right:14px;    <br />    background:transparent url(/Images/ExternalLink.gif) center right no-repeat;<br />}</code></p>
]]></description>
          <pubDate>Fri, 11 Apr 2014 10:14:11 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2233665#post2233665</guid>
        </item>
                <item>
          <title>Load an icon up only if a file has been loaded up</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2233657#post2233657</link>
          <description><![CDATA[<p>i have got this working for both pdfs and word documents:</p>
<p>&lt;?php foreach ($mindfulnessRecord['word_uploads'] as $index =&gt; $upload): ?&gt;<br />         &lt;p class="intro"&gt;&lt;?php if($upload['extension']=="docx"):?&gt; <br />               &lt;img src="../images/word-icon.png" width="25" height="28"&gt;<br />&lt;?php endif ?&gt;<br />          &lt;a href="&lt;?php echo $upload['urlPath'] ?&gt;" target="_blank"&gt;&lt;?php echo $upload['info1'] ?&gt;&lt;/a&gt;&lt;/p&gt;<br />&lt;?php endforeach ?&gt;</p>
<p>But I also need it to work for when I load content/links into a wysiwyg editor, can you explain how I can do it that please.</p>]]></description>
          <pubDate>Thu, 10 Apr 2014 03:59:03 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2233657#post2233657</guid>
        </item>
                <item>
          <title>Load an icon up only if a file has been loaded up</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2233656#post2233656</link>
          <description><![CDATA[<p>I tried the fle extension option but I obviously wasn't doing it properly, could you give me instructions for both methods for me to try again please.</p>
<p>Thanks for your help.</p>]]></description>
          <pubDate>Thu, 10 Apr 2014 02:32:01 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2233656#post2233656</guid>
        </item>
                <item>
          <title>Load an icon up only if a file has been loaded up</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2233654#post2233654</link>
          <description><![CDATA[<p>Hi,</p>
<p>You can use the file extension code to determine what the file type is:</p>
<p><code>&lt;?php echo $upload['extension'] ?&gt;</code></p>
<p>Then either you an if statement (if pdf display pdf icon) or you could control the icons using CSS:</p>
<p><code>... class="&lt;?php echo $upload['extension'] ?&gt;<br /></code></p>
<p>Let me know what method you want to go with and I can provide more details.</p>]]></description>
          <pubDate>Wed, 09 Apr 2014 09:26:15 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2233654#post2233654</guid>
        </item>
                <item>
          <title>Load an icon up only if a file has been loaded up</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2233649#post2233649</link>
          <description><![CDATA[<p>This is quite hard to explain, I want to be show an icon for a pdf, a word document or a link to webpage. I want it to only show if a file has been added to the CMS entry. So if there is nothing loaded up then the icon disappears. I ahev done something similar before but cannot work out how I have done it.</p>]]></description>
          <pubDate>Tue, 08 Apr 2014 06:57:51 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2233649#post2233649</guid>
        </item>
              </channel>
    </rss>
  