Hey guys.

There's not much I can say on the matter as i'm not a php master at all but i'm trying to edit this code:

					<table id="reviewListingTable" <?php if(count($this->Reviews) == 0) echo "style='display:none'"; ?> >
						<tr>
						    <th><?php echo $this->ReviewHeadings->title1Name;?></th>
			            	<th><?php echo $this->ReviewHeadings->title1Name;?></th>
			            	<th><?php echo $this->ReviewHeadings->title2Name;?></th>
			            	<th><?php echo $this->ReviewHeadings->title3Name;?></th>
			            	<th><?php echo $this->ReviewHeadings->rating;?></th>
				            <th><?php echo $this->ReviewHeadings->reviewer;?></th>
			            	<th><?php echo $this->ReviewHeadings->date;?></th>
						</tr>
						<?php
						$isAlt = false;
						foreach($this->Reviews as $r):
							$css = $isAlt ? 'odd' : 'even';
							$isAlt = !$isAlt;
							?>
						<tr class="<?php echo $css;?>">
						    <td><img src="<?php echo $r->thumbnailURL;?>"></td>
			            	<td><?php echo $r->title1;?></td>
			            	<td><?php echo $r->title2;?></td>
			            	<td><?php echo $r->title3;?></td>
			            	<td><?php echo $r->rating;?></td>
				            <td><?php echo $r->reviewer;?></td>
			            	<td><?php echo $r->date;?></td>
						</tr>
						<?php endforeach?>
					</table>

What i've done is add a td to show a thumbnail url that's dragged from the admin panel of my cms. Right now that code links the img src to the root of the site.

Here's the site:

http://highriserocks.com/rockon/index.php?option=com_simple_review&Itemid=57

Hope any of that helps!

Thanks

    AH, that would help haha.

    Well, if you check the link now:

    http://highriserocks.com/rockon/index.php?option=com_simple_review&Itemid=57

    I've hard coded one of the images in where just the title (all time low - nothing personal) should go. and the 2nd one I haven't.

    And you'll notice that there's a no image icon to the very left of each where i'm trying to call it.

    The URL to the review isn't really bad anymore because i've changed that but for SEO purposes i'd like to be able to call the thumbnail and make it work then have the title of the review back in the url again.

      ok, so whatever that class is you are using has 'thumbnailURL' == '/rockon/' and not the full url, thus the class is at fault somehow.

        Ah, and I suppose it's not easy to diagnose when it's some extension for a CMS either is it.

          Is it possible to do the following:

          instead of this code:

          <img src='<?php echo $details->thumbnailUrl;?>' width='50' height='50'/>

          could some php be written like an IF statement. like...

          if the reviews title is 'all time low - nothing personal' then remove the spaces and stick.jpg on the end and it will be in the folder /images/albums/ or something?

          So then I would save my image as alltimelownothingpersonal.jpg and upload it to that folder?

            sure that'd work, but the if would be for a file_exists() check, ie:

            $thumbs_path = 'images/thumbs/'; // relative, so we can use for both the src and the file_exists
            $filename = preg_replace( '/[^a-z]+/', '', strtolower( $title ) ).'.jpg';
            if ( file_exists( $thumbs_path.$filename ) )
            {
              echo "<img src='$thumbs_path$filename' alt='".htmlentities( $title, ENT_QUOTES )."' />";
            }
            else
            {
              echo '&nbsp;';
            }

              alternatively, just look through the class for where it is supposed set up the image path and make it work.

                Write a Reply...