Yii Framework Forum: Suggestion for the website: only allow down votes with a comment - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Suggestion for the website: only allow down votes with a comment Rate Topic: -----

#1 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 664
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 06 October 2011 - 07:49 AM

It's common to see extensions with down votes but without any comments supporting it.
I believe that comments are essential to make a proper contribution to the community in this case. Without it, no criticism is constructive.

Reference: http://www.yiiframew...nsion/noscript/

I suggest that a comment should be made mandatory for any down vote.
0

#2 User is offline   Trejder 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,193
  • Joined: 06-October 10
  • Location:Southern Poland

Posted 12 April 2013 - 03:10 AM

I agree with you, but I don't think you're going to force any changes here.

Take a look at StackOverflow. They've had the same issue there and all ended up with suggesting a downvoting user, that he or she should consider adding a comment aside his or her downvote. No obligatory was ever introduced.
Proud Cookbook author, though still learning powerful Yii! :] See my generic profile for more information. Cheers!
0

#3 User is offline   softark 

  • Keep It Simple
  • Yii
  • Group: Moderators
  • Posts: 2,045
  • Joined: 16-February 11
  • Location:Japan

Posted 12 April 2013 - 05:19 AM

One solution to the problem of down voting might be removing it at all. Probably we can do without it.

As you may agree, our forum has been much more comfortable since the down voting functionality had been removed.
0

#4 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 12 April 2013 - 08:01 AM

I truly hate the way StackOverflow works with regards to downvoting.

The forums at Coursera allows that too..

However, I've got my secret weapon. :)

Stylish Chrome Extension!

I added a small script which turns the red downvotes into green :D
"Less noise - more signal"
0

#5 User is offline   copist 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 16-October 13

Posted 17 October 2013 - 06:37 PM

Hello

First. I think the using of jQuery is the reason you have down votes for http://www.yiiframew...nsion/noscript/

This is the same solution

<script type="text/javascript"><!--
document.write('<!' + '--');
//--></script>
<noscript>
	<div id="js-info">
		Javascript is off
	</div>
</noscript>
<script type="text/javascript"><!--
document.write('--'+'>');
//--></script>


Explanation:
If the javascript if OFF, visitor will get message
<noscript>
	<div id="js-info">
		Javascript is off
	</div>
</noscript>


If the javascript if ON, visitor will not get message, because Javascript will write comments around message
<!--<noscript>
	<div id="js-info">
		Javascript is off
	</div>
</noscript>-->


Second. Your CSS file has .noscript { ... } rule that not used
And some browsers could not apply rule noscript div#js-info { ... }, Opera < 10 for example





protected/extensions/noscript/assets/XNoScriptMessage.css
/* 
    Document   : jgui-noscript
    Created on : 07.09.2010, 10:34:42
    Author     : bk016474
    Description:
        styling for noscript tag.
*/

div#no-javascript {
    display:block;
    padding: 10px 20px;
    background: #fee;
    color: #800;
    margin: 0 0 10px 0;
    border-top:3px solid #c30;
    border-bottom:3px solid #c30;
    font-weight:bold;
}



protected/extensions/noscript/XNoScriptMessage.php
<?php
/**
 * XNoScriptMessage class file.
 *
 * @author Stefan Volkmar <volkmar_yii@email.de>
 * @version 1.0
 * @license BSD
 */

/** 
 *
 * This widget create a message if javascript isn't enabled in the browser
 *
 * @author Stefan Volkmar <volkmar_yii@email.de>
 */

class XNoScriptMessage extends CWidget
{
	/**
	 * @var mixed the CSS file used for the widget.
	 * If false, the default CSS file will be used. Otherwise, the specified CSS file
	 * will be included when using this widget.
	 */
	public $cssFile=false;

	/**
	 * Initializes the widget.
	 * This method registers all needed client scripts 
	 */
	public function init()
	{
		$baseUrl = CHtml::asset(dirname(__FILE__).DIRECTORY_SEPARATOR.'assets');
		$cssUrl = ($this->cssFile!==false) ? $this->cssFile : $baseUrl.'/XNoScriptMessage.css';
		Yii::app()->getClientScript()->registerCssFile($cssUrl);
		echo <<<HTML
<script type="text/javascript"><!--
document.write('<!' + '--');
//--></script>
<noscript>
	<div id="no-javascript">
HTML;
	}

	/**
	 * Renders the close tag of the element.
	 */
	public function run()
	{
		echo <<<HTML
	</div>
</noscript>
<script type="text/javascript"><!--
document.write('--'+'>');
//--></script>
HTML;
	}
}


Here my version of extension
Attached File  noscript_1.1.zip (1.31K)
Number of downloads: 1
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users