Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
6 - 4 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
query("select count(id) from ".$xoopsDB->prefix("test").""); list($numrows) = $xoopsDB->fetchRow($sql); $result = $xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix("test")." order by id desc limit ".$options[1].""); while($myrow = $xoopsDB->fetchArray($result)){ $mytest= array(); $mytest['name'] = $myts->htmlSpecialChars($myrow['name']); $block['lang_xname'] = _MB_MYNAME; $block['mytest'][] = $mytest; } return $block; } function b_news_blocks_edit($options) { $form = "Noumber of Names  "; $form .= ""; $form .= " #"; return $form; }[/code] this is my Template which prints the result in Row , I need it to print it out to 2 column . [code] [/code][/quote]" />

Re: Column Layout in Smarty
by Dylian on 2010/1/28 17:10:22

Try this:
le="color: #000000"><?php <table cellpadding="5" cellspacing="5" class="outer"> <tr> <{foreach item=mytest from=$block.mytest}> <td class="even"> <div> <{$mytest.name}> </div> </td> <{/foreach}> </tr> </table>


And please stop sending me pm's everytime you've got a problem. If noone reacted to your help request for a week or two then you can send me a pm, but not just a day after you posted you help request...

Greets Dylian.
Column Layout in Smarty
by xsell on 2010/1/27 0:46:08

Hello..

My Quastion Very Simple , How to Make My block Prints out the Records into Column instaed Row ..

this is my Block Code.
le="color: #000000"><?php include_once XOOPS_ROOT_PATH."/include/xoopscodes.php"; function b_news_blocks_show($options) { global $xoopsUser, $xoopsConfig, $xoopsDB; $block = array(); $myts =& MyTextSanitizer::getInstance(); $sql=$xoopsDB->query("select count(id) from ".$xoopsDB->prefix("test").""); list($numrows) = $xoopsDB->fetchRow($sql); $result = $xoopsDB->query("SELECT id FROM ".$xoopsDB->prefix("test")." order by id desc limit ".$options[1].""); while($myrow = $xoopsDB->fetchArray($result)){ $mytest= array(); $mytest['name'] = $myts->htmlSpecialChars($myrow['name']); $block['lang_xname'] = _MB_MYNAME; $block['mytest'][] = $mytest; } return $block; } function b_news_blocks_edit($options) { $form = "Noumber of Names &nbsp;"; $form .= "<input type='hidden' name='options[]' value='"; $form .= "date'"; $form .= " />"; $form .= "<input type='text' name='options[]' value='".$options[1]."' />&nbsp;#"; return $form; }


this is my Template which prints the result in Row , I need it to print it out to 2 column .
le="color: #000000"><?php <table cellpadding="5" cellspacing="5" class="outer"> <{foreach item=mytest from=$block.mytest}> <tr> <td class="even"> <div> <{$mytest.name}></div> </td> </tr> <tr> <{/foreach}> </tr> </table>

Who's Online

203 user(s) are online (167 user(s) are browsing Support Forums)


Members: 0


Guests: 203


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits