steviez Posted August 23, 2008 Share Posted August 23, 2008 Hi, I am designing my site using the smarty template system and need to display my results in a horizontal way instaed of them just going down the page. Here is my code so far: PHP side: <?php $result = mysql_query("SELECT * FROM uploads WHERE owner = '".$_SESSION['username']."' AND album_id = '".$_GET['galleryID']."'"); while($row = @mysql_fetch_array($result)) $results[] = $row; $smarty->assign("results",$results); ?> Template side: <table class="gallery" align="center" border="0"> <tbody align="center"> <tr align="center"> {foreach from=$results item="row"} <td align="center"><div id="img_{$row.id}" class="image" style="text-align: center; margin: 0 auto;"> <div class="image"> <a href="#"><img src="{$site_url}/images/{$row.file_name}" border="0" alt="" id="{$row.id}" style="max-width: 250px;"></a> </div> <div style="clear: both; text-align: left"></div> <span class="pseudolink" onClick="delImage({$row.id})">delete</span> / <span class="pseudolink" id="clk_{$row.id}" onClick="toggleStg(event, {$row.id})">move</span> <div id="stg_{$row.id}" class="settings" style="display: none; text-align: left"> <nobr><b>Move to album:</b></nobr><br> <span class="pseudolink" onClick="xajax_moveImage({$row.id}, {$row.id})">{$gi.title}</span><br /> </div> </div> </td> {/foreach} </tr> </tbody> </table> Any help would be great! Link to comment https://forums.phpfreaks.com/topic/121028-bit-of-smarty-help-needed/ Share on other sites More sharing options...
DeanWhitehouse Posted August 23, 2008 Share Posted August 23, 2008 If i were you , i would not use smarty, when i used it is was very problematic. Link to comment https://forums.phpfreaks.com/topic/121028-bit-of-smarty-help-needed/#findComment-623884 Share on other sites More sharing options...
steviez Posted August 23, 2008 Author Share Posted August 23, 2008 I have no choice but to use it as im going to be selling the script and users need to be able to change the layout. Link to comment https://forums.phpfreaks.com/topic/121028-bit-of-smarty-help-needed/#findComment-623887 Share on other sites More sharing options...
DarkWater Posted August 23, 2008 Share Posted August 23, 2008 If i were you , i would not use smarty, when i used it is was very problematic. Not true, Smarty is a great system. =/ Quite honestly, this is an HTML problem. Link to comment https://forums.phpfreaks.com/topic/121028-bit-of-smarty-help-needed/#findComment-623888 Share on other sites More sharing options...
steviez Posted August 23, 2008 Author Share Posted August 23, 2008 If i were you , i would not use smarty, when i used it is was very problematic. Not true, Smarty is a great system. =/ Quite honestly, this is an HTML problem. is it? Link to comment https://forums.phpfreaks.com/topic/121028-bit-of-smarty-help-needed/#findComment-623889 Share on other sites More sharing options...
DeanWhitehouse Posted August 23, 2008 Share Posted August 23, 2008 Quote from: Blade280891 on Today at 08:29:54 PM If i were you , i would not use smarty, when i used it is was very problematic. Not true, Smarty is a great system. =/ darkwater how can it not be true, i did find it very problematic. Link to comment https://forums.phpfreaks.com/topic/121028-bit-of-smarty-help-needed/#findComment-623892 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.