mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Added theme row colour/class support
git-svn-id: file:///svn/phpbb/trunk@1046 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
f1233468cf
commit
01f0a5d16c
4 changed files with 21 additions and 11 deletions
|
@ -310,9 +310,14 @@ switch($mode)
|
|||
//
|
||||
// Loop throuh the rows of smilies setting block vars for the template.
|
||||
//
|
||||
for( $i = 0; $i < count($smilies); $i++ )
|
||||
for($i = 0; $i < count($smilies); $i++)
|
||||
{
|
||||
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
|
||||
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
|
||||
|
||||
$template->assign_block_vars("smiles", array(
|
||||
"ROW_COLOR" => "#" . $row_color,
|
||||
"ROW_CLASS" => $row_class,
|
||||
"SMILEY_IMG" => $phpbb_root_path . '/' . $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'],
|
||||
"CODE" => $smilies[$i]['code'],
|
||||
"EMOT" => $smilies[$i]['emoticon'],
|
||||
|
|
|
@ -209,7 +209,12 @@ else
|
|||
$replacement = $word_rows[$i]['replacement'];
|
||||
$word_id = $word_rows[$i]['word_id'];
|
||||
|
||||
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
|
||||
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
|
||||
|
||||
$template->assign_block_vars("words", array(
|
||||
"ROW_COLOR" => "#" . $row_color,
|
||||
"ROW_CLASS" => $row_class,
|
||||
"WORD" => $word,
|
||||
"REPLACEMENT" => $replacement,
|
||||
"U_WORD_EDIT" => append_sid("admin_words.$phpEx?mode=edit&id=$word_id"),
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<P>{L_SMILEY_TEXT}</p>
|
||||
|
||||
<form method="GET" action="{S_SMILEY_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<form method="get" action="{S_SMILEY_ACTION}"><table cellspacing="1" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<th>{L_CODE}</th>
|
||||
<th>{L_SMILE}</th>
|
||||
|
@ -14,11 +14,11 @@
|
|||
</tr>
|
||||
<!-- BEGIN smiles -->
|
||||
<tr>
|
||||
<td class="row2">{smiles.CODE}</td>
|
||||
<td class="row2"><img src="{smiles.SMILEY_IMG}" alt="{smiles.CODE}" /></td>
|
||||
<td class="row2">{smiles.EMOT}</td>
|
||||
<td class="row2"><a href="{smiles.U_SMILEY_EDIT}">{L_EDIT}</a></td>
|
||||
<td class="row2"><a href="{smiles.U_SMILEY_DELETE}">{L_DELETE}</a></td>
|
||||
<td class="{smiles.ROW_CLASS}">{smiles.CODE}</td>
|
||||
<td class="{smiles.ROW_CLASS}"><img src="{smiles.SMILEY_IMG}" alt="{smiles.CODE}" /></td>
|
||||
<td class="{smiles.ROW_CLASS}">{smiles.EMOT}</td>
|
||||
<td class="{smiles.ROW_CLASS}"><a href="{smiles.U_SMILEY_EDIT}">{L_EDIT}</a></td>
|
||||
<td class="{smiles.ROW_CLASS}"><a href="{smiles.U_SMILEY_DELETE}">{L_DELETE}</a></td>
|
||||
</tr>
|
||||
<!-- END smiles -->
|
||||
<tr>
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
</tr>
|
||||
<!-- BEGIN words -->
|
||||
<tr>
|
||||
<td class="row2" align="center">{words.WORD}</td>
|
||||
<td class="row2" align="center">{words.REPLACEMENT}</td>
|
||||
<td class="row2"><a href="{words.U_WORD_EDIT}">{L_EDIT}</a></td>
|
||||
<td class="row2"><a href="{words.U_WORD_DELETE}">{L_DELETE}</a></td>
|
||||
<td class="{words.ROW_CLASS}" align="center">{words.WORD}</td>
|
||||
<td class="{words.ROW_CLASS}" align="center">{words.REPLACEMENT}</td>
|
||||
<td class="{words.ROW_CLASS}"><a href="{words.U_WORD_EDIT}">{L_EDIT}</a></td>
|
||||
<td class="{words.ROW_CLASS}"><a href="{words.U_WORD_DELETE}">{L_DELETE}</a></td>
|
||||
</tr>
|
||||
<!-- END words -->
|
||||
<tr>
|
||||
|
|
Loading…
Add table
Reference in a new issue