# HG changeset patch # User Eric Joseph-Alexandre # Date 1293010572 -3600 # Node ID 8c8667451eab6bafefcba8164a8969a554f2842a # Parent e13c1f42b3f12f72f1b5f647e9fcae8d036b936b Add slitaz themes for vanilla diff -r e13c1f42b3f1 -r 8c8667451eab forum/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/README Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,12 @@ +2010-12-22 +The forum is powered by Vanilla Forum (http://vanillaforums.org/) + +Running on Debian 4.0 with: +* vanilla 2.0.16 +* apache 2.23 +* mysql 5.0.32 +* php 5.2 +* awstats 6.95 (optionnal) + + + diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz-2/README.txt Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,45 @@ +How to create a theme: + +Part 1: CSS / Design +================================================================================ +1. Copy this "default" theme folder and rename it to your new theme name. +2. Open the "about.php" file and edit the information to reflect your theme. Be + sure to change the array key like this: $ThemeInfo['YourThemeNameHere']. +3. Create a "design" subfolder and copy /applications/dashboard/design/style.css + and /applications/vanilla/design/vanilla.css into it. +4. Any background images you want to continue using (like the star png images + for bookmarking) should be copied along with their respective stylesheets. +5. Go to your Dashboard, Themes, and apply your new theme. +6. Edit the copied CSS files to look however you wish! + +Other things you should know: + + + All non-forum pages should be edited in the global "style.css" file. + + + If you want to edit the look & feel of the administrative screens, also + copy /applications/dashboard/design/admin.css in step 3. Similarly, you can + copy other CSS files like /applications/vanilla/design/vanillaprofile.css to + customize those pages as well. + + +Part 2: HTML / Views +================================================================================ +If you want to customize the HTML, you can edit that too. +Our pages are made up of two parts: + + 1. Master Views - these represent everything that wraps the main content of the + page. If all you want to do is add a menu or banner above Vanilla, this is + all you need to alter. To do so, copy the default master view from + /applications/dashboard/views/default.master.php to + /themes/yourtheme/views/default.master.php and edit it there. + + 2. Views - these represent all of the content in each page. Every application + has a "views" folder that contains all of the HTML for every page. So, for + example, if you wanted to edit the HTML for the Discussions list, you could + copy the views from /applications/vanilla/views/discussions to + /themes/yourtheme/views/discussions and edit them there. + +You can avoid naming conflicts between applications' views and specify which +app a view is for by optionally adding a subfolder with the app's name in +/themes/yourtheme/views/ (e.g.: /themes/yourtheme/views/appname/) and placing +views there rather than directly in the "views" folder. \ No newline at end of file diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/about.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz-2/about.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,21 @@ +. +Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com +*/ + +/** + * An associative array of information about this application. + */ +$ThemeInfo['SliTaz-2'] = array( + 'Name' => 'SliTaz-2', + 'Description' => "SliTaz Vanilla 2 official theme", + 'Version' => '2.0', + 'Author' => "Christophe Lincoln", + 'AuthorEmail' => 'pankso@slitaz.org', + 'AuthorUrl' => 'http://www.slitaz.org' +); diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/design/favicon.ico Binary file forum/themes/slitaz-2/design/favicon.ico has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/design/favicon.png Binary file forum/themes/slitaz-2/design/favicon.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/design/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz-2/design/style.css Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,422 @@ +@charset "utf-8"; +/* CSS Document */ + +/***--- MAIN / DEFAULT --***/ +html, body { height: 102%; margin: 0; } +html, body, input, select, textarea, button { + font-family: Verdana, Geneva, sans-serif; + font-size: 11px; + line-height: 17px; + color: #555; +} +a { color: #2f6c8e; text-decoration: none; } +a:hover { color: #69a1c1; } +a img { border: none; } +ul, ol { margin: 0; padding: 0; list-style: none; } + +.clear { + clear: both; + display: block; + height: 0; + overflow: hidden; + visibility: hidden; + width: 0; +} + +#Wrapper { min-height: 100%; position: relative; margin: 0 auto; } +.Hidden { display: none; } + +/***--- HEADER(S) --***/ + + +#Header h1 { padding: 15px; font-size: 2em; } +#Header a { color: #69a1c1; } +#Header a:hover { color: #FFF; } + +#Header{ + background: #f0ba08 url(../images/header.png) repeat-x top; + color: black; + width: 100%; + height: 50px; + border-top: 1px solid black; + border-bottom: 1px solid black; + margin-bottom: 30px; + position: absolute; + top: 0; +} + +#titre { + position: absolute; + font-size: 16px; + font-weight: bolder ; + margin-left: 200px; + margin-top: 28px; +} + +#logo { + position: absolute; + float: left; + margin-left: 16px; + margin-top: 0px; +} + +/***--- NAV --***/ +#Nav { + right: 0; + position: absolute; + top: 3px; + font-size: 10px; + font-weight: bold; } + +/* search */ +#Search { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + height: 20px; + float: right; + background: #FFF; + padding: 2px 2px; + margin: 11px 95px 0 0; } +#Search form { padding: 0; border: none; } +#Nav #Search input.InputBox { width: 150px; border: none; } +#Search input.Button { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + height: 17px; + margin: 0; + padding: 0; } + +/***--- MAIN --***/ +/*#Main { }*/ + +/* 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 */ +#Content { + margin: 0px 320px 0px 0px; + padding: 86px 40px 65px 80px; + } +#Panel { + position: absolute; + top: 76px; + right: 80px; + color: #555555; + float: right; + width: 250px; + line-height: 1.5em; + text-align: left; + font-size: 12px; + } +.Box, #UserOptions { + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + list-style-type: none; + margin: 10px 0; + padding: 10px 24px 10px 24px; + background-color: #eaeaea;} +#Panel .Box ul { + list-style-type: none; + margin: 0; + padding: 10px 24px 10px 0px; + font-weight: bold; +} + +/***--- CONTENT --***/ +.GuestBox { background: #eaeaea; } +.GuestBox p { padding: 0; } +.Message img { max-width: 100%; } + +/* headers */ +h1 { margin: 0; font-size: 1.5em; } +#Content h1, h2, #Popup h1, div.DiscussionTabs .SubTab { + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + font-size: 1.1em; background: #555555; color: #fff; margin: 0 0 10px; padding: 10px; font-weight: bold; +} +div.DiscussionTabs .SubTab { margin: 0; } + +#Panel h4, #Panel .GuestBox h4 { + font-size: 110%; + color: #666666; + font-weight: bold; + padding: 0 0 1px 0; + margin: 0; + border-bottom: 1px solid #cecece; } + +div.Empty, div#Status { padding: 10px; } + +/* tabs */ +.Tabs li, .SubTab { + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + background: #CECECE; + padding: 5px 8px; + font-size: 140%; + font-weight: bold; + border-bottom: 1px solid #fff; } +.Tabs li.Active { background: #555; border-bottom: none; } +.Tabs li.Active a { color: #fff; } +.Tabs span { display: inline-block; margin: 0 10px; color: #888; } +.SubTab { font-size: 1em; } + +/* DISCUSSIONS */ +.DataList li.Item, .Conversation li.Item { + border-bottom: 1px solid #ccc; + position: relative; + padding: 10px; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; +} +.Activities li.Item { min-height: 50px; } +.DataList li.Item a.Title { display: block; font-size: 1.15em; font-weight: bold; padding: 0 0 8px; } + +/* discussions meta */ +.DataList .Meta span, .DataList .Meta strong { + min-width: 100px; display: inline-block; margin: 0 5px 0 0; +} +.DataList .Meta .LastCommentBy { width: 175px; } +.DataList .Meta .LastCommentDate { width: 100px; } + +/* discussions highlight */ +.DataList li.Mine { background: #f1f1f1; border-bottom-color: #fff; } +.DataList li.New { background: #d8ecbc; } +.DataList li.Bookmarked { background: #ffdf5d; border-bottom-color: #fff; } + +.DataList li.Closed { background: #eee; } +.DataList .Meta .Closed { color: #333; } +.DataList li.Closed a.Title { text-decoration: line-through; } + +.DataList li.Announcement { background: #FFC; } +.DataList .Meta .Announcement, .DataList .Meta .Closed { + width: 100px; font-weight: bold; +} +.DataList .Meta .Announcement { color: #C60; } + +/* DISCUSSION */ +div.DiscussionTabs li { font-size: 1em; } +ul.Discussion { margin: 0 0 10px; } + +/* bookmark */ +a.Bookmark { width: 9px; height: 9px; position: absolute; top: 8px; right: 10px; font-size: 0; background: #fff; border: 1px dotted #ffcc00; } +.Discussion a.Bookmark { top: 41px; } +a.Bookmarked { background: #ffcc00; border: 1px solid #fff; } +div.Options a.Bookmark { top: 14px; } + +div.Comment { + position: relative; + border-bottom: 1px dotted #ccc; + padding: 10px; } +li.Even { background: #f8f8f8; } + +/* discussion meta */ +.Comment .Message, .Comment .MessageForm, .ConversationMessage .Message { + margin-left: 215px; line-height: 1.75em; +} +.Comment .Meta, .ConversationMessage .Meta { + width: 175px; float: left; padding: 10px; background: #FFC; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; +} +.Comment .Meta span, .ConversationMessage .Meta span, div.Meta div.PostCount { + display: block; border-bottom: 1px dotted #ccc; font-size: 0.85em; padding: 1px 0; +} +.Comment .Author, .ConversationMessage span.Author { + background: #fff; padding: 5px; border-bottom: none; +} +.Comment .Author img, .ConversationMessage .Author a.Photo { + float: left; margin: 0 10px 0 0; +} +.Comment .Author a, .ConversationMessage .Author a { + font-weight: bold; font-size: 1.1em; +} +blockquote { margin: 0; padding: 10px; background: #fff; border: 1px dotted #ccc; } +.Odd blockquote { background: #F8F8F8; } + +/* post */ +ul.PostOptions { margin: 0 0 10px; } +.Preview { padding: 10px; margin: 0 0 10px; border-bottom: 1px dotted #ccc; } + +/*- Conversations & Activities -*/ +ul.Activities .Title { margin: 0 0 0 60px; font-weight: bold; } +ul.Conversations .Photo, ul.Activities .Photo { + width: 50px; height: 50px; float: left; font-size: 0.9em; color: #ccc; overflow: hidden; background: #eee; +} +ul.Conversations .Excerpt, ul.Activities .Excerpt { + margin: 0 0 10px 60px; +} +ul.Conversations .Meta, ul.Activities .Meta, .SearchResults .Meta { + margin: 0 0 0 60px;background: #FFC; padding: 3px 5px; +} +.SearchResults .Meta { margin: 5px 0 0; } +ul.ActivityComments { margin: 0 0 0 60px; } + +.ConversationMessage .Message { min-height: 100px; } +.ConversationMessage span.Author { height: 50px; } +.ConversationMessage span.ItemLink { display: none; } + +/***--- PANEL --***/ +.Block { padding: 15px; background: #ddd; margin: 0 10px 0 0; } +.Post #Panel, .Search #Panel { + display: none; +} + +.PanelInfo li { padding: 0px 0px; } +.PanelInfo li strong { font-weight: normal; } +.PanelInfo li.Active a { color: #c60; } +.PanelInfo li.Parent { background: #ccc; padding: 2px 5px; font-size: 1.1em; font-weight: bold; } + +.PanelInfo a, .Box a { + color: #0F314E; + background: inherit; + display: block; + text-decoration: none; + font-weight: bold; +} + +.PanelInfo a:hover, .Box a:hover { + color: #c60; + text-decoration: none; + display: block; +} +/* account */ + +#Panel .Photo { background: #ddd; position: absolute; right: 10px; padding: 0 0 10px 10px; } +#Panel .Photo img { width: 50px; display: block; border: 5px solid #fff; border-bottom-width: 12px; } +#Panel .Photo img:hover { width: auto; } + +#Panel dl { padding: 10px; background: #fff; margin: 0; } +#Panel dt { font-weight: bold; padding: 2px 0 0; } +#Panel dd { margin: 0; border-bottom: 1px dotted #ccc; padding: 0 0 2px; } + +/* inbox */ +.PanelInfo li strong { display: inline-block; margin: 0 5px 0 0; } + +/*- Form elements -*/ +form { padding: 0 10px 10px; border-bottom: 1px dotted #ccc; } +fieldset { margin: 0; padding: 0; border: none; } + +form#Form_User_Register { margin-top: 10px; } + +input, textarea, select { + border: 1px solid #ccc; padding: 3px 5px; margin: 0; +} +input.InputBox { width: 325px; margin: 0 10px 5px 0; } + +input.Button, input.Cancel { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + cursor: pointer; border: none; background: #c60; color: #fff; padding: 4px; +} +input.Button:hover, input.Cancel:hover { + background: #555555; color: white; +} + +a.Back, a.Cancel { + margin: 0 5px 0 0; +} + +textarea { width: 95%; min-height: 100px; display: block; margin: 10px 0; } + +label { display: block; font-weight: bold; } +label.RadioLabel, label.CheckBoxLabel { + font-weight: normal; +} +label.RadioLabel input, label.CheckBoxLabel input { + border: none; +} + +li.Gender, li.CaptchaInput { + margin: 0 0 10px; +} +li.CreateAccount, li.Buttons { + margin: 5px 0 0; +} +.cleditorMain { margin: 10px 0; } + +.CommentForm div.Messages { margin: 8px 0 0; } +.Errors, .Warning { + color: #F00; +} + +/***--- BUTTONS ---***/ +.GuestBox a.Button { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + font-size: 11px; + padding: 4px; + margin: 0 0 10px; + background: #c60; + color: #FFF; } +.GuestBox .Button:hover { + background: #555555; } + +a.BigButton { + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + display: block; + background: #c60; + color: #FFF; + padding: 10px; + font-size: 1.1em; + font-weight: bold; + text-align: center} +a.BigButton:hover { background: #555555; } +a.ClearConversation { margin: 10px 0 0; } + +/* options */ +div.Options, div.OptionButton { + position: absolute; top: 12px; right: 10px; +} +div.OptionButton { font-weight: bold; color: #555; } +ul.Options strong { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + cursor: pointer; + display: block; + padding: 5px 10px; + background: #FFC; + border: 1px solid #ccc; } + +ul.Options { margin: 5px 40px 0 0; } +ul.Options li { position: relative; } +ul.Options ul { min-width: 125px; display: none; position: absolute; z-index: 1000; background: #FFC; right: 0; border: 1px dotted #ccc; margin-top: -1px; } +ul.Options li:hover ul { display: block; } +ul.Options ul li { display: block; border-top: 1px dotted #ccc; } +ul.Options ul li:first-child { border-top: none; } +ul.Options ul li a { display: block; padding: 5px 10px; } + +/*- Pager -*/ +#PagerAfter { margin: 10px 0; text-align: center; background: #ddd; padding: 2px 10px; } +#PagerAfter a { display: inline-block; padding: 0 5px; } +#PagerAfter a.Highlight { color: #c60; } +span.Previous, a.Previous { float: left; } +#PagerAfter span.Next, #PagerAfter a.Next { float: right; padding: 0; } + +#PagerMore { text-align: right; padding: 5px 10px; } + +/***--- FOOTER --***/ +#Footer { + font-size: 11px ; + width: 100%; + position: absolute; + bottom: 0; + background: inherit; + color: #a8a8a8; } +#Footer ul { margin: 16px 15px; } +#Footer li { float: left; } +#Footer a { text-decoration: underline; background: inherit; color: #a8a8a8; } +#Footer a:hover { color: #666666; } + +/***--- OVERLAY ---***/ +.Overlay { width: 100%; position: absolute; top: 0; z-index: 10000; background: url(../images/overlayBg.png); } +.Overlay #Popup { width: 720px; padding: 15px; background: #FFF; margin: 0 auto; border: 1px dotted #c60; position: relative; } + +.Overlay .Buttons input.Button { margin: 0 0 10px; } +.Overlay p { padding: 0 10px; } +.Overlay a.Close { position: absolute; display: block; top: 10px; right: 15px; padding: 13px; font-size: 1.5em; color: #fff; } +.Overlay a.Close:hover { color: #c60; } +.Overlay ul { margin: 10px 0 0; } + +.Overlay input.Button { margin: 10px 0 0; } +.Overlay textarea { margin: 10px 0 0; } +.Overlay li.Gender { margin: 0; } + +.Overlay #Form_Picture { margin: 0 0 10px; } diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/images/header.png Binary file forum/themes/slitaz-2/images/header.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/images/logo.png Binary file forum/themes/slitaz-2/images/logo.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/images/overlayBg.png Binary file forum/themes/slitaz-2/images/overlayBg.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/screenshot.png Binary file forum/themes/slitaz-2/screenshot.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/views/default.master.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz-2/views/default.master.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,84 @@ + + + + RenderAsset('Head'); ?> + + +
+
+
+
+ RenderAsset('Content'); ?> +
+
+
+
+ +
+

Navigation

+ + Menu) { + $this->Menu->AddLink('Dashboard', T('Dashboard'), '/dashboard/settings', array('Garden.Settings.Manage')); + // $this->Menu->AddLink('Dashboard', T('Users'), '/user/browse', array('Garden.Users.Add', 'Garden.Users.Edit', 'Garden.Users.Delete')); + $this->Menu->AddLink('Activity', T('Activity'), '/activity'); + $Authenticator = Gdn::Authenticator(); + if ($Session->IsValid()) { + $Name = $Session->User->Name; + $CountNotifications = $Session->User->CountNotifications; + if (is_numeric($CountNotifications) && $CountNotifications > 0) + $Name .= ' '.$CountNotifications.''; + + $this->Menu->AddLink('User', "Profile ($Name)", '/profile/{UserID}/{Username}', array('Garden.SignIn.Allow'), array('class' => 'UserNotifications')); + $this->Menu->AddLink('SignOut', T('Sign Out'), $Authenticator->SignOutUrl(), FALSE, array('class' => 'NonTab SignOut')); + } else { + $Attribs = array(); + if (C('Garden.SignIn.Popup') && strpos(Gdn::Request()->Url(), 'entry') === FALSE) + $Attribs['class'] = 'SignInPopup'; + + $this->Menu->AddLink('Entry', T('Sign In'), $Authenticator->SignInUrl($this->SelfUrl), FALSE, array('class' => 'NonTab'), $Attribs); + } + echo $this->Menu->ToString(); + } + ?> +
+ RenderAsset('Panel'); ?> +
+
+
 
+
+ + + + + + +
+ + FireEvent('AfterBody'); ?> + + diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/views/discussion/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz-2/views/discussion/comments.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,25 @@ +FireEvent('BeforeCommentsRender'); +if (!function_exists('WriteComment')) + include($this->FetchViewLocation('helper_functions', 'discussion')); + +$CurrentOffset = $this->Offset; +if ($CurrentOffset == 0 && !$this->Data('NewComments', FALSE)) { + echo WriteComment($this->Discussion, $this, $Session, $CurrentOffset); +} + +// Only prints individual comment list items +$CommentData = $this->CommentData->Result(); +$i = 0; +foreach ($CommentData as $Comment) { + ++$CurrentOffset; + $this->CurrentComment = $Comment; + if ($i % 2) { + $counter = 'Odd'; + } else { + $counter = 'Even'; + } + WriteComment($Comment, $this, $Session, $CurrentOffset, $counter); + $i++; +} diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/views/discussion/helper_functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz-2/views/discussion/helper_functions.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,118 @@ +EventArguments['Object'] = $Object; + $Sender->EventArguments['Type'] = $Type; + $Sender->EventArguments['Author'] = $Author; + $CssClass = 'Item Comment ' . $counter; + if ($Type == 'Comment') { + $Sender->EventArguments['Comment'] = $Object; + $Id = 'Comment_'.$Object->CommentID; + $Permalink = '/discussion/comment/'.$Object->CommentID.'/#Comment_'.$Object->CommentID; + } else { + $Sender->EventArguments['Discussion'] = $Object; + $CssClass .= ' FirstComment'; + $Id = 'Discussion_'.$Object->DiscussionID; + $Permalink = '/discussion/'.$Object->DiscussionID.'/'.Gdn_Format::Url($Object->Name).'/p1'; + } + $Sender->Options = ''; + $CssClass .= $Object->InsertUserID == $Session->UserID ? ' Mine' : ''; + $Sender->FireEvent('BeforeCommentDisplay'); +?> +
  • +
    +
    + FireEvent('BeforeCommentMeta'); ?> +
    + +
     
    +
    + + DateInserted); + ?> + + + 'Item_'.($CurrentOffset+1), 'rel' => 'nofollow')); ?> + + +
    + FireEvent('CommentInfo'); ?> +
    + FireEvent('AfterCommentMeta'); ?> +
    +
    + FireEvent('BeforeCommentBody'); ?> + FormatBody = Gdn_Format::To($Object->Body, $Object->Format); + $Sender->FireEvent('AfterCommentFormat'); + $Object = $Sender->EventArguments['Object']; + echo $Object->FormatBody; + ?> +
     
    + FireEvent('AfterCommentBody'); ?> +
    +
  • +FireEvent('AfterComment'); +} + +function WriteOptionList($Object, $Sender, $Session) { + $EditContentTimeout = C('Garden.EditContentTimeout', -1); + $CanEdit = $EditContentTimeout == -1 || strtotime($Object->DateInserted) + $EditContentTimeout > time(); + $TimeLeft = ''; + if ($CanEdit && $EditContentTimeout > 0) { + $TimeLeft = strtotime($Object->DateInserted) + $EditContentTimeout - time(); + $TimeLeft = $TimeLeft > 0 ? ' ('.Gdn_Format::Seconds($TimeLeft).')' : ''; + } + + $Sender->Options = ''; + $CategoryID = GetValue('CategoryID', $Object); + if(!$CategoryID && property_exists($Sender, 'Discussion')) + $CategoryID = GetValue('CategoryID', $Sender->Discussion); + + // Show discussion options if this is the discussion / first comment + if ($Sender->EventArguments['Type'] == 'Discussion') { + // Can the user edit the discussion? + if (($CanEdit && $Session->UserID == $Object->InsertUserID) || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T('Edit'), '/vanilla/post/editdiscussion/'.$Object->DiscussionID, 'EditDiscussion').$TimeLeft.''; + + // Can the user announce? + if ($Session->CheckPermission('Vanilla.Discussions.Announce', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T($Sender->Discussion->Announce == '1' ? 'Unannounce' : 'Announce'), 'vanilla/discussion/announce/'.$Object->DiscussionID.'/'.$Session->TransientKey(), 'AnnounceDiscussion') . ''; + + // Can the user sink? + if ($Session->CheckPermission('Vanilla.Discussions.Sink', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T($Sender->Discussion->Sink == '1' ? 'Unsink' : 'Sink'), 'vanilla/discussion/sink/'.$Object->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'SinkDiscussion') . ''; + + // Can the user close? + if ($Session->CheckPermission('Vanilla.Discussions.Close', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T($Sender->Discussion->Closed == '1' ? 'Reopen' : 'Close'), 'vanilla/discussion/close/'.$Object->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'CloseDiscussion') . ''; + + // Can the user delete? + if ($Session->CheckPermission('Vanilla.Discussions.Delete', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T('Delete Discussion'), 'vanilla/discussion/delete/'.$Object->DiscussionID.'/'.$Session->TransientKey(), 'DeleteDiscussion') . ''; + } else { + // And if this is just another comment in the discussion ... + + // Can the user edit the comment? + if (($CanEdit && $Session->UserID == $Object->InsertUserID) || $Session->CheckPermission('Vanilla.Comments.Edit', TRUE, 'Category', $Sender->Discussion->CategoryID)) + $Sender->Options .= ''.Anchor(T('Edit'), '/vanilla/post/editcomment/'.$Object->CommentID, 'EditComment').$TimeLeft.''; + + // Can the user delete the comment? + if ($Session->CheckPermission('Vanilla.Comments.Delete', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T('Delete'), 'vanilla/discussion/deletecomment/'.$Object->CommentID.'/'.$Session->TransientKey().'/?Target='.urlencode($Sender->SelfUrl), 'DeleteComment') . ''; + } + + // Allow plugins to add options + $Sender->FireEvent('CommentOptions'); + echo $Sender->Options; +} \ No newline at end of file diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz-2/views/discussions/helper_functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz-2/views/discussions/helper_functions.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,186 @@ +Bookmarked == '1' ? ' Bookmarked' : ''; + $CssClass .= $Discussion->Closed == '1' ? ' Closed' : ''; + $CssClass .= $Alt.' '; + $CssClass .= $Discussion->Announce == '1' ? ' Announcement' : ''; + $CssClass .= $Discussion->Dismissed == '1' ? ' Dismissed' : ''; + $CssClass .= $Discussion->InsertUserID == $Session->UserID ? ' Mine' : ''; + $CssClass .= ($Discussion->CountUnreadComments > 0 && $Session->IsValid()) ? ' New' : ''; + $Sender->EventArguments['Discussion'] = &$Discussion; + $First = UserBuilder($Discussion, 'First'); + $Last = UserBuilder($Discussion, 'Last'); + + $Sender->FireEvent('BeforeDiscussionName'); + + $DiscussionName = Gdn_Format::Text($Discussion->Name); + if ($DiscussionName == '') + $DiscussionName = T('Blank Discussion Topic'); + + static $FirstDiscussion = TRUE; + if (!$FirstDiscussion) + $Sender->FireEvent('BetweenDiscussion'); + else + $FirstDiscussion = FALSE; +?> +
  • + FireEvent('BeforeDiscussionContent'); + WriteOptions($Discussion, $Sender, $Session); + ?> +
    + DiscussionID.'/'.Gdn_Format::Url($Discussion->Name).($Discussion->CountCommentWatch > 0 && C('Vanilla.Comments.AutoOffset') ? '/#Item_'.$Discussion->CountCommentWatch : ''), 'Title'); ?> + FireEvent('AfterDiscussionTitle'); ?> +
    + Announce == '1') { ?> + + + Closed == '1') { ?> + + + CountComments, '%s comment', '%s comments'), $Discussion->CountComments); ?> + IsValid() && $Discussion->CountUnreadComments > 0) + echo ''.Plural($Discussion->CountUnreadComments, '%s New', '%s New Plural').''; + + if ($Discussion->LastCommentID != '') { + echo ''.sprintf(T('Most recent by %1$s'), UserAnchor($Last)).''; + echo ''.Gdn_Format::Date($Discussion->LastDate).''; + } else { + echo ''.sprintf(T('Started by %1$s'), UserAnchor($First)).''; + echo ''.Gdn_Format::Date($Discussion->FirstDate).''; + } + + if (C('Vanilla.Categories.Use')) + echo Wrap(Anchor($Discussion->Category, '/categories/'.$Discussion->CategoryUrlCode, 'Category')); + + $Sender->FireEvent('DiscussionMeta'); + ?> +
    +
    +
  • +Category) ? $Sender->Category->Name : T('All Discussions'); + $Bookmarked = T('My Bookmarks'); + $MyDiscussions = T('My Discussions'); + $MyDrafts = T('My Drafts'); + $CountBookmarks = 0; + $CountDiscussions = 0; + $CountDrafts = 0; + if ($Session->IsValid()) { + $CountBookmarks = $Session->User->CountBookmarks; + $CountDiscussions = $Session->User->CountDiscussions; + $CountDrafts = $Session->User->CountDrafts; + } + if (is_numeric($CountBookmarks) && $CountBookmarks > 0) + $Bookmarked .= ''.$CountBookmarks.''; + + if (is_numeric($CountDiscussions) && $CountDiscussions > 0) + $MyDiscussions .= ''.$CountDiscussions.''; + + if (is_numeric($CountDrafts) && $CountDrafts > 0) + $MyDrafts .= ''.$CountDrafts.''; + + ?> +
    + + Category)) { + ?> +
    Category->Name; ?>
    + +
    + IsValid() && $Sender->ShowOptions) { + echo '
    '; + // Bookmark link + $Title = T($Discussion->Bookmarked == '1' ? 'Unbookmark' : 'Bookmark'); + echo Anchor( + '' + .Img('applications/dashboard/design/images/pixel.png', array('alt' => $Title)) + .'', + '/vanilla/discussion/bookmark/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), + 'Bookmark' . ($Discussion->Bookmarked == '1' ? ' Bookmarked' : ''), + array('title' => $Title) + ); + + $Sender->Options = ''; + + // Dismiss an announcement + if (C('Vanilla.Discussions.Dismiss', 1) && $Discussion->Announce == '1' && $Discussion->Dismissed != '1') + $Sender->Options .= '
  • '.Anchor(T('Dismiss'), 'vanilla/discussion/dismissannouncement/'.$Discussion->DiscussionID.'/'.$Session->TransientKey(), 'DismissAnnouncement') . '
  • '; + + // Edit discussion + if ($Discussion->FirstUserID == $Session->UserID || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T('Edit'), 'vanilla/post/editdiscussion/'.$Discussion->DiscussionID, 'EditDiscussion') . '
  • '; + + // Announce discussion + if ($Session->CheckPermission('Vanilla.Discussions.Announce', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T($Discussion->Announce == '1' ? 'Unannounce' : 'Announce'), 'vanilla/discussion/announce/'.$Discussion->DiscussionID.'/'.$Session->TransientKey(), 'AnnounceDiscussion') . '
  • '; + + // Sink discussion + if ($Session->CheckPermission('Vanilla.Discussions.Sink', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T($Discussion->Sink == '1' ? 'Unsink' : 'Sink'), 'vanilla/discussion/sink/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'SinkDiscussion') . '
  • '; + + // Close discussion + if ($Session->CheckPermission('Vanilla.Discussions.Close', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T($Discussion->Closed == '1' ? 'Reopen' : 'Close'), 'vanilla/discussion/close/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'CloseDiscussion') . '
  • '; + + // Delete discussion + if ($Session->CheckPermission('Vanilla.Discussions.Delete', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T('Delete'), 'vanilla/discussion/delete/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'DeleteDiscussion') . '
  • '; + + // Allow plugins to add options + $Sender->FireEvent('DiscussionOptions'); + + if ($Sender->Options != '') { + ?> + + '; + } +} \ No newline at end of file diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz/README.txt Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,45 @@ +How to create a theme: + +Part 1: CSS / Design +================================================================================ +1. Copy this "default" theme folder and rename it to your new theme name. +2. Open the "about.php" file and edit the information to reflect your theme. Be + sure to change the array key like this: $ThemeInfo['YourThemeNameHere']. +3. Create a "design" subfolder and copy /applications/dashboard/design/style.css + and /applications/vanilla/design/vanilla.css into it. +4. Any background images you want to continue using (like the star png images + for bookmarking) should be copied along with their respective stylesheets. +5. Go to your Dashboard, Themes, and apply your new theme. +6. Edit the copied CSS files to look however you wish! + +Other things you should know: + + + All non-forum pages should be edited in the global "style.css" file. + + + If you want to edit the look & feel of the administrative screens, also + copy /applications/dashboard/design/admin.css in step 3. Similarly, you can + copy other CSS files like /applications/vanilla/design/vanillaprofile.css to + customize those pages as well. + + +Part 2: HTML / Views +================================================================================ +If you want to customize the HTML, you can edit that too. +Our pages are made up of two parts: + + 1. Master Views - these represent everything that wraps the main content of the + page. If all you want to do is add a menu or banner above Vanilla, this is + all you need to alter. To do so, copy the default master view from + /applications/dashboard/views/default.master.php to + /themes/yourtheme/views/default.master.php and edit it there. + + 2. Views - these represent all of the content in each page. Every application + has a "views" folder that contains all of the HTML for every page. So, for + example, if you wanted to edit the HTML for the Discussions list, you could + copy the views from /applications/vanilla/views/discussions to + /themes/yourtheme/views/discussions and edit them there. + +You can avoid naming conflicts between applications' views and specify which +app a view is for by optionally adding a subfolder with the app's name in +/themes/yourtheme/views/ (e.g.: /themes/yourtheme/views/appname/) and placing +views there rather than directly in the "views" folder. \ No newline at end of file diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/about.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz/about.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,21 @@ +. +Contact Vanilla Forums Inc. at support [at] vanillaforums [dot] com +*/ + +/** + * An associative array of information about this application. + */ +$ThemeInfo['SliTaz'] = array( + 'Name' => 'SliTaz', + 'Description' => "SliTaz Vanilla 2 official theme", + 'Version' => '1.0', + 'Author' => "Christophe Lincoln", + 'AuthorEmail' => 'pankso@slitaz.org', + 'AuthorUrl' => 'http://www.slitaz.org' +); diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/design/favicon.ico Binary file forum/themes/slitaz/design/favicon.ico has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/design/favicon.png Binary file forum/themes/slitaz/design/favicon.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/design/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz/design/style.css Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,438 @@ +@charset "utf-8"; +/* CSS Document */ + +/***--- MAIN / DEFAULT --***/ +html, body { height: 102%; margin: 0; } +html, body, input, select, textarea, button { + font-family: Verdana, Geneva, sans-serif; + font-size: 11px; + line-height: 17px; + color: #555; +} +a { color: #2f6c8e; text-decoration: none; } +a:hover { color: #69a1c1; } +a img { border: none; } +ul, ol { margin: 0; padding: 0; list-style: none; } + +.clear { + clear: both; + display: block; + height: 0; + overflow: hidden; + visibility: hidden; + width: 0; +} + +#Wrapper { min-height: 100%; position: relative; margin: 0 auto; } +.Hidden { display: none; } + +/***--- HEADER(S) --***/ + + +#Header h1 { padding: 15px; font-size: 2em; } +#Header a { color: #69a1c1; } +#Header a:hover { color: #FFF; } + +#Header{ + background: #f0ba08 url(../images/header.png) repeat-x top; + color: black; + width: 100%; + height: 50px; + border-top: 1px solid black; + border-bottom: 1px solid black; + margin-bottom: 30px; + position: absolute; + top: 0; +} + +#titre { + position: absolute; + font-size: 16px; + font-weight: bolder ; + margin-left: 200px; + margin-top: 28px; +} + +#logo { + position: absolute; + float: left; + margin-left: 16px; + margin-top: 0px; +} + +/***--- NAV --***/ +#Nav { + right: 0; + position: absolute; + top: 3px; + font-size: 10px; + font-weight: bold; } + +ul#Menu { + margin: 10px 15px; + float: left; } + +#Menu li { float: left; margin: 0 1px 0 0; } +#Menu a { + display: block; + padding: 5px 4px; + background: inherit; + color: white; + text-decoration: none; } + +#Menu a:hover { + background: inherit; + color: #222222; } +#Menu li.Highlight a { color: #222222; } + +/* search */ +#Search { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + height: 20px; + float: right; + background: #FFF; + padding: 2px 2px; + margin: 11px 15px; } +#Search form { padding: 0; border: none; } +#Nav #Search input.InputBox { width: 150px; border: none; } +#Search input.Button { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + height: 17px; + margin: 0; + padding: 0; } + +/***--- MAIN --***/ +/*#Main { }*/ + +/* 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 */ +#Content { + margin: 0px 320px 0px 0px; + padding: 86px 40px 65px 80px; + } +#Panel { + position: absolute; + top: 86px; + right: 80px; + color: #555555; + float: right; + width: 250px; + line-height: 1.5em; + text-align: left; + font-size: 12px; + } +.Box, #UserOptions { + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + list-style-type: none; + margin: 10px 0; + padding: 10px 24px 10px 24px; + background-color: #eaeaea;} +#Panel .Box ul { + list-style-type: none; + margin: 0; + padding: 10px 24px 10px 0px; +} + +/***--- CONTENT --***/ +.GuestBox { background: #eaeaea; } +.GuestBox p { padding: 0; } +.Message img { max-width: 100%; } + +/* headers */ +h1 { margin: 0; font-size: 1.5em; } +#Content h1, h2, #Popup h1, div.DiscussionTabs .SubTab { + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + font-size: 1.1em; background: #555555; color: #fff; margin: 0 0 10px; padding: 10px; font-weight: bold; +} +div.DiscussionTabs .SubTab { margin: 0; } + +#Panel h4, #Panel .GuestBox h4 { + font-size: 110%; + color: #666666; + font-weight: bold; + padding: 0 0 1px 0; + margin: 0; + border-bottom: 1px solid #cecece; } + +div.Empty, div#Status { padding: 10px; } + +/* tabs */ +.Tabs li, .SubTab { + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + background: #CECECE; + padding: 5px 8px; + font-size: 140%; + font-weight: bold; + border-bottom: 1px solid #fff; } +.Tabs li.Active { background: #555; border-bottom: none; } +.Tabs li.Active a { color: #fff; } +.Tabs span { display: inline-block; margin: 0 10px; color: #888; } +.SubTab { font-size: 1em; } + +/* DISCUSSIONS */ +.DataList li.Item, .Conversation li.Item { + border-bottom: 1px solid #ccc; + position: relative; + padding: 10px; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; +} +.Activities li.Item { min-height: 50px; } +.DataList li.Item a.Title { display: block; font-size: 1.15em; font-weight: bold; padding: 0 0 8px; } + +/* discussions meta */ +.DataList .Meta span, .DataList .Meta strong { + min-width: 100px; display: inline-block; margin: 0 5px 0 0; +} +.DataList .Meta .LastCommentBy { width: 175px; } +.DataList .Meta .LastCommentDate { width: 100px; } + +/* discussions highlight */ +.DataList li.Mine { background: #f1f1f1; border-bottom-color: #fff; } +.DataList li.New { background: #d8ecbc; } +.DataList li.Bookmarked { background: #ffdf5d; border-bottom-color: #fff; } + +.DataList li.Closed { background: #eee; } +.DataList .Meta .Closed { color: #333; } +.DataList li.Closed a.Title { text-decoration: line-through; } + +.DataList li.Announcement { background: #FFC; } +.DataList .Meta .Announcement, .DataList .Meta .Closed { + width: 100px; font-weight: bold; +} +.DataList .Meta .Announcement { color: #C60; } + +/* DISCUSSION */ +div.DiscussionTabs li { font-size: 1em; } +ul.Discussion { margin: 0 0 10px; } + +/* bookmark */ +a.Bookmark { width: 9px; height: 9px; position: absolute; top: 8px; right: 10px; font-size: 0; background: #fff; border: 1px dotted #ffcc00; } +.Discussion a.Bookmark { top: 41px; } +a.Bookmarked { background: #ffcc00; border: 1px solid #fff; } +div.Options a.Bookmark { top: 14px; } + +div.Comment { + position: relative; + border-bottom: 1px dotted #ccc; + padding: 10px; } +li.Even { background: #f8f8f8; } + +/* discussion meta */ +.Comment .Message, .Comment .MessageForm, .ConversationMessage .Message { + margin-left: 215px; line-height: 1.75em; +} +.Comment .Meta, .ConversationMessage .Meta { + width: 175px; float: left; padding: 10px; background: #FFC; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; +} +.Comment .Meta span, .ConversationMessage .Meta span, div.Meta div.PostCount { + display: block; border-bottom: 1px dotted #ccc; font-size: 0.85em; padding: 1px 0; +} +.Comment .Author, .ConversationMessage span.Author { + background: #fff; padding: 5px; border-bottom: none; +} +.Comment .Author img, .ConversationMessage .Author a.Photo { + float: left; margin: 0 10px 0 0; +} +.Comment .Author a, .ConversationMessage .Author a { + font-weight: bold; font-size: 1.1em; +} +blockquote { margin: 0; padding: 10px; background: #fff; border: 1px dotted #ccc; } +.Odd blockquote { background: #F8F8F8; } + +/* post */ +ul.PostOptions { margin: 0 0 10px; } +.Preview { padding: 10px; margin: 0 0 10px; border-bottom: 1px dotted #ccc; } + +/*- Conversations & Activities -*/ +ul.Activities .Title { margin: 0 0 0 60px; font-weight: bold; } +ul.Conversations .Photo, ul.Activities .Photo { + width: 50px; height: 50px; float: left; font-size: 0.9em; color: #ccc; overflow: hidden; background: #eee; +} +ul.Conversations .Excerpt, ul.Activities .Excerpt { + margin: 0 0 10px 60px; +} +ul.Conversations .Meta, ul.Activities .Meta, .SearchResults .Meta { + margin: 0 0 0 60px;background: #FFC; padding: 3px 5px; +} +.SearchResults .Meta { margin: 5px 0 0; } +ul.ActivityComments { margin: 0 0 0 60px; } + +.ConversationMessage .Message { min-height: 100px; } +.ConversationMessage span.Author { height: 50px; } +.ConversationMessage span.ItemLink { display: none; } + +/***--- PANEL --***/ +.Block { padding: 15px; background: #ddd; margin: 0 10px 0 0; } +.Post #Panel, .Search #Panel { + display: none; +} + +.PanelInfo li { padding: 0px 0px; } +.PanelInfo li strong { font-weight: normal; } +.PanelInfo li.Active a { color: #c60; } +.PanelInfo li.Parent { background: #ccc; padding: 2px 5px; font-size: 1.1em; font-weight: bold; } + +.PanelInfo a { + color: #0F314E; + background: inherit; + display: block; + text-decoration: none; + font-weight: bold; +} + +.PanelInfo a:hover { + color: #c60; + text-decoration: none; + display: block; +} +/* account */ + +#Panel .Photo { background: #ddd; position: absolute; right: 10px; padding: 0 0 10px 10px; } +#Panel .Photo img { width: 50px; display: block; border: 5px solid #fff; border-bottom-width: 12px; } +#Panel .Photo img:hover { width: auto; } + +#Panel dl { padding: 10px; background: #fff; margin: 0; } +#Panel dt { font-weight: bold; padding: 2px 0 0; } +#Panel dd { margin: 0; border-bottom: 1px dotted #ccc; padding: 0 0 2px; } + +/* inbox */ +.PanelInfo li strong { display: inline-block; margin: 0 5px 0 0; } + +/*- Form elements -*/ +form { padding: 0 10px 10px; border-bottom: 1px dotted #ccc; } +fieldset { margin: 0; padding: 0; border: none; } + +form#Form_User_Register { margin-top: 10px; } + +input, textarea, select { + border: 1px solid #ccc; padding: 3px 5px; margin: 0; +} +input.InputBox { width: 325px; margin: 0 10px 5px 0; } + +input.Button, input.Cancel { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + cursor: pointer; border: none; background: #c60; color: #fff; padding: 4px; +} +input.Button:hover, input.Cancel:hover { + background: #555555; color: white; +} + +a.Back, a.Cancel { + margin: 0 5px 0 0; +} + +textarea { width: 95%; min-height: 100px; display: block; margin: 10px 0; } + +label { display: block; font-weight: bold; } +label.RadioLabel, label.CheckBoxLabel { + font-weight: normal; +} +label.RadioLabel input, label.CheckBoxLabel input { + border: none; +} + +li.Gender, li.CaptchaInput { + margin: 0 0 10px; +} +li.CreateAccount, li.Buttons { + margin: 5px 0 0; +} +.cleditorMain { margin: 10px 0; } + +.CommentForm div.Messages { margin: 8px 0 0; } +.Errors, .Warning { + color: #F00; +} + +/***--- BUTTONS ---***/ +.GuestBox a.Button { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + font-size: 11px; + padding: 4px; + margin: 0 0 10px; + background: #c60; + color: #FFF; } +.GuestBox .Button:hover { + background: #555555; } + +a.BigButton { + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + display: block; + background: #c60; + color: #FFF; + padding: 10px; + font-size: 1.1em; + font-weight: bold; + text-align: center} +a.BigButton:hover { background: #555555; } +a.ClearConversation { margin: 10px 0 0; } + +/* options */ +div.Options, div.OptionButton { + position: absolute; top: 12px; right: 10px; +} +div.OptionButton { font-weight: bold; color: #555; } +ul.Options strong { + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + cursor: pointer; + display: block; + padding: 5px 10px; + background: #FFC; + border: 1px solid #ccc; } + +ul.Options { margin: 5px 40px 0 0; } +ul.Options li { position: relative; } +ul.Options ul { min-width: 125px; display: none; position: absolute; z-index: 1000; background: #FFC; right: 0; border: 1px dotted #ccc; margin-top: -1px; } +ul.Options li:hover ul { display: block; } +ul.Options ul li { display: block; border-top: 1px dotted #ccc; } +ul.Options ul li:first-child { border-top: none; } +ul.Options ul li a { display: block; padding: 5px 10px; } + +/*- Pager -*/ +#PagerAfter { margin: 10px 0; text-align: center; background: #ddd; padding: 2px 10px; } +#PagerAfter a { display: inline-block; padding: 0 5px; } +#PagerAfter a.Highlight { color: #c60; } +span.Previous, a.Previous { float: left; } +#PagerAfter span.Next, #PagerAfter a.Next { float: right; padding: 0; } + +#PagerMore { text-align: right; padding: 5px 10px; } + +/***--- FOOTER --***/ +#Footer { + font-size: 11px ; + width: 100%; + position: absolute; + bottom: 0; + background: inherit; + color: #a8a8a8; } +#Footer ul { margin: 16px 15px; } +#Footer li { float: left; } +#Footer a { text-decoration: underline; background: inherit; color: #a8a8a8; } +#Footer a:hover { color: #666666; } + +/***--- OVERLAY ---***/ +.Overlay { width: 100%; position: absolute; top: 0; z-index: 10000; background: url(../images/overlayBg.png); } +.Overlay #Popup { width: 720px; padding: 15px; background: #FFF; margin: 0 auto; border: 1px dotted #c60; position: relative; } + +.Overlay .Buttons input.Button { margin: 0 0 10px; } +.Overlay p { padding: 0 10px; } +.Overlay a.Close { position: absolute; display: block; top: 10px; right: 15px; padding: 13px; font-size: 1.5em; color: #fff; } +.Overlay a.Close:hover { color: #c60; } +.Overlay ul { margin: 10px 0 0; } + +.Overlay input.Button { margin: 10px 0 0; } +.Overlay textarea { margin: 10px 0 0; } +.Overlay li.Gender { margin: 0; } + +.Overlay #Form_Picture { margin: 0 0 10px; } diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/images/header.png Binary file forum/themes/slitaz/images/header.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/images/logo.png Binary file forum/themes/slitaz/images/logo.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/images/overlayBg.png Binary file forum/themes/slitaz/images/overlayBg.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/screenshot.png Binary file forum/themes/slitaz/screenshot.png has changed diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/views/default.master.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz/views/default.master.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,76 @@ + + + + RenderAsset('Head'); ?> + + +
    +
    +
    +
    + RenderAsset('Content'); ?> +
    +
    +
    +
    RenderAsset('Panel'); ?>
    +
    +
     
    +
    + + + + + + +
    + + FireEvent('AfterBody'); ?> + + diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/views/discussion/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz/views/discussion/comments.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,25 @@ +FireEvent('BeforeCommentsRender'); +if (!function_exists('WriteComment')) + include($this->FetchViewLocation('helper_functions', 'discussion')); + +$CurrentOffset = $this->Offset; +if ($CurrentOffset == 0 && !$this->Data('NewComments', FALSE)) { + echo WriteComment($this->Discussion, $this, $Session, $CurrentOffset); +} + +// Only prints individual comment list items +$CommentData = $this->CommentData->Result(); +$i = 0; +foreach ($CommentData as $Comment) { + ++$CurrentOffset; + $this->CurrentComment = $Comment; + if ($i % 2) { + $counter = 'Odd'; + } else { + $counter = 'Even'; + } + WriteComment($Comment, $this, $Session, $CurrentOffset, $counter); + $i++; +} diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/views/discussion/helper_functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz/views/discussion/helper_functions.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,118 @@ +EventArguments['Object'] = $Object; + $Sender->EventArguments['Type'] = $Type; + $Sender->EventArguments['Author'] = $Author; + $CssClass = 'Item Comment ' . $counter; + if ($Type == 'Comment') { + $Sender->EventArguments['Comment'] = $Object; + $Id = 'Comment_'.$Object->CommentID; + $Permalink = '/discussion/comment/'.$Object->CommentID.'/#Comment_'.$Object->CommentID; + } else { + $Sender->EventArguments['Discussion'] = $Object; + $CssClass .= ' FirstComment'; + $Id = 'Discussion_'.$Object->DiscussionID; + $Permalink = '/discussion/'.$Object->DiscussionID.'/'.Gdn_Format::Url($Object->Name).'/p1'; + } + $Sender->Options = ''; + $CssClass .= $Object->InsertUserID == $Session->UserID ? ' Mine' : ''; + $Sender->FireEvent('BeforeCommentDisplay'); +?> +
  • +
    +
    + FireEvent('BeforeCommentMeta'); ?> +
    + +
     
    +
    + + DateInserted); + ?> + + + 'Item_'.($CurrentOffset+1), 'rel' => 'nofollow')); ?> + + +
    + FireEvent('CommentInfo'); ?> +
    + FireEvent('AfterCommentMeta'); ?> +
    +
    + FireEvent('BeforeCommentBody'); ?> + FormatBody = Gdn_Format::To($Object->Body, $Object->Format); + $Sender->FireEvent('AfterCommentFormat'); + $Object = $Sender->EventArguments['Object']; + echo $Object->FormatBody; + ?> +
     
    + FireEvent('AfterCommentBody'); ?> +
    +
  • +FireEvent('AfterComment'); +} + +function WriteOptionList($Object, $Sender, $Session) { + $EditContentTimeout = C('Garden.EditContentTimeout', -1); + $CanEdit = $EditContentTimeout == -1 || strtotime($Object->DateInserted) + $EditContentTimeout > time(); + $TimeLeft = ''; + if ($CanEdit && $EditContentTimeout > 0) { + $TimeLeft = strtotime($Object->DateInserted) + $EditContentTimeout - time(); + $TimeLeft = $TimeLeft > 0 ? ' ('.Gdn_Format::Seconds($TimeLeft).')' : ''; + } + + $Sender->Options = ''; + $CategoryID = GetValue('CategoryID', $Object); + if(!$CategoryID && property_exists($Sender, 'Discussion')) + $CategoryID = GetValue('CategoryID', $Sender->Discussion); + + // Show discussion options if this is the discussion / first comment + if ($Sender->EventArguments['Type'] == 'Discussion') { + // Can the user edit the discussion? + if (($CanEdit && $Session->UserID == $Object->InsertUserID) || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T('Edit'), '/vanilla/post/editdiscussion/'.$Object->DiscussionID, 'EditDiscussion').$TimeLeft.''; + + // Can the user announce? + if ($Session->CheckPermission('Vanilla.Discussions.Announce', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T($Sender->Discussion->Announce == '1' ? 'Unannounce' : 'Announce'), 'vanilla/discussion/announce/'.$Object->DiscussionID.'/'.$Session->TransientKey(), 'AnnounceDiscussion') . ''; + + // Can the user sink? + if ($Session->CheckPermission('Vanilla.Discussions.Sink', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T($Sender->Discussion->Sink == '1' ? 'Unsink' : 'Sink'), 'vanilla/discussion/sink/'.$Object->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'SinkDiscussion') . ''; + + // Can the user close? + if ($Session->CheckPermission('Vanilla.Discussions.Close', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T($Sender->Discussion->Closed == '1' ? 'Reopen' : 'Close'), 'vanilla/discussion/close/'.$Object->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'CloseDiscussion') . ''; + + // Can the user delete? + if ($Session->CheckPermission('Vanilla.Discussions.Delete', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T('Delete Discussion'), 'vanilla/discussion/delete/'.$Object->DiscussionID.'/'.$Session->TransientKey(), 'DeleteDiscussion') . ''; + } else { + // And if this is just another comment in the discussion ... + + // Can the user edit the comment? + if (($CanEdit && $Session->UserID == $Object->InsertUserID) || $Session->CheckPermission('Vanilla.Comments.Edit', TRUE, 'Category', $Sender->Discussion->CategoryID)) + $Sender->Options .= ''.Anchor(T('Edit'), '/vanilla/post/editcomment/'.$Object->CommentID, 'EditComment').$TimeLeft.''; + + // Can the user delete the comment? + if ($Session->CheckPermission('Vanilla.Comments.Delete', TRUE, 'Category', $CategoryID)) + $Sender->Options .= ''.Anchor(T('Delete'), 'vanilla/discussion/deletecomment/'.$Object->CommentID.'/'.$Session->TransientKey().'/?Target='.urlencode($Sender->SelfUrl), 'DeleteComment') . ''; + } + + // Allow plugins to add options + $Sender->FireEvent('CommentOptions'); + echo $Sender->Options; +} \ No newline at end of file diff -r e13c1f42b3f1 -r 8c8667451eab forum/themes/slitaz/views/discussions/helper_functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/forum/themes/slitaz/views/discussions/helper_functions.php Wed Dec 22 10:36:12 2010 +0100 @@ -0,0 +1,186 @@ +Bookmarked == '1' ? ' Bookmarked' : ''; + $CssClass .= $Discussion->Closed == '1' ? ' Closed' : ''; + $CssClass .= $Alt.' '; + $CssClass .= $Discussion->Announce == '1' ? ' Announcement' : ''; + $CssClass .= $Discussion->Dismissed == '1' ? ' Dismissed' : ''; + $CssClass .= $Discussion->InsertUserID == $Session->UserID ? ' Mine' : ''; + $CssClass .= ($Discussion->CountUnreadComments > 0 && $Session->IsValid()) ? ' New' : ''; + $Sender->EventArguments['Discussion'] = &$Discussion; + $First = UserBuilder($Discussion, 'First'); + $Last = UserBuilder($Discussion, 'Last'); + + $Sender->FireEvent('BeforeDiscussionName'); + + $DiscussionName = Gdn_Format::Text($Discussion->Name); + if ($DiscussionName == '') + $DiscussionName = T('Blank Discussion Topic'); + + static $FirstDiscussion = TRUE; + if (!$FirstDiscussion) + $Sender->FireEvent('BetweenDiscussion'); + else + $FirstDiscussion = FALSE; +?> +
  • + FireEvent('BeforeDiscussionContent'); + WriteOptions($Discussion, $Sender, $Session); + ?> +
    + DiscussionID.'/'.Gdn_Format::Url($Discussion->Name).($Discussion->CountCommentWatch > 0 && C('Vanilla.Comments.AutoOffset') ? '/#Item_'.$Discussion->CountCommentWatch : ''), 'Title'); ?> + FireEvent('AfterDiscussionTitle'); ?> +
    + Announce == '1') { ?> + + + Closed == '1') { ?> + + + CountComments, '%s comment', '%s comments'), $Discussion->CountComments); ?> + IsValid() && $Discussion->CountUnreadComments > 0) + echo ''.Plural($Discussion->CountUnreadComments, '%s New', '%s New Plural').''; + + if ($Discussion->LastCommentID != '') { + echo ''.sprintf(T('Most recent by %1$s'), UserAnchor($Last)).''; + echo ''.Gdn_Format::Date($Discussion->LastDate).''; + } else { + echo ''.sprintf(T('Started by %1$s'), UserAnchor($First)).''; + echo ''.Gdn_Format::Date($Discussion->FirstDate).''; + } + + if (C('Vanilla.Categories.Use')) + echo Wrap(Anchor($Discussion->Category, '/categories/'.$Discussion->CategoryUrlCode, 'Category')); + + $Sender->FireEvent('DiscussionMeta'); + ?> +
    +
    +
  • +Category) ? $Sender->Category->Name : T('All Discussions'); + $Bookmarked = T('My Bookmarks'); + $MyDiscussions = T('My Discussions'); + $MyDrafts = T('My Drafts'); + $CountBookmarks = 0; + $CountDiscussions = 0; + $CountDrafts = 0; + if ($Session->IsValid()) { + $CountBookmarks = $Session->User->CountBookmarks; + $CountDiscussions = $Session->User->CountDiscussions; + $CountDrafts = $Session->User->CountDrafts; + } + if (is_numeric($CountBookmarks) && $CountBookmarks > 0) + $Bookmarked .= ''.$CountBookmarks.''; + + if (is_numeric($CountDiscussions) && $CountDiscussions > 0) + $MyDiscussions .= ''.$CountDiscussions.''; + + if (is_numeric($CountDrafts) && $CountDrafts > 0) + $MyDrafts .= ''.$CountDrafts.''; + + ?> +
    +
      + FireEvent('BeforeDiscussionTabs'); ?> + ControllerName) == 'discussionscontroller' && strtolower($Sender->RequestMethod) == 'index' ? ' class="Active"' : ''; ?>> + FireEvent('AfterAllDiscussionsTab'); ?> + 0 || $Sender->RequestMethod == 'bookmarked') { ?> + RequestMethod == 'bookmarked' ? ' class="Active"' : ''; ?>> + FireEvent('AfterBookmarksTab'); + } + if ($CountDiscussions > 0 || $Sender->RequestMethod == 'mine') { + ?> + RequestMethod == 'mine' ? ' class="Active"' : ''; ?>> + 0 || $Sender->ControllerName == 'draftscontroller') { + ?> + ControllerName == 'draftscontroller' ? ' class="Active"' : ''; ?>> + FireEvent('AfterDiscussionTabs'); + ?> +
    + Category)) { + ?> +
    Category->Name; ?>
    + +
    + IsValid() && $Sender->ShowOptions) { + echo '
    '; + // Bookmark link + $Title = T($Discussion->Bookmarked == '1' ? 'Unbookmark' : 'Bookmark'); + echo Anchor( + '' + .Img('applications/dashboard/design/images/pixel.png', array('alt' => $Title)) + .'', + '/vanilla/discussion/bookmark/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), + 'Bookmark' . ($Discussion->Bookmarked == '1' ? ' Bookmarked' : ''), + array('title' => $Title) + ); + + $Sender->Options = ''; + + // Dismiss an announcement + if (C('Vanilla.Discussions.Dismiss', 1) && $Discussion->Announce == '1' && $Discussion->Dismissed != '1') + $Sender->Options .= '
  • '.Anchor(T('Dismiss'), 'vanilla/discussion/dismissannouncement/'.$Discussion->DiscussionID.'/'.$Session->TransientKey(), 'DismissAnnouncement') . '
  • '; + + // Edit discussion + if ($Discussion->FirstUserID == $Session->UserID || $Session->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T('Edit'), 'vanilla/post/editdiscussion/'.$Discussion->DiscussionID, 'EditDiscussion') . '
  • '; + + // Announce discussion + if ($Session->CheckPermission('Vanilla.Discussions.Announce', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T($Discussion->Announce == '1' ? 'Unannounce' : 'Announce'), 'vanilla/discussion/announce/'.$Discussion->DiscussionID.'/'.$Session->TransientKey(), 'AnnounceDiscussion') . '
  • '; + + // Sink discussion + if ($Session->CheckPermission('Vanilla.Discussions.Sink', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T($Discussion->Sink == '1' ? 'Unsink' : 'Sink'), 'vanilla/discussion/sink/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'SinkDiscussion') . '
  • '; + + // Close discussion + if ($Session->CheckPermission('Vanilla.Discussions.Close', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T($Discussion->Closed == '1' ? 'Reopen' : 'Close'), 'vanilla/discussion/close/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'CloseDiscussion') . '
  • '; + + // Delete discussion + if ($Session->CheckPermission('Vanilla.Discussions.Delete', TRUE, 'Category', $Discussion->CategoryID)) + $Sender->Options .= '
  • '.Anchor(T('Delete'), 'vanilla/discussion/delete/'.$Discussion->DiscussionID.'/'.$Session->TransientKey().'?Target='.urlencode($Sender->SelfUrl), 'DeleteDiscussion') . '
  • '; + + // Allow plugins to add options + $Sender->FireEvent('DiscussionOptions'); + + if ($Sender->Options != '') { + ?> +
      +
    • + +
        + Options; ?> +
      +
    • +
    + '; + } +} \ No newline at end of file