Wiki ⇒ Upgrading or Switching ⇒ 9.3 to 10.0 ⇒ html vs xml/tal themes ⇒ CPG Dragonfly™ CMS
WikiUpgrading or Switching9.3 to 10.0 ⇒ html vs xml/tal themes

4.5. 3: html vs xml/tal themes Parent


v9 PHP $result = $db->sql_query("SELECT tid, pid, sid, date, name, email, host_name, subject, comment, score, reason FROM {$prefix}_comments WHERE pid='{$tid}' ORDER BY date, tid"); while ($row = $db->sql_fetchrow($result)) { $cpgtpl->assign_block_vars('comment', array( 'I_SCORE' => $row['score'], 'S_SUBJECT' => $row['subject'], 'S_BYNAME' => _BY.' '.$row['name'], 'S_NAME' => $row['name'], 'S_DATE' => formatDateTime($row['date'], _DATESTRING), 'S_COMMENT' => decode_bb_all($comment), )); } $db->sql_freeresult($result); v10 PHP $cpgtpl->comments = $db->query("SELECT tid, pid, sid, date, name, email, host_name, subject, comment, score, reason FROM {$db->TBL->comments} WHERE pid='{$tid}' ORDER BY date, tid"); v9 HTML <!-- BEGIN comment --> <div> <b>{comment.S_SUBJECT}</b> <span class="content"> etc... </span> </div> <!-- END comment --> v10 XML <div tal:repeat="comment comments"> <b tal:content="comment/subject"></b> <span class="content"> etc... </span> </div>

Created: Wednesday, April 24, 2013 (00:10:13) by DJ Maze
Updated: Wednesday, April 24, 2013 (00:22:45) by DJ Maze