diff options
| -rw-r--r-- | admin/admin_bitboards_inc.php | 8 | ||||
| -rw-r--r-- | styles/bitboards.css | 45 | ||||
| -rw-r--r-- | templates/admin_bitboards.tpl | 72 | ||||
| -rw-r--r-- | templates/board.tpl | 8 | ||||
| -rw-r--r-- | templates/board_cat.tpl | 8 | ||||
| -rw-r--r-- | templates/board_table.tpl | 98 | ||||
| -rw-r--r-- | templates/flipswitch.tpl | 4 | ||||
| -rw-r--r-- | templates/header_inc.tpl | 64 | ||||
| -rw-r--r-- | templates/post.tpl | 78 | ||||
| -rw-r--r-- | templates/post_display.tpl | 2 | ||||
| -rw-r--r-- | templates/topic.tpl | 217 |
11 files changed, 326 insertions, 278 deletions
diff --git a/admin/admin_bitboards_inc.php b/admin/admin_bitboards_inc.php index e5b1a65..77d8d7d 100644 --- a/admin/admin_bitboards_inc.php +++ b/admin/admin_bitboards_inc.php @@ -1,5 +1,5 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_boards/admin/Attic/admin_bitboards_inc.php,v 1.7 2006/07/29 17:14:26 spiderr Exp $ +// $Header: /cvsroot/bitweaver/_bit_boards/admin/Attic/admin_bitboards_inc.php,v 1.8 2006/08/31 13:36:30 squareing Exp $ // Copyright (c) 2005 bitweaver BitBoards // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. @@ -15,15 +15,15 @@ require_once( BITBOARDS_PKG_PATH.'BitBoard.php' ); $formBitBoardsLists = array( 'bitboards_thread_track' => array( 'label' => 'Enable Topic Status Tracking', - 'note' => 'Allow users to see what topic have been changed since they last logged on', + 'note' => 'Allow users to see what topic have been changed since they last logged on.', ), 'bitboards_thread_notification' => array( 'label' => 'Enable Topic Reply Notification', - 'note' => 'Allow users to be sent emails when topics they are interested in recive replies', + 'note' => 'Allow users to be sent emails when topics they are interested in recive replies.', ), 'bitboards_post_anon_moderation' => array( 'label' => 'Enable Forced Anon Post Moderation', - 'note' => 'Require that ALL Anon posts must be validated before they are shown', + 'note' => 'Require that ALL Anonymous posts must be validated before they are shown.', ), ); $gBitSmarty->assign( 'formBitBoardsLists',$formBitBoardsLists ); diff --git a/styles/bitboards.css b/styles/bitboards.css index 0712543..a011bae 100644 --- a/styles/bitboards.css +++ b/styles/bitboards.css @@ -1,23 +1,3 @@ -.mb-sticky td { - background-color: red; -} - -.mb-even-unapproved td { - background-color: #FF3366; -} - -.mb-odd-unapproved td { - background-color: #FF3399; -} - -.mb-even-moved td { - background-color: #FF6600; -} - -.mb-odd-moved td { - background-color: #FF9900; -} - .mb-row-even { background-color: #99CC99; } @@ -50,10 +30,6 @@ margin-bottom: 0.3em; } -.mb-cat-indent { - padding: 2px; - padding-left: 2em; -} .mb-table .header h1 { background-image: none; @@ -101,4 +77,23 @@ border: 1px #aaa solid; background: #f7f7f7; padding: 2px; -}
\ No newline at end of file +} + +/* +.from --> .to +.mb-even-unapproved td --> .even.uapproved {} +.mb-odd-unapproved td --> .odd.uapproved {} +.mb-even-moved td --> .even.moved {} +.mb-odd-moved td --> .odd.moved {} +.mb-cat-indent --> .indent {} +.mb-sticky td --> .highlight {} +unregistered user post highlight + --> .bitboard a.highlight {} +*/ + +.bitboard tr.odd.unapproved {background:pink;} +.bitboard tr.even.unapproved {background:purple;} +.bitboard tr.odd.moved {background:pink;} +.bitboard tr.even.moved {background:purple;} +.bitboard div.indent {margin-left:2em;} +.bitboard tr.highlight {background:#fdc;} diff --git a/templates/admin_bitboards.tpl b/templates/admin_bitboards.tpl index ac30e07..51c84ac 100644 --- a/templates/admin_bitboards.tpl +++ b/templates/admin_bitboards.tpl @@ -1,46 +1,40 @@ {strip} {form} - {jstabs} - {jstab title="Home Message Board"} - {legend legend="Home Message Board"} - <input type="hidden" name="page" value="{$page}" /> - <div class="row"> - {formlabel label="Home BitBoards (main bitboard)" for="homeBitBoards"} - {forminput} - <select name="homeBitBoards" id="homeBitBoards"> - {section name=ix loop=$bitboards} - <option value="{$bitboards[ix].bitboards_id|escape}" {if $bitboards[ix].bitboards_id eq $home_bitboard}selected="selected"{/if}>{$bitboards[ix].title|escape|truncate:20:"...":true}</option> - {sectionelse} - <option>{tr}No records found{/tr}</option> - {/section} - </select> - {/forminput} - </div> + {legend legend="Home Message Board"} + <input type="hidden" name="page" value="{$page}" /> + <div class="row"> + {formlabel label="Home BitBoards (main bitboard)" for="homeBitBoards"} + {forminput} + <select name="homeBitBoards" id="homeBitBoards"> + {section name=ix loop=$bitboards} + <option value="{$bitboards[ix].bitboards_id|escape}" {if $bitboards[ix].bitboards_id eq $home_bitboard}selected="selected"{/if}>{$bitboards[ix].title|escape|truncate:20:"...":true}</option> + {sectionelse} + <option>{tr}No records found{/tr}</option> + {/section} + </select> + {/forminput} + </div> - <div class="row submit"> - <input type="submit" name="homeTabSubmit" value="{tr}Change preferences{/tr}" /> - </div> - {/legend} - {/jstab} + <div class="row submit"> + <input type="submit" name="homeTabSubmit" value="{tr}Change preferences{/tr}" /> + </div> + {/legend} - {jstab title="List Settings"} - {legend legend="List Settings"} - <input type="hidden" name="page" value="{$page}" /> - {foreach from=$formBitBoardsLists key=item item=output} - <div class="row"> - {formlabel label=`$output.label` for=$item} - {forminput} - {html_checkboxes name="$item" values="y" checked=$gBitSystem->getConfig($item) labels=false id=$item} - {formhelp note=`$output.note` page=`$output.page`} - {/forminput} - </div> - {/foreach} + {legend legend="List Settings"} + <input type="hidden" name="page" value="{$page}" /> + {foreach from=$formBitBoardsLists key=item item=output} + <div class="row"> + {formlabel label=`$output.label` for=$item} + {forminput} + {html_checkboxes name="$item" values="y" checked=$gBitSystem->getConfig($item) labels=false id=$item} + {formhelp note=`$output.note` page=`$output.page`} + {/forminput} + </div> + {/foreach} - <div class="row submit"> - <input type="submit" name="listTabSubmit" value="{tr}Change preferences{/tr}" /> - </div> - {/legend} - {/jstab} - {/jstabs} + <div class="row submit"> + <input type="submit" name="listTabSubmit" value="{tr}Change preferences{/tr}" /> + </div> + {/legend} {/form} {/strip} diff --git a/templates/board.tpl b/templates/board.tpl index ba3ed20..bc6ee7f 100644 --- a/templates/board.tpl +++ b/templates/board.tpl @@ -1,18 +1,14 @@ -{* $Header: /cvsroot/bitweaver/_bit_boards/templates/Attic/board.tpl,v 1.7 2006/07/29 15:10:00 hash9 Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_boards/templates/Attic/board.tpl,v 1.8 2006/08/31 13:36:30 squareing Exp $ *} {strip} -<div class="floaticon">{bithelp}</div> - <div class="listing bitboard"> <div class="header"> - <h1>Boards</h1> + <h1>Boards</h1> </div> <div class="body"> - <div class="mb-cat-list"> {foreach from=$ns item=child} {include file="bitpackage:bitboards/board_cat.tpl" child=$child color=$color} {/foreach} - </div> </div><!-- end .body --> </div><!-- end .admin --> {/strip} diff --git a/templates/board_cat.tpl b/templates/board_cat.tpl index 937cd30..24cf670 100644 --- a/templates/board_cat.tpl +++ b/templates/board_cat.tpl @@ -1,15 +1,17 @@ {strip} <h2>{$child.data.title}</h2> + {if count($child.members) > 0} - <div class="mb-cat-indent"> + <div class="indent"> {include file="bitpackage:bitboards/board_table.tpl" boardsList=$child.members} </div> {/if} + {if !empty($child.sub_count) && count($child.children)>0} - <div class="mb-cat-indent"> + <div class="indent"> {foreach from=$child.children item=schild} {include file="bitpackage:bitboards/board_cat.tpl" child=$schild color=$scolor} {/foreach} </div> {/if} -{/strip}
\ No newline at end of file +{/strip} diff --git a/templates/board_table.tpl b/templates/board_table.tpl index 067d5be..8220060 100644 --- a/templates/board_table.tpl +++ b/templates/board_table.tpl @@ -1,47 +1,63 @@ {strip} - <table class="mb-table"> - <tr> - <th width="1">{if $boardsList.0.track.on}<small>UBSI</small>{/if}</th> - <th style="text-align:left;white-space: nowrap;">Title</th> - <th>Topics</th> - <th>{tr}Last Post{/tr}</th> - <th></th> - {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} - <th>Anon</th> +<table class="data"> + <tr> + <th style="width:1%;">{*if $boardsList.0.track.on}Status{/if*}</th> + <th style="width:35%;">{tr}Board{/tr}</th> + <th style="width:40%;">{tr}Post{/tr}</th> + <th style="width:5%;">{tr}Topics{/tr}</th> + <th style="width:18%;">{tr}Last Post{/tr}</th> + {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} + <th style="width:1%;"><abbr title="{tr}Number of posts by Anonymous users{/tr}">Anon</abbr></th> + {/if} + </tr> + + {foreach item=board from=$boardsList} + {if $board.title} + {assign var=board_title value=$board.title|escape} + {else} + {assign var=board_title value=$board.content_id|escape} + {assign var=board_title value="(Content $board_title)"} + {/if} + + <tr class="{cycle values="even,odd"}{if $board.unreg > 0} unapproved{/if}"> + <td style="width:1px;">{* topic tracking icons *} + {if $board.track.on && $board.track.mod} + {biticon ipackage=bitboard iname="track_new_l" iexplain="New Posts"} + {elseif $board.track.on} + {biticon ipackage=bitboard iname="track_old_l" iexplain="No New Posts"} + {/if} + </td> + + <td> + <h2><a href="{$board.url}" title="{$board_title}">{$board_title}</a></h2> + {$board.parsed_data} + </td> + + {if !empty($board.last)} + <td> + <a href="{$board.last.url}">{$board.last.title|default:"Post..."}</a> + </td> + {else} + <td> </td> {/if} - </tr> - {foreach item=board from=$boardsList} - {if $board.title} - {assign var=board_title value=$board.title|escape} + + <td style="text-align:center;">{if $board.post_count > 0}{$board.post_count}{/if}</td> + + {if !empty($board.last)} + <td style="text-align:center;"> + {if $board.last.last_modified > 0}{$board.last.last_modified|reltime}{/if}<br/> + {if $board.last.user_id < 0}{$board.last.l_anon_name|escape}{else}{displayname user_id=$board.last.user_id}{/if} + </td> {else} - {assign var=board_title value=$board.content_id|escape} - {assign var=board_title value="(Content $board_title)"} + <td> </td> {/if} - {cycle values="even,odd" print=false assign=cycle_var} - <tr class="{$cycle_var} {if $board.unreg > 0} mb-{$cycle_var}-unapproved{/if}"> - <td class="actionicon" width="1px">{* topic tracking icons *} - {if $board.track.on && $board.track.mod} - {biticon ipackage=bitboard iname="track_new_l" iexplain="New Posts"} - {elseif $board.track.on} - {biticon ipackage=bitboard iname="track_old_l" iexplain="No New Posts"} - {/if} + + {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} + <td style="text-align:center;"> + {if $board.unreg > 0}<a class="highlight" href="{$board.url}" title="{$board.title|escape}">{$board.unreg}</a>{/if} </td> - <td><a href="{$board.url}" title="{$board_title}">{$board_title}</a><div style="margin-left:2em;" class="small">{$board.parsed_data}</blockquote></td> - <td style="text-align:center;">{if $board.post_count > 0}{$board.post_count}</a>{/if}</td> - {if !empty($board.last)} - <td style="text-align:center;"> - {if $board.last.last_modified > 0}{$board.last.last_modified|reltime}{/if}<br/> - {if $board.last.user_id < 0}{$board.last.l_anon_name|escape}{else}{displayname user_id=$board.last.user_id}{/if} - </td> - <td style="text-align:center;"><a href="{$board.last.url}">{$board.last.title|default:"Post..."}</a></td> - {else} - <td></td> - <td></td> - {/if} - {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} - <td style="text-align:center;">{if $board.unreg > 0}<a style="color: blue;" href="{$board.url}" title="{$board.title|escape}">{$board.unreg}</a>{/if}</td> - {/if} - </tr> - {/foreach} - </table> + {/if} + </tr> + {/foreach} +</table> {/strip} diff --git a/templates/flipswitch.tpl b/templates/flipswitch.tpl index 935a449..bebddc0 100644 --- a/templates/flipswitch.tpl +++ b/templates/flipswitch.tpl @@ -28,7 +28,7 @@ $flip_downname=>$flip.$flip_name.downname return false; " href="{$smarty.const.BITBOARDS_PKG_URL}topic.php? {$flip.$flip_name.idname}={$flip.$flip_name.id|escape:"url"} - &{$flip_name}={$flip.$flip_name.state|escape:"url"}"> + &{$flip_name}={$flip.$flip_name.state|escape:"url"}"> {/if} {if $flip.$flip_name.state==1} {biticon ipackage=bitboards iname=$flip.$flip_name.up iexplain=$flip.$flip_name.upname} @@ -41,4 +41,4 @@ $flip_downname=>$flip.$flip_name.downname </a> </span> {/if} -{/strip}
\ No newline at end of file +{/strip} diff --git a/templates/header_inc.tpl b/templates/header_inc.tpl index 531b599..af4e564 100644 --- a/templates/header_inc.tpl +++ b/templates/header_inc.tpl @@ -1,36 +1,36 @@ {if $smarty.const.ACTIVE_PACKAGE == 'bitboards'} -<link rel="stylesheet" title="{$style}" type="text/css" href="{$smarty.const.BITBOARDS_PKG_URL}styles/bitboards.css" media="all" /> -<script> -{literal} -function reportError(request) { - var body = document.getElementsByTagName('body'); - body = body.item(0); - var div = document.getElementById('ajax_error_div'); - if (div == null) { - div = document.createElement('div'); - div.setAttribute('id','ajax_error_div'); - } - div.style['position']='absolute'; - div.style['top']="10%"; - div.style['left']="25%"; - div.style['right']="25%"; - div.style['width']="50%"; - div.style['padding']="10px"; - div.style['backgroundColor']="red"; - div.style['border']="3px solid yellow"; - div.style['zIndex']="100"; - div.innerHTML="<h1 style=\"text-align: center; margin: 10px;\">AJAX Error</h1>"+ - "<h2 style=\"text-align: center; margin: 10px;\">"+request.statusText+"</h2>"+ - request.responseText+ - "<p style=\"text-align:center;\"><small>Click to Close Message</small></p>"; - body.insertBefore(div,body.firstChild); - div.onclick=function close() { - this.style['display']='none'; - this.parentNode.removeChild(this); - } -} -{/literal} -</script> + <link rel="stylesheet" title="{$style}" type="text/css" href="{$smarty.const.BITBOARDS_PKG_URL}styles/bitboards.css" media="all" /> + <script type="text/javascript">/* <![CDATA[ */ + {literal} + function reportError(request) { + var body = document.getElementsByTagName('body'); + body = body.item(0); + var div = document.getElementById('ajax_error_div'); + if (div == null) { + div = document.createElement('div'); + div.setAttribute('id','ajax_error_div'); + } + div.style['position']='absolute'; + div.style['top']="10%"; + div.style['left']="25%"; + div.style['right']="25%"; + div.style['width']="50%"; + div.style['padding']="10px"; + div.style['backgroundColor']="red"; + div.style['border']="3px solid yellow"; + div.style['zIndex']="100"; + div.innerHTML="<h1 style=\"text-align: center; margin: 10px;\">AJAX Error</h1>"+ + "<h2 style=\"text-align: center; margin: 10px;\">"+request.statusText+"</h2>"+ + request.responseText+ + "<p style=\"text-align:center;\"><small>Click to Close Message</small></p>"; + body.insertBefore(div,body.firstChild); + div.onclick=function close() { + this.style['display']='none'; + this.parentNode.removeChild(this); + } + } + {/literal} + /* ]]> */</script> {if $gBitSystem->isPackageActive( 'rss' ) && !empty($board)} <link rel="alternate" type="application/rss+xml" title="Board {$board->mInfo.title} RSS" href="{$smarty.const.BITBOARDS_PKG_URL}bitboards_rss.php?version=rss20&b={$smarty.request.b}" /> diff --git a/templates/post.tpl b/templates/post.tpl index 733960a..d03c357 100644 --- a/templates/post.tpl +++ b/templates/post.tpl @@ -1,13 +1,12 @@ -{* $Header: /cvsroot/bitweaver/_bit_boards/templates/Attic/post.tpl,v 1.9 2006/07/29 15:10:00 hash9 Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_boards/templates/Attic/post.tpl,v 1.10 2006/08/31 13:36:30 squareing Exp $ *} {strip} <div class="floaticon"> -{assign var=flip value=$thread->getFlipFlop()} -{foreach from=$flip item=flip_s key=flip_name} + {assign var=flip value=$thread->getFlipFlop()} + {foreach from=$flip item=flip_s key=flip_name} {include file="bitpackage:bitboards/flipswitch.tpl"} -{/foreach} -{if !$topic_locked}<a title="{tr}Post Reply{/tr}" href="{$comments_return_url}&post_comment_reply_id={$thread->mInfo.flc_content_id}&post_comment_request=1#editcomments"> {biticon ipackage=bitboard iname="mail_new" iexplain="Post Reply"}</a>{/if} - -{bithelp}</div> + {/foreach} + {if !$topic_locked}<a title="{tr}Post Reply{/tr}" href="{$comments_return_url}&post_comment_reply_id={$thread->mInfo.flc_content_id}&post_comment_request=1#editcomments"> {biticon ipackage=bitboard iname="mail_new" iexplain="Post Reply"}</a>{/if} +</div> <div class="listing bitboard"> <div class="header"> @@ -16,12 +15,16 @@ </div> <div class="body"> - <form action="{$comments_return_url}" style="padding: 0.2em; margin: 0.2em; text-align:right" class="small" method="post"> - <input type="hidden" name="t" value="{$smarty.request.t}" /> - <input type="hidden" name="comment_page" value="{$smarty.request.comment_page}" /> - <label for="comments-style">{tr}Threaded: {/tr} </label> - <input type="checkbox" name="comments_style" id="comments-style" value="threaded" {if $comments_style eq "threaded"}checked="checked"{/if} onchange="this.parentNode.submit()"/> <label for="comments-maxcomm">{tr}Messages: {/tr} </label> - <select name="comments_maxComments" id="comments-maxcomm" onchange="this.parentNode.submit()"> + {* not happy with this yet - xing *} + {form action="$comments_return_url" style="text-align:right;"} + <input type="hidden" name="t" value="{$smarty.request.t}" /> + <input type="hidden" name="comment_page" value="{$smarty.request.comment_page}" /> + <label> + {tr}Threaded{/tr}: <input type="checkbox" name="comments_style" id="comments-style" value="threaded" {if $comments_style eq "threaded"}checked="checked"{/if} onchange="this.parentNode.submit()"/> + </label> + + <label> + {tr}Messages{/tr}: <select name="comments_maxComments" id="comments-maxcomm" onchange="this.parentNode.submit()"> <option value="5" {if $maxComments eq 5}selected="selected"{/if}>5</option> <option value="10" {if $maxComments eq 10}selected="selected"{/if}>10</option> <option value="20" {if $maxComments eq 20}selected="selected"{/if}>20</option> @@ -29,14 +32,18 @@ <option value="100" {if $maxComments eq 100}selected="selected"{/if}>100</option> <option value="999999" {if $maxComments eq 999999}selected="selected"{/if}>All</option> </select> <input type="submit" name="comments_setOptions" value="set" id="set_btn"/> - <script>document.getElementById('set_btn').parentNode.removeChild(document.getElementById('set_btn'));</script> - </form> + </label> + <script>/*<![CDATA[*/ + document.getElementById('set_btn').parentNode.removeChild(document.getElementById('set_btn')); + /*]]>*/</script> + {/form} + {formfeedback hash=$formfeedback} - <table class="mb-table"> + + <table class="data"> {foreach item=comment from=$comments} - {cycle values="even,odd" print=false assign=cycle_var} - <tr class="{$cycle_var} {if $gBitSystem->isFeatureActive('bitboards_post_anon_moderation') && $comment.user_id<0 and $comment.approved==0}mb-{$cycle_var}-unapproved{/if}"> - {assign var=thread_mInfo value=$thread->mInfo} + <tr class="{cycle values="even,odd"}{if $gBitSystem->isFeatureActive('bitboards_post_anon_moderation') && $comment.user_id<0 and $comment.approved==0} unapproved{/if}"> + {assign var=thread_mInfo value=$thread->mInfo} {displaycomment comment=$comment template=$comment_template} </tr> {foreachelse} @@ -44,27 +51,30 @@ {tr}No posts found{/tr} </td></tr> {/foreach} + {if $post_comment_preview} - <tr><td colspan="10"> </td></tr> - <tr><td colspan="10"><h2 style="text-align:center; padding:.5em">{tr}{$post_title} Preview{/tr}</h2></td></tr> - <tr> - <div class="preview"> - {assign var=post_is_preview value=1} - {displaycomment comment=$postComment template=$comment_template} - {assign var=post_is_preview value=0} - </div><!-- end .preview --> - </tr> - <tr><td colspan="10"> </td></tr> - {/if} + <tr><td colspan="10"> </td></tr> + <tr><td colspan="10"><h2 style="text-align:center; padding:.5em">{tr}{$post_title} Preview{/tr}</h2></td></tr> + <tr> + <div class="preview"> + {assign var=post_is_preview value=1} + {displaycomment comment=$postComment template=$comment_template} + {assign var=post_is_preview value=0} + </div><!-- end .preview --> + </tr> + <tr><td colspan="10"> </td></tr> + {/if} </table> {if !$topic_locked}<p style="text-align: right;"><a title="{tr}Post Reply{/tr}" href="{$comments_return_url}&post_comment_reply_id={$thread->mInfo.flc_content_id}&post_comment_request=1#editcomments">{tr}Post Reply{/tr} {biticon ipackage=bitboard iname="mail_new" iexplain="Post Reply"}</a></p>{/if} {libertypagination ihash=$commentsPgnHash} </div><!-- end .body --> </div><!-- end .admin --> - {if $gBitSystem->isFeatureActive('bitboards_post_anon_moderation') && ($smarty.request.post_comment_request || !empty($smarty.request.post_comment_submit)) && !$gBitUser->isRegistered()} - {formfeedback warning="Your post will not be shown immediately it will have to be approved by a moderator"} - {/if} - {include file="bitpackage:liberty/comments_post_inc.tpl" post_title="Post" hide=1 preview_override=1} + +{if $gBitSystem->isFeatureActive('bitboards_post_anon_moderation') && ($smarty.request.post_comment_request || !empty($smarty.request.post_comment_submit)) && !$gBitUser->isRegistered()} + {formfeedback warning="Your post will not be shown immediately it will have to be approved by a moderator"} +{/if} + +{include file="bitpackage:liberty/comments_post_inc.tpl" post_title="Post" hide=1 preview_override=1} {/strip} diff --git a/templates/post_display.tpl b/templates/post_display.tpl index bf69165..bc2bbf1 100644 --- a/templates/post_display.tpl +++ b/templates/post_display.tpl @@ -77,7 +77,7 @@ '); return false; " title="{tr}Warn the poster about this post{/tr}" href="{$smarty.const.BITBOARDS_PKG_URL}post.php?t={$thread->mRootId}&action=3&comment_id={$comment.comment_id}"> - {biticon ipackage=bitboard iname="warning" iexplain="Warn Post"} + {biticon ipackage=liberty iname="warning" iexplain="Warn Post"} </a> <div style="display:none;" id="warn_block_{$comment.comment_id|escape:"url"}"> <form action="{$thread_mInfo.display_url}" method="post"> diff --git a/templates/topic.tpl b/templates/topic.tpl index e0566ed..74b5a14 100644 --- a/templates/topic.tpl +++ b/templates/topic.tpl @@ -1,4 +1,4 @@ -{* $Header: /cvsroot/bitweaver/_bit_boards/templates/Attic/topic.tpl,v 1.10 2006/08/31 08:07:15 spiderr Exp $ *} +{* $Header: /cvsroot/bitweaver/_bit_boards/templates/Attic/topic.tpl,v 1.11 2006/08/31 13:36:30 squareing Exp $ *} {strip} <div class="listing bitboard"> <div class="floaticon"> @@ -11,71 +11,88 @@ {/if} {/if}<!-- end print_page --> </div><!-- end .floaticon --> - <div class="header"> - <h1>{$board->mInfo.title|escape|default:"Message Board Topic"} <a id='content_1' href="{$comments_return_url}&show={if empty($smarty.request.show)}1{else}0{/if}" onclick="{literal}if (this.innerHTML=='-') { document.getElementById('content_div').style.display='none'; this.innerHTML='+'; } else { document.getElementById('content_div').style.display='block'; this.innerHTML='-'; } return false;{/literal}">{if empty($smarty.request.show)}+{else}-{/if}</a></h1> - <div class="date"> - <div id="content_div" class="content" style="text-align: right; {if empty($smarty.request.show)}display: none;{/if}"> - {$board->mInfo.parsed_data} - </div><!-- end .content --> - </div> + <div class="header"> + <h1>{$board->mInfo.title|escape|default:"Message Board Topic"}</h1> + {if $boards->mInfo.parsed_data} + <h2>{$board->mInfo.parsed_data}</h2> + {/if} Back to <a href="{$cat_url}">{$board->mInfo.content_type.content_description}s</a> </div> <div class="body"> - <p style="text-align: right; margin: 0px; padding: 0px;"><a title="{tr}New Topic{/tr}" href="{$comments_return_url}&post_comment_request=1#editcomments">{tr}New Topic{/tr} {biticon ipackage=bitboard iname="mail_new" iexplain="New Topic"}</a></p> {minifind sort_mode=$sort_mode b=$smarty.request.b} + {* looks horrible, but leave for now - xing *} + <div class="navbar"> + <ul> + <li> + <a title="{tr}New Topic{/tr}" href="{$comments_return_url}&post_comment_request=1#editcomments">{tr}New Topic{/tr} {biticon ipackage=bitboard iname="mail_new" iexplain="New Topic"}</a> + </li> + </ul> + </div> + {form id="checkform"} <input type="hidden" name="board_id" value="{$smarty.request.board_id}" /> <input type="hidden" name="offset" value="{$control.offset|escape}" /> <input type="hidden" name="sort_mode" value="{$control.sort_mode|escape}" /> - <table class="mb-table"> - {if ! $gBitSystem->isFeatureActive('bitboards_thread_verbrose')} - <th width="1" colspan="{$threadList.0.flip|@count}"><small>{if $gBitUser->isRegistered()}U{/if}TSI</small></th> - <th style="text-align:left;white-space: nowrap;">Title</th> - <th width="1" style="text-align: center;">Replies</th> - <th>{tr}Started{/tr}</th> - <th>{tr}Last Post{/tr}</th> - {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} - <th style="text-align: center;">Anon</th> - {/if} - {if $gBitUser->hasPermission('p_bitboards_edit')} - <th colspan="4" style="text-align: center;">Actions</th> - {/if} + <table class="data"> + {if !$gBitSystem->isFeatureActive('bitboards_thread_verbrose')} + <tr> + <th style="width:5%;"> </th> + <th style="width:40%;">{tr}Title{/tr}</th> + <th style="width:5%;">{tr}Replies{/tr}</th> + <th style="width:20%;">{tr}Started{/tr}</th> + <th style="width:20%;">{tr}Last Post{/tr}</th> + {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} + <th style="width:1%;"><abbr title="{tr}Number of posts by Anonymous users{/tr}">Anon</abbr></th> + {/if} + {if $gBitUser->hasPermission('p_bitboards_edit')} + <th style="width:10%;" colspan="2">Actions</th> + {/if} + </tr> {/if} + {foreach item=thread from=$threadList} - {cycle values="even,odd" print=false assign=cycle_var} - <tr class=" - {$cycle_var} {if $gBitSystem->isFeatureActive('bitboards_post_anon_moderation') && $thread.unreg > 0} mb-{$cycle_var}-unapproved - {elseif $thread.th_moved>0} mb-{$cycle_var}-moved - {/if} - {if $thread.th_sticky==1} mb-sticky{/if}"> - {if $thread.th_moved>0} - <td class="actionicon" width="1" colspan="{$thread.flip|@count}">{* topic status icons *} - {biticon ipackage=bitboard iname="move" iexplain="Moved Topic"} - </td> - {else} - {assign var=flip value=$thread.flip} - {foreach from=$flip item=flip_s key=flip_name} - <td class="actionicon" width="1">{* topic status icons *} - {include file="bitpackage:bitboards/flipswitch.tpl"} + <tr class="{cycle values="even,odd"} { + if $gBitSystem->isFeatureActive('bitboards_post_anon_moderation') && $thread.unreg > 0 + }unapproved{ + elseif $thread.th_moved>0 + }moved{ + /if} + {if $thread.th_sticky==1} highlight{/if}" + > + <td style="white-space:nowrap;">{* topic status icons *} + {if $thread.th_moved>0} + {biticon ipackage=bitboard iname="move" iexplain="Moved Topic"} + {else} + {assign var=flip value=$thread.flip} + {foreach from=$flip item=flip_s key=flip_name} + {include file="bitpackage:bitboards/flipswitch.tpl"} + {/foreach} + {/if} </td> - {/foreach} - {/if} - <td style="white-space: nowrap;"><a href="{$thread.url}" title="{$thread.title|escape}">{$thread.title|escape}</a></td> - <td width="1" style="text-align: center;">{if $thread.post_count-1}{$thread.post_count-1|escape}{/if}</td> - <td> - {$thread.flc_created|reltime:short|escape}<br/> - {if $thread.flc_user_id < 0}{$thread.anon_name|escape}{else}{displayname user_id=$thread.flc_user_id}{/if} - </td> - <td style="text-align: right;"> - {if $thread.post_count > 1}{$thread.llc_last_modified|reltime:short|escape}{else}{/if}<br/> - {if $thread.post_count > 1}{if $thread.llc_user_id < 0}{$thread.l_anon_name|escape}{else}{displayname user_id=$thread.llc_user_id}{/if}{else}{/if} - </td> - {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} - <td style="text-align:center;">{if $thread.unreg > 0}<a style="color: blue;" href="{$thread.url}" title="{$thread.title}">{$thread.unreg}</a>{/if}</td> - {/if} + + <td> + <h2><a href="{$thread.url}" title="{$thread.title|escape}">{$thread.title|escape}</a></h2> + </td> + + <td style="text-align:center;">{if $thread.post_count-1}{$thread.post_count-1}{/if}</td> + + <td style="text-align:center;"> + {$thread.flc_created|reltime:short|escape}<br/> + {if $thread.flc_user_id < 0}{$thread.anon_name|escape}{else}{displayname user_id=$thread.flc_user_id}{/if} + </td> + + <td style="text-align:center;"> + {if $thread.post_count > 1}{$thread.llc_last_modified|reltime:short|escape}{else}{/if}<br/> + {if $thread.post_count > 1}{if $thread.llc_user_id < 0}{$thread.l_anon_name|escape}{else}{displayname user_id=$thread.llc_user_id}{/if}{else}{/if} + </td> + + {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} + <td style="text-align:center;">{if $thread.unreg > 0}<a class="highlight" href="{$thread.url}" title="{$thread.title}">{$thread.unreg}</a>{/if}</td> + {/if} + {if $gBitUser->hasPermission('p_bitboards_edit') || $gBitUser->hasPermission('p_bitboards_post_edit')} <td class="actionicon"> {if $thread.flc_user_id<0 && $thread.first_approved==0} @@ -86,48 +103,56 @@ {biticon ipackage=bitboard iname="edit_remove" iexplain="Reject First Post"} </a> {/if} - </td> - <td class="actionicon"> - {if $thread.th_moved==0} - {if $gBitUser->hasPermission( 'p_bitboards_edit' )} - {*smartlink ititle="Edit" ifile="edit.php" ibiticon="liberty/edit" board_id=$thread.board_id*} - <a onclick=" - document.getElementById('move_block_{$thread.th_thread_id|escape:"url"}').style['display']='inline'; - var url = '{$smarty.const.BITBOARDS_PKG_URL}ajax.php?req=1&seq=' + new Date().getTime(); - var element = 'move_{$thread.th_thread_id|escape:"url"}'; - var params = null; - {literal} - var ajax = new Ajax.Updater( - {success: element}, - url, {method: 'get', parameters: params, onFailure: reportError} - ); - {/literal} - this.oldonclick=this.onclick; - this.onclick=new Function(' - document.getElementById(\'move_block_{$thread.th_thread_id|escape:"url"}\').style[\'display\']=\'none\'; - document.getElementById(\'move_{$thread.th_thread_id|escape:"url"}\').innerHTML=\'\'; - this.onclick=this.oldonclick; - return false; - '); - return false;" title="{tr}Move Thread{/tr}" href="{$smarty.const.BITBOARDS_PKG_URL}topic_move.php?t={$thread.th_thread_id|escape:"url"}">{biticon ipackage=bitboard iname="mail_forward" iexplain="Move Thread"}</a> - <div style="display:none;" id="move_block_{$thread.th_thread_id|escape:"url"}"> - Move to: <select onchange="window.location=('{$smarty.const.BITBOARDS_PKG_URL}topic_move.php?t={$thread.th_thread_id|escape:"url"}&target='+ - document.getElementById('move_{$thread.th_thread_id|escape:"url"}').value);" id="move_{$thread.th_thread_id|escape:"url"}"> - </select> - </div> + + {if $thread.th_moved==0} + {if $gBitUser->hasPermission( 'p_bitboards_edit' )} + {*smartlink ititle="Edit" ifile="edit.php" ibiticon="liberty/edit" board_id=$thread.board_id*} + <a onclick=" + document.getElementById('move_block_{$thread.th_thread_id|escape:"url"}').style['display']='inline'; + var url = '{$smarty.const.BITBOARDS_PKG_URL}ajax.php?req=1&seq=' + new Date().getTime(); + var element = 'move_{$thread.th_thread_id|escape:"url"}'; + var params = null; + {literal} + var ajax = new Ajax.Updater( + {success: element}, + url, {method: 'get', parameters: params, onFailure: reportError} + ); + {/literal} + this.oldonclick=this.onclick; + this.onclick=new Function(' + document.getElementById(\'move_block_{$thread.th_thread_id|escape:"url"}\').style[\'display\']=\'none\'; + document.getElementById(\'move_{$thread.th_thread_id|escape:"url"}\').innerHTML=\'\'; + this.onclick=this.oldonclick; + return false; + '); + return false;" title="{tr}Move Thread{/tr}" href="{$smarty.const.BITBOARDS_PKG_URL}topic_move.php?t={$thread.th_thread_id|escape:"url"}" + >{biticon ipackage=bitboard iname="mail_forward" iexplain="Move Thread"}</a> + {/if} {/if} - {/if} - </td> - <td class="actionicon"> + {if $thread.th_moved==0 && $gBitUser->hasPermission( 'p_bitboards_remove' )} <a title="{tr}Delete Thread{/tr}" href="{$smarty.const.BITBOARDS_PKG_URL}remove_bitboard.php?thread_id={$thread.th_thread_id|escape:"url"}">{biticon ipackage=bitboard iname="mail_delete" iexplain="Delete Thread"}</a> + {else} + {biticon ipackage=spacer iname=spacer} {/if} - </td> - <td class="actionicon"> - {if $thread.th_moved==0 && $gBitUser->hasPermission( 'p_bitboards_remove' )} - <input type="checkbox" name="checked[]" title="{$thread.title|escape}" value="{$thread.th_thread_id}" /> + + {if $thread.th_moved==0} + {if $gBitUser->hasPermission( 'p_bitboards_edit' )} + <br /> + <div style="display:none;" id="move_block_{$thread.th_thread_id|escape:"url"}"> + Move to: <select onchange="window.location=('{$smarty.const.BITBOARDS_PKG_URL}topic_move.php?t={$thread.th_thread_id|escape:"url"}&target='+ + document.getElementById('move_{$thread.th_thread_id|escape:"url"}').value);" id="move_{$thread.th_thread_id|escape:"url"}"> + </select> + </div> + {/if} {/if} </td> + + {if $thread.th_moved==0 && $gBitUser->hasPermission( 'p_bitboards_remove' )} + <td> + <input type="checkbox" name="checked[]" title="{$thread.title|escape}" value="{$thread.th_thread_id}" /> + </td> + {/if} {/if} </tr> {foreachelse} @@ -137,12 +162,19 @@ {/foreach} </table> - <p style="text-align: right;"><a title="{tr}New Topic{/tr}" href="{$comments_return_url}&post_comment_request=1#editcomments">{tr}New Topic{/tr} {biticon ipackage=bitboard iname="mail_new" iexplain="New Topic"}</a></p> + <div class="navbar"> + <ul> + <li> + <a title="{tr}New Topic{/tr}" href="{$comments_return_url}&post_comment_request=1#editcomments">{tr}New Topic{/tr} {biticon ipackage=bitboard iname="mail_new" iexplain="New Topic"}</a> + </li> + </ul> + </div> + {if $gBitUser->hasPermission( 'p_bitboards_remove' )} <div style="text-align:right;"> <script type="text/javascript">/* <![CDATA[ check / uncheck all */ - document.write("<label for=\"switcher\">{tr}Select All{/tr}</label> "); - document.write("<input name=\"switcher\" id=\"switcher\" type=\"checkbox\" onclick=\"switchCheckboxes(this.form.id,'checked[]','switcher')\" /><br />"); + document.write("<label for=\"switcher\">{tr}Select All{/tr}</label> "); + document.write("<input name=\"switcher\" id=\"switcher\" type=\"checkbox\" onclick=\"switchCheckboxes(this.form.id,'checked[]','switcher')\" /><br />"); /* ]]> */</script> <select name="submit_mult" onchange="this.form.submit();"> @@ -156,11 +188,14 @@ </div> {/if} {/form} + {pagination b=$smarty.request.b} </div><!-- end .body --> </div><!-- end .admin --> + {if $gBitSystem->isFeatureActive('bitboards_post_anon_moderation') && $smarty.request.post_comment_request && !$gBitUser->isRegistered()} {formfeedback warning="Your post will not be shown immediately it will have to be approved by a moderator"} {/if} + {include file="bitpackage:liberty/comments_post_inc.tpl" post_title="Post" hide=1} {/strip} |
