slitaz-forge rev 1

Add slitaz themes for vanilla
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Dec 22 10:36:12 2010 +0100 (2010-12-22)
parents e13c1f42b3f1
children 2f1ea04fc17b
files forum/README forum/themes/slitaz-2/README.txt forum/themes/slitaz-2/about.php forum/themes/slitaz-2/design/favicon.ico forum/themes/slitaz-2/design/favicon.png forum/themes/slitaz-2/design/style.css forum/themes/slitaz-2/images/header.png forum/themes/slitaz-2/images/logo.png forum/themes/slitaz-2/images/overlayBg.png forum/themes/slitaz-2/screenshot.png forum/themes/slitaz-2/views/default.master.php forum/themes/slitaz-2/views/discussion/comments.php forum/themes/slitaz-2/views/discussion/helper_functions.php forum/themes/slitaz-2/views/discussions/helper_functions.php forum/themes/slitaz/README.txt forum/themes/slitaz/about.php forum/themes/slitaz/design/favicon.ico forum/themes/slitaz/design/favicon.png forum/themes/slitaz/design/style.css forum/themes/slitaz/images/header.png forum/themes/slitaz/images/logo.png forum/themes/slitaz/images/overlayBg.png forum/themes/slitaz/screenshot.png forum/themes/slitaz/views/default.master.php forum/themes/slitaz/views/discussion/comments.php forum/themes/slitaz/views/discussion/helper_functions.php forum/themes/slitaz/views/discussions/helper_functions.php
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/forum/README	Wed Dec 22 10:36:12 2010 +0100
     1.3 @@ -0,0 +1,12 @@
     1.4 +2010-12-22 
     1.5 +The forum is powered by Vanilla Forum (http://vanillaforums.org/)
     1.6 +
     1.7 +Running on Debian 4.0 with:
     1.8 +* vanilla 2.0.16
     1.9 +* apache 2.23
    1.10 +* mysql 5.0.32
    1.11 +* php 5.2
    1.12 +* awstats 6.95 (optionnal)
    1.13 +
    1.14 +
    1.15 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/forum/themes/slitaz-2/README.txt	Wed Dec 22 10:36:12 2010 +0100
     2.3 @@ -0,0 +1,45 @@
     2.4 +How to create a theme:
     2.5 +
     2.6 +Part 1: CSS / Design
     2.7 +================================================================================
     2.8 +1. Copy this "default" theme folder and rename it to your new theme name.
     2.9 +2. Open the "about.php" file and edit the information to reflect your theme. Be
    2.10 +   sure to change the array key like this: $ThemeInfo['YourThemeNameHere'].
    2.11 +3. Create a "design" subfolder and copy /applications/dashboard/design/style.css 
    2.12 +   and /applications/vanilla/design/vanilla.css into it.
    2.13 +4. Any background images you want to continue using (like the star png images
    2.14 +   for bookmarking) should be copied along with their respective stylesheets.
    2.15 +5. Go to your Dashboard, Themes, and apply your new theme.
    2.16 +6. Edit the copied CSS files to look however you wish!
    2.17 +
    2.18 +Other things you should know:
    2.19 +
    2.20 + + All non-forum pages should be edited in the global "style.css" file.
    2.21 +
    2.22 + + If you want to edit the look & feel of the administrative screens, also 
    2.23 +   copy /applications/dashboard/design/admin.css in step 3. Similarly, you can 
    2.24 +   copy other CSS files like /applications/vanilla/design/vanillaprofile.css to
    2.25 +   customize those pages as well.
    2.26 +
    2.27 +
    2.28 +Part 2: HTML / Views
    2.29 +================================================================================
    2.30 +If you want to customize the HTML, you can edit that too. 
    2.31 +Our pages are made up of two parts:
    2.32 +
    2.33 + 1. Master Views - these represent everything that wraps the main content of the
    2.34 +   page. If all you want to do is add a menu or banner above Vanilla, this is
    2.35 +   all you need to alter. To do so, copy the default master view from
    2.36 +   /applications/dashboard/views/default.master.php to
    2.37 +   /themes/yourtheme/views/default.master.php and edit it there.
    2.38 +   
    2.39 + 2. Views - these represent all of the content in each page. Every application
    2.40 +   has a "views" folder that contains all of the HTML for every page. So, for
    2.41 +   example, if you wanted to edit the HTML for the Discussions list, you could
    2.42 +   copy the views from /applications/vanilla/views/discussions to
    2.43 +   /themes/yourtheme/views/discussions and edit them there.
    2.44 +
    2.45 +You can avoid naming conflicts between applications' views and specify which 
    2.46 +app a view is for by optionally adding a subfolder with the app's name in 
    2.47 +/themes/yourtheme/views/ (e.g.: /themes/yourtheme/views/appname/) and placing 
    2.48 +views there rather than directly in the "views" folder.
    2.49 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/forum/themes/slitaz-2/about.php	Wed Dec 22 10:36:12 2010 +0100
     3.3 @@ -0,0 +1,21 @@
     3.4 +<?php if (!defined('APPLICATION')) exit();
     3.5 +/*
     3.6 +Copyright 2008, 2009 Vanilla Forums Inc.
     3.7 +This file is part of Garden.
     3.8 +Garden is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
     3.9 +Garden is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    3.10 +You should have received a copy of the GNU General Public License along with Garden.  If not, see <http://www.gnu.org/licenses/>.
    3.11 +Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com
    3.12 +*/
    3.13 +
    3.14 +/**
    3.15 + * An associative array of information about this application.
    3.16 + */
    3.17 +$ThemeInfo['SliTaz-2'] = array(
    3.18 +   'Name' => 'SliTaz-2',
    3.19 +   'Description' => "SliTaz Vanilla 2 official theme",
    3.20 +   'Version' => '2.0',
    3.21 +   'Author' => "Christophe Lincoln",
    3.22 +   'AuthorEmail' => 'pankso@slitaz.org',
    3.23 +   'AuthorUrl' => 'http://www.slitaz.org'
    3.24 +);
     4.1 Binary file forum/themes/slitaz-2/design/favicon.ico has changed
     5.1 Binary file forum/themes/slitaz-2/design/favicon.png has changed
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/forum/themes/slitaz-2/design/style.css	Wed Dec 22 10:36:12 2010 +0100
     6.3 @@ -0,0 +1,422 @@
     6.4 +@charset "utf-8";
     6.5 +/* CSS Document */
     6.6 +
     6.7 +/***--- MAIN / DEFAULT --***/
     6.8 +html, body	{ height: 102%; margin: 0; }
     6.9 +html, body, input, select, textarea, button {
    6.10 +	font-family: Verdana, Geneva, sans-serif;
    6.11 +	font-size: 11px;
    6.12 +	line-height: 17px;
    6.13 +	color: #555;
    6.14 +}
    6.15 +a			{ color: #2f6c8e; text-decoration: none; }
    6.16 +a:hover		{ color: #69a1c1; }
    6.17 +a img		{ border: none; }
    6.18 +ul, ol		{ margin: 0; padding: 0; list-style: none; }
    6.19 +
    6.20 +.clear {
    6.21 +    clear: both;
    6.22 +    display: block;
    6.23 +    height: 0;
    6.24 +    overflow: hidden;
    6.25 +    visibility: hidden;
    6.26 +    width: 0;
    6.27 +}
    6.28 +
    6.29 +#Wrapper	{ min-height: 100%; position: relative; margin: 0 auto; }
    6.30 +.Hidden		{ display: none; }
    6.31 +
    6.32 +/***--- HEADER(S) --***/
    6.33 +
    6.34 +
    6.35 +#Header h1	{ padding: 15px; font-size: 2em; }
    6.36 +#Header a	{ color: #69a1c1; }
    6.37 +#Header a:hover	{ color: #FFF; }
    6.38 +
    6.39 +#Header{
    6.40 +	background: #f0ba08 url(../images/header.png) repeat-x top;
    6.41 +	color: black;
    6.42 +	width: 100%;
    6.43 +	height: 50px;
    6.44 +	border-top: 1px solid black;
    6.45 +	border-bottom: 1px solid black;
    6.46 +	margin-bottom: 30px;
    6.47 +	position: absolute;
    6.48 +	top: 0;
    6.49 +}
    6.50 +
    6.51 +#titre {
    6.52 +	position: absolute;
    6.53 +	font-size: 16px;
    6.54 +	font-weight: bolder ;
    6.55 +	margin-left: 200px;
    6.56 +	margin-top: 28px;
    6.57 +}
    6.58 +
    6.59 +#logo {
    6.60 +	position: absolute;
    6.61 +	float: left;
    6.62 +	margin-left: 16px;
    6.63 +	margin-top: 0px;
    6.64 +}
    6.65 +
    6.66 +/***--- NAV --***/
    6.67 +#Nav { 
    6.68 +	right: 0;
    6.69 +	position: absolute;
    6.70 +	top: 3px;
    6.71 +	font-size: 10px;
    6.72 +	font-weight: bold; }
    6.73 +
    6.74 +/* search */
    6.75 +#Search { 
    6.76 +	-moz-border-radius: 4px;
    6.77 +	-webkit-border-radius: 4px; 
    6.78 +	height: 20px; 
    6.79 +	float: right; 
    6.80 +	background: #FFF; 
    6.81 +	padding: 2px 2px; 
    6.82 +	margin: 11px 95px 0 0; }
    6.83 +#Search form	{ padding: 0; border: none; }
    6.84 +#Nav #Search input.InputBox	{ width: 150px; border: none; }
    6.85 +#Search input.Button {
    6.86 +	-moz-border-radius: 4px;
    6.87 +	-webkit-border-radius: 4px;
    6.88 +	height: 17px;
    6.89 +	margin: 0;
    6.90 +	padding: 0; }
    6.91 +
    6.92 +/***--- MAIN --***/
    6.93 +/*#Main	{ }*/
    6.94 +
    6.95 +/* If you prefer the panel on the left and content on the right, simply switch the "float" property for #Content & #Panel and set the "margin-left" to "margin-right" for the #Content */
    6.96 +#Content		{ 
    6.97 +	margin: 0px 320px 0px 0px;
    6.98 +	padding: 86px 40px 65px 80px;
    6.99 +	}
   6.100 +#Panel			{
   6.101 +	position: absolute;
   6.102 +	top: 76px;
   6.103 +	right: 80px;
   6.104 +	color: #555555;
   6.105 +	float: right;
   6.106 +	width: 250px;
   6.107 +	line-height: 1.5em;
   6.108 +	text-align: left;
   6.109 +	font-size: 12px;
   6.110 +	 }
   6.111 +.Box, #UserOptions {
   6.112 +	-moz-border-radius: 8px;
   6.113 +	-webkit-border-radius: 8px;
   6.114 +	list-style-type: none;
   6.115 +	margin: 10px 0;
   6.116 +	padding: 10px 24px 10px 24px;
   6.117 +	background-color: #eaeaea;}
   6.118 +#Panel .Box ul {
   6.119 +	list-style-type: none;
   6.120 +	margin: 0;
   6.121 +	padding: 10px 24px 10px 0px;
   6.122 +	font-weight: bold;
   6.123 +}
   6.124 +
   6.125 +/***--- CONTENT --***/
   6.126 +.GuestBox	{ background: #eaeaea; }
   6.127 +.GuestBox p	{ padding: 0; }
   6.128 +.Message img	{ max-width: 100%; }
   6.129 +
   6.130 +/* headers */
   6.131 +h1				{ margin: 0; font-size: 1.5em; }
   6.132 +#Content h1, h2, #Popup h1, div.DiscussionTabs .SubTab {
   6.133 +	-moz-border-radius: 8px;
   6.134 +	-webkit-border-radius: 8px;
   6.135 +	font-size: 1.1em; background: #555555; color: #fff; margin: 0 0 10px; padding: 10px; font-weight: bold;
   6.136 +}
   6.137 +div.DiscussionTabs .SubTab	{ margin: 0; }
   6.138 +
   6.139 +#Panel h4, #Panel .GuestBox h4 {
   6.140 +	font-size: 110%;
   6.141 +	color: #666666;
   6.142 +	font-weight: bold;
   6.143 +	padding: 0 0 1px 0;
   6.144 +	margin: 0;
   6.145 +	border-bottom: 1px solid #cecece; }
   6.146 +
   6.147 +div.Empty, div#Status	{ padding: 10px; }
   6.148 +
   6.149 +/* tabs */
   6.150 +.Tabs li, .SubTab	{
   6.151 +	-moz-border-radius: 8px;
   6.152 +	-webkit-border-radius: 8px;
   6.153 +	background: #CECECE;
   6.154 +	padding: 5px 8px;
   6.155 +	font-size: 140%;
   6.156 +	font-weight: bold;
   6.157 +	border-bottom: 1px solid #fff; }
   6.158 +.Tabs li.Active		{ background: #555; border-bottom: none; }
   6.159 +.Tabs li.Active a	{ color: #fff; }
   6.160 +.Tabs span			{ display: inline-block; margin: 0 10px; color: #888; }
   6.161 +.SubTab				{ font-size: 1em; }
   6.162 +
   6.163 +/* DISCUSSIONS */
   6.164 +.DataList li.Item, .Conversation li.Item {
   6.165 +	border-bottom: 1px solid #ccc;
   6.166 +	position: relative;
   6.167 +	padding: 10px;
   6.168 +	-moz-border-radius: 8px;
   6.169 +	-webkit-border-radius: 8px;
   6.170 +}
   6.171 +.Activities li.Item	{ min-height: 50px; }
   6.172 +.DataList li.Item a.Title	{ display: block; font-size: 1.15em; font-weight: bold; padding: 0 0 8px; }
   6.173 +
   6.174 +/* discussions meta */
   6.175 +.DataList .Meta span, .DataList .Meta strong {
   6.176 +	min-width: 100px; display: inline-block; margin: 0 5px 0 0;
   6.177 +}
   6.178 +.DataList .Meta .LastCommentBy		{ width: 175px; }
   6.179 +.DataList .Meta .LastCommentDate	{ width: 100px; }
   6.180 +
   6.181 +/* discussions highlight */
   6.182 +.DataList li.Mine			{ background: #f1f1f1; border-bottom-color: #fff; }
   6.183 +.DataList li.New			{ background: #d8ecbc; }
   6.184 +.DataList li.Bookmarked		{ background: #ffdf5d; border-bottom-color: #fff; }
   6.185 +
   6.186 +.DataList li.Closed		{ background: #eee; }
   6.187 +.DataList .Meta .Closed			{ color: #333; }
   6.188 +.DataList li.Closed a.Title	{ text-decoration: line-through; }
   6.189 +
   6.190 +.DataList li.Announcement	{ background: #FFC; }
   6.191 +.DataList .Meta .Announcement, .DataList .Meta .Closed {
   6.192 +	width: 100px; font-weight: bold;
   6.193 +}
   6.194 +.DataList .Meta .Announcement	{ color: #C60; }
   6.195 +
   6.196 +/* DISCUSSION */
   6.197 +div.DiscussionTabs li		{ font-size: 1em; }
   6.198 +ul.Discussion				{ margin: 0 0 10px; }
   6.199 +
   6.200 +/* bookmark */
   6.201 +a.Bookmark					{ width: 9px; height: 9px; position: absolute; top: 8px; right: 10px; font-size: 0; background: #fff; border: 1px dotted #ffcc00; }
   6.202 +.Discussion a.Bookmark		{ top: 41px; }
   6.203 +a.Bookmarked 				{ background: #ffcc00; border: 1px solid #fff; }
   6.204 +div.Options a.Bookmark		{ top: 14px; }
   6.205 +
   6.206 +div.Comment {
   6.207 +	position: relative; 
   6.208 +	border-bottom: 1px dotted #ccc;
   6.209 +	padding: 10px; }
   6.210 +li.Even			{ background: #f8f8f8; }
   6.211 +
   6.212 +/* discussion meta */
   6.213 +.Comment .Message, .Comment .MessageForm, .ConversationMessage .Message {
   6.214 +	margin-left: 215px; line-height: 1.75em;
   6.215 +}
   6.216 +.Comment .Meta, .ConversationMessage .Meta {
   6.217 +	width: 175px; float: left; padding: 10px; background: #FFC;
   6.218 +	-moz-border-radius: 8px;
   6.219 +	-webkit-border-radius: 8px;
   6.220 +}
   6.221 +.Comment .Meta span, .ConversationMessage .Meta span, div.Meta div.PostCount {
   6.222 +	display: block; border-bottom: 1px dotted #ccc; font-size: 0.85em; padding: 1px 0; 
   6.223 +}
   6.224 +.Comment .Author, .ConversationMessage span.Author {
   6.225 +	background: #fff; padding: 5px; border-bottom: none;
   6.226 +}
   6.227 +.Comment .Author img, .ConversationMessage .Author a.Photo {
   6.228 +	float: left; margin: 0 10px 0 0;
   6.229 +}
   6.230 +.Comment .Author a, .ConversationMessage .Author a {
   6.231 +	font-weight: bold; font-size: 1.1em;
   6.232 +}
   6.233 +blockquote	{ margin: 0; padding: 10px; background: #fff; border: 1px dotted #ccc; }
   6.234 +.Odd blockquote	{ background: #F8F8F8; }
   6.235 +
   6.236 +/* post */
   6.237 +ul.PostOptions	{ margin: 0 0 10px; }
   6.238 +.Preview			{ padding: 10px; margin: 0 0 10px; border-bottom: 1px dotted #ccc; }
   6.239 +
   6.240 +/*- Conversations & Activities -*/
   6.241 +ul.Activities .Title	{ margin: 0 0 0 60px; font-weight: bold; }
   6.242 +ul.Conversations .Photo, ul.Activities .Photo {
   6.243 +	width: 50px; height: 50px; float: left; font-size: 0.9em; color: #ccc; overflow: hidden; background: #eee;
   6.244 +}
   6.245 +ul.Conversations .Excerpt, ul.Activities .Excerpt {
   6.246 +	margin: 0 0 10px 60px;
   6.247 +}
   6.248 +ul.Conversations .Meta, ul.Activities .Meta, .SearchResults .Meta {
   6.249 +	margin: 0 0 0 60px;background: #FFC; padding: 3px 5px; 
   6.250 +}
   6.251 +.SearchResults .Meta	{ margin: 5px 0 0; }
   6.252 +ul.ActivityComments		{ margin: 0 0 0 60px; }
   6.253 +
   6.254 +.ConversationMessage .Message		{ min-height: 100px; }
   6.255 +.ConversationMessage span.Author	{ height: 50px; }
   6.256 +.ConversationMessage span.ItemLink		{ display: none; }
   6.257 +
   6.258 +/***--- PANEL --***/
   6.259 +.Block		{ padding: 15px; background: #ddd; margin: 0 10px 0 0; }
   6.260 +.Post #Panel, .Search #Panel {
   6.261 +	display: none;
   6.262 +}
   6.263 +
   6.264 +.PanelInfo li			{ padding: 0px 0px; }
   6.265 +.PanelInfo li strong	{ font-weight: normal; }
   6.266 +.PanelInfo li.Active a	{ color: #c60; }
   6.267 +.PanelInfo li.Parent	{ background: #ccc; padding: 2px 5px; font-size: 1.1em; font-weight: bold; }
   6.268 +
   6.269 +.PanelInfo a, .Box a {
   6.270 +	color: #0F314E;
   6.271 +	background: inherit;
   6.272 +	display: block;
   6.273 +	text-decoration: none;
   6.274 +	font-weight: bold;
   6.275 +}
   6.276 +
   6.277 +.PanelInfo a:hover, .Box a:hover {
   6.278 +	color: #c60;
   6.279 +	text-decoration: none;
   6.280 +	display: block;
   6.281 +}
   6.282 +/* account */
   6.283 +
   6.284 +#Panel .Photo		{ background: #ddd; position: absolute; right: 10px; padding: 0 0 10px 10px; }
   6.285 +#Panel .Photo img	{ width: 50px; display: block; border: 5px solid #fff; border-bottom-width: 12px; }
   6.286 +#Panel .Photo img:hover	{ width: auto; }
   6.287 +
   6.288 +#Panel dl					{ padding: 10px; background: #fff; margin: 0; }
   6.289 +#Panel dt					{ font-weight: bold; padding: 2px 0 0; }
   6.290 +#Panel dd					{ margin: 0; border-bottom: 1px dotted #ccc; padding: 0 0 2px; }
   6.291 +
   6.292 +/* inbox */
   6.293 +.PanelInfo li strong		{ display: inline-block; margin: 0 5px 0 0; }
   6.294 +
   6.295 +/*- Form elements -*/
   6.296 +form		{ padding: 0 10px 10px; border-bottom: 1px dotted #ccc; }
   6.297 +fieldset	{ margin: 0; padding: 0; border: none; }
   6.298 +
   6.299 +form#Form_User_Register	{ margin-top: 10px; }
   6.300 +
   6.301 +input, textarea, select {
   6.302 +	border: 1px solid #ccc; padding: 3px 5px; margin: 0;
   6.303 +}
   6.304 +input.InputBox		{ width: 325px; margin: 0 10px 5px 0; }
   6.305 +
   6.306 +input.Button, input.Cancel {
   6.307 +	-moz-border-radius: 4px;
   6.308 +	-webkit-border-radius: 4px;
   6.309 +	cursor: pointer; border: none; background: #c60; color: #fff; padding: 4px;
   6.310 +}
   6.311 +input.Button:hover, input.Cancel:hover {
   6.312 +	background: #555555; color: white;
   6.313 +}
   6.314 +
   6.315 +a.Back, a.Cancel {
   6.316 +	margin: 0 5px 0 0;
   6.317 +}
   6.318 +
   6.319 +textarea			{ width: 95%; min-height: 100px; display: block; margin: 10px 0; }
   6.320 +
   6.321 +label	{ display: block; font-weight: bold; }
   6.322 +label.RadioLabel, label.CheckBoxLabel {
   6.323 +	font-weight: normal;
   6.324 +}
   6.325 +label.RadioLabel input, label.CheckBoxLabel input {
   6.326 +	border: none;
   6.327 +}
   6.328 +
   6.329 +li.Gender, li.CaptchaInput {
   6.330 +	margin: 0 0 10px;
   6.331 +}
   6.332 +li.CreateAccount, li.Buttons {
   6.333 +	margin: 5px 0 0;
   6.334 +}
   6.335 +.cleditorMain	{ margin: 10px 0; }
   6.336 +
   6.337 +.CommentForm div.Messages { margin: 8px 0 0; }
   6.338 +.Errors, .Warning	{
   6.339 +	color: #F00;
   6.340 +}
   6.341 +
   6.342 +/***--- BUTTONS ---***/
   6.343 +.GuestBox a.Button	{
   6.344 +	-moz-border-radius: 4px;
   6.345 +	-webkit-border-radius: 4px;
   6.346 +	font-size: 11px;
   6.347 +	padding: 4px;
   6.348 +	margin: 0 0 10px;
   6.349 +	background: #c60; 
   6.350 +	color: #FFF; }
   6.351 +.GuestBox .Button:hover	{
   6.352 +	background: #555555; }
   6.353 +	
   6.354 +a.BigButton	{
   6.355 +	-moz-border-radius: 8px;
   6.356 +	-webkit-border-radius: 8px;
   6.357 +	display: block; 
   6.358 +	background: #c60; 
   6.359 +	color: #FFF; 
   6.360 +	padding: 10px; 
   6.361 +	font-size: 1.1em; 
   6.362 +	font-weight: bold;
   6.363 +	text-align: center}
   6.364 +a.BigButton:hover	{ background: #555555; }
   6.365 +a.ClearConversation	{ margin: 10px 0 0; }
   6.366 +
   6.367 +/* options */
   6.368 +div.Options, div.OptionButton {
   6.369 +	position: absolute; top: 12px; right: 10px;
   6.370 +}
   6.371 +div.OptionButton	{ font-weight: bold; color: #555; }
   6.372 +ul.Options strong	{
   6.373 +	-moz-border-radius: 4px;
   6.374 +	-webkit-border-radius: 4px;
   6.375 +	cursor: pointer; 
   6.376 +	display: block; 
   6.377 +	padding: 5px 10px;
   6.378 +	background: #FFC;
   6.379 +	border: 1px solid #ccc; }
   6.380 +
   6.381 +ul.Options				{ margin: 5px 40px 0 0; }
   6.382 +ul.Options li			{ position: relative; }
   6.383 +ul.Options ul			{ min-width: 125px; display: none; position: absolute; z-index: 1000; background: #FFC; right: 0; border: 1px dotted #ccc; margin-top: -1px; }
   6.384 +ul.Options li:hover ul 	{ display: block; }
   6.385 +ul.Options ul li		{ display: block; border-top: 1px dotted #ccc; }
   6.386 +ul.Options ul li:first-child	{ border-top: none; }
   6.387 +ul.Options ul li a		{ display: block; padding: 5px 10px; }
   6.388 +
   6.389 +/*- Pager -*/
   6.390 +#PagerAfter				{ margin: 10px 0; text-align: center; background: #ddd; padding: 2px 10px; }
   6.391 +#PagerAfter	a			{ display: inline-block; padding: 0 5px; }
   6.392 +#PagerAfter	a.Highlight		{ color: #c60; }
   6.393 +span.Previous, a.Previous	{ float: left; }
   6.394 +#PagerAfter	span.Next, #PagerAfter	a.Next	{ float: right; padding: 0; }
   6.395 +
   6.396 +#PagerMore				{ text-align: right; padding: 5px 10px; }
   6.397 +
   6.398 +/***--- FOOTER --***/
   6.399 +#Footer {
   6.400 +	font-size: 11px ;
   6.401 +	width: 100%; 
   6.402 +	position: absolute; 
   6.403 +	bottom: 0;
   6.404 +	background: inherit;
   6.405 +	color: #a8a8a8; }
   6.406 +#Footer ul	{ margin: 16px 15px; }
   6.407 +#Footer li	{ float: left; }
   6.408 +#Footer a { text-decoration: underline; background: inherit; color: #a8a8a8; }
   6.409 +#Footer a:hover	{ color: #666666; }
   6.410 +
   6.411 +/***--- OVERLAY ---***/
   6.412 +.Overlay	{ width: 100%; position: absolute; top: 0; z-index: 10000; background: url(../images/overlayBg.png); }
   6.413 +.Overlay #Popup	{ width: 720px; padding: 15px; background: #FFF; margin: 0 auto; border: 1px dotted #c60; position: relative; }
   6.414 +
   6.415 +.Overlay .Buttons input.Button	{ margin: 0 0 10px; }
   6.416 +.Overlay p			{ padding: 0 10px; }
   6.417 +.Overlay a.Close	{ position: absolute; display: block; top: 10px; right: 15px; padding: 13px; font-size: 1.5em; color: #fff; }
   6.418 +.Overlay a.Close:hover	{ color: #c60; }
   6.419 +.Overlay ul			{ margin: 10px 0 0; }
   6.420 +
   6.421 +.Overlay input.Button	{ margin: 10px 0 0; }
   6.422 +.Overlay textarea		{ margin: 10px 0 0; }
   6.423 +.Overlay li.Gender		{ margin: 0; }
   6.424 +
   6.425 +.Overlay #Form_Picture	{ margin: 0 0 10px; }
     7.1 Binary file forum/themes/slitaz-2/images/header.png has changed
     8.1 Binary file forum/themes/slitaz-2/images/logo.png has changed
     9.1 Binary file forum/themes/slitaz-2/images/overlayBg.png has changed
    10.1 Binary file forum/themes/slitaz-2/screenshot.png has changed
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/forum/themes/slitaz-2/views/default.master.php	Wed Dec 22 10:36:12 2010 +0100
    11.3 @@ -0,0 +1,84 @@
    11.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    11.5 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    11.6 +	<head>
    11.7 +		<?php $this->RenderAsset('Head'); ?>
    11.8 +	</head>
    11.9 +	<body id="<?php echo $BodyIdentifier; ?>" class="<?php echo $this->CssClass; ?>">
   11.10 +		<div id="Wrapper">
   11.11 +			<div id="Main">
   11.12 +				<div id="ContentHolder">
   11.13 +					<div id="Content">
   11.14 +						<?php $this->RenderAsset('Content'); ?>
   11.15 +					</div>
   11.16 +				</div>
   11.17 +				<div id="PanelHolder">
   11.18 +					<div id="Panel">
   11.19 +					
   11.20 +					<div class="Box">
   11.21 +						<h4>Navigation</h4>
   11.22 +
   11.23 +					<?php
   11.24 +				  $Session = Gdn::Session();
   11.25 +					if ($this->Menu) {
   11.26 +						$this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'));
   11.27 +						// $this->Menu->AddLink('Dashboard', T('Users'), '/user/browse', array('Garden.Users.Add', 'Garden.Users.Edit', 'Garden.Users.Delete'));
   11.28 +						$this->Menu->AddLink('Activity', T('Activity'), '/activity');
   11.29 +					 $Authenticator = Gdn::Authenticator();
   11.30 +						if ($Session->IsValid()) {
   11.31 +							$Name = $Session->User->Name;
   11.32 +							$CountNotifications = $Session->User->CountNotifications;
   11.33 +							if (is_numeric($CountNotifications) && $CountNotifications > 0)
   11.34 +								$Name .= ' <span>'.$CountNotifications.'</span>';
   11.35 +								
   11.36 +							$this->Menu->AddLink('User', "Profile ($Name)", '/profile/{UserID}/{Username}', array('Garden.SignIn.Allow'), array('class' => 'UserNotifications'));
   11.37 +							$this->Menu->AddLink('SignOut', T('Sign Out'), $Authenticator->SignOutUrl(), FALSE, array('class' => 'NonTab SignOut'));
   11.38 +						} else {
   11.39 +							$Attribs = array();
   11.40 +							if (C('Garden.SignIn.Popup') && strpos(Gdn::Request()->Url(), 'entry') === FALSE)
   11.41 +								$Attribs['class'] = 'SignInPopup';
   11.42 +								
   11.43 +							$this->Menu->AddLink('Entry', T('Sign In'), $Authenticator->SignInUrl($this->SelfUrl), FALSE, array('class' => 'NonTab'), $Attribs);
   11.44 +						}
   11.45 +						echo $this->Menu->ToString();
   11.46 +					}
   11.47 +				?>
   11.48 +					</div>
   11.49 +					<?php $this->RenderAsset('Panel'); ?>
   11.50 +					</div>
   11.51 +				</div>
   11.52 +				<div class="clear">&nbsp;</div>
   11.53 +			</div>
   11.54 +			
   11.55 +			<div id="Header">
   11.56 +			
   11.57 +			<a href="http://forum.slitaz.org/"><img id="logo"
   11.58 +			src="themes/slitaz/images/logo.png" title="www.slitaz.org" alt="www.slitaz.org"
   11.59 +			style="border: 0px solid ; width: 200px; height: 74px;" /></a>
   11.60 +			<p id="titre">#!/Support/Forum</p>
   11.61 +				
   11.62 +			</div>
   11.63 +			
   11.64 +			<div id="Nav">
   11.65 +				
   11.66 +				<div id="Search">
   11.67 +					<?php
   11.68 +						$Form = Gdn::Factory('Form');
   11.69 +						$Form->InputPrefix = '';
   11.70 +						echo 
   11.71 +							$Form->Open(array('action' => Url('/search'), 'method' => 'get')),
   11.72 +							$Form->TextBox('Search'),
   11.73 +							$Form->Button('Search', array('Name' => '')),
   11.74 +							$Form->Close();
   11.75 +					?>
   11.76 +				</div>
   11.77 +			</div>
   11.78 +			
   11.79 +			<div id="Footer">
   11.80 +				Copyright &copy; 2010 <a href="http://www.slitaz.org/">SliTaz</a> -
   11.81 +				<a href="http://vanillaforums.org">Powered by Vanilla</a>
   11.82 +			</div>
   11.83 +		</div>
   11.84 +
   11.85 +		<?php $this->FireEvent('AfterBody'); ?>
   11.86 +	</body>
   11.87 +</html>
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/forum/themes/slitaz-2/views/discussion/comments.php	Wed Dec 22 10:36:12 2010 +0100
    12.3 @@ -0,0 +1,25 @@
    12.4 +<?php if (!defined('APPLICATION')) exit();
    12.5 +$Session = Gdn::Session();
    12.6 +$this->FireEvent('BeforeCommentsRender');
    12.7 +if (!function_exists('WriteComment'))
    12.8 +   include($this->FetchViewLocation('helper_functions', 'discussion'));
    12.9 +   
   12.10 +$CurrentOffset = $this->Offset;
   12.11 +if ($CurrentOffset == 0 && !$this->Data('NewComments', FALSE)) {
   12.12 +   echo WriteComment($this->Discussion, $this, $Session, $CurrentOffset);
   12.13 +}
   12.14 +
   12.15 +// Only prints individual comment list items
   12.16 +$CommentData = $this->CommentData->Result();
   12.17 +$i = 0;
   12.18 +foreach ($CommentData as $Comment) {
   12.19 +   ++$CurrentOffset;
   12.20 +   $this->CurrentComment = $Comment;
   12.21 +   if ($i % 2) {
   12.22 +		$counter = 'Odd';
   12.23 +   } else {
   12.24 +	   $counter = 'Even';
   12.25 +   }
   12.26 +   WriteComment($Comment, $this, $Session, $CurrentOffset, $counter);
   12.27 +   $i++;
   12.28 +}
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/forum/themes/slitaz-2/views/discussion/helper_functions.php	Wed Dec 22 10:36:12 2010 +0100
    13.3 @@ -0,0 +1,118 @@
    13.4 +<?php if (!defined('APPLICATION')) exit();
    13.5 +
    13.6 +/**
    13.7 + * $Object is either a Comment or the original Discussion.
    13.8 + */
    13.9 +function WriteComment($Object, $Sender, $Session, $CurrentOffset, $counter) {
   13.10 +   $Author = UserBuilder($Object, 'Insert');
   13.11 +   $Type = property_exists($Object, 'CommentID') ? 'Comment' : 'Discussion';
   13.12 +	$Sender->EventArguments['Object'] = $Object;
   13.13 +   $Sender->EventArguments['Type'] = $Type;
   13.14 +   $Sender->EventArguments['Author'] = $Author;
   13.15 +   $CssClass = 'Item Comment ' . $counter;
   13.16 +   if ($Type == 'Comment') {
   13.17 +      $Sender->EventArguments['Comment'] = $Object;   
   13.18 +      $Id = 'Comment_'.$Object->CommentID;
   13.19 +      $Permalink = '/discussion/comment/'.$Object->CommentID.'/#Comment_'.$Object->CommentID;
   13.20 +   } else {
   13.21 +      $Sender->EventArguments['Discussion'] = $Object;   
   13.22 +      $CssClass .= ' FirstComment';
   13.23 +      $Id = 'Discussion_'.$Object->DiscussionID;
   13.24 +      $Permalink = '/discussion/'.$Object->DiscussionID.'/'.Gdn_Format::Url($Object->Name).'/p1';
   13.25 +   }
   13.26 +   $Sender->Options = '';
   13.27 +   $CssClass .= $Object->InsertUserID == $Session->UserID ? ' Mine' : '';
   13.28 +   $Sender->FireEvent('BeforeCommentDisplay');
   13.29 +?>
   13.30 +<li class="<?php echo $CssClass; ?>" id="<?php echo $Id; ?>">
   13.31 +   <div class="Comment">
   13.32 +      <div class="Meta">
   13.33 +         <?php $Sender->FireEvent('BeforeCommentMeta'); ?>
   13.34 +         <div class="Author">
   13.35 +            <?php
   13.36 +            echo UserPhoto($Author);
   13.37 +            echo UserAnchor($Author);
   13.38 +            ?>
   13.39 +			<div class="clear">&nbsp;</div>
   13.40 +         </div>
   13.41 +         <span class="DateCreated">
   13.42 +            <?php
   13.43 +            echo Gdn_Format::Date($Object->DateInserted);
   13.44 +            ?>
   13.45 +         </span>
   13.46 +         <span class="Permalink">
   13.47 +            <?php echo Anchor(T('Permalink'), $Permalink, 'Permalink', array('name' => 'Item_'.($CurrentOffset+1), 'rel' => 'nofollow')); ?>
   13.48 +         </span>
   13.49 +         <?php WriteOptionList($Object, $Sender, $Session); ?>
   13.50 +         <div class="CommentInfo">
   13.51 +            <?php $Sender->FireEvent('CommentInfo'); ?>
   13.52 +         </div>
   13.53 +         <?php $Sender->FireEvent('AfterCommentMeta'); ?>
   13.54 +      </div>
   13.55 +      <div class="Message">
   13.56 +			<?php $Sender->FireEvent('BeforeCommentBody'); ?>
   13.57 +			<?php 
   13.58 +			   $Object->FormatBody = Gdn_Format::To($Object->Body, $Object->Format);
   13.59 +			   $Sender->FireEvent('AfterCommentFormat');
   13.60 +			   $Object = $Sender->EventArguments['Object'];
   13.61 +			   echo $Object->FormatBody;
   13.62 +			?>
   13.63 +		</div><div class="clear">&nbsp;</div>
   13.64 +      <?php $Sender->FireEvent('AfterCommentBody'); ?>
   13.65 +   </div>
   13.66 +</li>
   13.67 +<?php
   13.68 +	$Sender->FireEvent('AfterComment');
   13.69 +}
   13.70 +
   13.71 +function WriteOptionList($Object, $Sender, $Session) {
   13.72 +   $EditContentTimeout = C('Garden.EditContentTimeout', -1);
   13.73 +	$CanEdit = $EditContentTimeout == -1 || strtotime($Object->DateInserted) + $EditContentTimeout > time();
   13.74 +	$TimeLeft = '';
   13.75 +	if ($CanEdit && $EditContentTimeout > 0) {
   13.76 +		$TimeLeft = strtotime($Object->DateInserted) + $EditContentTimeout - time();
   13.77 +		$TimeLeft = $TimeLeft > 0 ? ' ('.Gdn_Format::Seconds($TimeLeft).')' : '';
   13.78 +	}
   13.79 +
   13.80 +   $Sender->Options = '';
   13.81 +	$CategoryID = GetValue('CategoryID', $Object);
   13.82 +	if(!$CategoryID && property_exists($Sender, 'Discussion'))
   13.83 +		$CategoryID = GetValue('CategoryID', $Sender->Discussion);
   13.84 +		
   13.85 +   // Show discussion options if this is the discussion / first comment
   13.86 +   if ($Sender->EventArguments['Type'] == 'Discussion') {
   13.87 +      // Can the user edit the discussion?
   13.88 +      if (($CanEdit && $Session->UserID == $Object->InsertUserID) || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $CategoryID))
   13.89 +         $Sender->Options .= '<span>'.Anchor(T('Edit'), '/vanilla/post/editdiscussion/'.$Object->DiscussionID, 'EditDiscussion').$TimeLeft.'</span>';
   13.90 +         
   13.91 +      // Can the user announce?
   13.92 +      if ($Session->CheckPermission('Vanilla.Discussions.Announce', TRUE, 'Category', $CategoryID))
   13.93 +         $Sender->Options .= '<span>'.Anchor(T($Sender->Discussion->Announce == '1' ? 'Unannounce' : 'Announce'), 'vanilla/discussion/announce/'.$Object->DiscussionID.'/'.$Session->TransientKey(), 'AnnounceDiscussion') . '</span>';
   13.94 +
   13.95 +      // Can the user sink?
   13.96 +      if ($Session->CheckPermission('Vanilla.Discussions.Sink', TRUE, 'Category', $CategoryID))
   13.97 +         $Sender->Options .= '<span>'.Anchor(T($Sender->Discussion->Sink == '1' ? 'Unsink' : 'Sink'), 'vanilla/discussion/sink/'.$Object->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'SinkDiscussion') . '</span>';
   13.98 +
   13.99 +      // Can the user close?
  13.100 +      if ($Session->CheckPermission('Vanilla.Discussions.Close', TRUE, 'Category', $CategoryID))
  13.101 +         $Sender->Options .= '<span>'.Anchor(T($Sender->Discussion->Closed == '1' ? 'Reopen' : 'Close'), 'vanilla/discussion/close/'.$Object->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'CloseDiscussion') . '</span>';
  13.102 +      
  13.103 +      // Can the user delete?
  13.104 +      if ($Session->CheckPermission('Vanilla.Discussions.Delete', TRUE, 'Category', $CategoryID))
  13.105 +         $Sender->Options .= '<span>'.Anchor(T('Delete Discussion'), 'vanilla/discussion/delete/'.$Object->DiscussionID.'/'.$Session->TransientKey(), 'DeleteDiscussion') . '</span>';
  13.106 +   } else {
  13.107 +      // And if this is just another comment in the discussion ...
  13.108 +      
  13.109 +      // Can the user edit the comment?
  13.110 +      if (($CanEdit && $Session->UserID == $Object->InsertUserID) || $Session->CheckPermission('Vanilla.Comments.Edit', TRUE, 'Category', $Sender->Discussion->CategoryID))
  13.111 +         $Sender->Options .= '<span>'.Anchor(T('Edit'), '/vanilla/post/editcomment/'.$Object->CommentID, 'EditComment').$TimeLeft.'</span>';
  13.112 +
  13.113 +      // Can the user delete the comment?
  13.114 +      if ($Session->CheckPermission('Vanilla.Comments.Delete', TRUE, 'Category', $CategoryID))
  13.115 +         $Sender->Options .= '<span>'.Anchor(T('Delete'), 'vanilla/discussion/deletecomment/'.$Object->CommentID.'/'.$Session->TransientKey().'/?Target='.urlencode($Sender->SelfUrl), 'DeleteComment') . '</span>';
  13.116 +   }
  13.117 +   
  13.118 +   // Allow plugins to add options
  13.119 +   $Sender->FireEvent('CommentOptions');
  13.120 +   echo $Sender->Options;
  13.121 +}
  13.122 \ No newline at end of file
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/forum/themes/slitaz-2/views/discussions/helper_functions.php	Wed Dec 22 10:36:12 2010 +0100
    14.3 @@ -0,0 +1,186 @@
    14.4 +<?php
    14.5 +if (!defined('APPLICATION')) exit();
    14.6 +
    14.7 +function WriteDiscussion($Discussion, &$Sender, &$Session, $Alt) {
    14.8 +   $CssClass = 'Item';
    14.9 +   $CssClass .= $Discussion->Bookmarked == '1' ? ' Bookmarked' : '';
   14.10 +   $CssClass .= $Discussion->Closed == '1' ? ' Closed' : '';
   14.11 +   $CssClass .= $Alt.' ';
   14.12 +   $CssClass .= $Discussion->Announce == '1' ? ' Announcement' : '';
   14.13 +   $CssClass .= $Discussion->Dismissed == '1' ? ' Dismissed' : '';
   14.14 +   $CssClass .= $Discussion->InsertUserID == $Session->UserID ? ' Mine' : '';
   14.15 +   $CssClass .= ($Discussion->CountUnreadComments > 0 && $Session->IsValid()) ? ' New' : '';
   14.16 +   $Sender->EventArguments['Discussion'] = &$Discussion;
   14.17 +   $First = UserBuilder($Discussion, 'First');
   14.18 +   $Last = UserBuilder($Discussion, 'Last');
   14.19 +   
   14.20 +   $Sender->FireEvent('BeforeDiscussionName');
   14.21 +   
   14.22 +   $DiscussionName = Gdn_Format::Text($Discussion->Name);
   14.23 +   if ($DiscussionName == '')
   14.24 +      $DiscussionName = T('Blank Discussion Topic');
   14.25 +
   14.26 +   static $FirstDiscussion = TRUE;
   14.27 +   if (!$FirstDiscussion)
   14.28 +      $Sender->FireEvent('BetweenDiscussion');
   14.29 +   else
   14.30 +      $FirstDiscussion = FALSE;
   14.31 +?>
   14.32 +<li class="<?php echo $CssClass; ?> ">
   14.33 +   <?php
   14.34 +   $Sender->FireEvent('BeforeDiscussionContent');
   14.35 +   WriteOptions($Discussion, $Sender, $Session);
   14.36 +   ?>
   14.37 +   <div class="ItemContent Discussion">
   14.38 +      <?php echo Anchor($DiscussionName, '/discussion/'.$Discussion->DiscussionID.'/'.Gdn_Format::Url($Discussion->Name).($Discussion->CountCommentWatch > 0 && C('Vanilla.Comments.AutoOffset') ? '/#Item_'.$Discussion->CountCommentWatch : ''), 'Title'); ?>
   14.39 +      <?php $Sender->FireEvent('AfterDiscussionTitle'); ?>
   14.40 +      <div class="Meta">
   14.41 +         <?php if ($Discussion->Announce == '1') { ?>
   14.42 +         <span class="Announcement"><?php echo T('Announcement'); ?></span>
   14.43 +         <?php } ?>
   14.44 +         <?php if ($Discussion->Closed == '1') { ?>
   14.45 +         <span class="Closed"><?php echo T('Closed'); ?></span>
   14.46 +         <?php } ?>
   14.47 +         <span class="CommentCount"><?php printf(Plural($Discussion->CountComments, '%s comment', '%s comments'), $Discussion->CountComments); ?></span>
   14.48 +         <?php
   14.49 +            if ($Session->IsValid() && $Discussion->CountUnreadComments > 0)
   14.50 +               echo '<strong>'.Plural($Discussion->CountUnreadComments, '%s New', '%s New Plural').'</strong>';
   14.51 +
   14.52 +            if ($Discussion->LastCommentID != '') {
   14.53 +               echo '<span class="LastCommentBy">'.sprintf(T('Most recent by %1$s'), UserAnchor($Last)).'</span>';
   14.54 +               echo '<span class="LastCommentDate">'.Gdn_Format::Date($Discussion->LastDate).'</span>';
   14.55 +            } else {
   14.56 +               echo '<span class="LastCommentBy">'.sprintf(T('Started by %1$s'), UserAnchor($First)).'</span>';
   14.57 +               echo '<span class="LastCommentDate">'.Gdn_Format::Date($Discussion->FirstDate).'</span>';
   14.58 +            }
   14.59 +         
   14.60 +            if (C('Vanilla.Categories.Use'))
   14.61 +               echo Wrap(Anchor($Discussion->Category, '/categories/'.$Discussion->CategoryUrlCode, 'Category'));
   14.62 +               
   14.63 +            $Sender->FireEvent('DiscussionMeta');
   14.64 +         ?>
   14.65 +      </div>
   14.66 +   </div>
   14.67 +</li>
   14.68 +<?php
   14.69 +}
   14.70 +
   14.71 +function WriteFilterTabs(&$Sender) {
   14.72 +   $Session = Gdn::Session();
   14.73 +   $Title = property_exists($Sender, 'Category') && is_object($Sender->Category) ? $Sender->Category->Name : T('All Discussions');
   14.74 +   $Bookmarked = T('My Bookmarks');
   14.75 +   $MyDiscussions = T('My Discussions');
   14.76 +   $MyDrafts = T('My Drafts');
   14.77 +   $CountBookmarks = 0;
   14.78 +   $CountDiscussions = 0;
   14.79 +   $CountDrafts = 0;
   14.80 +   if ($Session->IsValid()) {
   14.81 +      $CountBookmarks = $Session->User->CountBookmarks;
   14.82 +      $CountDiscussions = $Session->User->CountDiscussions;
   14.83 +      $CountDrafts = $Session->User->CountDrafts;
   14.84 +   }
   14.85 +   if (is_numeric($CountBookmarks) && $CountBookmarks > 0)
   14.86 +      $Bookmarked .= '<span>'.$CountBookmarks.'</span>';
   14.87 +
   14.88 +   if (is_numeric($CountDiscussions) && $CountDiscussions > 0)
   14.89 +      $MyDiscussions .= '<span>'.$CountDiscussions.'</span>';
   14.90 +
   14.91 +   if (is_numeric($CountDrafts) && $CountDrafts > 0)
   14.92 +      $MyDrafts .= '<span>'.$CountDrafts.'</span>';
   14.93 +      
   14.94 +   ?>
   14.95 +<div class="Tabs DiscussionsTabs">
   14.96 +   <ul>
   14.97 +      <?php $Sender->FireEvent('BeforeDiscussionTabs'); ?>
   14.98 +      <li<?php echo strtolower($Sender->ControllerName) == 'discussionscontroller' && strtolower($Sender->RequestMethod) == 'index' ? ' class="Active"' : ''; ?>><?php echo Anchor(T('All Discussions'), 'discussions'); ?></li>
   14.99 +      <?php $Sender->FireEvent('AfterAllDiscussionsTab'); ?>
  14.100 +      <?php if ($CountBookmarks > 0 || $Sender->RequestMethod == 'bookmarked') { ?>
  14.101 +      <li<?php echo $Sender->RequestMethod == 'bookmarked' ? ' class="Active"' : ''; ?>><?php echo Anchor($Bookmarked, '/discussions/bookmarked', 'MyBookmarks'); ?></li>
  14.102 +      <?php
  14.103 +         $Sender->FireEvent('AfterBookmarksTab');
  14.104 +      }
  14.105 +      if ($CountDiscussions > 0 || $Sender->RequestMethod == 'mine') {
  14.106 +      ?>
  14.107 +      <li<?php echo $Sender->RequestMethod == 'mine' ? ' class="Active"' : ''; ?>><?php echo Anchor($MyDiscussions, '/discussions/mine', 'MyDiscussions'); ?></li>
  14.108 +      <?php
  14.109 +      }
  14.110 +      if ($CountDrafts > 0 || $Sender->ControllerName == 'draftscontroller') {
  14.111 +      ?>
  14.112 +      <li<?php echo $Sender->ControllerName == 'draftscontroller' ? ' class="Active"' : ''; ?>><?php echo Anchor($MyDrafts, '/drafts', 'MyDrafts'); ?></li>
  14.113 +      <?php
  14.114 +      }
  14.115 +      $Sender->FireEvent('AfterDiscussionTabs');
  14.116 +      ?>
  14.117 +   </ul>
  14.118 +   <?php
  14.119 +   if (property_exists($Sender, 'Category') && is_object($Sender->Category)) {
  14.120 +      ?>
  14.121 +      <div class="SubTab">↳ <?php echo $Sender->Category->Name; ?></div>
  14.122 +      <?php
  14.123 +   }
  14.124 +   ?>
  14.125 +</div>
  14.126 +   <?php
  14.127 +}
  14.128 +
  14.129 +/**
  14.130 + * Render options that the user has for this discussion.
  14.131 + */
  14.132 +function WriteOptions($Discussion, &$Sender, &$Session) {
  14.133 +   if ($Session->IsValid() && $Sender->ShowOptions) {
  14.134 +      echo '<div class="Options">';
  14.135 +      // Bookmark link
  14.136 +      $Title = T($Discussion->Bookmarked == '1' ? 'Unbookmark' : 'Bookmark');
  14.137 +      echo Anchor(
  14.138 +         '<span class="Star">'
  14.139 +            .Img('applications/dashboard/design/images/pixel.png', array('alt' => $Title))
  14.140 +         .'</span>',
  14.141 +         '/vanilla/discussion/bookmark/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl),
  14.142 +         'Bookmark' . ($Discussion->Bookmarked == '1' ? ' Bookmarked' : ''),
  14.143 +         array('title' => $Title)
  14.144 +      );
  14.145 +      
  14.146 +      $Sender->Options = '';
  14.147 +      
  14.148 +      // Dismiss an announcement
  14.149 +      if (C('Vanilla.Discussions.Dismiss', 1) && $Discussion->Announce == '1' && $Discussion->Dismissed != '1')
  14.150 +         $Sender->Options .= '<li>'.Anchor(T('Dismiss'), 'vanilla/discussion/dismissannouncement/'.$Discussion->DiscussionID.'/'.$Session->TransientKey(), 'DismissAnnouncement') . '</li>';
  14.151 +      
  14.152 +      // Edit discussion
  14.153 +      if ($Discussion->FirstUserID == $Session->UserID || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $Discussion->CategoryID))
  14.154 +         $Sender->Options .= '<li>'.Anchor(T('Edit'), 'vanilla/post/editdiscussion/'.$Discussion->DiscussionID, 'EditDiscussion') . '</li>';
  14.155 +
  14.156 +      // Announce discussion
  14.157 +      if ($Session->CheckPermission('Vanilla.Discussions.Announce', TRUE, 'Category', $Discussion->CategoryID))
  14.158 +         $Sender->Options .= '<li>'.Anchor(T($Discussion->Announce == '1' ? 'Unannounce' : 'Announce'), 'vanilla/discussion/announce/'.$Discussion->DiscussionID.'/'.$Session->TransientKey(), 'AnnounceDiscussion') . '</li>';
  14.159 +
  14.160 +      // Sink discussion
  14.161 +      if ($Session->CheckPermission('Vanilla.Discussions.Sink', TRUE, 'Category', $Discussion->CategoryID))
  14.162 +         $Sender->Options .= '<li>'.Anchor(T($Discussion->Sink == '1' ? 'Unsink' : 'Sink'), 'vanilla/discussion/sink/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'SinkDiscussion') . '</li>';
  14.163 +
  14.164 +      // Close discussion
  14.165 +      if ($Session->CheckPermission('Vanilla.Discussions.Close', TRUE, 'Category', $Discussion->CategoryID))
  14.166 +         $Sender->Options .= '<li>'.Anchor(T($Discussion->Closed == '1' ? 'Reopen' : 'Close'), 'vanilla/discussion/close/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'CloseDiscussion') . '</li>';
  14.167 +      
  14.168 +      // Delete discussion
  14.169 +      if ($Session->CheckPermission('Vanilla.Discussions.Delete', TRUE, 'Category', $Discussion->CategoryID))
  14.170 +         $Sender->Options .= '<li>'.Anchor(T('Delete'), 'vanilla/discussion/delete/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'DeleteDiscussion') . '</li>';
  14.171 +      
  14.172 +      // Allow plugins to add options
  14.173 +      $Sender->FireEvent('DiscussionOptions');
  14.174 +      
  14.175 +      if ($Sender->Options != '') {
  14.176 +      ?>
  14.177 +         <ul class="Options">
  14.178 +            <li>
  14.179 +               <strong><?php echo T('Options'); ?></strong>
  14.180 +               <ul>
  14.181 +                  <?php echo $Sender->Options; ?>
  14.182 +               </ul>
  14.183 +            </li>
  14.184 +         </ul>
  14.185 +      <?php
  14.186 +      }
  14.187 +      echo '</div>';
  14.188 +   }
  14.189 +}
  14.190 \ No newline at end of file
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/forum/themes/slitaz/README.txt	Wed Dec 22 10:36:12 2010 +0100
    15.3 @@ -0,0 +1,45 @@
    15.4 +How to create a theme:
    15.5 +
    15.6 +Part 1: CSS / Design
    15.7 +================================================================================
    15.8 +1. Copy this "default" theme folder and rename it to your new theme name.
    15.9 +2. Open the "about.php" file and edit the information to reflect your theme. Be
   15.10 +   sure to change the array key like this: $ThemeInfo['YourThemeNameHere'].
   15.11 +3. Create a "design" subfolder and copy /applications/dashboard/design/style.css 
   15.12 +   and /applications/vanilla/design/vanilla.css into it.
   15.13 +4. Any background images you want to continue using (like the star png images
   15.14 +   for bookmarking) should be copied along with their respective stylesheets.
   15.15 +5. Go to your Dashboard, Themes, and apply your new theme.
   15.16 +6. Edit the copied CSS files to look however you wish!
   15.17 +
   15.18 +Other things you should know:
   15.19 +
   15.20 + + All non-forum pages should be edited in the global "style.css" file.
   15.21 +
   15.22 + + If you want to edit the look & feel of the administrative screens, also 
   15.23 +   copy /applications/dashboard/design/admin.css in step 3. Similarly, you can 
   15.24 +   copy other CSS files like /applications/vanilla/design/vanillaprofile.css to
   15.25 +   customize those pages as well.
   15.26 +
   15.27 +
   15.28 +Part 2: HTML / Views
   15.29 +================================================================================
   15.30 +If you want to customize the HTML, you can edit that too. 
   15.31 +Our pages are made up of two parts:
   15.32 +
   15.33 + 1. Master Views - these represent everything that wraps the main content of the
   15.34 +   page. If all you want to do is add a menu or banner above Vanilla, this is
   15.35 +   all you need to alter. To do so, copy the default master view from
   15.36 +   /applications/dashboard/views/default.master.php to
   15.37 +   /themes/yourtheme/views/default.master.php and edit it there.
   15.38 +   
   15.39 + 2. Views - these represent all of the content in each page. Every application
   15.40 +   has a "views" folder that contains all of the HTML for every page. So, for
   15.41 +   example, if you wanted to edit the HTML for the Discussions list, you could
   15.42 +   copy the views from /applications/vanilla/views/discussions to
   15.43 +   /themes/yourtheme/views/discussions and edit them there.
   15.44 +
   15.45 +You can avoid naming conflicts between applications' views and specify which 
   15.46 +app a view is for by optionally adding a subfolder with the app's name in 
   15.47 +/themes/yourtheme/views/ (e.g.: /themes/yourtheme/views/appname/) and placing 
   15.48 +views there rather than directly in the "views" folder.
   15.49 \ No newline at end of file
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/forum/themes/slitaz/about.php	Wed Dec 22 10:36:12 2010 +0100
    16.3 @@ -0,0 +1,21 @@
    16.4 +<?php if (!defined('APPLICATION')) exit();
    16.5 +/*
    16.6 +Copyright 2008, 2009 Vanilla Forums Inc.
    16.7 +This file is part of Garden.
    16.8 +Garden is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
    16.9 +Garden is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
   16.10 +You should have received a copy of the GNU General Public License along with Garden.  If not, see <http://www.gnu.org/licenses/>.
   16.11 +Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com
   16.12 +*/
   16.13 +
   16.14 +/**
   16.15 + * An associative array of information about this application.
   16.16 + */
   16.17 +$ThemeInfo['SliTaz'] = array(
   16.18 +   'Name' => 'SliTaz',
   16.19 +   'Description' => "SliTaz Vanilla 2 official theme",
   16.20 +   'Version' => '1.0',
   16.21 +   'Author' => "Christophe Lincoln",
   16.22 +   'AuthorEmail' => 'pankso@slitaz.org',
   16.23 +   'AuthorUrl' => 'http://www.slitaz.org'
   16.24 +);
    17.1 Binary file forum/themes/slitaz/design/favicon.ico has changed
    18.1 Binary file forum/themes/slitaz/design/favicon.png has changed
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/forum/themes/slitaz/design/style.css	Wed Dec 22 10:36:12 2010 +0100
    19.3 @@ -0,0 +1,438 @@
    19.4 +@charset "utf-8";
    19.5 +/* CSS Document */
    19.6 +
    19.7 +/***--- MAIN / DEFAULT --***/
    19.8 +html, body	{ height: 102%; margin: 0; }
    19.9 +html, body, input, select, textarea, button {
   19.10 +	font-family: Verdana, Geneva, sans-serif;
   19.11 +	font-size: 11px;
   19.12 +	line-height: 17px;
   19.13 +	color: #555;
   19.14 +}
   19.15 +a			{ color: #2f6c8e; text-decoration: none; }
   19.16 +a:hover		{ color: #69a1c1; }
   19.17 +a img		{ border: none; }
   19.18 +ul, ol		{ margin: 0; padding: 0; list-style: none; }
   19.19 +
   19.20 +.clear {
   19.21 +    clear: both;
   19.22 +    display: block;
   19.23 +    height: 0;
   19.24 +    overflow: hidden;
   19.25 +    visibility: hidden;
   19.26 +    width: 0;
   19.27 +}
   19.28 +
   19.29 +#Wrapper	{ min-height: 100%; position: relative; margin: 0 auto; }
   19.30 +.Hidden		{ display: none; }
   19.31 +
   19.32 +/***--- HEADER(S) --***/
   19.33 +
   19.34 +
   19.35 +#Header h1	{ padding: 15px; font-size: 2em; }
   19.36 +#Header a	{ color: #69a1c1; }
   19.37 +#Header a:hover	{ color: #FFF; }
   19.38 +
   19.39 +#Header{
   19.40 +	background: #f0ba08 url(../images/header.png) repeat-x top;
   19.41 +	color: black;
   19.42 +	width: 100%;
   19.43 +	height: 50px;
   19.44 +	border-top: 1px solid black;
   19.45 +	border-bottom: 1px solid black;
   19.46 +	margin-bottom: 30px;
   19.47 +	position: absolute;
   19.48 +	top: 0;
   19.49 +}
   19.50 +
   19.51 +#titre {
   19.52 +	position: absolute;
   19.53 +	font-size: 16px;
   19.54 +	font-weight: bolder ;
   19.55 +	margin-left: 200px;
   19.56 +	margin-top: 28px;
   19.57 +}
   19.58 +
   19.59 +#logo {
   19.60 +	position: absolute;
   19.61 +	float: left;
   19.62 +	margin-left: 16px;
   19.63 +	margin-top: 0px;
   19.64 +}
   19.65 +
   19.66 +/***--- NAV --***/
   19.67 +#Nav { 
   19.68 +	right: 0;
   19.69 +	position: absolute;
   19.70 +	top: 3px;
   19.71 +	font-size: 10px;
   19.72 +	font-weight: bold; }
   19.73 +
   19.74 +ul#Menu {
   19.75 +	margin: 10px 15px;
   19.76 +	float: left; }
   19.77 +
   19.78 +#Menu li { float: left; margin: 0 1px 0 0; }
   19.79 +#Menu a {
   19.80 +	display: block;
   19.81 +	padding: 5px 4px;
   19.82 +	background: inherit;
   19.83 +	color: white;
   19.84 +	text-decoration: none; }
   19.85 +
   19.86 +#Menu a:hover {
   19.87 +	background: inherit;
   19.88 +	color: #222222; }
   19.89 +#Menu li.Highlight a	{ color: #222222; }
   19.90 +
   19.91 +/* search */
   19.92 +#Search { 
   19.93 +	-moz-border-radius: 4px;
   19.94 +	-webkit-border-radius: 4px; 
   19.95 +	height: 20px; 
   19.96 +	float: right; 
   19.97 +	background: #FFF; 
   19.98 +	padding: 2px 2px; 
   19.99 +	margin: 11px 15px; }
  19.100 +#Search form	{ padding: 0; border: none; }
  19.101 +#Nav #Search input.InputBox	{ width: 150px; border: none; }
  19.102 +#Search input.Button {
  19.103 +	-moz-border-radius: 4px;
  19.104 +	-webkit-border-radius: 4px;
  19.105 +	height: 17px;
  19.106 +	margin: 0;
  19.107 +	padding: 0; }
  19.108 +
  19.109 +/***--- MAIN --***/
  19.110 +/*#Main	{ }*/
  19.111 +
  19.112 +/* If you prefer the panel on the left and content on the right, simply switch the "float" property for #Content & #Panel and set the "margin-left" to "margin-right" for the #Content */
  19.113 +#Content		{ 
  19.114 +	margin: 0px 320px 0px 0px;
  19.115 +	padding: 86px 40px 65px 80px;
  19.116 +	}
  19.117 +#Panel			{
  19.118 +	position: absolute;
  19.119 +	top: 86px;
  19.120 +	right: 80px;
  19.121 +	color: #555555;
  19.122 +	float: right;
  19.123 +	width: 250px;
  19.124 +	line-height: 1.5em;
  19.125 +	text-align: left;
  19.126 +	font-size: 12px;
  19.127 +	}
  19.128 +.Box, #UserOptions {
  19.129 +	-moz-border-radius: 8px;
  19.130 +	-webkit-border-radius: 8px;
  19.131 +	list-style-type: none;
  19.132 +	margin: 10px 0;
  19.133 +	padding: 10px 24px 10px 24px;
  19.134 +	background-color: #eaeaea;}
  19.135 +#Panel .Box ul {
  19.136 +	list-style-type: none;
  19.137 +	margin: 0;
  19.138 +	padding: 10px 24px 10px 0px;
  19.139 +}
  19.140 +
  19.141 +/***--- CONTENT --***/
  19.142 +.GuestBox	{ background: #eaeaea; }
  19.143 +.GuestBox p	{ padding: 0; }
  19.144 +.Message img	{ max-width: 100%; }
  19.145 +
  19.146 +/* headers */
  19.147 +h1				{ margin: 0; font-size: 1.5em; }
  19.148 +#Content h1, h2, #Popup h1, div.DiscussionTabs .SubTab {
  19.149 +	-moz-border-radius: 8px;
  19.150 +	-webkit-border-radius: 8px;
  19.151 +	font-size: 1.1em; background: #555555; color: #fff; margin: 0 0 10px; padding: 10px; font-weight: bold;
  19.152 +}
  19.153 +div.DiscussionTabs .SubTab	{ margin: 0; }
  19.154 +
  19.155 +#Panel h4, #Panel .GuestBox h4 {
  19.156 +	font-size: 110%;
  19.157 +	color: #666666;
  19.158 +	font-weight: bold;
  19.159 +	padding: 0 0 1px 0;
  19.160 +	margin: 0;
  19.161 +	border-bottom: 1px solid #cecece; }
  19.162 +
  19.163 +div.Empty, div#Status	{ padding: 10px; }
  19.164 +
  19.165 +/* tabs */
  19.166 +.Tabs li, .SubTab	{
  19.167 +	-moz-border-radius: 8px;
  19.168 +	-webkit-border-radius: 8px;
  19.169 +	background: #CECECE;
  19.170 +	padding: 5px 8px;
  19.171 +	font-size: 140%;
  19.172 +	font-weight: bold;
  19.173 +	border-bottom: 1px solid #fff; }
  19.174 +.Tabs li.Active		{ background: #555; border-bottom: none; }
  19.175 +.Tabs li.Active a	{ color: #fff; }
  19.176 +.Tabs span			{ display: inline-block; margin: 0 10px; color: #888; }
  19.177 +.SubTab				{ font-size: 1em; }
  19.178 +
  19.179 +/* DISCUSSIONS */
  19.180 +.DataList li.Item, .Conversation li.Item {
  19.181 +	border-bottom: 1px solid #ccc;
  19.182 +	position: relative;
  19.183 +	padding: 10px;
  19.184 +	-moz-border-radius: 8px;
  19.185 +	-webkit-border-radius: 8px;
  19.186 +}
  19.187 +.Activities li.Item	{ min-height: 50px; }
  19.188 +.DataList li.Item a.Title	{ display: block; font-size: 1.15em; font-weight: bold; padding: 0 0 8px; }
  19.189 +
  19.190 +/* discussions meta */
  19.191 +.DataList .Meta span, .DataList .Meta strong {
  19.192 +	min-width: 100px; display: inline-block; margin: 0 5px 0 0;
  19.193 +}
  19.194 +.DataList .Meta .LastCommentBy		{ width: 175px; }
  19.195 +.DataList .Meta .LastCommentDate	{ width: 100px; }
  19.196 +
  19.197 +/* discussions highlight */
  19.198 +.DataList li.Mine			{ background: #f1f1f1; border-bottom-color: #fff; }
  19.199 +.DataList li.New			{ background: #d8ecbc; }
  19.200 +.DataList li.Bookmarked		{ background: #ffdf5d; border-bottom-color: #fff; }
  19.201 +
  19.202 +.DataList li.Closed		{ background: #eee; }
  19.203 +.DataList .Meta .Closed			{ color: #333; }
  19.204 +.DataList li.Closed a.Title	{ text-decoration: line-through; }
  19.205 +
  19.206 +.DataList li.Announcement	{ background: #FFC; }
  19.207 +.DataList .Meta .Announcement, .DataList .Meta .Closed {
  19.208 +	width: 100px; font-weight: bold;
  19.209 +}
  19.210 +.DataList .Meta .Announcement	{ color: #C60; }
  19.211 +
  19.212 +/* DISCUSSION */
  19.213 +div.DiscussionTabs li		{ font-size: 1em; }
  19.214 +ul.Discussion				{ margin: 0 0 10px; }
  19.215 +
  19.216 +/* bookmark */
  19.217 +a.Bookmark					{ width: 9px; height: 9px; position: absolute; top: 8px; right: 10px; font-size: 0; background: #fff; border: 1px dotted #ffcc00; }
  19.218 +.Discussion a.Bookmark		{ top: 41px; }
  19.219 +a.Bookmarked 				{ background: #ffcc00; border: 1px solid #fff; }
  19.220 +div.Options a.Bookmark		{ top: 14px; }
  19.221 +
  19.222 +div.Comment {
  19.223 +	position: relative; 
  19.224 +	border-bottom: 1px dotted #ccc;
  19.225 +	padding: 10px; }
  19.226 +li.Even			{ background: #f8f8f8; }
  19.227 +
  19.228 +/* discussion meta */
  19.229 +.Comment .Message, .Comment .MessageForm, .ConversationMessage .Message {
  19.230 +	margin-left: 215px; line-height: 1.75em;
  19.231 +}
  19.232 +.Comment .Meta, .ConversationMessage .Meta {
  19.233 +	width: 175px; float: left; padding: 10px; background: #FFC;
  19.234 +	-moz-border-radius: 8px;
  19.235 +	-webkit-border-radius: 8px;
  19.236 +}
  19.237 +.Comment .Meta span, .ConversationMessage .Meta span, div.Meta div.PostCount {
  19.238 +	display: block; border-bottom: 1px dotted #ccc; font-size: 0.85em; padding: 1px 0; 
  19.239 +}
  19.240 +.Comment .Author, .ConversationMessage span.Author {
  19.241 +	background: #fff; padding: 5px; border-bottom: none;
  19.242 +}
  19.243 +.Comment .Author img, .ConversationMessage .Author a.Photo {
  19.244 +	float: left; margin: 0 10px 0 0;
  19.245 +}
  19.246 +.Comment .Author a, .ConversationMessage .Author a {
  19.247 +	font-weight: bold; font-size: 1.1em;
  19.248 +}
  19.249 +blockquote	{ margin: 0; padding: 10px; background: #fff; border: 1px dotted #ccc; }
  19.250 +.Odd blockquote	{ background: #F8F8F8; }
  19.251 +
  19.252 +/* post */
  19.253 +ul.PostOptions	{ margin: 0 0 10px; }
  19.254 +.Preview			{ padding: 10px; margin: 0 0 10px; border-bottom: 1px dotted #ccc; }
  19.255 +
  19.256 +/*- Conversations & Activities -*/
  19.257 +ul.Activities .Title	{ margin: 0 0 0 60px; font-weight: bold; }
  19.258 +ul.Conversations .Photo, ul.Activities .Photo {
  19.259 +	width: 50px; height: 50px; float: left; font-size: 0.9em; color: #ccc; overflow: hidden; background: #eee;
  19.260 +}
  19.261 +ul.Conversations .Excerpt, ul.Activities .Excerpt {
  19.262 +	margin: 0 0 10px 60px;
  19.263 +}
  19.264 +ul.Conversations .Meta, ul.Activities .Meta, .SearchResults .Meta {
  19.265 +	margin: 0 0 0 60px;background: #FFC; padding: 3px 5px; 
  19.266 +}
  19.267 +.SearchResults .Meta	{ margin: 5px 0 0; }
  19.268 +ul.ActivityComments		{ margin: 0 0 0 60px; }
  19.269 +
  19.270 +.ConversationMessage .Message		{ min-height: 100px; }
  19.271 +.ConversationMessage span.Author	{ height: 50px; }
  19.272 +.ConversationMessage span.ItemLink		{ display: none; }
  19.273 +
  19.274 +/***--- PANEL --***/
  19.275 +.Block		{ padding: 15px; background: #ddd; margin: 0 10px 0 0; }
  19.276 +.Post #Panel, .Search #Panel {
  19.277 +	display: none;
  19.278 +}
  19.279 +
  19.280 +.PanelInfo li			{ padding: 0px 0px; }
  19.281 +.PanelInfo li strong	{ font-weight: normal; }
  19.282 +.PanelInfo li.Active a	{ color: #c60; }
  19.283 +.PanelInfo li.Parent	{ background: #ccc; padding: 2px 5px; font-size: 1.1em; font-weight: bold; }
  19.284 +
  19.285 +.PanelInfo a {
  19.286 +	color: #0F314E;
  19.287 +	background: inherit;
  19.288 +	display: block;
  19.289 +	text-decoration: none;
  19.290 +	font-weight: bold;
  19.291 +}
  19.292 +
  19.293 +.PanelInfo a:hover {
  19.294 +	color: #c60;
  19.295 +	text-decoration: none;
  19.296 +	display: block;
  19.297 +}
  19.298 +/* account */
  19.299 +
  19.300 +#Panel .Photo		{ background: #ddd; position: absolute; right: 10px; padding: 0 0 10px 10px; }
  19.301 +#Panel .Photo img	{ width: 50px; display: block; border: 5px solid #fff; border-bottom-width: 12px; }
  19.302 +#Panel .Photo img:hover	{ width: auto; }
  19.303 +
  19.304 +#Panel dl					{ padding: 10px; background: #fff; margin: 0; }
  19.305 +#Panel dt					{ font-weight: bold; padding: 2px 0 0; }
  19.306 +#Panel dd					{ margin: 0; border-bottom: 1px dotted #ccc; padding: 0 0 2px; }
  19.307 +
  19.308 +/* inbox */
  19.309 +.PanelInfo li strong		{ display: inline-block; margin: 0 5px 0 0; }
  19.310 +
  19.311 +/*- Form elements -*/
  19.312 +form		{ padding: 0 10px 10px; border-bottom: 1px dotted #ccc; }
  19.313 +fieldset	{ margin: 0; padding: 0; border: none; }
  19.314 +
  19.315 +form#Form_User_Register	{ margin-top: 10px; }
  19.316 +
  19.317 +input, textarea, select {
  19.318 +	border: 1px solid #ccc; padding: 3px 5px; margin: 0;
  19.319 +}
  19.320 +input.InputBox		{ width: 325px; margin: 0 10px 5px 0; }
  19.321 +
  19.322 +input.Button, input.Cancel {
  19.323 +	-moz-border-radius: 4px;
  19.324 +	-webkit-border-radius: 4px;
  19.325 +	cursor: pointer; border: none; background: #c60; color: #fff; padding: 4px;
  19.326 +}
  19.327 +input.Button:hover, input.Cancel:hover {
  19.328 +	background: #555555; color: white;
  19.329 +}
  19.330 +
  19.331 +a.Back, a.Cancel {
  19.332 +	margin: 0 5px 0 0;
  19.333 +}
  19.334 +
  19.335 +textarea			{ width: 95%; min-height: 100px; display: block; margin: 10px 0; }
  19.336 +
  19.337 +label	{ display: block; font-weight: bold; }
  19.338 +label.RadioLabel, label.CheckBoxLabel {
  19.339 +	font-weight: normal;
  19.340 +}
  19.341 +label.RadioLabel input, label.CheckBoxLabel input {
  19.342 +	border: none;
  19.343 +}
  19.344 +
  19.345 +li.Gender, li.CaptchaInput {
  19.346 +	margin: 0 0 10px;
  19.347 +}
  19.348 +li.CreateAccount, li.Buttons {
  19.349 +	margin: 5px 0 0;
  19.350 +}
  19.351 +.cleditorMain	{ margin: 10px 0; }
  19.352 +
  19.353 +.CommentForm div.Messages { margin: 8px 0 0; }
  19.354 +.Errors, .Warning	{
  19.355 +	color: #F00;
  19.356 +}
  19.357 +
  19.358 +/***--- BUTTONS ---***/
  19.359 +.GuestBox a.Button	{
  19.360 +	-moz-border-radius: 4px;
  19.361 +	-webkit-border-radius: 4px;
  19.362 +	font-size: 11px;
  19.363 +	padding: 4px;
  19.364 +	margin: 0 0 10px;
  19.365 +	background: #c60; 
  19.366 +	color: #FFF; }
  19.367 +.GuestBox .Button:hover	{
  19.368 +	background: #555555; }
  19.369 +	
  19.370 +a.BigButton	{
  19.371 +	-moz-border-radius: 8px;
  19.372 +	-webkit-border-radius: 8px;
  19.373 +	display: block; 
  19.374 +	background: #c60; 
  19.375 +	color: #FFF; 
  19.376 +	padding: 10px; 
  19.377 +	font-size: 1.1em; 
  19.378 +	font-weight: bold;
  19.379 +	text-align: center}
  19.380 +a.BigButton:hover	{ background: #555555; }
  19.381 +a.ClearConversation	{ margin: 10px 0 0; }
  19.382 +
  19.383 +/* options */
  19.384 +div.Options, div.OptionButton {
  19.385 +	position: absolute; top: 12px; right: 10px;
  19.386 +}
  19.387 +div.OptionButton	{ font-weight: bold; color: #555; }
  19.388 +ul.Options strong	{
  19.389 +	-moz-border-radius: 4px;
  19.390 +	-webkit-border-radius: 4px;
  19.391 +	cursor: pointer; 
  19.392 +	display: block; 
  19.393 +	padding: 5px 10px;
  19.394 +	background: #FFC;
  19.395 +	border: 1px solid #ccc; }
  19.396 +
  19.397 +ul.Options				{ margin: 5px 40px 0 0; }
  19.398 +ul.Options li			{ position: relative; }
  19.399 +ul.Options ul			{ min-width: 125px; display: none; position: absolute; z-index: 1000; background: #FFC; right: 0; border: 1px dotted #ccc; margin-top: -1px; }
  19.400 +ul.Options li:hover ul 	{ display: block; }
  19.401 +ul.Options ul li		{ display: block; border-top: 1px dotted #ccc; }
  19.402 +ul.Options ul li:first-child	{ border-top: none; }
  19.403 +ul.Options ul li a		{ display: block; padding: 5px 10px; }
  19.404 +
  19.405 +/*- Pager -*/
  19.406 +#PagerAfter				{ margin: 10px 0; text-align: center; background: #ddd; padding: 2px 10px; }
  19.407 +#PagerAfter	a			{ display: inline-block; padding: 0 5px; }
  19.408 +#PagerAfter	a.Highlight		{ color: #c60; }
  19.409 +span.Previous, a.Previous	{ float: left; }
  19.410 +#PagerAfter	span.Next, #PagerAfter	a.Next	{ float: right; padding: 0; }
  19.411 +
  19.412 +#PagerMore				{ text-align: right; padding: 5px 10px; }
  19.413 +
  19.414 +/***--- FOOTER --***/
  19.415 +#Footer {
  19.416 +	font-size: 11px ;
  19.417 +	width: 100%; 
  19.418 +	position: absolute; 
  19.419 +	bottom: 0;
  19.420 +	background: inherit;
  19.421 +	color: #a8a8a8; }
  19.422 +#Footer ul	{ margin: 16px 15px; }
  19.423 +#Footer li	{ float: left; }
  19.424 +#Footer a { text-decoration: underline; background: inherit; color: #a8a8a8; }
  19.425 +#Footer a:hover	{ color: #666666; }
  19.426 +
  19.427 +/***--- OVERLAY ---***/
  19.428 +.Overlay	{ width: 100%; position: absolute; top: 0; z-index: 10000; background: url(../images/overlayBg.png); }
  19.429 +.Overlay #Popup	{ width: 720px; padding: 15px; background: #FFF; margin: 0 auto; border: 1px dotted #c60; position: relative; }
  19.430 +
  19.431 +.Overlay .Buttons input.Button	{ margin: 0 0 10px; }
  19.432 +.Overlay p			{ padding: 0 10px; }
  19.433 +.Overlay a.Close	{ position: absolute; display: block; top: 10px; right: 15px; padding: 13px; font-size: 1.5em; color: #fff; }
  19.434 +.Overlay a.Close:hover	{ color: #c60; }
  19.435 +.Overlay ul			{ margin: 10px 0 0; }
  19.436 +
  19.437 +.Overlay input.Button	{ margin: 10px 0 0; }
  19.438 +.Overlay textarea		{ margin: 10px 0 0; }
  19.439 +.Overlay li.Gender		{ margin: 0; }
  19.440 +
  19.441 +.Overlay #Form_Picture	{ margin: 0 0 10px; }
    20.1 Binary file forum/themes/slitaz/images/header.png has changed
    21.1 Binary file forum/themes/slitaz/images/logo.png has changed
    22.1 Binary file forum/themes/slitaz/images/overlayBg.png has changed
    23.1 Binary file forum/themes/slitaz/screenshot.png has changed
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/forum/themes/slitaz/views/default.master.php	Wed Dec 22 10:36:12 2010 +0100
    24.3 @@ -0,0 +1,76 @@
    24.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    24.5 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    24.6 +	<head>
    24.7 +		<?php $this->RenderAsset('Head'); ?>
    24.8 +	</head>
    24.9 +	<body id="<?php echo $BodyIdentifier; ?>" class="<?php echo $this->CssClass; ?>">
   24.10 +		<div id="Wrapper">
   24.11 +			<div id="Main">
   24.12 +				<div id="ContentHolder">
   24.13 +					<div id="Content">
   24.14 +						<?php $this->RenderAsset('Content'); ?>
   24.15 +					</div>
   24.16 +				</div>
   24.17 +				<div id="PanelHolder">
   24.18 +					<div id="Panel"><?php $this->RenderAsset('Panel'); ?></div>
   24.19 +				</div>
   24.20 +				<div class="clear">&nbsp;</div>
   24.21 +			</div>
   24.22 +			
   24.23 +			<div id="Header">
   24.24 +			
   24.25 +			<a href="<?php echo Url('/'); ?>"><img id="logo"
   24.26 +			src="themes/slitaz/images/logo.png" title="www.slitaz.org" alt="www.slitaz.org"
   24.27 +			style="border: 0px solid ; width: 200px; height: 74px;" /></a>
   24.28 +			<p id="titre">#!/Support/Forum</p>
   24.29 +				
   24.30 +			</div>
   24.31 +			
   24.32 +			<div id="Nav">
   24.33 +				<?php
   24.34 +				  $Session = Gdn::Session();
   24.35 +					if ($this->Menu) {
   24.36 +						$this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage'));
   24.37 +						// $this->Menu->AddLink('Dashboard', T('Users'), '/user/browse', array('Garden.Users.Add', 'Garden.Users.Edit', 'Garden.Users.Delete'));
   24.38 +						$this->Menu->AddLink('Activity', T('Activity'), '/activity');
   24.39 +					 $Authenticator = Gdn::Authenticator();
   24.40 +						if ($Session->IsValid()) {
   24.41 +							$Name = $Session->User->Name;
   24.42 +							$CountNotifications = $Session->User->CountNotifications;
   24.43 +							if (is_numeric($CountNotifications) && $CountNotifications > 0)
   24.44 +								$Name .= ' <span>'.$CountNotifications.'</span>';
   24.45 +								
   24.46 +							$this->Menu->AddLink('User', "Profile ($Name)", '/profile/{UserID}/{Username}', array('Garden.SignIn.Allow'), array('class' => 'UserNotifications'));
   24.47 +							$this->Menu->AddLink('SignOut', T('Sign Out'), $Authenticator->SignOutUrl(), FALSE, array('class' => 'NonTab SignOut'));
   24.48 +						} else {
   24.49 +							$Attribs = array();
   24.50 +							if (C('Garden.SignIn.Popup') && strpos(Gdn::Request()->Url(), 'entry') === FALSE)
   24.51 +								$Attribs['class'] = 'SignInPopup';
   24.52 +								
   24.53 +							$this->Menu->AddLink('Entry', T('Sign In'), $Authenticator->SignInUrl($this->SelfUrl), FALSE, array('class' => 'NonTab'), $Attribs);
   24.54 +						}
   24.55 +						echo $this->Menu->ToString();
   24.56 +					}
   24.57 +				?>
   24.58 +				<div id="Search">
   24.59 +					<?php
   24.60 +						$Form = Gdn::Factory('Form');
   24.61 +						$Form->InputPrefix = '';
   24.62 +						echo 
   24.63 +							$Form->Open(array('action' => Url('/search'), 'method' => 'get')),
   24.64 +							$Form->TextBox('Search'),
   24.65 +							$Form->Button('Search', array('Name' => '')),
   24.66 +							$Form->Close();
   24.67 +					?>
   24.68 +				</div>
   24.69 +			</div>
   24.70 +			
   24.71 +			<div id="Footer">
   24.72 +				Copyright &copy; 2010 <a href="http://www.slitaz.org/">SliTaz</a> -
   24.73 +				<a href="http://vanillaforums.org">Powered by Vanilla</a>
   24.74 +			</div>
   24.75 +		</div>
   24.76 +
   24.77 +		<?php $this->FireEvent('AfterBody'); ?>
   24.78 +	</body>
   24.79 +</html>
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/forum/themes/slitaz/views/discussion/comments.php	Wed Dec 22 10:36:12 2010 +0100
    25.3 @@ -0,0 +1,25 @@
    25.4 +<?php if (!defined('APPLICATION')) exit();
    25.5 +$Session = Gdn::Session();
    25.6 +$this->FireEvent('BeforeCommentsRender');
    25.7 +if (!function_exists('WriteComment'))
    25.8 +   include($this->FetchViewLocation('helper_functions', 'discussion'));
    25.9 +   
   25.10 +$CurrentOffset = $this->Offset;
   25.11 +if ($CurrentOffset == 0 && !$this->Data('NewComments', FALSE)) {
   25.12 +   echo WriteComment($this->Discussion, $this, $Session, $CurrentOffset);
   25.13 +}
   25.14 +
   25.15 +// Only prints individual comment list items
   25.16 +$CommentData = $this->CommentData->Result();
   25.17 +$i = 0;
   25.18 +foreach ($CommentData as $Comment) {
   25.19 +   ++$CurrentOffset;
   25.20 +   $this->CurrentComment = $Comment;
   25.21 +   if ($i % 2) {
   25.22 +		$counter = 'Odd';
   25.23 +   } else {
   25.24 +	   $counter = 'Even';
   25.25 +   }
   25.26 +   WriteComment($Comment, $this, $Session, $CurrentOffset, $counter);
   25.27 +   $i++;
   25.28 +}
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/forum/themes/slitaz/views/discussion/helper_functions.php	Wed Dec 22 10:36:12 2010 +0100
    26.3 @@ -0,0 +1,118 @@
    26.4 +<?php if (!defined('APPLICATION')) exit();
    26.5 +
    26.6 +/**
    26.7 + * $Object is either a Comment or the original Discussion.
    26.8 + */
    26.9 +function WriteComment($Object, $Sender, $Session, $CurrentOffset, $counter) {
   26.10 +   $Author = UserBuilder($Object, 'Insert');
   26.11 +   $Type = property_exists($Object, 'CommentID') ? 'Comment' : 'Discussion';
   26.12 +	$Sender->EventArguments['Object'] = $Object;
   26.13 +   $Sender->EventArguments['Type'] = $Type;
   26.14 +   $Sender->EventArguments['Author'] = $Author;
   26.15 +   $CssClass = 'Item Comment ' . $counter;
   26.16 +   if ($Type == 'Comment') {
   26.17 +      $Sender->EventArguments['Comment'] = $Object;   
   26.18 +      $Id = 'Comment_'.$Object->CommentID;
   26.19 +      $Permalink = '/discussion/comment/'.$Object->CommentID.'/#Comment_'.$Object->CommentID;
   26.20 +   } else {
   26.21 +      $Sender->EventArguments['Discussion'] = $Object;   
   26.22 +      $CssClass .= ' FirstComment';
   26.23 +      $Id = 'Discussion_'.$Object->DiscussionID;
   26.24 +      $Permalink = '/discussion/'.$Object->DiscussionID.'/'.Gdn_Format::Url($Object->Name).'/p1';
   26.25 +   }
   26.26 +   $Sender->Options = '';
   26.27 +   $CssClass .= $Object->InsertUserID == $Session->UserID ? ' Mine' : '';
   26.28 +   $Sender->FireEvent('BeforeCommentDisplay');
   26.29 +?>
   26.30 +<li class="<?php echo $CssClass; ?>" id="<?php echo $Id; ?>">
   26.31 +   <div class="Comment">
   26.32 +      <div class="Meta">
   26.33 +         <?php $Sender->FireEvent('BeforeCommentMeta'); ?>
   26.34 +         <div class="Author">
   26.35 +            <?php
   26.36 +            echo UserPhoto($Author);
   26.37 +            echo UserAnchor($Author);
   26.38 +            ?>
   26.39 +			<div class="clear">&nbsp;</div>
   26.40 +         </div>
   26.41 +         <span class="DateCreated">
   26.42 +            <?php
   26.43 +            echo Gdn_Format::Date($Object->DateInserted);
   26.44 +            ?>
   26.45 +         </span>
   26.46 +         <span class="Permalink">
   26.47 +            <?php echo Anchor(T('Permalink'), $Permalink, 'Permalink', array('name' => 'Item_'.($CurrentOffset+1), 'rel' => 'nofollow')); ?>
   26.48 +         </span>
   26.49 +         <?php WriteOptionList($Object, $Sender, $Session); ?>
   26.50 +         <div class="CommentInfo">
   26.51 +            <?php $Sender->FireEvent('CommentInfo'); ?>
   26.52 +         </div>
   26.53 +         <?php $Sender->FireEvent('AfterCommentMeta'); ?>
   26.54 +      </div>
   26.55 +      <div class="Message">
   26.56 +			<?php $Sender->FireEvent('BeforeCommentBody'); ?>
   26.57 +			<?php 
   26.58 +			   $Object->FormatBody = Gdn_Format::To($Object->Body, $Object->Format);
   26.59 +			   $Sender->FireEvent('AfterCommentFormat');
   26.60 +			   $Object = $Sender->EventArguments['Object'];
   26.61 +			   echo $Object->FormatBody;
   26.62 +			?>
   26.63 +		</div><div class="clear">&nbsp;</div>
   26.64 +      <?php $Sender->FireEvent('AfterCommentBody'); ?>
   26.65 +   </div>
   26.66 +</li>
   26.67 +<?php
   26.68 +	$Sender->FireEvent('AfterComment');
   26.69 +}
   26.70 +
   26.71 +function WriteOptionList($Object, $Sender, $Session) {
   26.72 +   $EditContentTimeout = C('Garden.EditContentTimeout', -1);
   26.73 +	$CanEdit = $EditContentTimeout == -1 || strtotime($Object->DateInserted) + $EditContentTimeout > time();
   26.74 +	$TimeLeft = '';
   26.75 +	if ($CanEdit && $EditContentTimeout > 0) {
   26.76 +		$TimeLeft = strtotime($Object->DateInserted) + $EditContentTimeout - time();
   26.77 +		$TimeLeft = $TimeLeft > 0 ? ' ('.Gdn_Format::Seconds($TimeLeft).')' : '';
   26.78 +	}
   26.79 +
   26.80 +   $Sender->Options = '';
   26.81 +	$CategoryID = GetValue('CategoryID', $Object);
   26.82 +	if(!$CategoryID && property_exists($Sender, 'Discussion'))
   26.83 +		$CategoryID = GetValue('CategoryID', $Sender->Discussion);
   26.84 +		
   26.85 +   // Show discussion options if this is the discussion / first comment
   26.86 +   if ($Sender->EventArguments['Type'] == 'Discussion') {
   26.87 +      // Can the user edit the discussion?
   26.88 +      if (($CanEdit && $Session->UserID == $Object->InsertUserID) || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $CategoryID))
   26.89 +         $Sender->Options .= '<span>'.Anchor(T('Edit'), '/vanilla/post/editdiscussion/'.$Object->DiscussionID, 'EditDiscussion').$TimeLeft.'</span>';
   26.90 +         
   26.91 +      // Can the user announce?
   26.92 +      if ($Session->CheckPermission('Vanilla.Discussions.Announce', TRUE, 'Category', $CategoryID))
   26.93 +         $Sender->Options .= '<span>'.Anchor(T($Sender->Discussion->Announce == '1' ? 'Unannounce' : 'Announce'), 'vanilla/discussion/announce/'.$Object->DiscussionID.'/'.$Session->TransientKey(), 'AnnounceDiscussion') . '</span>';
   26.94 +
   26.95 +      // Can the user sink?
   26.96 +      if ($Session->CheckPermission('Vanilla.Discussions.Sink', TRUE, 'Category', $CategoryID))
   26.97 +         $Sender->Options .= '<span>'.Anchor(T($Sender->Discussion->Sink == '1' ? 'Unsink' : 'Sink'), 'vanilla/discussion/sink/'.$Object->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'SinkDiscussion') . '</span>';
   26.98 +
   26.99 +      // Can the user close?
  26.100 +      if ($Session->CheckPermission('Vanilla.Discussions.Close', TRUE, 'Category', $CategoryID))
  26.101 +         $Sender->Options .= '<span>'.Anchor(T($Sender->Discussion->Closed == '1' ? 'Reopen' : 'Close'), 'vanilla/discussion/close/'.$Object->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'CloseDiscussion') . '</span>';
  26.102 +      
  26.103 +      // Can the user delete?
  26.104 +      if ($Session->CheckPermission('Vanilla.Discussions.Delete', TRUE, 'Category', $CategoryID))
  26.105 +         $Sender->Options .= '<span>'.Anchor(T('Delete Discussion'), 'vanilla/discussion/delete/'.$Object->DiscussionID.'/'.$Session->TransientKey(), 'DeleteDiscussion') . '</span>';
  26.106 +   } else {
  26.107 +      // And if this is just another comment in the discussion ...
  26.108 +      
  26.109 +      // Can the user edit the comment?
  26.110 +      if (($CanEdit && $Session->UserID == $Object->InsertUserID) || $Session->CheckPermission('Vanilla.Comments.Edit', TRUE, 'Category', $Sender->Discussion->CategoryID))
  26.111 +         $Sender->Options .= '<span>'.Anchor(T('Edit'), '/vanilla/post/editcomment/'.$Object->CommentID, 'EditComment').$TimeLeft.'</span>';
  26.112 +
  26.113 +      // Can the user delete the comment?
  26.114 +      if ($Session->CheckPermission('Vanilla.Comments.Delete', TRUE, 'Category', $CategoryID))
  26.115 +         $Sender->Options .= '<span>'.Anchor(T('Delete'), 'vanilla/discussion/deletecomment/'.$Object->CommentID.'/'.$Session->TransientKey().'/?Target='.urlencode($Sender->SelfUrl), 'DeleteComment') . '</span>';
  26.116 +   }
  26.117 +   
  26.118 +   // Allow plugins to add options
  26.119 +   $Sender->FireEvent('CommentOptions');
  26.120 +   echo $Sender->Options;
  26.121 +}
  26.122 \ No newline at end of file
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/forum/themes/slitaz/views/discussions/helper_functions.php	Wed Dec 22 10:36:12 2010 +0100
    27.3 @@ -0,0 +1,186 @@
    27.4 +<?php
    27.5 +if (!defined('APPLICATION')) exit();
    27.6 +
    27.7 +function WriteDiscussion($Discussion, &$Sender, &$Session, $Alt) {
    27.8 +   $CssClass = 'Item';
    27.9 +   $CssClass .= $Discussion->Bookmarked == '1' ? ' Bookmarked' : '';
   27.10 +   $CssClass .= $Discussion->Closed == '1' ? ' Closed' : '';
   27.11 +   $CssClass .= $Alt.' ';
   27.12 +   $CssClass .= $Discussion->Announce == '1' ? ' Announcement' : '';
   27.13 +   $CssClass .= $Discussion->Dismissed == '1' ? ' Dismissed' : '';
   27.14 +   $CssClass .= $Discussion->InsertUserID == $Session->UserID ? ' Mine' : '';
   27.15 +   $CssClass .= ($Discussion->CountUnreadComments > 0 && $Session->IsValid()) ? ' New' : '';
   27.16 +   $Sender->EventArguments['Discussion'] = &$Discussion;
   27.17 +   $First = UserBuilder($Discussion, 'First');
   27.18 +   $Last = UserBuilder($Discussion, 'Last');
   27.19 +   
   27.20 +   $Sender->FireEvent('BeforeDiscussionName');
   27.21 +   
   27.22 +   $DiscussionName = Gdn_Format::Text($Discussion->Name);
   27.23 +   if ($DiscussionName == '')
   27.24 +      $DiscussionName = T('Blank Discussion Topic');
   27.25 +
   27.26 +   static $FirstDiscussion = TRUE;
   27.27 +   if (!$FirstDiscussion)
   27.28 +      $Sender->FireEvent('BetweenDiscussion');
   27.29 +   else
   27.30 +      $FirstDiscussion = FALSE;
   27.31 +?>
   27.32 +<li class="<?php echo $CssClass; ?> ">
   27.33 +   <?php
   27.34 +   $Sender->FireEvent('BeforeDiscussionContent');
   27.35 +   WriteOptions($Discussion, $Sender, $Session);
   27.36 +   ?>
   27.37 +   <div class="ItemContent Discussion">
   27.38 +      <?php echo Anchor($DiscussionName, '/discussion/'.$Discussion->DiscussionID.'/'.Gdn_Format::Url($Discussion->Name).($Discussion->CountCommentWatch > 0 && C('Vanilla.Comments.AutoOffset') ? '/#Item_'.$Discussion->CountCommentWatch : ''), 'Title'); ?>
   27.39 +      <?php $Sender->FireEvent('AfterDiscussionTitle'); ?>
   27.40 +      <div class="Meta">
   27.41 +         <?php if ($Discussion->Announce == '1') { ?>
   27.42 +         <span class="Announcement"><?php echo T('Announcement'); ?></span>
   27.43 +         <?php } ?>
   27.44 +         <?php if ($Discussion->Closed == '1') { ?>
   27.45 +         <span class="Closed"><?php echo T('Closed'); ?></span>
   27.46 +         <?php } ?>
   27.47 +         <span class="CommentCount"><?php printf(Plural($Discussion->CountComments, '%s comment', '%s comments'), $Discussion->CountComments); ?></span>
   27.48 +         <?php
   27.49 +            if ($Session->IsValid() && $Discussion->CountUnreadComments > 0)
   27.50 +               echo '<strong>'.Plural($Discussion->CountUnreadComments, '%s New', '%s New Plural').'</strong>';
   27.51 +
   27.52 +            if ($Discussion->LastCommentID != '') {
   27.53 +               echo '<span class="LastCommentBy">'.sprintf(T('Most recent by %1$s'), UserAnchor($Last)).'</span>';
   27.54 +               echo '<span class="LastCommentDate">'.Gdn_Format::Date($Discussion->LastDate).'</span>';
   27.55 +            } else {
   27.56 +               echo '<span class="LastCommentBy">'.sprintf(T('Started by %1$s'), UserAnchor($First)).'</span>';
   27.57 +               echo '<span class="LastCommentDate">'.Gdn_Format::Date($Discussion->FirstDate).'</span>';
   27.58 +            }
   27.59 +         
   27.60 +            if (C('Vanilla.Categories.Use'))
   27.61 +               echo Wrap(Anchor($Discussion->Category, '/categories/'.$Discussion->CategoryUrlCode, 'Category'));
   27.62 +               
   27.63 +            $Sender->FireEvent('DiscussionMeta');
   27.64 +         ?>
   27.65 +      </div>
   27.66 +   </div>
   27.67 +</li>
   27.68 +<?php
   27.69 +}
   27.70 +
   27.71 +function WriteFilterTabs(&$Sender) {
   27.72 +   $Session = Gdn::Session();
   27.73 +   $Title = property_exists($Sender, 'Category') && is_object($Sender->Category) ? $Sender->Category->Name : T('All Discussions');
   27.74 +   $Bookmarked = T('My Bookmarks');
   27.75 +   $MyDiscussions = T('My Discussions');
   27.76 +   $MyDrafts = T('My Drafts');
   27.77 +   $CountBookmarks = 0;
   27.78 +   $CountDiscussions = 0;
   27.79 +   $CountDrafts = 0;
   27.80 +   if ($Session->IsValid()) {
   27.81 +      $CountBookmarks = $Session->User->CountBookmarks;
   27.82 +      $CountDiscussions = $Session->User->CountDiscussions;
   27.83 +      $CountDrafts = $Session->User->CountDrafts;
   27.84 +   }
   27.85 +   if (is_numeric($CountBookmarks) && $CountBookmarks > 0)
   27.86 +      $Bookmarked .= '<span>'.$CountBookmarks.'</span>';
   27.87 +
   27.88 +   if (is_numeric($CountDiscussions) && $CountDiscussions > 0)
   27.89 +      $MyDiscussions .= '<span>'.$CountDiscussions.'</span>';
   27.90 +
   27.91 +   if (is_numeric($CountDrafts) && $CountDrafts > 0)
   27.92 +      $MyDrafts .= '<span>'.$CountDrafts.'</span>';
   27.93 +      
   27.94 +   ?>
   27.95 +<div class="Tabs DiscussionsTabs">
   27.96 +   <ul>
   27.97 +      <?php $Sender->FireEvent('BeforeDiscussionTabs'); ?>
   27.98 +      <li<?php echo strtolower($Sender->ControllerName) == 'discussionscontroller' && strtolower($Sender->RequestMethod) == 'index' ? ' class="Active"' : ''; ?>><?php echo Anchor(T('All Discussions'), 'discussions'); ?></li>
   27.99 +      <?php $Sender->FireEvent('AfterAllDiscussionsTab'); ?>
  27.100 +      <?php if ($CountBookmarks > 0 || $Sender->RequestMethod == 'bookmarked') { ?>
  27.101 +      <li<?php echo $Sender->RequestMethod == 'bookmarked' ? ' class="Active"' : ''; ?>><?php echo Anchor($Bookmarked, '/discussions/bookmarked', 'MyBookmarks'); ?></li>
  27.102 +      <?php
  27.103 +         $Sender->FireEvent('AfterBookmarksTab');
  27.104 +      }
  27.105 +      if ($CountDiscussions > 0 || $Sender->RequestMethod == 'mine') {
  27.106 +      ?>
  27.107 +      <li<?php echo $Sender->RequestMethod == 'mine' ? ' class="Active"' : ''; ?>><?php echo Anchor($MyDiscussions, '/discussions/mine', 'MyDiscussions'); ?></li>
  27.108 +      <?php
  27.109 +      }
  27.110 +      if ($CountDrafts > 0 || $Sender->ControllerName == 'draftscontroller') {
  27.111 +      ?>
  27.112 +      <li<?php echo $Sender->ControllerName == 'draftscontroller' ? ' class="Active"' : ''; ?>><?php echo Anchor($MyDrafts, '/drafts', 'MyDrafts'); ?></li>
  27.113 +      <?php
  27.114 +      }
  27.115 +      $Sender->FireEvent('AfterDiscussionTabs');
  27.116 +      ?>
  27.117 +   </ul>
  27.118 +   <?php
  27.119 +   if (property_exists($Sender, 'Category') && is_object($Sender->Category)) {
  27.120 +      ?>
  27.121 +      <div class="SubTab">↳ <?php echo $Sender->Category->Name; ?></div>
  27.122 +      <?php
  27.123 +   }
  27.124 +   ?>
  27.125 +</div>
  27.126 +   <?php
  27.127 +}
  27.128 +
  27.129 +/**
  27.130 + * Render options that the user has for this discussion.
  27.131 + */
  27.132 +function WriteOptions($Discussion, &$Sender, &$Session) {
  27.133 +   if ($Session->IsValid() && $Sender->ShowOptions) {
  27.134 +      echo '<div class="Options">';
  27.135 +      // Bookmark link
  27.136 +      $Title = T($Discussion->Bookmarked == '1' ? 'Unbookmark' : 'Bookmark');
  27.137 +      echo Anchor(
  27.138 +         '<span class="Star">'
  27.139 +            .Img('applications/dashboard/design/images/pixel.png', array('alt' => $Title))
  27.140 +         .'</span>',
  27.141 +         '/vanilla/discussion/bookmark/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl),
  27.142 +         'Bookmark' . ($Discussion->Bookmarked == '1' ? ' Bookmarked' : ''),
  27.143 +         array('title' => $Title)
  27.144 +      );
  27.145 +      
  27.146 +      $Sender->Options = '';
  27.147 +      
  27.148 +      // Dismiss an announcement
  27.149 +      if (C('Vanilla.Discussions.Dismiss', 1) && $Discussion->Announce == '1' && $Discussion->Dismissed != '1')
  27.150 +         $Sender->Options .= '<li>'.Anchor(T('Dismiss'), 'vanilla/discussion/dismissannouncement/'.$Discussion->DiscussionID.'/'.$Session->TransientKey(), 'DismissAnnouncement') . '</li>';
  27.151 +      
  27.152 +      // Edit discussion
  27.153 +      if ($Discussion->FirstUserID == $Session->UserID || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $Discussion->CategoryID))
  27.154 +         $Sender->Options .= '<li>'.Anchor(T('Edit'), 'vanilla/post/editdiscussion/'.$Discussion->DiscussionID, 'EditDiscussion') . '</li>';
  27.155 +
  27.156 +      // Announce discussion
  27.157 +      if ($Session->CheckPermission('Vanilla.Discussions.Announce', TRUE, 'Category', $Discussion->CategoryID))
  27.158 +         $Sender->Options .= '<li>'.Anchor(T($Discussion->Announce == '1' ? 'Unannounce' : 'Announce'), 'vanilla/discussion/announce/'.$Discussion->DiscussionID.'/'.$Session->TransientKey(), 'AnnounceDiscussion') . '</li>';
  27.159 +
  27.160 +      // Sink discussion
  27.161 +      if ($Session->CheckPermission('Vanilla.Discussions.Sink', TRUE, 'Category', $Discussion->CategoryID))
  27.162 +         $Sender->Options .= '<li>'.Anchor(T($Discussion->Sink == '1' ? 'Unsink' : 'Sink'), 'vanilla/discussion/sink/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'SinkDiscussion') . '</li>';
  27.163 +
  27.164 +      // Close discussion
  27.165 +      if ($Session->CheckPermission('Vanilla.Discussions.Close', TRUE, 'Category', $Discussion->CategoryID))
  27.166 +         $Sender->Options .= '<li>'.Anchor(T($Discussion->Closed == '1' ? 'Reopen' : 'Close'), 'vanilla/discussion/close/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'CloseDiscussion') . '</li>';
  27.167 +      
  27.168 +      // Delete discussion
  27.169 +      if ($Session->CheckPermission('Vanilla.Discussions.Delete', TRUE, 'Category', $Discussion->CategoryID))
  27.170 +         $Sender->Options .= '<li>'.Anchor(T('Delete'), 'vanilla/discussion/delete/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'DeleteDiscussion') . '</li>';
  27.171 +      
  27.172 +      // Allow plugins to add options
  27.173 +      $Sender->FireEvent('DiscussionOptions');
  27.174 +      
  27.175 +      if ($Sender->Options != '') {
  27.176 +      ?>
  27.177 +         <ul class="Options">
  27.178 +            <li>
  27.179 +               <strong><?php echo T('Options'); ?></strong>
  27.180 +               <ul>
  27.181 +                  <?php echo $Sender->Options; ?>
  27.182 +               </ul>
  27.183 +            </li>
  27.184 +         </ul>
  27.185 +      <?php
  27.186 +      }
  27.187 +      echo '</div>';
  27.188 +   }
  27.189 +}
  27.190 \ No newline at end of file