<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Default Image</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Default-Image-72318</link>
        <description></description>
        <pubDate>Fri, 10 Apr 2026 09:49:56 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Default-Image-72318" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [Jason] Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2210061#post2210061</link>
          <description><![CDATA[Awesome that worked...  thanks...  I'm working on something else with images in the news section and probably will have a question or 2 later... lol<br /><br />Thanks again<br />]]></description>
          <pubDate>Wed, 09 Mar 2011 14:55:34 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2210061#post2210061</guid>
        </item>
                <item>
          <title>Re: [kdub718] Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2210060#post2210060</link>
          <description><![CDATA[Hi,<br /><br />Since you only want to output the default image if no image has been uploaded, try moving the if statement outside the foreach loop like this:<br /><br /><code>&lt;?php foreach ($record['uploads'] as $upload): ?&gt;  <br />    &lt;?php if ($upload['hasThumbnail']): ?&gt;   <br />  <br />      &lt;a href=&quot;&lt;?php echo $upload['urlPath']; ?&gt;&quot;&gt;&lt;/a&gt;   <br />      &lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $upload['thumbUrlPath'] ?&gt;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;   <br />                      		  <br />    &lt;?php endif ?&gt;<br /><br />&lt;?php endforeach ?&gt;<br /><br />&lt;?php if(!$record['uploads']): ?&gt;<br /><br />  &lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;img src=&quot;images/defaultnewsimage.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;<br />&lt;?php endif ?&gt;</code><br /><br />Hope this helps<br />]]></description>
          <pubDate>Wed, 09 Mar 2011 14:46:19 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2210060#post2210060</guid>
        </item>
                <item>
          <title>Re: [Jason] Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2210059#post2210059</link>
          <description><![CDATA[Well I have tried a few different ways.  But the default image won't show up...  The Uploaded image that I have with the news shows up... so the &quot;if&quot; is working... But it also was working before I started this default image idea... lol... <br /><br />I'm gonna show you the entire news code I have maybe you will see something thats wrong... I dunno<br /><br /><code>&lt;div class=&quot;leftbox&quot;&gt;<br />                        &lt;!-- left--&gt;<br />                  &lt;div class=&quot;title&quot;&gt;<br />                    &lt;a href=&quot;news/&quot;&gt;NEWS ARCHIVES&lt;/a&gt;<br />                            &lt;img src=&quot;images/title.png&quot; alt=&quot;&quot; /&gt;<br />            	  &lt;/div&gt;        <br /> 					&lt;?php foreach ($newsRecords as $record): ?&gt;<br />                    &lt;div class=&quot;news&quot;&gt;<br />                        &lt;!-- news--&gt;<br />                      &lt;div class=&quot;info&quot;&gt;<br />                        &lt;!-- info--&gt;&lt;h3&gt;&lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;?php echo $record['title'] ?&gt;&lt;/a&gt;&lt;/h3&gt;<br />                              &lt;strong&gt;Published: &lt;?php echo date(&quot;D, M jS, Y&quot;, strtotime($record['date'])) ?&gt;&lt;/strong&gt;<br />                              	&lt;p&gt;<br />                                 &lt;?php $record['content']; echo maxWords($record['content'],43); ?&gt;... &lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt; Full Story&lt;/a&gt;<br />                            	&lt;/p&gt;<br />                      	&lt;/div&gt;<br />                            &lt;!-- end info--&gt;<br />                            &lt;?php foreach ($record['uploads'] as $upload): ?&gt; <br />  							&lt;?php if ($upload['hasThumbnail']): ?&gt;  <br /> <br />    						&lt;a href=&quot;&lt;?php echo $upload['urlPath']; ?&gt;&quot;&gt;&lt;/a&gt;  <br />    						&lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $upload['thumbUrlPath'] ?&gt;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;  <br />                      		 <br />  							&lt;?php else: ?&gt;   <br /> <br />    						&lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;img src=&quot;images/defaultnewsimage.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;<br />     <br />  							&lt;?php endif; ?&gt; <br />                            &lt;?php endforeach ?&gt;<br />                  		&lt;/div&gt;<br />                        &lt;?php endforeach ?&gt;<br />    					&lt;?php if (!$newsRecords): ?&gt;No records were found!<br />   					  &lt;?php endif ?&gt;<br />                    &lt;/div&gt;&lt;!-- end left--&gt;</code><br /><br />Thanks again for all your help.<br />]]></description>
          <pubDate>Wed, 09 Mar 2011 14:28:27 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2210059#post2210059</guid>
        </item>
                <item>
          <title>Re: [kdub718] Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2210038#post2210038</link>
          <description><![CDATA[Hi,<br /><br />The problem is that you're trying to end your foreach loop inside half of an if statement.  You're also trying to end your foreach loop in two places.  Since you're deciding whether or not to output the default image inside an if statement, you don't need to use a break.<br /><br />Try this instead:<br /><br /><code>&lt;?php foreach ($record['uploads'] as $upload): ?&gt;<br />  &lt;?php if ($upload['hasThumbnail']): ?&gt; <br /><br />    &lt;a href=&quot;&lt;?php echo $upload['urlPath']; ?&gt;&quot;&gt;&lt;/a&gt; <br />    &lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $upload['thumbUrlPath'] ?&gt;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt; <br />                      		<br />  &lt;?php else: ?&gt;  <br /><br />    &lt;img src=&quot;pathto/defaultimage.jpg&quot; /&gt;<br />    <br />  &lt;?php endif; ?&gt;<br />  <br />  &lt;/div&gt; <br />&lt;?php endforeach ?&gt;</code><br /><br />Hope this helps<br />]]></description>
          <pubDate>Tue, 08 Mar 2011 12:50:52 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2210038#post2210038</guid>
        </item>
                <item>
          <title>Re: [zip222] Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2210020#post2210020</link>
          <description><![CDATA[The maxWord worked perfectly thanks for that..<br /><br />but back to my default image...  I have it setup with a thumb nail..  I keep getting a syntax error on the &lt;?php endforeach ?&gt; thats after the &lt;?php break ?&gt;<br /><br /><code>&lt;?php foreach ($newsRecords as $record): ?&gt;<br />                    &lt;div class=&quot;news&quot;&gt;<br />                        &lt;!-- news--&gt;<br />                      &lt;div class=&quot;info&quot;&gt;<br />                        &lt;!-- info--&gt;&lt;h3&gt;&lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;?php echo $record['title'] ?&gt;&lt;/a&gt;&lt;/h3&gt;<br />                              &lt;strong&gt;Published: &lt;?php echo date(&quot;D, M jS, Y&quot;, strtotime($record['date'])) ?&gt;&lt;/strong&gt;<br />                              	&lt;p&gt;<br />                                 &lt;?php $record['content']; echo maxWords($record['content'],43); ?&gt;... &lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt; Full Story&lt;/a&gt;<br />                            	&lt;/p&gt;<br />                      	&lt;/div&gt;<br />                            &lt;!-- end info--&gt;<br />                            &lt;?php foreach ($record['uploads'] as $upload): ?&gt;<br />                            &lt;?php if ($upload['hasThumbnail']): ?&gt;<br />                     		&lt;a href=&quot;&lt;?php echo $upload['urlPath']; ?&gt;&quot;&gt;&lt;/a&gt;<br />                      		&lt;a href=&quot;news/&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php echo $upload['thumbUrlPath'] ?&gt;&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;<br />                      		&lt;?php break ?&gt;<br />                      		&lt;?php endforeach ?&gt;<br />                            &lt;?php else: ?&gt; <br />    						&lt;img src=&quot;pathto/defaultimage.jpg&quot; /&gt; <br />							&lt;?php endif; ?&gt;<br />                  		&lt;/div&gt;<br />                        &lt;?php endforeach ?&gt;<br />    					&lt;?php if (!$newsRecords): ?&gt;No records were found!<br />   					  &lt;?php endif ?&gt;<br />                    &lt;/div&gt;&lt;!-- end left--&gt;</code><br /><br />Maybe I can't do it with the thumbnail the way I have it...  Will I have to just use what you have and set my max width and height to make it thumbnail?<br />]]></description>
          <pubDate>Mon, 07 Mar 2011 16:41:56 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2210020#post2210020</guid>
        </item>
                <item>
          <title>Re: [kdub718] Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2209998#post2209998</link>
          <description><![CDATA[Hi,<br /><br />Take a look at this post:<br /><a target="_blank" href="http://www.interactivetools.com/forum/gforum.cgi?post=66587#66587">http://www.interactivetools.com/forum/gforum.cgi?post=66587#66587</a><br /><br />It describes a function called maxWords that you can use to display only a certain number of words from a field.<br /><br />Hope this helps<br />]]></description>
          <pubDate>Mon, 07 Mar 2011 13:44:14 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2209998#post2209998</guid>
        </item>
                <item>
          <title>Re: [zip222] Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2209974#post2209974</link>
          <description><![CDATA[Awesome, makes sense... Thank you... I have a couple more questions maybe you can help me with?  <br /><br />Right now in my cmsb I have a summary text field that I put a brief description in (say a paragraph of the full story) then I have a &quot;full story&quot; button that can be clicked to take them to the &quot;details&quot; page which obviously shows the entire story...  So the question I have is can I get rid of that extra text field in cmsb (1 less field to have) and put say a character limit or  line limit on the &quot;list&quot; page that will do that for me automatically? <br /><br />Does that make sense?<br />]]></description>
          <pubDate>Sat, 05 Mar 2011 18:52:25 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2209974#post2209974</guid>
        </item>
                <item>
          <title>Re: [kdub718] Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2209973#post2209973</link>
          <description><![CDATA[This can be done with an if/else statement.<br /><br />Assuming you are trying to do this on a list page, not a detail page:<br />Inside of the foreach loop that outputs the blog listings, use the code below. you will need to change the &quot;image&quot; variable (in two places) to match your particular field name.<br /><br /><code>&lt;?php if($record[&quot;image&quot;]):?&gt;<br />    &lt;?php foreach ($record['image'] as $upload): ?&gt;<br />        &lt;img src=&quot;&lt;?php echo $upload['urlPath'] ?&gt;&quot; width=&quot;&lt;?php echo $upload['width'] ?&gt;&quot; height=&quot;&lt;?php echo $upload['height'] ?&gt;&quot; /&gt;<br />    &lt;?php endforeach ?&gt;<br />&lt;?php else: ?&gt;<br />    &lt;img src=&quot;pathto/defaultimage.jpg&quot; /&gt;<br />&lt;?php endif; ?&gt;</code><br /><br />if you are trying to do this on a detail page, the code will need to change slightly.<br />]]></description>
          <pubDate>Sat, 05 Mar 2011 12:33:45 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2209973#post2209973</guid>
        </item>
                <item>
          <title>Default Image</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2209970#post2209970</link>
          <description><![CDATA[I have like a news/blog style page setup.  Basically I want a default image to show up on every post unless I upload one that actually goes with the post.  Anyone know how to do this?  I have tried a few different ways but wasn't successful...<br />]]></description>
          <pubDate>Fri, 04 Mar 2011 22:00:32 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2209970#post2209970</guid>
        </item>
              </channel>
    </rss>
  