<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Limit Upload Display - Mind Blank!</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Limit-Upload-Display---Mind-Blank-69240</link>
        <description></description>
        <pubDate>Sat, 14 Mar 2026 06:27:48 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Limit-Upload-Display---Mind-Blank-69240" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [Dave] Limit Upload Display - Mind Blank!</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2194042#post2194042</link>
          <description><![CDATA[Thank you!<br />]]></description>
          <pubDate>Sun, 02 Nov 2008 23:57:30 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2194042#post2194042</guid>
        </item>
                <item>
          <title>Re: [Perchpole] Limit Upload Display - Mind Blank!</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2193467#post2193467</link>
          <description><![CDATA[Hi perchpole,<br /><br />If you know all your uploads are images and will have thumbnails you can remove this code:<br /><br /><code>&lt;?php foreach ($record['gallery_images'] as $upload): ?&gt; <br />  <strike><span style="color:red">&lt;?php if ($upload['hasThumbnail']): ?&gt;</span></strike> <br />    &lt;img src=&quot;&lt;?php echo $upload['thumbUrlPath'] ?&gt;&quot; width=&quot;&lt;?php echo $upload['thumbWidth'] ?&gt;&quot; height=&quot;&lt;?php echo $upload['thumbHeight'] ?&gt;&quot; alt=&quot;&quot; /&gt; <br />  <strike><span style="color:red">&lt;?php endif ?&gt;</span></strike><br />&lt;?php endforeach ?&gt;</code><br /><br />Next, if you want to show just one image you can use <span style="color:red">break</span> like this to stop after just one:<br /><br /><code>&lt;?php foreach ($record['gallery_images'] as $upload): ?&gt; <br />  &lt;img src=&quot;&lt;?php echo $upload['thumbUrlPath'] ?&gt;&quot; width=&quot;&lt;?php echo $upload['thumbWidth'] ?&gt;&quot; height=&quot;&lt;?php echo $upload['thumbHeight'] ?&gt;&quot; alt=&quot;&quot; /&gt;<br />  <span style="color:red">&lt;?php break ?&gt;</span><br />&lt;?php endforeach ?&gt;</code><br /><br />And if you want a random image you can <span style="color:red">shuffle</span> your array first:<br /><br /><code><span style="color:red">&lt;?php shuffle($record['gallery_images']) ?&gt;</span><br />&lt;?php foreach ($record['gallery_images'] as $upload): ?&gt; <br />  &lt;img src=&quot;&lt;?php echo $upload['thumbUrlPath'] ?&gt;&quot; width=&quot;&lt;?php echo $upload['thumbWidth'] ?&gt;&quot; height=&quot;&lt;?php echo $upload['thumbHeight'] ?&gt;&quot; alt=&quot;&quot; /&gt;<br />  <span style="color:red">&lt;?php break ?&gt;</span><br />&lt;?php endforeach ?&gt;</code><br /><br />Hope that helps!<br />]]></description>
          <pubDate>Mon, 22 Sep 2008 18:14:48 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2193467#post2193467</guid>
        </item>
                <item>
          <title>Re: [sagentic] Limit Upload Display - Mind Blank!</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2193459#post2193459</link>
          <description><![CDATA[Hi, Kenny - <br /><br />Thanks for your input. I've already gone down the route you suggested but (as you hi lighted) it seems like an necessarily repetitive step! <br /><br />Ideally I'd like to be able to pluck out a random upload/image from the record and display it next to each entry on the listpage.  <br /><br />As with all things related to my CMS projects, I want to make the admin as easy (and as automated) as possible for the end-user - the client.<br /><br />:o)<br /><br />Perchpole<br />]]></description>
          <pubDate>Mon, 22 Sep 2008 07:01:52 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2193459#post2193459</guid>
        </item>
                <item>
          <title>Re: [Perchpole] Limit Upload Display - Mind Blank!</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2193458#post2193458</link>
          <description><![CDATA[Perch,<br /><br />The easiest thing I have found to do is to make a seperate &quot;preview image&quot; upload field.  This way the user can choose which picture to show as the preview image.  Limit this field to a one picture upload and code just this upload field into your list page.<br /><br />I know this means you have to upload the same picture twice (once as a preview image and once as a gallery image) but it does make it understandable for most users.<br /><br />As far as making this automatic, I haven't ever tried to code that so I'm not much help there.<br /><br />Kenny<br />]]></description>
          <pubDate>Sun, 21 Sep 2008 21:31:07 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2193458#post2193458</guid>
        </item>
                <item>
          <title>Limit Upload Display - Mind Blank!</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2193453#post2193453</link>
          <description><![CDATA[Hello, All - <br /><br />I'm sure we must have covered this before - but here we go anyway... <br /><br />On a List page, how do I limit the number of (image) uploads displayed with each record? <br /><br />I've just created a Gallery category which features multiple sections spread over many pages. Each page includes a Title, some Content text and about 24 uploaded images. <br /><br />The galleryList.php is the index from which visitors can access each gallery page. Alongside each link I would like to display a single random thumbnail image (from the corresponding section).  <br /><br />The basic code would be something like this... <br /><br /><br /> <code>&lt;?php<br />  <br />  require_once &quot;/xyz/viewer_functions.php&quot;; <br /><br />  list($galleryRecords, $galleryMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'gallery',<br />  )); <br /><br />?&gt; <br /><br /><br />&lt;?php foreach ($galleryRecords as $record): ?&gt;<br />  <br />  &lt;a href=&quot;&lt;?php echo $record['_link'] ?&gt;&quot;&gt;&lt;?php echo $record['title'] ?&gt;&lt;/a&gt; <br /><br /><br />     &lt;?php foreach ($record['gallery_images'] as $upload): ?&gt;<br />          &lt;?php if ($upload['hasThumbnail']): ?&gt;<br />            &lt;img src=&quot;&lt;?php echo $upload['thumbUrlPath'] ?&gt;&quot; width=&quot;&lt;?php echo $upload['thumbWidth'] ?&gt;&quot; height=&quot;&lt;?php echo $upload['thumbHeight'] ?&gt;&quot; alt=&quot;&quot; /&gt;<br />          &lt;?php endif ?&gt;<br />     &lt;?php endforeach ?&gt; <br /><br />&lt;?php endforeach; ?&gt; <br /><br /> </code><br /> <br /><br /><br />It seems simple enough but I can't remember how to limit the number of thumbnails. Instead of a single image I get one of every picture in each gallery! The only way I've been able to control this is by inserting a <span style="color: #ff0000">&lt;?php break; ?&gt;[/#ff0000] - but this seems rather clumsy! <br /><br />Surely there must be a more elegant way of controlling which and how many thumbnails are displayed?<br /><br />:0)<br /><br />Perch<br />]]></description>
          <pubDate>Sat, 20 Sep 2008 18:49:07 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2193453#post2193453</guid>
        </item>
              </channel>
    </rss>
  