Subject: Moving miscellaneous MarkUp #3
This time in forumlist.html:
These changes are mark-up neutral in the web pages.
@@ -248,16 +248,16 @@
{endif}
{-- if or $forumlistCount (not $forumlistTopForum)}
- {if and (or $forumlistActionAddForum $forumlistActionAdvanced) (not $threadlistActionAdvanced)}{-- advanced options}
- {if or or $forumlistActionAdvanced $forumlistActionMarkRead $forumlistActionAddForum}
+ {if and (or $forumlistActionAddForumLink $forumlistActionAdvanced) (not $threadlistActionAdvanced)}{-- advanced options}
+ {if or or $forumlistActionAdvanced $forumlistActionMarkReadLink $forumlistActionAddForumLink}
<div class="all_forum_actions_bottom">
{set $div ""}
{if and $forumlistActionAdvanced (not $threadlistActionAdvanced)}
{$div}<a href="javascript:nothing()" onclick="setImageId('advanced_link_img_forums', toggleVisIdScroll('advanced_options_forums') == 1, '{
imgurl}arrow_down.png', '{imgurl}arrow_right.png')"><img {$UNBImage.arrow_down} id="advanced_link_img_forums" /> {tr "advanced options"}</a>
{set $div " · "}
{endif}
- {if $forumlistActionMarkRead}{$div}{$forumlistActionMarkRead}{set $div " · "}{endif}
- {if $forumlistActionAddForum}{$div}{$forumlistActionAddForum}{set $div " · "}{endif}
+ {if $forumlistActionMarkReadLink}{$div}<a href="{$forumlistActionMarkReadLink}"><img {$UNBImage.unread} /> {tr "mark all forums read"}</a>{set $di
v " · "}{endif}
+ {if $forumlistActionAddForumLink}{$div}<a href="{$forumlistActionAddForumLink}"><img {$UNBImage.add} /> {tr "forum.new"}</a>{set $div " · "
}{endif}
</div>
{endif}
{endif}
@@ -275,9 +275,8 @@
<h1>{tr "forum.advanced options"}</h1>
<div class="advanced_options_container">
<div class="advanced_options_content">
- {$forumlistAdvIgnoreForum}
- {$forumlistAdvHideForum}
- {$forumlistAdvShowHiddenForums}
+{foreach $action in $forumlistActionAdvanced}
+ <div class="advanced_option"><a href="{$action.link}">{$action.option}</a><div class="advanced_subtitle">{$action.subtitle}</div></div>{endforeach}
</div><!-- advanced_options_content -->
</div><!-- advanced_options_container -->
{set $ShadowBottomOffset 0}
The relevant changes in main.inc.php are{endif}
{-- if or $forumlistCount (not $forumlistTopForum)}
- {if and (or $forumlistActionAddForum $forumlistActionAdvanced) (not $threadlistActionAdvanced)}{-- advanced options}
- {if or or $forumlistActionAdvanced $forumlistActionMarkRead $forumlistActionAddForum}
+ {if and (or $forumlistActionAddForumLink $forumlistActionAdvanced) (not $threadlistActionAdvanced)}{-- advanced options}
+ {if or or $forumlistActionAdvanced $forumlistActionMarkReadLink $forumlistActionAddForumLink}
<div class="all_forum_actions_bottom">
{set $div ""}
{if and $forumlistActionAdvanced (not $threadlistActionAdvanced)}
{$div}<a href="javascript:nothing()" onclick="setImageId('advanced_link_img_forums', toggleVisIdScroll('advanced_options_forums') == 1, '{
imgurl}arrow_down.png', '{imgurl}arrow_right.png')"><img {$UNBImage.arrow_down} id="advanced_link_img_forums" /> {tr "advanced options"}</a>
{set $div " · "}
{endif}
- {if $forumlistActionMarkRead}{$div}{$forumlistActionMarkRead}{set $div " · "}{endif}
- {if $forumlistActionAddForum}{$div}{$forumlistActionAddForum}{set $div " · "}{endif}
+ {if $forumlistActionMarkReadLink}{$div}<a href="{$forumlistActionMarkReadLink}"><img {$UNBImage.unread} /> {tr "mark all forums read"}</a>{set $di
v " · "}{endif}
+ {if $forumlistActionAddForumLink}{$div}<a href="{$forumlistActionAddForumLink}"><img {$UNBImage.add} /> {tr "forum.new"}</a>{set $div " · "
}{endif}
</div>
{endif}
{endif}
@@ -275,9 +275,8 @@
<h1>{tr "forum.advanced options"}</h1>
<div class="advanced_options_container">
<div class="advanced_options_content">
- {$forumlistAdvIgnoreForum}
- {$forumlistAdvHideForum}
- {$forumlistAdvShowHiddenForums}
+{foreach $action in $forumlistActionAdvanced}
+ <div class="advanced_option"><a href="{$action.link}">{$action.option}</a><div class="advanced_subtitle">{$action.subtitle}</div></div>{endforeach}
</div><!-- advanced_options_content -->
</div><!-- advanced_options_container -->
{set $ShadowBottomOffset 0}
- @@ -1285,11 +1285,11 @@
- $new_forums &&
- $forums_count)
- {
- - $TP['forumlistActionMarkRead'] = '<a href="' . UnbLink('@this', 'id=' . $parent . '&allforumsread=1×tamp=' . time() . '&key=' . UnbUrlGetKey(
- ), true) . '"><img ' . $UNB['Image']['unread'] . ' /> ' . $UNB_T['mark all forums read'] . '</a>';
- + $TP['forumlistActionMarkReadLink'] = UnbLink('@this', 'id=' . $parent . '&allforumsread=1×tamp=' . time() . '&key=' . UnbUrlGetKey(), true);
- }
- if (UnbCheckRights('addforum', $toplevel))
- {
- - $TP['forumlistActionAddForum'] = '<a href="' . UnbLink('@this', 'id=' . $toplevel . '&addparent=' . $toplevel . '#here', true) . '"><img ' . $UNB[
- 'Image']['add'] . ' /> ' . $UNB_T['forum.new'] . '</a>';
- + $TP['forumlistActionAddForumLink'] = UnbLink('@this', 'id=' . $toplevel . '&addparent=' . $toplevel . '#here', true);
- }
- if (!$forums_count && !$toplevel)
- @@ -1298,6 +1298,7 @@
- // advanced options area
- if ($TP['forumlistActionAdvanced'])
- {
- if ($toplevel > 0)
- {
- $forum = new IForum($toplevel);
- @@ -1305,24 +1306,24 @@
- {
- if ($UNB['LoginUser']->GetForumFlag($toplevel, UNB_UFF_IGNORE))
- {
- - $TP['forumlistAdvIgnoreForum'] = '<div class="advanced_option"><a href="' . UnbLink('@this', 'id=' . $toplevel . '&unignor
- eforum=' . $toplevel . '&key=' . UnbUrlGetKey(), true) . '">' . $UNB_T['forum.advanced.unignore'] . '</a><div class="advanced_subtitle">' . $UNB_T['forum.advanced.ignore~
- '] . ' ' . $UNB_T['forum.advanced.ignoring'] . '</div></div>';
- + $TP['forumlistActionAdvanced'][] = array('link' => UnbLink('@this', 'id=' . $toplevel . '&unignoreforum=' . $toplevel . '&
- key=' . UnbUrlGetKey(), true), 'option' => $UNB_T['forum.advanced.unignore'], 'subtitle' => $UNB_T['forum.advanced.ignore~'] . ' ' . $UNB_T['forum.advanced.ignoring']);
- }
- else
- {
- - $TP['forumlistAdvIgnoreForum'] = '<div class="advanced_option"><a href="' . UnbLink('@this', 'id=' . $toplevel . '&ignoref
- orum=' . $toplevel . '&key=' . UnbUrlGetKey(), true) . '">' . $UNB_T['forum.advanced.ignore'] . '</a><div class="advanced_subtitle">' . $UNB_T['forum.advanced.ignore~'] .
- ' ' . $UNB_T['forum.advanced.not ignoring'] . '</div></div>';
- + $TP['forumlistActionAdvanced'][] = array('link' => UnbLink('@this', 'id=' . $toplevel . '&ignoreforum=' . $toplevel . '&ke
- y=' . UnbUrlGetKey(), true), 'option' => $UNB_T['forum.advanced.ignore'], 'subtitle' => $UNB_T['forum.advanced.ignore~'] . ' ' . $UNB_T['forum.advanced.not ignoring']);
- }
- }
- if ($UNB['LoginUser']->GetForumFlag($toplevel, UNB_UFF_HIDE))
- {
- - $TP['forumlistAdvHideForum'] = '<div class="advanced_option"><a href="' . UnbLink('@this', 'id=' . $toplevel . '&unhideforum=' . $
- toplevel . '&key=' . UnbUrlGetKey(), true) . '">' . $UNB_T['forum.advanced.unhide'] . '</a><div class="advanced_subtitle">' . $UNB_T['forum.advanced.hide~'] . ' ' . $UNB_
- T['forum.advanced.hiding'] . '</div></div>';
- + $TP['forumlistActionAdvanced'][] = array('link' => UnbLink('@this', 'id=' . $toplevel . '&unhideforum=' . $toplevel . '&key=' . Un
- bUrlGetKey(), true), 'option' => $UNB_T['forum.advanced.unhide'], 'subtitle' => $UNB_T['forum.advanced.hide~'] . ' ' . $UNB_T['forum.advanced.hiding']);
- }
- else
- {
- - $TP['forumlistAdvHideForum'] = '<div class="advanced_option"><a href="' . UnbLink('@this', 'id=' . $toplevel . '&hideforum=' . $to
- plevel . '&key=' . UnbUrlGetKey(), true) . '">' . $UNB_T['forum.advanced.hide'] . '</a><div class="advanced_subtitle">' . $UNB_T['forum.advanced.hide~'] . ' ' . $UNB_T['f
- orum.advanced.not hiding'] . '</div></div>';
- + $TP['forumlistActionAdvanced'][] = array('link' => UnbLink('@this', 'id=' . $toplevel . '&hideforum=' . $toplevel . '&key=' . UnbU
- rlGetKey(), true), 'option' => $UNB_T['forum.advanced.hide'], 'subtitle' => $UNB_T['forum.advanced.hide~'] . ' ' . $UNB_T['forum.advanced.not hiding']);
- }
- }
- - $TP['forumlistAdvShowHiddenForums'] = '<div class="advanced_option"><a href="' . UnbLink('@this', array('id' => $toplevel, 'showhidden_f' => true)
- , true) . '">' . $UNB_T['show hidden forums'] . '</a><div class="advanced_subtitle">' . $UNB_T['show hidden forums~'] . '</div></div>';
- how hidden forums'], 'subtitle' => $UNB_T['show hidden forums~']);
- }
- }
Alala, Alala, Gimme three wishes - CSS

jense
Show profile
Link to this post
Done.