Forum Replies Created

Viewing 14 replies - 31 through 44 (of 44 total)
  • Forum: Plugins
    In reply to: [FL3R FeelBox] loads error
    Plugin Author FL3R

    (@armandofiore)

    Thanks!
    Maybe the problem is due to your server. Perhaps with Xampp the error does not recur.

    Forum: Plugins
    In reply to: [FL3R FeelBox] loads error
    Plugin Author FL3R

    (@armandofiore)

    Do you have the opportunity to test the site offline? For example using Wamp?

    Plugin Author FL3R

    (@armandofiore)

    Hello lolhospital.
    For now, you can do this by editing feelbox.php rows 104/108, in the next few days I hope to implement this option.

    Forum: Plugins
    In reply to: [FL3R FeelBox] Size options
    Plugin Author FL3R

    (@armandofiore)

    This is the 3.2 FeelBox CSS:

    @font-face {
    	font-family: 'robotomedium';
    	src: url('../webfont/roboto-medium-webfont.eot');
    	src: url('../webfont/roboto-medium-webfont.eot?#iefix') format('embedded-opentype'),  url('../webfont/roboto-medium-webfont.woff2') format('woff2'),  url('../webfont/roboto-medium-webfont.woff') format('woff'),  url('../webfont/roboto-medium-webfont.ttf') format('truetype'),  url('../webfont/roboto-medium-webfont.svg#robotomedium') format('svg');
    	font-weight: normal;
    	font-style: normal;
    }
    #feelbox-widget {
    	font-family: 'robotomedium' !important;
    	text-decoration: none !important;
    }
    #feelbox-widget a {
    	text-decoration: none !important;
    	color: #333;
    }
    #feelbox-widget {
    	width: 100%;
    	line-height: 1em;
    	clear: both;
    	position: relative;
    	margin: 0 auto;
    }
    #feelbox-widget #lyr1 {
    	position: absolute;
    	background-color: #fff;
    	width: 100%;
    	height: 100%;
    	z-index: 10;
    	opacity: 0.85;
    	visibility: hidden;
    }
    #feelbox-widget #lyr2 {
    	position: absolute;
    	z-index: 20;
    	width: 100%;
    	height: 100%;
    	top: 10px;
    	text-align: center;
    	visibility: hidden;
    }
    #feelbox-widget #lyr2 #feelbox-bold {
    	font-weight: bold;
    	font-size: 1.4em;
    	line-height: 1.2em;
    	margin: 10px 0px 20px 0px;
    }
    #feelbox-widget #lyr2 #feelbox-s {
    }
    #feelbox-widget #total, #feelbox-widget #voted {
    	display: none;
    	text-decoration: none !important;
    }
    #feelbox-widget.voted li {
    	cursor: pointer;
    	text-decoration: none !important;
    }
    #feelbox-widget.voted li a {
    	cursor: pointer;
    	text-decoration: none !important;
    }
    #feelbox-widget .count {
    	visibility: hidden; /* position: absolute; */
    }
    #feelbox-widget #hdr {
    	background-color: #fff;
    	color: #333;
    	font-size: 1.2 em;
    	min-height: 30px;
    	border-radius: 0px !important;
    }
    #feelbox-widget #hdr #title {
    	float: right;
    	padding-right: 6px;
    }
    #feelbox-widget #hdr #title span {
    	background: url("../images/logo.png") no-repeat scroll 0 0 transparent;
    	display: block;
    	float: left;
    	margin-right: 8px;
    	margin-top: 2px;
    	min-height: 24px;
    	text-indent: -99999px;
    	width: 27px;
    }
    #paypal span {
    	background: url("../images/donate-paypal-frontend.png") no-repeat scroll 0 0 transparent;
    	display: block;
    	float: right;
    	padding-right: 4px;
    	margin-top: 2px;
    	min-height: 24px;
    	width: 24px;
    	color: transparent !important;
    }
    #feelbox-widget #hdr #s { /* padding-left: 6px; padding-top: 6px; */
    	display: block;
    	margin-left: 6px;
    	padding-top: 6px;
    	background: transparent;
    	width: auto;
    	color: inherit;
    }
    #feelbox-widget #bd {
    	position: relative;
    	clear: both;
    	margin-top: 0;
    	background-color: #fff;
    }
    #feelbox-widget #bd #loading {
    	top: 1px;
    	background: url("../images/loading.gif") center center no-repeat #fff;
    	height: 100%;
    	opacity: 0.9;
    	position: absolute;
    	text-align: center;
    	width: 100%;
    	z-index: 1;
    }
    #feelbox-widget ul {
    	width: 100%;
    	padding: 0px;
    	margin: 8px auto 0px auto;
    	text-align: center;
    }
    #feelbox-widget ul li {
    	width: 15%;
    	cursor: pointer;
    	display: inline-block;
    	padding: 0;
    	text-align: left;
    	zoom: 1;
    *display: inline;
    	margin: 0;
    }
    #feelbox-widget ul li #feelbox-cell {
    	margin: 5px 2px;
    	/*height: 75px;*/
    	height: 100%;
    	vertical-align: middle;
    	-moz-box-orient: vertical;
    	text-align: center;
    	position: relative;
    }
    #feelbox-widget ul li #feelbox-cell div {
    	height: 100%;
    	width: 100%;
    	margin: 0;
    	/* line-height: 1.25em; */
    }
    #feelbox-widget ul li #feelbox-cell span {
    	display: block;
    }
    #feelbox-widget ul li #feelbox-cell span.m {
    	font-size: 1.2em;
    	line-height: 0px;
    	padding-top: 0px;
    	text-transform: uppercase;
    	color: #333;
    	visibility: hidden;
    }
    #feelbox-widget ul li #feelbox-cell span.p {
    	font-size: 2.4em;
    	line-height: 28px;
    }
    #feelbox-widget ul li #feelbox-cell span.count {
    	position: absolute;
    	visibility: hidden;
    }
    .clearfix {
    	clear: both;
    }
    #feelbox-widget ul li #feelbox-cell .vftthx, #feelbox-widget ul li #feelbox-cell .vft.vftchoose {
    	font-size: 0.75em;
    	float: left;
    	width: 100%;
    	color: #666;
    }
    #sparkbardiv {
    	width: 98%;
    	margin: 0 auto;
    }
    .sparkbar {
    	height: 10px;
    }
    .sparkbar div {
    	float: left;
    	height: 5px;
    }
    .sparkbar div {
    	float: left;
    	height: 10px;
    	margin-left: -1px;
    }
    /* fascinated */
    #mdr-e1 {
    	background-image: url(../images/fascinated.png);
    	background-repeat: no-repeat;
    	background-position: top;
    	background-size: contain;
    }
    #mdr-e1:hover {
    	background-image: url(../images/fascinated.png);
    	background-repeat: no-repeat;
    	background-position: top;
    	background-size: contain;
    }
    #mdr-e1 .percent {
    	color: #bdc3c7;
    }
    .spark1 {
    	background-color: #bdc3c7;
    }
    /* happy */
    #mdr-e2 {
    	background-image: url(../images/happy.png);
    	background-repeat: no-repeat;
    	background-position: top;
    	background-size: contain;
    }
    #mdr-e2 .percent {
    	color: #f1c40f;
    }
    .spark2 {
    	background-color: #f1c40f;
    }
    /* sad */
    #mdr-e3 {
    	background-image: url(../images/sad.png);
    	background-repeat: no-repeat;
    	background-position: top;
    	background-size: contain;
    }
    #mdr-e3 .percent {
    	color: #27ae60;
    }
    .spark3 {
    	background-color: #27ae60;
    }
    /* angry */
    #mdr-e4 {
    	background-image: url(../images/angry.png);
    	background-repeat: no-repeat;
    	background-position: top;
    	background-size: contain;
    }
    #mdr-e4 .percent {
    	color: #e74c3c;
    }
    .spark4 {
    	background-color: #e74c3c;
    }
    /* bored */
    #mdr-e5 {
    	background-image: url(../images/bored.png);
    	background-repeat: no-repeat;
    	background-position: top;
    	background-size: contain;
    }
    #mdr-e5 .percent {
    	color: #3498db;
    }
    .spark5 {
    	background-color: #3498db;
    }
    /* afraid */
    #mdr-e6 {
    	background-image: url(../images/afraid.png);
    	background-repeat: no-repeat;
    	background-position: top;
    	background-size: contain;
    }
    #mdr-e6 .percent {
    	color: #b967da;
    }
    .spark6 {
    	background-color: #b967da;
    }
    .p-0 {
    /*	color: #CCCCCC; */
    }
    #feelbox-widget p {
    	margin: 0;
    	padding: 0;
    }
    #feelbox-widget br {
    	display: none;
    }
    #feelbox-twitter-button {
    	background-image: url(../images/share-twitter.png);
    	background-repeat: no-repeat;
    	background-position: center;
    	background-size: contain;
    	font-size: 2em;
    	color: transparent !important;
    	margin: 4px;
    	text-decoration: none !important;
    }
    #feelbox-facebook-button{
    	background-image: url(../images/share-facebook.png);
    	background-repeat: no-repeat;
    	background-position: center;
    	background-size: contain;
    	font-size: 2em;
    	color: transparent !important;
    	margin: 4px;
    	text-decoration: none !important;
    }
    #feelbox-googleplus-button {
    	background-image: url(../images/share-googleplus.png);
    	background-repeat: no-repeat;
    	background-position: center;
    	background-size: contain;
    	font-size: 2em;
    	color: transparent !important;
    	margin: 4px;
    	text-decoration: none !important;
    }
    #feelbox-twitter-button a {
    	outline: none !important;
    }
    #feelbox-facebook-button a {
    	outline: none !important;
    }
    #feelbox-googleplus-button a {
    	outline: none !important;
    }
    .percent {
    	margin-top: 100%;
    }
    .vftthx {
    	position: absolute;
    }
    #feelbox-social-media, a#feelbox-social-media {
    	text-decoration: none !important;
    }
    a#clr {
    	text-decoration: none !important;
    }
    .entry-content a {
    	border-bottom: 0px !important;
    }
    #feelbox-ifeel {
    }
    div#feelbox-s {
    	line-height: 24px;
    }
    
    /* fl3r: mobile <500px */
    
    @media (max-width: 500px) {
    div#feelbox-s {
    	font-size: 0.75em;
    }
    #feelbox-widget #hdr #title span {
    	background: url("../images/logo.png") no-repeat scroll 0 0 transparent;
    	display: block;
    	float: left;
    	margin-right: 8px;
    	margin-top: 2px;
    	min-height: 24px;
    	text-indent: -99999px;
    	width: 27px;
    }
    #feelbox-twitter-button {
    	background-image: url(../images/share-twitter.png);
    	background-repeat: no-repeat;
    	background-position: center;
    	background-size: contain;
    	font-size: 1.5em;
    	color: transparent !important;
    	text-decoration: none !important;
    }
    #feelbox-facebook-button{
    	background-image: url(../images/share-facebook.png);
    	background-repeat: no-repeat;
    	background-position: center;
    	background-size: contain;
    	font-size: 1.5em;
    	color: transparent !important;
    	text-decoration: none !important;
    }
    #feelbox-googleplus-button {
    	background-image: url(../images/share-googleplus.png);
    	background-repeat: no-repeat;
    	background-position: center;
    	background-size: contain;
    	font-size: 1.5em;
    	color: transparent !important;
    	text-decoration: none !important;
    }
    }
    
    /* fl3r: mobile <400px */
    
    @media (max-width: 400px) {
    #feelbox-widget.small ul li #feelbox-cell span.m {
    }
    #feelbox-widget.small ul li #feelbox-cell span.percent {
    	font-size: 0.75em;
    }
    #feelbox-widget.small ul li #feelbox-cell .vftthx {
    }
    }

    For the infinite loading try to disable, if you can, all the other plugins.

    Plugin Author FL3R

    (@armandofiore)

    With this code, you must disable the “Automatic display” option in the Settings page, otherwise it will cause a double view of plugins on individual pages post.

    Forum: Plugins
    In reply to: [FL3R FeelBox] Size options
    Plugin Author FL3R

    (@armandofiore)

    In Custom CSS settings you can edit all CSS rules of FeelBox.
    #feelbox-widget set the width (100%).

    Plugin Author FL3R

    (@armandofiore)

    Yes, the code should be more or less there.

    I am experiencing the display on the home page, but I did it in half: if you replace the plugin file with this at the bottom, the FeelBox is actually also displayed on the home page under each post, but reads the ID of the home page and not those of the individual posts. For now you have to settle for this, if you like to experiment I leave you the code:

    feelbox.php

    <?php
    /*
    Plugin Name: FL3R FeelBox
    Plugin URI: https://www.ads-software.com/plugins/fl3r-feelbox/
    Description: Adds a one-click real-time mood rating widget to all of your posts.
    Version: 3.1
    Author: Armando "FL3R" Fiore
    E-Mail: [email protected]
    Author URI: https://www.twitter.com/Armando_Fiore
    License: Freeware, no warranty. Modifications not allowed.
    */
    
    load_plugin_textdomain('fl3r-feelbox', NULL, dirname(plugin_basename(__FILE__)) . "/languages");
    
    define('feelbox_PLUGIN_DIR', plugins_url(basename(dirname(__FILE__))));
    
    global $lydl_db_version;
    global $moods;
    global $nothumb;
    
    $lydl_db_version = "0.6";
    $moods = array(1 => "Fascinated", 2 => "Happy", 3 => "Sad", 4 => "Angry", 5 => "Bored", 6 => "Afraid");
    $cookie_duration = 14;
    $nothumb = feelbox_PLUGIN_DIR . '/no_thumb.jpg';
    
    require_once( 'feelbox-admin.php' );
    
    function feelbox_init() {
    
    	$options = get_option('feelbox_wp_options');
    	$customCSS = @file_get_contents(feelbox_CSS_FILE);
    
    	if ( !$customCSS ) {
    		$defaultCSS = @file_get_contents(feelbox_CSS_DEFAULT);
    		@file_put_contents(feelbox_CSS_FILE, strip_tags($defaultCSS) );
    	}
    
    	// embed the javascript file that makes the AJAX request
    	if ( is_admin() ) {
    		wp_enqueue_script('jquery');
    	} else {
    
    		if ( $options['bypasscss'] != 'on' ) {
    			wp_register_style('feelbox-default-style', feelbox_PLUGIN_DIR . '/css/style.css' );
    			wp_enqueue_style('feelbox-default-style');
    
    			if ( $customCSS ) {
    				wp_register_style('feelbox-custom-style', feelbox_CSS_URI );
    				wp_enqueue_style('feelbox-custom-style');
    			}
    		}
    
    		wp_enqueue_script( 'my-ajax-request', feelbox_PLUGIN_DIR . '/js/ajax.js', array( 'jquery' ) );
    		wp_register_script( 'feelbox-remote', feelbox_PLUGIN_DIR . '/js/easyXDM.min.js' );
    		wp_enqueue_script( 'feelbox-remote' );
    	}
    
    	if (!$options) {
    		feelbox_add_default_options();
    	} else {
    		if ($options['showinpostsondefault'] == 'on') {
    			add_filter('the_content', 'add_feelbox_widget_to_posts');
    		}
    		if (empty($options['showtweetfollowup'])) {
    			$temp = array(
    				'showtweetfollowup' => 'on'
    			);
    			update_option('feelbox_wp_options', $temp);
    		}
    	}
    }
    
    function feelbox_add_default_options() {
    	$temp = array(
    		'showsparkbar' => 'on',
    		'showinpostsondefault' => 'on',
    		'showtweetfollowup' => 'on',
    		'sortmoods' => 'off'
    	);
    
    	update_option('feelbox_wp_options', $temp);
    }
    
    function feelbox_get_widget_html() {
    	global $wpdb;
    	global $post;
    	global $moods;
    
    	{
    		$post_id = (int)$post->ID;
    		$obj = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}lydl_posts WHERE ID=" . $post_id, ARRAY_A);
    		$sum = $obj["emotion_1"]+$obj["emotion_2"]+$obj["emotion_3"]+$obj["emotion_4"]+$obj["emotion_5"]+$obj["emotion_6"];		
    
    		$widgethtml = '<div id="feelbox-widget" class="voted"><div id="lyr2"><div id="feelbox-bold">Share your vote!</div>
    
    		<BR>
    		<BR>
    		<div>
    
    		<a id="feelbox-twitter-button" class="socialmedia" href="https://twitter.com/share?url=' . get_permalink() . '&related=Armando_Fiore&hashtags=FL3RFeelBox&text=I%20just%20voted%20on%20the%20post%20\"' . get_the_title() . '\"">share</a>
    
    		<a id="feelbox-facebook-button" class="socialmedia" href="https://www.facebook.com/sharer/sharer.php?s=100&p[title]=' . get_the_title() . '&p[url]=' . get_permalink() . '&p[summary]=I+just+voted+on+this+post+with+feelbox!">share</a>
    
    		<a id="feelbox-googleplus-button" class="socialmedia" href="https://plus.google.com/share?url=' . get_the_title() . '&p[url]=' . get_permalink() . '&p[summary]=I+just+voted+on+this+post+with+feelbox!">share</a>
    
    </div>
    
    <div id="feelbox-s"><a href="#" id="clr">No, thanks.</a></div></div>
    
    			<div id="lyr1"></div>
    			<div id="hdr">
    			 <!--
    			<div id="paypal"><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2PCZCTKZ86ANA" title="Donate with PayPal"><span> </span></a></div>
    			--!>
    				<div id="title">
    					<a target="_blank" href="https://www.ads-software.com/plugins/fl3r-feelbox/" title="FL3R FeelBox on www.ads-software.com"><span> </span></a>
    				</div>
    
    				<div id="feelbox-s">
    
    How this post make you feel?
    
    				</div>
    
    			</div>
    			<span id="total"></span><span id="voted"></span>
    			<div id="bd" style="">
    				<div id="loading" style="display: block;"></div>
    
    				<div id="sparkbardiv" style="">
    					<div class="sparkbar" style="">
    					</div>
    				</div>
    
    				<ul>
    					<li id="mdr-e1"><div id="feelbox-cell"><div>
    						<span class="m">' . $moods[1] .'</span>
    						<span class="count"></span><span class="percent"></span>
    					</div></div></li>
    					<li id="mdr-e2"><div id="feelbox-cell"><div>
    						<span class="m">' . $moods[2] . '</span>
    						<span class="count"></span><span class="percent"></span>
    					</div></div></li>
    					<li id="mdr-e3"><div id="feelbox-cell"><div>
    						<span class="m">' . $moods[3] .'</span>
    						<span class="count"></span><span class="percent"></span>
    					</div></div></li>
    					<li id="mdr-e4"><div id="feelbox-cell"><div>
    						<span class="m">' . $moods[4] . '</span>
    						<span class="count"></span><span class="percent"></span>
    					</div></div></li>
    					<li id="mdr-e5"><div id="feelbox-cell"><div>
    						<span class="m">' . $moods[5] . '</span>
    						<span class="count"></span><span class="percent"></span>
    					</div></div></li>
    					<li id="mdr-e6"><div id="feelbox-cell"><div>
    						<span class="m">' . $moods[6] . '</span>
    						<span class="count"></span><span class="percent"></span>
    					</div></div></li>
    				</ul>
    			</div>
    		</div>';
    		return $widgethtml;
    	}
    
    }
    
    function add_feelbox_widget_to_posts($content) {
    	if (is_single()) { $content .= feelbox_get_widget_html(); }
    	return $content;
    }
    
    // fl3r: patch per mostrare la feelbox anche in homepage
    
    function print_feelbox_widget () {
    
    		echo feelbox_get_widget_html();
    
    }
    
    function print_feelbox_shortcode ( ) {
    
    		return feelbox_get_widget_html();
    
    }
    
    // function print_feelbox_widget () {
    //	if ( is_single() || is_page() && !(is_home()) ) {
    //		echo feelbox_get_widget_html();
    //	}
    // }
    
    // function print_feelbox_shortcode ( ) {
    //	if ( is_single() || is_page() && !(is_home()) ) {
    //		return feelbox_get_widget_html();
    //	}
    // }
    
    function lydl_js_header() {
    
      // Define custom JavaScript function
    	global $wp_query;
    	wp_reset_query();
    	$options = get_option('feelbox_wp_options');
    
    	// fl3r: quando caricare la feelbox
    	if ( is_single() || is_page() || is_front_page() || is_home()) {
    	// if ( is_single() || is_page() {
    		// create security token
    		$nonce = wp_create_nonce('lydl-feelbox');	
    
    		$id = $wp_query->post->ID;
    
    		$search = array( chr(145), chr(146), chr(147), chr(148), chr(151), '–', '’' );
    		$replace = array("'", "'", '"', '"', '-', '-', "'");
    		$strnosmartquotes = str_replace($search, $replace, html_entity_decode(get_the_title()));
    
    		?>
    <!-- feelbox -->
    <script type="text/javascript">
    		//<![CDATA[
    		var feelboxAjax = {
    		ajaxurl: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
    		token: '<?php echo $nonce; ?>',
    		id: <?php echo $id; ?>,
    		title: '<?php echo addslashes($strnosmartquotes); ?>',
    		url: '<?php echo the_permalink(); ?>',
    		sparkline: '<?php echo $options['showsparkbar'] ?>',
    		sortmoods: '<?php echo $options['sortmoods'] ?>',
    		tweet: '<?php echo $options['showtweetfollowup'] ?>'
    		};
    
    		</script>
    <!-- feelbox -->
    <?php
    	}
    
    } // end of PHP function lydl_js_header
    
    function lydl_store_results($vote, $postid) {
    	global $wpdb;
    	$wpdb->show_errors();
    
    	if ($vote) {
    
    		$table_name = $wpdb->prefix.'lydl_posts';
    		$table_name2 = $wpdb->prefix.'lydl_poststimestamp';
    
    		// Necessary as there is weirdness to prepare method otherwise
    		$votefield = 'emotion_' . $vote;
    
    		$votecount = $wpdb->get_row(
    			$wpdb->prepare(
    				"SELECT * FROM ".$table_name." WHERE ID=%s",
    				$postid
    			)
    		);
    
    		$votecount = $votecount->$votefield;
    
    		$recordexists = (sizeof($votecount) > 0) ? true : false;
    		if ($recordexists) {
    			$row = $wpdb->update(
    				$table_name,
    				array( 'ID'=>$postid, $votefield => $votecount+1 ),
    				array( 'ID'=>$postid )
    			);
    		} else {
    			$row = $wpdb->insert(
    				$table_name,
    				array( 'ID'=>$postid, $votefield => 1)
    			);
    		}
    
    		// update popularpostsdatacache table
    		$isincache = $wpdb->get_results(
    			$wpdb->prepare(
    				"SELECT post_ID FROM ".$table_name2." WHERE post_ID = %s AND emotion = %s AND day = CURDATE()",
    				$postid,
    				$vote
    			)
    		);
    		if ($isincache) {
    			$result2 = $wpdb->query(
    				$wpdb->prepare(
    					"UPDATE ".$table_name2." SET votes=votes+1 WHERE post_ID = %s AND emotion = %s AND day = CURDATE()",
    					$postid,
    					$vote
    				)
    			);
    		} else {
    			$result2 = $wpdb->query(
    				$wpdb->prepare(
    					"INSERT INTO ".$table_name2." (post_ID, votes, emotion, day) VALUES (%s, 1, %s, CURDATE())",
    					$postid,
    					$vote
    				)
    			);
    		}
    		//$cookie_last = $cookie_duration * 24 * 60 * 60;
    		//setcookie("feelbox_{$postid}", $vote,  time()+$cookie_last, COOKIEPATH, COOKIE_DOMAIN);
    
    	}
    }
    
    function lydl_ajax_populate() {
    	global $wpdb;
    	global $post;
    
    	$postid = $_POST['postID'];
    	$nonce = $_POST['token'];
    	// is this a valid request?
    	if (! wp_verify_nonce($nonce, 'lydl-feelbox') ) die("Oops!");
    
    	$obj = $wpdb->get_row("SELECT * FROM {$wpdb->prefix}lydl_posts WHERE ID=" . $postid, ARRAY_A);
    	$sum = $obj["emotion_1"]+$obj["emotion_2"]+$obj["emotion_3"]+$obj["emotion_4"]+$obj["emotion_5"]+$obj["emotion_6"];
    
    	$voted = '';
    	if (isset($_COOKIE['feelbox_'.$postid])) {
    		$voted = $_COOKIE['feelbox_'.$postid];
    	} 
    
    	// generate the response
    	$response = json_encode( array( 'success' => true,
    									'voted' => $voted,
    									'emotion1' => $obj["emotion_1"],
    									'emotion2' => $obj["emotion_2"],
    									'emotion3' => $obj["emotion_3"],
    									'emotion4' => $obj["emotion_4"],
    									'emotion5' => $obj["emotion_5"],
    									'emotion6' => $obj["emotion_6"],
    									'sum' => $sum ) );
    	header( "Content-Type: application/json" );
    	echo $response;
    	exit;
    }
    
    function lydl_ajax_submit() {
    	$nonce = $_POST['token'];
    	// is this a valid request?
    	if (! wp_verify_nonce($nonce, 'lydl-feelbox') ) die("Oops!");
    
    	$vote = $_POST['feelboxvote'];
    	$results_id = $_POST['results_div_id'];
    	$postid = $_POST['postID'];
    
    	lydl_store_results($vote, $postid);
    
    	// generate the response
    	$response = json_encode( array( 'success' => true, 'vote' => $vote, 'divid' => $results_id ) );
    
    	// response output
    	header( "Content-Type: application/json" );
    	echo $response;
    
    	// IMPORTANT: don't forget to "exit"
    	exit;
    }
    
    function lydl_install_db_table () {
    	global $wpdb;
    	global $lydl_db_version;
    
    	$table_name = $wpdb->prefix.'lydl_posts';
    	$table_name2 = $wpdb->prefix.'lydl_poststimestamp';
    	$installed_ver = get_option( "lydl_db_version" );
    
    	if( $installed_ver != $lydl_db_version ) {
    		$sql = "CREATE TABLE " . $table_name . " (
    			<code>ID</code> bigint(20) NOT NULL,
    			<code>emotion_1</code> bigint(20) DEFAULT '0' ,
    			<code>emotion_2</code> bigint(20) DEFAULT '0' ,
    			<code>emotion_3</code> bigint(20) DEFAULT '0' ,
    			<code>emotion_4</code> bigint(20) DEFAULT '0' ,
    			<code>emotion_5</code> bigint(20) DEFAULT '0' ,
    			<code>emotion_6</code> bigint(20) DEFAULT '0' ,
    		);";
    		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    		dbDelta($sql);
    	}
    
    	if( $installed_ver != $lydl_db_version ) {
    		$sql = "CREATE TABLE " . $table_name2 . " (
    			<code>post_ID</code> bigint(20) NOT NULL,
    			<code>day</code> datetime NOT NULL default '0000-00-00 00:00:00',
    			<code>votes</code> bigint(20) DEFAULT '0' ,
    			<code>emotion</code> bigint(20) NOT NULL
    		);";
    		require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
    		dbDelta($sql);
    	}
    
    	add_option("lydl_db_version", $lydl_db_version);
    }
    
    $feelbox_plugin = plugin_basename(__FILE__); 
    
    add_filter("plugin_action_links_$feelbox_plugin", 'feelbox_settings_link' );
    register_activation_hook(__FILE__,'lydl_install_db_table');
    add_action('init', 'feelbox_init');
    add_action('admin_menu', 'feelbox_wp_menu');
    add_action('wp_head', 'lydl_js_header' );
    add_action('wp_ajax_cast_vote', 'lydl_ajax_submit');
    add_action('wp_ajax_nopriv_cast_vote', 'lydl_ajax_submit');
    add_action('wp_ajax_check_ip', 'lydl_ajax_checkip');
    add_action('wp_ajax_populate_post', 'lydl_ajax_populate');
    add_action('wp_ajax_nopriv_populate_post', 'lydl_ajax_populate');
    
    function register_feelbox_Widget(){
    register_widget('feelbox_Widget');
    }
    
    add_action('init', 'register_feelbox_Widget', 1);
    add_shortcode( 'feelbox', 'print_feelbox_shortcode' );
    
    ?>

    Plugin Author FL3R

    (@armandofiore)

    Usually the file is content.php.
    You can edit the icons size changing the height in

    #feelbox-cell div

    wich is normally 100%. You may need to change other values to bring the text (the percentage below the icons) in line with icons.

    Plugin Author FL3R

    (@armandofiore)

    Hi lolhospital.

    You must edit your theme, adding

    <?php if ( function_exists(‘print_feelbox_widget’) ) { print_feelbox_widget(); } ?>

    usually in you content.php file.
    Unfortunately, I never tried to insert the plugin on the home page, so I do not know if it will work.

    Plugin Author FL3R

    (@armandofiore)

    Hi!
    The option for change the text should be available in the coming days. There is not a paid version of the plugin, it’s all free. ( ?° ?? ?°)

    Plugin Author FL3R

    (@armandofiore)

    Hello p0pr0ck5,
    thank you for interested in the plugin. In version 1.4 was fixed a security bug, maybe you referring to that.

    Plugin Author FL3R

    (@armandofiore)

    Sorry if I answer only now, but did not receive a notification I had not noticed your request.
    The error was probably due to a CSS class that could be applied in some themes at the tables. In version 3.0 this bug is patched.

    Plugin Author FL3R

    (@armandofiore)

    Hi, brookskim.
    Sorry if I answer only now, but did not receive a notification I had not noticed your request.
    Indeed the plugin generated some graphical errors on Firefox and Internet Explorer, that have been fixed in version 3.0, tested on the latest versions of Chrome (40.0.2214.115), Firefox (35.0.1), Internet Explorer (11) and Opera (12.17).

    Plugin Author FL3R

    (@armandofiore)

    Hi Paul.
    I try to answer to all your requests.

    1 and 2: I accepted your suggestion, now the plugin should be compatible with the vast majority of the themes of WordPress. I also improved the code for small-screen devices.

    3: This is my first plugin for WordPress, so some things are still not able to do it, simply because I am experiencing. I did not understand what you mean with “advert”, if you mean the icon of PayPal, the development of this plugin required me a lot of work, and it would be nice to get something in return, even if the plugin still remain free for all. If this really bothers you, you can delete the button using the “custom css” and setting the class invisible.

    4: You’re right, it was a mistake, I left my Twitter account as suggest user only once tweeted.

    5, 6, 7: I’m working on it. ˉ\_(ツ)_/ˉ

Viewing 14 replies - 31 through 44 (of 44 total)