Changeset 38
- Timestamp:
- 12/15/05 09:24:51 (7 years ago)
- Files:
-
- trunk/data/fixtures/test_data.yml (modified) (1 diff)
- trunk/data/sql/schema.sql (modified) (1 diff)
- trunk/frontend/config/app.yml (modified) (1 diff)
- trunk/frontend/config/routing.yml (modified) (3 diffs)
- trunk/frontend/lib/helper/AnswerHelper.php (modified) (3 diffs)
- trunk/frontend/lib/helper/GlobalHelper.php (modified) (3 diffs)
- trunk/frontend/lib/helper/QuestionHelper.php (modified) (1 diff)
- trunk/frontend/lib/helper/UserHelper.php (modified) (2 diffs)
- trunk/frontend/lib/myNewAccountValidator.class.php (added)
- trunk/frontend/modules/answer/actions/actions.class.php (modified) (1 diff)
- trunk/frontend/modules/answer/templates/_answer.php (modified) (1 diff)
- trunk/frontend/modules/answer/templates/_list.php (modified) (1 diff)
- trunk/frontend/modules/answer/templates/_vote_user.php (modified) (1 diff)
- trunk/frontend/modules/answer/templates/recentSuccess.php (modified) (2 diffs)
- trunk/frontend/modules/content (added)
- trunk/frontend/modules/content/actions (added)
- trunk/frontend/modules/content/actions/actions.class.php (added)
- trunk/frontend/modules/content/config (added)
- trunk/frontend/modules/content/config/.sf (added)
- trunk/frontend/modules/content/lib (added)
- trunk/frontend/modules/content/lib/.sf (added)
- trunk/frontend/modules/content/templates (added)
- trunk/frontend/modules/content/templates/_markdown_help.php (added)
- trunk/frontend/modules/content/templates/aboutSuccess.php (added)
- trunk/frontend/modules/content/templates/indexSuccess.php (added)
- trunk/frontend/modules/content/validate (added)
- trunk/frontend/modules/content/validate/.sf (added)
- trunk/frontend/modules/question/actions/actions.class.php (modified) (3 diffs)
- trunk/frontend/modules/question/templates/_interested_user.php (modified) (1 diff)
- trunk/frontend/modules/question/templates/_question_list.php (modified) (1 diff)
- trunk/frontend/modules/question/templates/addSuccess.php (modified) (1 diff)
- trunk/frontend/modules/question/templates/showSuccess.php (modified) (1 diff)
- trunk/frontend/modules/question/validate/add.yml (modified) (2 diffs)
- trunk/frontend/modules/sidebar/templates/_rss_links.php (added)
- trunk/frontend/modules/sidebar/templates/defaultSuccess.php (modified) (1 diff)
- trunk/frontend/modules/sidebar/templates/questionSuccess.php (modified) (2 diffs)
- trunk/frontend/modules/tag/actions/actions.class.php (modified) (2 diffs)
- trunk/frontend/modules/tag/config/view.yml (modified) (1 diff)
- trunk/frontend/modules/tag/templates/_question_tags.php (modified) (1 diff)
- trunk/frontend/modules/tag/templates/_tag_cloud.php (added)
- trunk/frontend/modules/tag/templates/popularSuccess.php (modified) (1 diff)
- trunk/frontend/modules/tag/templates/removeSuccess.php (added)
- trunk/frontend/modules/tag/templates/showSuccess.php (modified) (1 diff)
- trunk/frontend/modules/user/actions/actions.class.php (modified) (2 diffs)
- trunk/frontend/modules/user/templates/loginSuccess.php (modified) (2 diffs)
- trunk/frontend/modules/user/templates/passwordRequestSuccess.php (modified) (1 diff)
- trunk/frontend/modules/user/templates/showSuccess.php (modified) (1 diff)
- trunk/frontend/modules/user/validate/add.yml (added)
- trunk/frontend/templates/layout.php (modified) (3 diffs)
- trunk/lib/model/QuestionPeer.php (modified) (1 diff)
- trunk/lib/model/QuestionTagPeer.php (modified) (2 diffs)
- trunk/lib/model/User.php (modified) (2 diffs)
- trunk/test/frontend/contentActionsTest.php (added)
- trunk/web/css/layout.css (modified) (2 diffs)
- trunk/web/css/main.css (modified) (11 diffs)
- trunk/web/images/add_background.gif (added)
- trunk/web/images/askeet_logo.gif (modified) (previous)
- trunk/web/images/content_top.gif (added)
- trunk/web/images/first.gif (added)
- trunk/web/images/footer_background.gif (added)
- trunk/web/images/header_background.gif (added)
- trunk/web/images/interested_bubble.gif (added)
- trunk/web/images/last.gif (added)
- trunk/web/images/menu_left.gif (added)
- trunk/web/images/new_background.gif (added)
- trunk/web/images/next.gif (added)
- trunk/web/images/previous.gif (added)
- trunk/web/images/side_top.gif (added)
- trunk/web/images/symfony.gif (added)
- trunk/web/images/thumb_down.gif (added)
- trunk/web/images/thumb_up.gif (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/data/fixtures/test_data.yml
r31 r38 46 46 I have a very swell blog that talks 47 47 about my class and mates and pets and favorite movies. 48 49 q4: 50 title: Test4 51 user_id: anonymous 52 body: Test 53 54 q5: 55 title: Test4 56 user_id: anonymous 57 body: Test 58 59 q6: 60 title: Test4 61 user_id: anonymous 62 body: Test 48 63 49 64 Interest: trunk/data/sql/schema.sql
r23 r38 108 108 ) 109 109 Type=InnoDB; 110 # ----------------------------------------------------------------------- 111 # ask_question_tag 112 # ----------------------------------------------------------------------- 113 DROP TABLE IF EXISTS `ask_question_tag`; 114 115 CREATE TABLE `ask_question_tag`( 116 `question_id` INTEGER , 117 `user_id` INTEGER , 118 `created_at` DATETIME , 119 `tag` VARCHAR(100) , 120 `normalized_tag` VARCHAR(100) , 121 KEY `normalized_tag_index` (`normalized_tag`), 122 INDEX `ask_question_tag_FI_1` (`question_id`), 123 CONSTRAINT `ask_question_tag_FK_1` 124 FOREIGN KEY (`question_id`) 125 REFERENCES `ask_question` (`id`) 126 , 127 INDEX `ask_question_tag_FI_2` (`user_id`), 128 CONSTRAINT `ask_question_tag_FK_2` 129 FOREIGN KEY (`user_id`) 130 REFERENCES `ask_user` (`id`) 131 ) 132 Type=InnoDB; 133 110 134 111 135 trunk/frontend/config/app.yml
r27 r38 2 2 all: 3 3 pager: 4 homepage_max: 25 answers_max: 14 homepage_max: 5 5 answers_max: 5 6 6 users_max: 10 7 7 trunk/frontend/config/routing.yml
r34 r38 44 44 add_account: 45 45 url: /add_user 46 param: { module: user, action: new}46 param: { module: user, action: add } 47 47 48 48 user_require_password: … … 76 76 param: { module: tag, action: popular } 77 77 78 tag_remove: 79 url: /question/:stripped_title/tag/remove/:tag 80 param: { module: tag, action: remove } 81 78 82 # feeds 79 83 feed_recent_answers: … … 88 92 url: /feed/question/:stripped_title 89 93 param: { module: feed, action: question } 94 95 # content 96 about: 97 url: /about 98 param: { module: content, action: about } 90 99 91 100 # default rules trunk/frontend/lib/helper/AnswerHelper.php
r25 r38 22 22 use_helper('Javascript'); 23 23 24 $img = image_tag('thumb_'.$name.'.gif'); 25 24 26 if ($user->isAuthenticated()) 25 27 { … … 28 30 { 29 31 // already interested 30 return $ name;32 return $img; 31 33 } 32 34 else 33 35 { 34 36 // didn't declare interest yet 35 return link_to_remote($ name, array(37 return link_to_remote($img, array( 36 38 'url' => 'user/vote?id='.$answer->getId().'&score='.($name == 'up' ? 1 : -1), 37 39 'update' => array('success' => 'vote_'.$answer->getId()), … … 43 45 else 44 46 { 45 return link_to_login($ name);47 return link_to_login($img); 46 48 } 47 49 } trunk/frontend/lib/helper/GlobalHelper.php
r29 r38 3 3 function link_to_rss($name, $uri) 4 4 { 5 return link_to(image_tag('rss.gif', array('alt' => $name, 'title' => $name )), $uri);5 return link_to(image_tag('rss.gif', array('alt' => $name, 'title' => $name, 'align' => 'absmiddle')), $uri); 6 6 } 7 7 … … 29 29 30 30 // First and previous page 31 $navigation .= link_to( '«', $uri.'1');32 $navigation .= link_to( '<', $uri.$pager->getPreviousPage());31 $navigation .= link_to(image_tag('first.gif', 'align=absmiddle'), $uri.'1'); 32 $navigation .= link_to(image_tag('previous.gif', 'align=absmiddle'), $uri.$pager->getPreviousPage()).' '; 33 33 34 34 // Pages one by one … … 38 38 $links[] = link_to_unless($page == $pager->getPage(), $page, $uri.$page); 39 39 } 40 $navigation .= join(' -', $links);40 $navigation .= join(' ', $links); 41 41 42 42 // Next and last page 43 $navigation .= link_to('>', $uri.$pager->getNextPage());44 $navigation .= link_to( '»', $uri.$pager->getLastPage());43 $navigation .= ' '.link_to(image_tag('next.gif', 'align=absmiddle'), $uri.$pager->getNextPage()); 44 $navigation .= link_to(image_tag('last.gif', 'align=absmiddle'), $uri.$pager->getLastPage()); 45 45 } 46 46 trunk/frontend/lib/helper/QuestionHelper.php
r31 r38 13 13 } 14 14 15 function link_to_question($question) 16 { 17 return link_to($question->getTitle(), '@question?stripped_title='.$question->getStrippedTitle()); 18 } 19 15 20 ?> trunk/frontend/lib/helper/UserHelper.php
r25 r38 20 20 'update' => array('success' => 'block_'.$question->getId()), 21 21 'loading' => "Element.show('indicator')", 22 'complete' => "Element.hide('indicator');".visual_effect(' highlight', 'mark_'.$question->getId()),22 'complete' => "Element.hide('indicator');".visual_effect('pulsate', 'mark_'.$question->getId()), 23 23 )); 24 24 } … … 30 30 } 31 31 32 function link_to_profile($user) 33 { 34 if ($user->getNickname() == 'anonymous') 35 { 36 return 'anonymous'; 37 } 38 else 39 { 40 return link_to($user->__toString(), '@user_profile?nickname='.$user->getNickname()); 41 } 42 } 43 32 44 ?> trunk/frontend/modules/answer/actions/actions.class.php
r27 r38 14 14 { 15 15 $this->answer_pager = AnswerPeer::getRecentPager($this->getRequestParameter('page', 1)); 16 17 $this->setTitle('askeet! » recent answers'); 16 18 } 17 19 trunk/frontend/modules/answer/templates/_answer.php
r25 r38 1 <?php use_helper ('Date') ?>1 <?php use_helpers('Date', 'User') ?> 2 2 3 3 <div class="vote_block" id="vote_<?php echo $answer->getId() ?>"> 4 4 <?php echo include_partial('answer/vote_user', array('answer' => $answer)) ?> 5 5 </div> 6 posted by <?php echo $answer->getUser() ?> 7 on <?php echo format_date($answer->getCreatedAt(), 'p') ?> 8 <div> 6 7 <div class="answer_body"> 9 8 <?php echo $answer->getHtmlBody() ?> 9 <div class="subtitle">answered by <?php echo link_to_profile($answer->getUser()) ?> on <?php echo format_date($answer->getCreatedAt(), 'f') ?></div> 10 10 </div> 11 12 <br class="clearleft" /> trunk/frontend/modules/answer/templates/_list.php
r25 r38 2 2 3 3 <div id="answers"> 4 <?php foreach ($answers as $answer): ?>5 <div class="answer">6 <?php include_partial('answer/answer', array('answer' => $answer)) ?>7 </div>8 <?php endforeach ?>9 4 10 <div class="answer" id="add_answer"> 11 <?php echo form_remote_tag(array( 12 'url' => '@add_answer', 13 'update' => array('success' => 'add_answer'), 14 'loading' => "Element.show('indicator')", 15 'complete' => "Element.hide('indicator');".visual_effect('highlight', 'add_answer'), 16 )) ?> 17 <fieldset> 5 <?php foreach ($answers as $answer): ?> 6 <div class="answer"> 7 <?php include_partial('answer/answer', array('answer' => $answer)) ?> 8 </div> 9 <?php endforeach ?> 18 10 19 <div class="form-row"> 11 <div class="answer" id="add_answer"> 12 <?php echo form_remote_tag(array( 13 'url' => '@add_answer', 14 'update' => array('success' => 'add_answer'), 15 'loading' => "Element.show('indicator')", 16 'complete' => "Element.hide('indicator');".visual_effect('highlight', 'add_answer'), 17 ), 'class=form') ?> 18 <fieldset> 19 20 <label for="author">author:</label> 21 <div style="display: inline; float: left"> 20 22 <?php if ($user->isAuthenticated()): ?> 21 23 <?php echo $user->getNickname() ?> 22 24 <?php else: ?> 23 <?php echo ' Anonymous Coward' ?>24 <?php echo link_to_login(' login') ?>25 <?php echo 'anonymous coward' ?> 26 <?php echo link_to_login('[login]') ?> 25 27 <?php endif ?> 26 </div> 28 </div> 29 <br class="clearleft" /> 27 30 28 <div class="form-row">29 < label for="label">Your answer:</label>30 < ?php echo textarea_tag('body', $params->get('body')) ?>31 </div>31 <label for="body">your answer:</label> 32 <?php echo textarea_tag('body', $params->get('body'), 'size=40x10') ?> 33 <br class="clearleft" /> 34 <?php echo include_partial('content/markdown_help') ?> 32 35 33 </fieldset>36 </fieldset> 34 37 35 <div class="submit-row">36 38 <?php echo input_hidden_tag('question_id', $question->getId()) ?> 37 <?php echo submit_tag('answer it') ?> 38 </div> 39 </form> 40 </div> 39 <div class="right"> 40 <?php echo submit_tag('answer it') ?> 41 </div> 42 </form> 43 </div> 41 44 42 45 </div> trunk/frontend/modules/answer/templates/_vote_user.php
r20 r38 1 1 <?php use_helper('Answer') ?> 2 2 3 <span class="vote_up_mark" id="vote_up_<?php echo $answer->getId() ?>"> 3 <div class="vote_up_mark"><?php echo link_to_user_relevancy_up($user, $answer) ?></div> 4 <div class="vote_down_mark"><?php echo link_to_user_relevancy_down($user, $answer) ?></div> 5 6 <br class="clearleft" /> 7 8 <div class="vote_up_mark" id="vote_up_<?php echo $answer->getId() ?>"> 4 9 <?php echo $answer->getRelevancyUpPercent() ?>% 5 </span> <?php echo link_to_user_relevancy_up($user, $answer) ?> 6 7 <span class="vote_down_mark" id="vote_down_<?php echo $answer->getId() ?>"> 10 </div> 11 <div class="vote_down_mark" id="vote_down_<?php echo $answer->getId() ?>"> 8 12 <?php echo $answer->getRelevancyDownPercent() ?>% 9 </ span> <?php echo link_to_user_relevancy_down($user, $answer) ?>13 </div> trunk/frontend/modules/answer/templates/recentSuccess.php
r27 r38 1 <?php use_helpers('Date', 'Answer' ) ?>1 <?php use_helpers('Date', 'Answer', 'Question') ?> 2 2 3 3 <h1>recent answers</h1> … … 6 6 <?php foreach ($answer_pager->getResults() as $answer): ?> 7 7 <div class="answer"> 8 <?php include_partial('answer/answer', array('answer' => $answer)) ?> 8 <h2><?php echo link_to_question($answer->getQuestion()) ?></h2> 9 <?php include_partial('answer/answer', array('answer' => $answer)) ?> 9 10 </div> 10 11 <?php endforeach ?> trunk/frontend/modules/question/actions/actions.class.php
r25 r38 23 23 $c = new Criteria(); 24 24 $c->add(AnswerPeer::QUESTION_ID, $this->question->getId()); 25 $c->addDescendingOrderByColumn(AnswerPeer::RELEVANCY_UP); 25 26 $this->answers = AnswerPeer::doSelect($c); 27 28 $this->setTitle('askeet! » '.$this->question->getTitle()); 26 29 } 27 30 … … 29 32 { 30 33 $this->question_pager = QuestionPeer::getRecentPager($this->getRequestParameter('page', 1)); 34 35 $this->setTitle('askeet! » recent questions'); 31 36 } 32 37 … … 46 51 $user->isInterestedIn($question); 47 52 53 $question->addTagsForUser($this->getRequestParameter('tag'), $user->getId()); 54 48 55 return $this->redirect('@question?stripped_title='.$question->getStrippedTitle()); 49 56 } trunk/frontend/modules/question/templates/_interested_user.php
r20 r38 1 1 <?php use_helper('User') ?> 2 2 3 <div class="interested_mark" id="mark_<?php echo $question->getId() ?>"> 4 <?php echo $question->getInterestedUsers() ?> 3 <?php 4 $class = 'few_interests'; 5 if ($question->getInterestedUsers() > 1000) 6 { 7 $class = 'many_interests'; 8 } 9 else if ($question->getInterestedUsers() > 100) 10 { 11 $class = 'some_interests'; 12 } 13 ?> 14 15 <div class="interested_mark <?php echo $class ?>" id="mark_<?php echo $question->getId() ?>"> 16 <?php echo $question->getInterestedUsers().' ' ?> 5 17 </div> 6 18 7 <?php echo link_to_user_interested($user, $question) ?> 19 <div class="interested_link"><?php echo link_to_user_interested($user, $question) ?></div> 20 trunk/frontend/modules/question/templates/_question_list.php
r31 r38 1 <?php use_helpers('Text', 'Global', 'Question' ) ?>1 <?php use_helpers('Text', 'Global', 'Question', 'Date') ?> 2 2 3 3 <?php foreach($question_pager->getResults() as $question): ?> 4 <div class="question"> 4 5 <div class="interested_block" id="block_<?php echo $question->getId() ?>"> 5 6 <?php echo include_partial('question/interested_user', array('question' => $question)) ?> 6 7 </div> 7 8 8 <h2><?php echo link_to($question->getTitle(), '@question?stripped_title='.$question->getStrippedTitle()) ?></h2> 9 <h2><?php echo link_to_question($question) ?></h2> 10 11 <div class="subtitle">asked by <?php echo link_to_profile($question->getUser()) ?> on <?php echo format_date($question->getCreatedAt(), 'f') ?></div> 9 12 10 13 <div class="question_body"> 11 14 <?php echo truncate_text(strip_tags($question->getHtmlBody()), 200) ?> 15 16 <div class="tags"> 17 18 <?php if ($question->getAnswers()): ?> 19 <?php echo link_to(count($question->getAnswers()).' answer'.(count($question->getAnswers()) > 1 ? 's' : ''), '@question?stripped_title='.$question->getStrippedTitle()) ?> 20 <?php else: ?> 21 <?php echo link_to('answer it', '@question?stripped_title='.$question->getStrippedTitle()) ?> 22 <?php endif ?> 23 24 - 25 26 <?php if ($question->getTags()): ?> 27 tags: <?php echo tags_for_question($question) ?> 28 <?php endif ?> 29 30 </div> 31 12 32 </div> 13 tags: <?php echo tags_for_question($question) ?>33 </div> 14 34 <?php endforeach ?> 15 35 16 <div id="question_pager" >17 <?php echo pager_navigation($question_pager, '@popular_questions') ?>36 <div id="question_pager" class="right"> 37 <?php echo pager_navigation($question_pager, '@popular_questions') ?> 18 38 </div> trunk/frontend/modules/question/templates/addSuccess.php
r25 r38 1 <?php echo form_tag('@add_question') ?> 1 <?php use_helper('Javascript') ?> 2 3 <h1>ask a question</h1> 4 5 <div class="in_form"> 6 <p> 7 Have you looked for similar questions? Check if a related question already exists: The more interesting a 8 question is, the more people will be willing to answer it. 9 </p> 10 11 <p> 12 Be as accurate as you can when giving a title to your question. Keep it short and put the details 13 in the question body. 14 </p> 15 </div> 16 17 <?php echo form_tag('@add_question', 'class=form') ?> 2 18 3 19 <fieldset> 4 20 5 <div class="form-row"> 6 <?php echo form_error('title') ?> 7 <label for="title">Question title:</label> 8 <?php echo input_tag('title', $params->get('title')) ?> 9 </div> 21 <?php echo form_error('title') ?> 22 <label for="title">question:</label> 23 <?php echo input_tag('title', $params->get('title'), 'size=40') ?> 24 <br class="clearleft" /> 10 25 11 <div class="form-row"> 12 <?php echo form_error('body') ?> 13 <label for="label">Your question in details:</label> 14 <?php echo textarea_tag('body', $params->get('body')) ?> 15 </div> 26 <?php echo form_error('body') ?> 27 <label for="label">describe it:</label> 28 <?php echo textarea_tag('body', $params->get('body'), 'size=40x10') ?> 29 <br class="clearleft" /> 30 <?php echo include_partial('content/markdown_help') ?> 31 32 <?php echo form_error('tag') ?> 33 <label for="tag">tags:</label> 34 <?php echo input_auto_complete_tag('tag', '', '@tag_autocomplete', 'autocomplete=off', 'use_style=true') ?> 35 <br class="clearleft" /> 36 <div class="small in_form">example: askeet "how to"</div> 16 37 17 38 </fieldset> 18 39 19 <div class=" submit-row">40 <div class="right"> 20 41 <?php echo submit_tag('ask it') ?> 21 42 </div> trunk/frontend/modules/question/templates/showSuccess.php
r27 r38 1 1 <?php use_helpers('Date', 'Answer') ?> 2 2 3 <div class="interested_block"> 4 <?php echo include_partial('interested_user', array('question' => $question)) ?> 5 </div> 6 7 <h2><?php echo $question->getTitle() ?></h2> 8 9 <div class="question_body"> 10 <?php echo $question->getHtmlBody() ?> 3 <h1></h1> 4 5 <div class="question"> 6 <div class="interested_block"> 7 <?php echo include_partial('interested_user', array('question' => $question)) ?> 8 </div> 9 10 <h2><?php echo $question->getTitle() ?> <?php echo link_to_rss('this question feed', '@feed_question?stripped_title='.$question->getStrippedTitle()) ?></h2> 11 12 <div class="subtitle">asked by <?php echo link_to_profile($question->getUser()) ?> on <?php echo format_date($question->getCreatedAt(), 'f') ?></div> 13 14 <div class="question_body"> 15 <?php echo $question->getHtmlBody() ?> 16 </div> 11 17 </div> 12 18 13 < p><?php echo link_to_rss('this question feed', '@feed_question?stripped_title='.$question->getStrippedTitle()) ?></p>19 <h2>Answers</h2> 14 20 15 21 <?php include_partial('answer/list', array('question' => $question, 'answers' => $answers)) ?> trunk/frontend/modules/question/validate/add.yml
r25 r38 1 1 methods: 2 post: [title, body ]2 post: [title, body, tag] 3 3 4 4 names: … … 9 9 body: 10 10 required: Yes 11 required_msg: You must provide a brief context for your question11 required_msg: you must provide a brief context for your question 12 12 validators: bodyValidator 13 14 tag: 15 required: Yes 16 required_msg: you must provide some tags for your question 13 17 14 18 bodyValidator: trunk/frontend/modules/sidebar/templates/defaultSuccess.php
r27 r38 1 1 <?php use_helper('Global') ?> 2 2 3 <?php echo link_to_login('ask a new question', '@add_question') ?> 3 <div id="add_question"> 4 <?php echo link_to_login('ask a new question', '@add_question') ?> 5 </div> 4 6 5 <ul> 6 <li><?php echo link_to('popular questions', '@homepage') ?> <?php echo link_to_rss('popular questions', 'feed/popular') ?></li> 7 <li><?php echo link_to('latest questions', '@recent_questions') ?> <?php echo link_to_rss('latest questions', '@feed_recent_questions') ?></li> 8 <li><?php echo link_to('latest answers', '@recent_answers') ?> <?php echo link_to_rss('latest answers', '@feed_recent_answers') ?></li> 9 </ul> 7 <h2>popular tags</h2> 8 <?php echo include_partial('tag/tag_cloud', array('tags' => QuestionTagPeer::getPopularTags(20))) ?> 9 <div class="right" style="padding-top: 5px"><?php echo link_to('more popular tags »', '@popular_tags') ?></div> 10 11 <h2>browse askeet</h2> 12 <?php echo include_partial('rss_links') ?> trunk/frontend/modules/sidebar/templates/questionSuccess.php
r34 r38 1 <?php use_helper(' Javascript') ?>1 <?php use_helper('Global', 'Javascript') ?> 2 2 3 <?php echo link_to('ask a new question', 'question/new') ?> 3 <div id="add_question"> 4 <?php echo link_to_login('ask a new question', '@add_question') ?> 5 </div> 4 6 5 <ul> 6 <li><?php echo link_to('popular questions', 'question/list') ?> 7 <li><?php echo link_to('latest questions', 'question/recent') ?></li> 8 <li><?php echo link_to('latest answers', 'answer/recent') ?></li> 9 </ul> 7 <h2>browse askeet</h2> 8 <?php echo include_partial('rss_links') ?> 10 9 11 10 <h2>question tags</h2> … … 16 15 17 16 <?php if ($user->isAuthenticated()): ?> 18 <div>Add your own: 19 <?php echo form_remote_tag(array( 20 'url' => '@tag_add', 21 'update' => 'question_tags', 22 )) ?> 23 <?php echo input_hidden_tag('question_id', $question->getId()) ?> 24 <?php echo input_auto_complete_tag('tag', '', '@tag_autocomplete', 'autocomplete=off', 'use_style=true') ?> 25 <?php echo submit_tag('Tag') ?> 26 </form> 17 <div>add your own: 18 <?php echo form_remote_tag(array( 19 'url' => '@tag_add', 20 'update' => 'question_tags', 21 'loading' => "Element.show('indicator'); \$('tag').value = ''", 22 'complete' => "Element.hide('indicator');".visual_effect('highlight', 'question_tags'), 23 )) ?> 24 <?php echo input_hidden_tag('question_id', $question->getId()) ?> 25 <?php echo input_auto_complete_tag('tag', '', '@tag_autocomplete', 'autocomplete=off', 'use_style=true') ?> 26 <?php echo submit_tag('tag') ?> 27 </form> 27 28 </div> 28 29 <?php endif ?> trunk/frontend/modules/tag/actions/actions.class.php
r34 r38 14 14 { 15 15 $this->question_pager = QuestionPeer::getPopularByTag($this->getRequestParameter('tag'), $this->getRequestParameter('page', 1)); 16 17 $this->setTitle('askeet! » question tagged '.Tag::normalize($this->getRequestParameter('tag'))); 16 18 } 17 19 … … 67 69 } 68 70 71 public function executeRemove() 72 { 73 // disable web debug toolbar 74 $this->getRequest()->setAttribute('disable_web_debug', true, 'debug/web'); 75 76 $this->question = QuestionPeer::getQuestionFromTitle($this->getRequestParameter('stripped_title')); 77 $this->forward404Unless($this->question); 78 79 // remove tag for this user and question 80 $user = $this->getUser()->getSubscriber(); 81 $tag = $this->getRequestParameter('tag'); 82 83 $user->removeTag($this->question, $tag); 84 85 $this->tags = $this->question->getTags(); 86 } 87 69 88 public function executePopular() 70 89 { 71 90 $this->tags = QuestionTagPeer::getPopularTags(40); 91 92 $this->setTitle('askeet! » popular tags'); 72 93 } 73 94 } trunk/frontend/modules/tag/config/view.yml
r34 r38 6 6 has_layout: off 7 7 slots: [] 8 9 removeSuccess: 10 has_layout: off 11 slots: [] trunk/frontend/modules/tag/templates/_question_tags.php
r32 r38 1 <?php foreach($tags as $tag): ?> 2 <li><?php echo link_to($tag, '@tag?tag='.$tag, 'rel=tag') ?></li> 3 <?php endforeach ?> 1 <?php use_helper('Javascript') ?> 2 3 <?php if ($user->isAuthenticated()): ?> 4 <?php $user_tags = $user->getSubscriber()->getTagsFor($question) ?> 5 <ul> 6 <?php foreach ($question->getPopularTags(20) as $tag => $count): ?> 7 <li> 8 <?php if (isset($user_tags[$tag])): ?> 9 <?php echo link_to($user_tags[$tag], '@tag?tag='.$tag, 'rel=tag') ?> 10 <?php echo link_to_remote('[x]', array( 11 'url' => '@tag_remove?stripped_title='.$question->getStrippedTitle().'&tag='.$tag, 12 'update' => 'question_tags', 13 'loading' => "Element.show('indicator')", 14 'complete' => "Element.hide('indicator');".visual_effect('highlight', 'question_tags'), 15 )) ?> 16 <?php else: ?> 17 <?php echo link_to($tag, '@tag?tag='.$tag, 'rel=tag') ?> 18 <?php endif ?> 19 </li> 20 <?php endforeach ?> 21 </ul> 22 <?php else: ?> 23 <?php echo include_partial('tag/tag_cloud', array('tags' => QuestionTagPeer::getPopularTagsFor($question))) ?> 24 <?php endif ?> trunk/frontend/modules/tag/templates/popularSuccess.php
r34 r38 1 <h2>Popular tags</h2> 2 <ul id="tag_cloud"> 3 <?php foreach($tags as $tag => $count): ?> 4 <li class="tag_popularity_<?php echo $count ?>"><?php echo link_to($tag, '@tag?tag='.$tag, 'rel=tag') ?></li> 5 <?php endforeach ?> 6 </ul> 1 <h1>Popular tags</h1> 2 3 <?php echo include_partial('tag/tag_cloud', array('tags' => $tags)) ?> trunk/frontend/modules/tag/templates/showSuccess.php
r31 r38 1 <h1>popular questions for tag '<?php echo $request->getParameter('tag') ?>'</h1> 2 1 3 <?php echo include_partial('question/question_list', array('question_pager' => $question_pager)) ?> 2 4 <?php echo pager_navigation($question_pager, '@tag?tag='.$request->getParameter('tag')) ?> trunk/frontend/modules/user/actions/actions.class.php
r29 r38 58 58 $this->answers = $this->subscriber->getAnswersJoinQuestion(); 59 59 $this->questions = $this->subscriber->getQuestions(); 60 61 $this->setTitle('askeet! » '.$this->subscriber->__toString().'\'s profile'); 60 62 } 61 63 62 64 public function executeLogin() 63 65 { 66 $this->getRequest()->setAttribute('newaccount', false); 67 64 68 if ($this->getRequest()->getMethod() != sfRequest::POST) 65 69 { 66 70 // display the form 67 $this->getRequest()->getParameterHolder()->set('referer', $this->getRequest()->getReferer()); 71 $this->setTitle('askeet! » sign in / register'); 72 $this->getRequest()->getAttributeHolder()->set('referer', $this->getRequest()->getReferer()); 68 73 return sfView::SUCCESS; 69 74 } … … 122 127 } 123 128 129 public function executeAdd() 130 { 131 // process only POST requests 132 if ($this->getRequest()->getMethod() == sfRequest::POST) 133 { 134 $user = new User(); 135 $user->setNickname($this->getRequestParameter('nickname')); 136 $user->setEmail($this->getRequestParameter('email')); 137 $user->setPassword($this->getRequestParameter('password')); 138 139 $user->save(); 140 141 $this->forward('user', 'login'); 142 } 143 144 $this->getRequest()->setAttribute('newaccount', true); 145 $this->forward('user', 'login'); 146 } 147 124 148 public function handleErrorLogin() 125 149 { 126 150 return sfView::SUCCESS; 151 } 152 153 public function handleErrorAdd() 154 { 155 $this->getRequest()->setAttribute('newaccount', true); 156 157 return array('user', 'loginSuccess'); 127 158 } 128 159 trunk/frontend/modules/user/templates/loginSuccess.php
r29 r38 1 <?php use_helper('Validation') ?> 2 <?php echo form_tag('user/login') ?> 3 1 <?php use_helpers('Validation', 'Javascript') ?> 2 3 <h1>sign in / register</h1> 4 5 <div class="in_form"> 6 <p>Registration is free and required only to create a new question or rate an answer.</p> 7 </div> 8 9 <?php echo form_tag($request->getAttribute('newaccount', false) ? '@add_account' : '@login', 'id=login_form class=form') ?> 10 4 11 <fieldset> 5 12 6 <div class="form-row"> 7 <?php echo form_error('nickname') ?> 8 <label for="nickname">nickname:</label> 9 <?php echo input_tag('nickname', $params->get('nickname')) ?> 13 <?php echo form_error('nickname') ?> 14 <label for="nickname">nickname:</label> 15 <?php echo input_tag('nickname', $params->get('nickname')) ?> 16 <br class="clearleft"/> 17 18 <?php echo form_error('password') ?> 19 <label for="password">password:</label> 20 <?php echo input_password_tag('password') ?> <?php echo link_to('forgot your password?', '@user_require_password') ?> 21 <br class="clearleft"/> 22 23 <div class="in_form"> 24 <?php echo checkbox_tag('new', 1, $request->getAttribute('newaccount', false) ? 1 : 0, array('onclick' => 'toggleForm()')) ?> 25 <label for="new" style="display: inline; float: none">click here to create a new account</label> 10 26 </div> 11 12 <div class="form-row"> 13 <?php echo form_error('password') ?> 14 <label for="password">password:</label> 15 <?php echo input_password_tag('password') ?> 27 <br class="clearleft"/> 28 29 <div id="new_account"<?php echo $request->getAttribute('newaccount', false) ? '' : ' style="display: none"' ?>> 30 31 <label for="password_bis">confirm your password:</label> 32 <?php echo input_password_tag('password_bis') ?> 33 <br class="clearleft"/> 34 35 <?php echo form_error('email') ?> 36 <label for="email">your email:</label> 37 <?php echo input_tag('email', $params->get('email')) ?> 38 <br class="clearleft"/> 39 <div class="small in_form">askeet will never disclose this address to a third party</div> 40 16 41 </div> 17 42 … … 19 44 20 45 <?php echo input_hidden_tag('referer', $request->getAttribute('referer')) ?> 21 <?php echo submit_tag('sign in') ?> 22 <?php echo link_to('Forgot your password?', '@user_require_password') ?> 46 <div class="right"> 47 <?php echo submit_tag('sign in') ?> 48 </div> 23 49 24 50 </form> 51 52 <?php echo javascript_tag("function toggleForm() 53 { 54 if (Element.visible('new_account')) 55 { 56 Effect.BlindUp('new_account'); 57 $('login_form').action = '".url_for('@login')."'; 58 } 59 else 60 { 61 Effect.BlindDown('new_account'); 62 $('login_form').action = '".url_for('@add_account')."'; 63 } 64 65 return false; 66 }") ?> trunk/frontend/modules/user/templates/passwordRequestSuccess.php
r29 r38 1 <h2>Receive your login details by email</h2> 2 <p>Did you forget your password? Enter your email no receive your login details:</p> 3 <?php echo form_tag('@user_require_password') ?> 1 <h1>Receive your login details by email</h1> 2 3 <div class="in_form"> 4 <p>Did you forget your password? 5 <br />Enter your email no receive your login details:</p> 6 </div> 7 8 <?php echo form_tag('@user_require_password', 'class=form') ?> 4 9 <?php echo form_error('email') ?> 5 10 <label for="email">email:</label> 6 <?php echo input_tag('email', $params->get('email'), 'style=width:150px') ?><br /> 7 <?php echo submit_tag('Send') ?> 11 <?php echo input_tag('email', $params->get('email'), 'style=width:150px') ?> 12 <br class="clearleft" /> 13 14 <div class="right"> 15 <?php echo submit_tag('send it') ?> 16 </div> 8 17 </form> trunk/frontend/modules/user/templates/showSuccess.php
r18 r38 1 <?php echo $subscriber?>1 <?php use_helpers('Date', 'Question', 'Text') ?> 2 2 3 <h 2>Interests</h2>3 <h1><?php echo $subscriber ?>'s profile</h1> 4 4 5 <ul> 5 <h3>tags</h3> 6 7 <ul id="question_tags"> 8 <?php echo include_partial('tag/tag_cloud', array('tags' => $subscriber->getPopularTags())) ?> 9 </ul> 10 11 <h3>contributions</h3> 12 13 <?php foreach ($answers as $answer): $question = $answer->getQuestion() ?> 14 15 <div class="vote_block" id="vote_<?php echo $answer->getId() ?>"> 16 <?php echo include_partial('answer/vote_user', array('answer' => $answer)) ?> 17 </div> 18 19 <div class="answer_body"> 20 <h2><?php echo link_to_question($answer->getQuestion()) ?></h2> 21 <?php echo $answer->getHtmlBody() ?> 22 <div class="subtitle">posted on <?php echo format_date($answer->getCreatedAt(), 'f') ?></div> 23 </div> 24 25 <br class="clearleft" /> 26 27 <?php endforeach ?> 28 29 <h3>questions</h3> 30 31 <?php foreach ($questions as $question): ?> 32 <div class="question"> 33 <div class="interested_block" id="block_<?php echo $question->getId() ?>"> 34 <?php echo include_partial('question/interested_user', array('question' => $question)) ?> 35 </div> 36 37 <h2><?php echo link_to_question($question) ?></h2> 38 39 <div class="subtitle">submitted on <?php echo format_date($question->getCreatedAt(), 'f') ?></div> 40 41 <div class="question_body"> 42 <?php echo truncate_text(strip_tags($question->getHtmlBody()), 200) ?> 43 <?php if ($question->getTags()): ?> 44 <div class="tags">tags: <?php echo tags_for_question($question) ?></div> 45 <?php endif ?> 46 </div> 47 </div> 48 <?php endforeach ?> 49 50 <h3>interests</h3> 51 52 <ul class="plain_list"> 6 53 <?php foreach ($interests as $interest): $question = $interest->getQuestion() ?> 7 <li><?php echo link_to($question->getTitle(), $question->getId()) ?></li>54 <li><?php echo link_to($question->getTitle(), '@question?stripped_title='.$question->getStrippedTitle()) ?></li> 8 55 <?php endforeach ?> 9 56 </ul> 10 11 <h2>Contributions</h2>12 13 <ul>14 <?php foreach ($answers as $answer): $question = $answer->getQuestion() ?>15 <li>16 <?php echo link_to($question->getTitle(), $question->getId()) ?><br />17 <?php echo $answer->getBody() ?>18 </li>19 <?php endforeach ?>20 </ul>21 22 <h2>Questions</h2>23 24 <ul>25 <?php foreach ($questions as $question): ?>26 <li><?php echo link_to($question->getTitle(), $question->getId()) ?></li>27 <?php endforeach ?>28 </ul>trunk/frontend/templates/layout.php
r29 r38 32 32 <li><?php echo link_to('sign in/register', '@login') ?></li> 33 33 <?php endif ?> 34 <li ><?php echo link_to('about', 'question/list') ?></li>34 <li class="last"><?php echo link_to('about', '@about') ?></li> 35 35 </ul> 36 <h1><?php echo link_to(image_tag('askeet_logo.gif', 'alt=askeet'), '@homepage') ?></h1> 36 <h1> 37 <?php echo link_to(image_tag('askeet_logo.gif', 'alt=askeet align=middle'), '@homepage') ?> 38 ask <strong>it</strong> - find <strong>it</strong> - answer <strong>it</strong> 39 </h1> 37 40 </div> 38 41 39 42 <div id="login" style="display: none"> 40 <h2>Please sign-in first</h2> 41 42 <?php echo link_to_function('cancel', visual_effect('blind_up', 'login', array('duration' => 0.5))) ?> 43 43 <h2>please sign-in first</h2> 44 44 <?php echo form_tag('@login', 'id=loginform') ?> 45 nickname: <?php echo input_tag('nickname') ?><br />46 password: <?php echo input_password_tag('password') ?><br />45 <label for="nickname">nickname:</label><?php echo input_tag('nickname') ?> 46 <label for="password">password:</label><?php echo input_password_tag('password') ?> 47 47 <?php echo input_hidden_tag('referer', $params->get('referer') ? $params->get('referer') : $request->getUri()) ?> 48 48 <?php echo submit_tag('login') ?> 49 <?php echo link_to ('Forgot your password?','@user_require_password') ?>49 <?php echo link_to_function('cancel', visual_effect('blind_up', 'login', array('duration' => 0.5))) ?> 50 50 </form> 51 51 </div> … … 58 58 59 59 <div id="content_bar"> 60 <div class="topbar"></div> 60 61 <?php echo $sidebar ?> 61 62 <div class="verticalalign"></div> … … 63 64 </div> 64 65 66 <div id="footer"> 67 powered by <?php echo link_to(image_tag('symfony.gif', 'align=absmiddle'), 'http://www.symfony-project.com/') ?> 68 </div> 69 65 70 </body> 66 71 </html> trunk/lib/model/QuestionPeer.php
r31 r38 36 36 $c = new Criteria(); 37 37 $c->addDescendingOrderByColumn(self::INTERESTED_USERS); 38 /* 39 if (1) 40 { 41 $c->addJoin(self::ID, QuestionTagPeer::QUESTION_ID, Criteria::LEFT_JOIN); 42 $c->add(QuestionTagPeer::NORMALIZED_TAG, 'perl'); 43 $c->setDistinct(); 44 } 45 */ 38 46 $pager->setCriteria($c); 39 47 $pager->setPage($page); trunk/lib/model/QuestionTagPeer.php
r34 r38 29 29 SELECT '.QuestionTagPeer::NORMALIZED_TAG.' AS tag, 30 30 COUNT('.QuestionTagPeer::NORMALIZED_TAG.') AS count 31 FROM '.QuestionTagPeer::TABLE_NAME.' 31 FROM '.QuestionTagPeer::TABLE_NAME; 32 33 if (1) 34 { 35 /* 36 $query .= ' 37 LEFT JOIN '.QuestionPeer::TABLE_NAME.' 38 GROUP BY '.QuestionTagPeer::NORMALIZED_TAG; 39 */ 40 } 41 42 $query .= ' 32 43 GROUP BY '.QuestionTagPeer::NORMALIZED_TAG.' 33 44 ORDER BY count DESC'; … … 51 62 return $tags; 52 63 } 64 65 public static function getPopularTagsFor($question, $max = 10) 66 { 67 $tags = array(); 68 69 $con = Propel::getConnection(); 70 71 // get popular tags 72 $query = ' 73 SELECT '.QuestionTagPeer::NORMALIZED_TAG.' AS tag, COUNT('.QuestionTagPeer::NORMALIZED_TAG.') AS count 74 FROM '.QuestionTagPeer::TABLE_NAME; 75 if ($question !== null) 76 { 77 $query .= ' WHERE '.QuestionTagPeer::QUESTION_ID.' = ?'; 78 } 79 $query .= ' 80 GROUP BY '.QuestionTagPeer::NORMALIZED_TAG.' 81 ORDER BY count DESC 82 '; 83 84 $stmt = $con->prepareStatement($query); 85 if ($question !== null) 86 { 87 $stmt->setInt(1, $question->getId()); 88 } 89 $stmt->setLimit($max); 90 $rs = $stmt->executeQuery(); 91 $max_popularity = 0; 92 while ($rs->next()) 93 { 94 if (!$max_popularity) 95 { 96 $max_popularity = $rs->getInt('count'); 97 } 98 99 $tags[$rs->getString('tag')] = floor(($rs->getInt('count') / $max_popularity * 3) + 1); 100 } 101 102 ksort($tags); 103 104 return $tags; 105 } 53 106 } 54 107 trunk/lib/model/User.php
r25 r38 19 19 public function __toString() 20 20 { 21 return $this->getFirstName().' '.$this->getLastName(); 21 if ($this->getLastName()) 22 { 23 return ucfirst(strtolower($this->getFirstName())).' '.strtoupper($this->getLastName()); 24 } 25 else 26 { 27 return $this->getNickname(); 28 } 22 29 } 23 30 … … 36 43 $this->setSha1Password(sha1($salt.$password)); 37 44 } 45 46 public function getTagsFor($question, $max = 10) 47 { 48 $tags = array(); 49 50 $con = Propel::getConnection(); 51 $query = ' 52 SELECT %s AS tag, %s AS raw_tag, COUNT(%s) AS count 53 FROM %s 54 WHERE %s = ? AND %s = ? 55 GROUP BY %s 56 ORDER BY count DESC 57 '; 58 59 $query = sprintf($query, 60 QuestionTagPeer::NORMALIZED_TAG, 61 QuestionTagPeer::TAG, 62 QuestionTagPeer::NORMALIZED_TAG, 63 QuestionTagPeer::TABLE_NAME, 64 QuestionTagPeer::QUESTION_ID, 65 QuestionTagPeer::USER_ID, 66 QuestionTagPeer::NORMALIZED_TAG 67 ); 68 69 $stmt = $con->prepareStatement($query); 70 $stmt->setInt(1, $question->getId()); 71 $stmt->setInt(2, $this->getId()); 72 $stmt->setLimit($max); 73 $rs = $stmt->executeQuery(); 74 while ($rs->next()) 75 { 76 $tags[$rs->getString('tag')] = $rs->getString('raw_tag'); 77 } 78 79 return $tags; 80 } 81 82 public function removeTag($question, $tag) 83 { 84 $c = new Criteria(); 85 $c->add(QuestionTagPeer::QUESTION_ID, $question->getId()); 86 $c->add(QuestionTagPeer::USER_ID, $this->getId()); 87 $c->add(QuestionTagPeer::NORMALIZED_TAG, Tag::normalize($tag)); 88 89 QuestionTagPeer::doDelete($c); 90 } 91 92 public function getPopularTags($max = 40) 93 { 94 $tags = array(); 95 96 $con = Propel::getConnection(); 97 98 // get popular tags 99 $query = ' 100 SELECT '.QuestionTagPeer::NORMALIZED_TAG.' AS tag, COUNT('.QuestionTagPeer::NORMALIZED_TAG.') AS count 101 FROM '.QuestionTagPeer::TABLE_NAME.' 102 WHERE '.QuestionTagPeer::USER_ID.' = ? 103 GROUP BY '.QuestionTagPeer::NORMALIZED_TAG.' 104 ORDER BY count DESC 105 '; 106 107 $stmt = $con->prepareStatement($query); 108 $stmt->setInt(1, $this->getId()); 109 $stmt->setLimit($max); 110 $rs = $stmt->executeQuery(); 111 $max_popularity = 0; 112 while ($rs->next()) 113 { 114 if (!$max_popularity) 115 { 116 $max_popularity = $rs->getInt('count'); 117 } 118 119 $tags[$rs->getString('tag')] = floor(($rs->getInt('count') / $max_popularity * 3) + 1); 120 } 121 122 ksort($tags); 123 124 return $tags; 125 } 38 126 } 39 127 trunk/web/css/layout.css
r8 r38 4 4 { 5 5 float: left; 6 width: 530px;6 width: 480px; 7 7 margin-right: 10px; 8 8 } … … 10 10 { 11 11 float: left; 12 width: 240px; 12 width: 220px; 13 padding:10px; 13 14 } 14 15 /* Start Mac IE5 filter \*/ trunk/web/css/main.css
r34 r38 5 5 a:link, a:visited 6 6 { 7 text-decoration: underline; 8 color:#9C4797; 9 } 10 11 a:hover 12 { 7 13 text-decoration: none; 8 color:#6E3291;9 }10 11 a:hover12 {13 text-decoration: underline;14 14 } 15 15 … … 20 20 font-family: Arial, sans-serif; 21 21 font-size: 12px; 22 background -color: #fff;22 background: #F2ECF2; 23 23 } 24 24 … … 32 32 margin-left: auto; 33 33 margin-right: auto; 34 margin-bottom: 10px; 34 35 text-align: left; 35 36 width: 780px; 36 height: 46px; 37 height: 102px; 38 background:url(/images/header_background.gif) no-repeat top left; 39 } 40 41 div#header h1 42 { 43 padding:30px; 44 font-family: Verdana, sans-serif; 45 font-size: 17px; 46 font-weight: bold; 47 color: #c8c8c8; 48 } 49 50 div#header h1 strong 51 { 52 color: #999; 37 53 } 38 54 … … 42 58 display:inline; 43 59 float:right; 60 padding: 5px 5px; 61 background: #d8732f url(/images/menu_left.gif) no-repeat left bottom; 62 font-size: 11px; 44 63 } 45 64 … … 54 73 padding: 0 7px; 55 74 font-weight: bold; 56 border-right: solid 1px # 0066CC;75 border-right: solid 1px #fff; 57 76 } 58 77 … … 78 97 div#header li :link, div#header li :visited 79 98 { 80 color:# 0066CC;99 color:#fff; 81 100 } 82 101 83 102 div#content_main 84 103 { 85 background-color:white; 104 background-color: white; 105 padding:25px; 86 106 } 87 107 88 108 div#content_main h1 89 109 { 90 padding:5px;110 margin: -25px; 91 111 font-size:14px; 92 margin-bottom:10px; 93 color: #B59D7A; 94 border-bottom: 1px solid #B59D7A; 112 font-family:Verdana, Arial, sans-serif; 113 padding:20px 25px 40px 25px; 114 color: #7E7E7E; 115 background: url(/images/content_top.gif) no-repeat top left; 95 116 } 96 117 … … 98 119 { 99 120 font-size:14px; 121 } 122 123 div#content_main h3 124 { 125 font-size:14px; 126 padding: 10px 0; 100 127 } 101 128 … … 109 136 div#content_main .interested_mark 110 137 { 111 font-size: 2em; 112 font-weight: bold; 113 width: 30px; 114 height: 30px; 115 background-color: #FFE56F; 116 border: 1px solid #ddd; 138 font-size: 2em; 139 font-weight: bold; 140 width: 40px; 141 height: 26px; 142 background: url(/images/interested_bubble.gif) no-repeat top left; 143 text-align: right; 144 margin-left:10px; 145 color: #fff; 146 } 147 148 div#content_main .few_interests 149 { 150 font-size: 20px; 151 line-height: 26px; 152 margin-right:10px; 153 } 154 155 div#content_main .some_interests 156 { 157 font-size: 16px; 158 line-height: 27px; 159 } 160 161 div#content_main .many_interests 162 { 163 font-size: 13px; 164 line-height: 25px; 165 } 166 167 div#content_main .interested_link 168 { 117 169 text-align: center; 118 margin-left:10px; 170 font-size: 9px; 171 } 172 173 div#content_main .interested_link :link, div#content_main .interested_link :visited 174 { 175 color: #f3b335; 176 } 177 178 div#content_main .question 179 { 180 margin-bottom: 25px; 119 181 } 120 182 … … 122 184 { 123 185 margin-top:6px; 186 padding-left:70px; 187 } 188 189 div#content_main .question_body li 190 { 191 list-style-position: outside; 192 } 193 194 .vote_block 195 { 196 width: 70px; 197 float: left; 198 } 199 200 .answer 201 { 202 padding-bottom: 10px; 203 } 204 205 206 div#content_main .vote_up_mark 207 { 208 display:inline; 209 float:left; 210 width:35px; 211 text-align:center; 212 font-size: 10px; 213 } 214 215 div#content_main .vote_down_mark 216 { 217 display:inline; 218 float:left; 219 width:35px; 220 text-align:center; 221 font-size: 10px; 222 } 223 224 div#content_main .answer_body 225 { 226 padding-left:80px; 227 } 228 229 div#content_main .answer_body ul 230 { 231 margin-left: 15px; 124 232 } 125 233 … … 133 241 } 134 242 243 div#content_main p 244 { 245 padding-bottom: 10px; 246 } 247 248 div#content_bar 249 { 250 background-color: white; 251 } 252 253 div#content_bar div.topbar 254 { 255 background:url(/images/side_top.gif) no-repeat top left; 256 height:15px; 257 margin:-10px; 258 } 259 260 div#content_bar li 261 { 262 list-style:none; 263 } 264 265 div#content_bar h2 266 { 267 font-size:14px; 268 font-family:Verdana, Arial, sans-serif; 269 padding:5px 0; 270 color: #7E7E7E; 271 } 272 135 273 div#footer 136 274 { 137 padding-top: 5px;138 275 margin-left: auto; 139 276 margin-right: auto; 140 text-align: left; 141 width: 780px; 142 background-color: #bbb; 277 height:80px; 278 padding-top:40px; 279 background:url(/images/footer_background.gif) no-repeat top left; 280 text-align: right; 143 281 } 144 282 145 283 .form_error 146 284 { 147 color: #f00; 285 padding-left: 85px; 286 color: #d8732f; 148 287 } 149 288 … … 159 298 } 160 299 300 .subtitle 301 { 302 color: #9c4797; 303 font-size: 11px; 304 } 305 306 .subtitle :link, .subtitle :visited 307 { 308 font-weight: bold; 309 } 310 311 .clearleft 312 { 313 clear: left; 314 } 315 316 .form input 317 { 318 display: block; 319 float: left; 320 margin-bottom: 10px; 321 } 322 323 .form .right input 324 { 325 display: inline; 326 float: none; 327 text-align: right; 328 } 329 330 .form label 331 { 332 display: block; 333 width: 75px; 334 padding-right: 10px; 335 margin-bottom: 10px; 336 float: left; 337 text-align: right; 338 } 339 340 fieldset 341 { 342 border: none; 343 } 344 345 #login 346 { 347 margin-bottom: 10px; 348 } 349 350 #login h2 351 { 352 font-size: 14px; 353 margin-bottom: 5px; 354 } 355 161 356 ul#tag_cloud 162 357 { 163 358 list-style: none; 164 359 } 165 360 166 361 ul#tag_cloud li 167 362 { 168 363 list-style: none; 169 364 display: inline; 170 } 171 365 padding: 5px; 366 } 367 172 368 ul#tag_cloud li.tag_popularity_1 173 369 { 174 370 font-size: 60%; 175 371 } 176 372 177 373 ul#tag_cloud li.tag_popularity_2 178 374 { 179 375 font-size: 100%; 180 376 } 181 377 182 378 ul#tag_cloud li.tag_popularity_3 183 379 { 184 380 font-size: 130%; 185 381 } 186 382 187 383 ul#tag_cloud li.tag_popularity_4 188 384 { 189 385 font-size: 160%; 190 386 } 387 388 #answers 389 { 390 padding-top: 10px; 391 } 392 393 #rss_links li 394 { 395 padding: 0 0 5px 5px; 396 } 397 398 #add_question 399 { 400 padding: 10px; 401 margin: 7px 0 5px 0; 402 text-align: center; 403 font-size: 16px; 404 font-weight: bold; 405 background: url(/images/add_background.gif) no-repeat left 7px; 406 } 407 408 #add_question :link, #add_question :visited 409 { 410 color: #fff; 411 } 412 413 .tags 414 { 415 color: #aaa; 416 } 417 418 .right 419 { 420 text-align: right; 421 } 422 423 .small 424 { 425 font-size: 10px; 426 } 427 428 .in_form 429 { 430 padding-left: 85px; 431 } 432 433 ul.plain_list 434 { 435 margin-left: 15px; 436 }
