Frederik Liljefred. M.D.
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] Redirect to subdomainDid set
source url: /t/(.*)
target url: new_site/t/$1
Set a cross in Regex
It seems to work.
- This reply was modified 5 years, 4 months ago by Frederik Liljefred. M.D..
Forum: Fixing WordPress
In reply to: Help to continue my discontinued plugin – the array stuff, how to?I was able to get this:
[‘2′,’8000’],[‘4′,’8000′],[’12’,’8500′],[’14’,’10000′],[’15’,’9990′],[’18’,’9000′],[’21’,’10000′],[’22’,’10680′],[’24’,’8500′],[’28’,’6000′],
by using
foreach ( $dbdata as $value ) { echo '['; echo '\''.$value->Day.'\','; echo '\''.$value->Distance.'\''; echo '],'; }
But the output needs to be:
[‘Day’, ‘Distance’], [‘2’, 8000], [‘4′, 8000], [’12’, 8500], [’14’, 10000], [’15’, 9990], [’18’, 9000], [’21’, 10000], [’22’, 10680], [’24’, 8500], [’28’, 6000]
and stored as
$content
I hope you can help ??
Forum: Plugins
In reply to: [DD Rating] Does this work on 4.3.x?It works on my site: https://bevarlaegevagten.dk/anmeld/
But stil Rich Snippet Rating doesnt work: https://developers.google.com/structured-data/rich-snippets/reviews
If you are able to solve that, then please share!
Forum: Plugins
In reply to: [DD Rating] Rich Snippet rating doesnt seems to workCan you confirm it is an issue or is it working on other pages using DD-rating?
Forum: Plugins
In reply to: [DD Rating] Rich Snippet rating doesnt seems to workCool, hope you can spot the reason!
Forum: Plugins
In reply to: [DD Rating] The hoi bugForum: Plugins
In reply to: [DD Rating] Rich Snippet support and shortcode questionGood point…
Thanks
Forum: Plugins
In reply to: [DD Rating] Rich Snippet support and shortcode questionEg. use this snippet instead to get title support
$averageOutput .= ' <li class="clearfix"> <div itemscope itemtype="https://data-vocabulary.org/Review-aggregate"> <div class="starTitle"><span itemprop="itemreviewed">' . $rateTitle . '</span></div> <div class="star-holder star' . $rateRank . '" title="average:' . $itemPercent . '% participants:' . $itemParticipants . '"> <div class="star star-rating" style="width: ' . $itemPercent . '%"></div> </div> <div class= "textParticipants"> <div class="number"><span itemprop="votes">' . $itemParticipants . '</span></div> <div class="icon"></div> </div> <div class="textAverage"> <span class="comment-count"> <span itemprop="rating" itemscope itemtype="https://data-vocabulary.org/Rating"> <span itemprop="average">' . number_format(($itemPercent/20), 2, '.', '') . '</span> stars out of <span itemprop="best">5</span> <meta itemprop="worst" content="1"/> </span> </span> </div> </div> </li>';
Forum: Plugins
In reply to: [DD Rating] Rich Snippet support and shortcode questionTo get rich snippet support like here: https://www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2F18-13.dk%2Funcategorized%2Ftest-dd-rating
Open /inc/shortcode.php
FIND (about line 132)
$averageOutput .= ' <li class="clearfix"> <div class="starTitle">' . $rateTitle . '</div> <div class="star-holder star' . $rateRank . '" title="average:' . $itemPercent . '% participants:' . $itemParticipants . '"> <div class="star star-rating" style="width: ' . $itemPercent . '%"></div> </div> <div class= "textParticipants"> <div class="number">' . $itemParticipants . '</div> <div class="icon"></div> </div> <div class="textAverage"> <span class="comment-count">' . number_format($itemPercent, 2, '.', '') . '%</span> </div> </li>';
REPLACE WITH
$averageOutput .= ' <li class="clearfix"> <div itemscope itemtype="https://data-vocabulary.org/Review-aggregate"> <div class="starTitle">' . $rateTitle . '</div> <div class="star-holder star' . $rateRank . '" title="average:' . $itemPercent . '% participants:' . $itemParticipants . '"> <div class="star star-rating" style="width: ' . $itemPercent . '%"></div> </div> <div class= "textParticipants"> <div class="number"><span itemprop="votes">' . $itemParticipants . '</span></div> <div class="icon"></div> </div> <div class="textAverage"> <span class="comment-count"> <span itemprop="rating" itemscope itemtype="https://data-vocabulary.org/Rating"> <span itemprop="average">' . number_format(($itemPercent/20), 2, '.', '') . '</span> stars out of <span itemprop="best">5</span> <meta itemprop="worst" content="1"/> </span> </span> </div> </div> </li>';
Forum: Plugins
In reply to: [DD Rating] Rich Snippet support and shortcode question(I did upgrade: https://18-13.dk/uncategorized/test-dd-rating/ – to see the images live)
I did recode the dd-rating.php file to this
< ?php /* Plugin Name: DD_Ratings Version: 1.1 Plugin URI: https://dijkstradesign.com Description: A plug-in to add rating-functionality to comments Author: Wouter Dijkstra Author URI: https://dijkstradesign.com */ /* Copyright 2013 WOUTER DIJKSTRA (email : [email protected]) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ require_once('inc/functions.php'); require_once('inc/add_to_admin_comments.php'); require_once('inc/add_to_admin_posts.php'); require_once('inc/add_to_comment.php'); require_once('inc/add_to_comment_form.php'); require_once('inc/shortcode.php'); /** * Enqueue plugin style-file (CSS) and js file for frontend */ function dd_add_files_to_body_tag() { wp_register_style( 'dd_css_style_to_body_tag', plugins_url('/css/style.css', __FILE__) ); wp_enqueue_style( 'dd_css_style_to_body_tag' ); wp_enqueue_script( 'dd_js_file_to_body_tag', plugins_url( '/js/default.js', __FILE__ ) , array( 'jquery' ), '' ); } add_action( 'wp_enqueue_scripts', 'dd_add_files_to_body_tag' ); /** * Enqueue plugin style-file for backend */ function dd_add_style_to_backend() { wp_register_style( 'dd_css_style_to_backend', plugins_url('/css/style.css', __FILE__) ); wp_enqueue_style( 'dd_css_style_to_backend' ); wp_enqueue_script( 'dd_js_file_to_backend', plugins_url( '/js/default.js', __FILE__ ) , array( 'jquery' ), '' ); } add_action( 'admin_init', 'dd_add_style_to_backend' );
And it did solve a lot.
Now it look like this in the backend
For comments
ScreendumpFor setting in a post
ScreendumpIn frontend for a post where the averagetag
[averageRating]
gives
ScreendumpWhen you see the list of all post it look like this
ScreendumpBut there is still an issue with the rating box in the comment area where it look like this
ScreendumpI dont know why you see the Json box?
Forum: Plugins
In reply to: [DD Rating] Rich Snippet support and shortcode questionTo call the files to be used in the backend use something like
/** * Enqueue plugin style-file for backend */ function dd_add_style_to_backend() { wp_register_style( 'dd_css_style_to_backend', plugins_url('/path/filename.css', __FILE__) ); wp_enqueue_style( 'dd_css_style_to_backend' ); } add_action( 'admin_init', 'dd_add_style_to_backend' );
Forum: Plugins
In reply to: [DD Rating] Rich Snippet support and shortcode questionThanks for a quick reply!
Well, I dont think it is a permission issue.
Ahh it seem like you call the files the wrong way.
Eg try to use this code instead in the dd_rating.php
/** * Enqueue plugin style-file (CSS) and js file for frontend */ function dd_add_files_to_body_tag() { wp_register_style( 'dd_css_style_to_body_tag', plugins_url('/css/style.css', __FILE__) ); wp_enqueue_style( 'dd_css_style_to_body_tag' ); wp_enqueue_script( 'dd_js_file_to_body_tag', plugins_url( '/js/default.js', __FILE__ ) , array( 'jquery' ), '' ); } add_action( 'wp_enqueue_scripts', 'dd_add_files_to_body_tag' );
It did solve some of it:
Take a look at: https://18-13.dk/uncategorized/test-dd-rating/
Forum: Plugins
In reply to: [DD Rating] Rich Snippet support and shortcode questionand when a user may add a comment the comment field look like this
Eg. see: https://18-13.dk/uncategorized/test-dd-rating/ (I did set the creation date to 2 years ago – this way it will not spoil my blog. I will delete the post when you have seen it)
Forum: Plugins
In reply to: [DD Rating] Rich Snippet support and shortcode questionHey,
Im sorry if I was too fast to say this was not working.
But I did try many things and it would not work
Setup:
Latest WP 3.7.1Plugins:
BackUpWordPress
Google Analytics Dashboard for WP
Google Doc Embedder
Google XML Sitemaps
upPrev
User Submitted Posts
WP-Optimize
WTI Like PostTheme:
Meet GavernLet me give you some details.
When I make a new post I get this metabox when creating a new post:
After I have updated my post the metabox look like this:
Screendump 2When I put in
[averageRating]
in a post gives me this
Forum: Themes and Templates
In reply to: How to make a review site eg. using Meet GavernWPI did write on their facebook page Yesterday it was free and it still says:
A free, responsive WordPress theme based upon our powerful GavernWP framework.
Well, where should I ask for help then?
UPDATE:
You can download it from here…https://www.gavick.com/download/download-wordpress-themes/meetgavernwp.html