PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Old October 19th, 2017, 03:02 PM
Moab Moab is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Oct 2017
Posts: 1 Moab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 m 3 sec
Reputation Power: 0
templating - Issue showing thumbs of pictures in a table

Hi All, I have some code here, where I am trying to show a table of pictures, fed from information of an sql database in the back. I can post a picture on my template and it will get shown when I view the page next time in the browser. The code below also should show pictures two and three as thumbs and than when clicked as full size. Can someone have a check if there is something wrong, especially with

the code here
<a><img src="<? print $TPL_thumb_url; ?>" <? print get_imageprops($TPL_thumb_url,100) ?> onClick="change('gr','<? print $TPL_pict_url;?>')" border="0"></a>


full table looks like this

<table align="center" width="650">
<tr>
<?
if($TPL_pict_url)
{
?>
<td rowspan="3" height="455" width="455" align="center">
<?
if($TPL_pict_url2)
{
?>
<center class="content">
Zur Ansicht die Vorschau-Bilder rechts anklicken
</center>
<?
}
?>
<table border="0" cellpadding="0" cellspacing="0" width="452" height="452">
<!--DWLayoutTable-->
<tr>
<td width="1"></td>
<td width="451" height="380" align="center" valign="middle">
<img src="<? print $TPL_pict_url;?>" name="gr" border="0"> </td>
</tr>
<tr>
<td></td>
<td height="61">&nbsp;</td>
</tr>
</table>
<?
}
else
{
?>
<td colspan="3" align="center">
<?
}
?>
</td>

<td align="center">
<?
if($TPL_pict_url)
{
?>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="100" height="100"><tr><td align="center" valign="middle">
<a><img src="<? print $TPL_thumb_url; ?>" <? print get_imageprops($TPL_thumb_url,100) ?> onClick="change('gr','<? print $TPL_pict_url;?>')" border="0"></a>
</td></tr></table>
<?
}
?>
</td>
</tr>

<tr>
<td align="center">
<?
if($TPL_pict_url2)
{
?>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="100" height="100"><tr><td align="center" valign="middle">
<img src="<? print $TPL_thumb_url2; ?>" <? print get_imageprops($TPL_thumb_url2,100) ?> onClick="change('gr','<? print $TPL_pict_url2;?>')" border="0">
</td></tr></table>
<?
}
?>
</td>
</tr>

<tr>
<td align="center">
<?
if($TPL_pict_url3)
{
?>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="100" height="100"><tr><td align="center" valign="middle">
<img src="<? print $TPL_thumb_url3; ?>" <? print get_imageprops($TPL_thumb_url3,100) ?> onClick="change('gr','<? print $TPL_pict_url3;?>')" border="0">
</td></tr></table>
<?
}
?>
</td>
</tr>
</table>
<?
if (!$TPL_pict_url)
{
?>
<table width="100%" border="0">
<tr>
<td align="center"><font color="black" size="2" face="arial" class="grey">
No Pictures available
</font></td>
</tr>
</table>
<?
}
?> </td>
</tr>
</table>

Many thanks in advance!!!

Reply With Quote
Old April 17th, 2018, 12:09 PM
icandothat's Avatar
icandothat icandothat is offline
Super Moderator
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: San Diego, CA
Posts: 1,736 icandothat User rank is Private First Class (20 - 50 Reputation Level)icandothat User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 3 Days 11 h 4 m 25 sec
Reputation Power: 13
Are you saying that it doesn't show the first time but does after you close your browser and return? If that's the case it sounds like a caching issue in your browser. do This. look at your site in whatever browser you normally use. Then make your change. Then open your site in a different browser to see if the change is made. If it is you're good. A cheeky way to fix this is add a time based string to the end of your image. For example your src could look like this <img src='/image/pic.jpg?378729238456' /> Where that string at the end is a time stamp that you append using the php time() function. This prevents your client from caching the content because it always looks like new content.
__________________
There is no spoon.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > templating - Issue showing thumbs of pictures in a table


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap