digitalnature
Forum Replies Created
-
It doesn’t seem Google changed their specs, so this must work.
Keep in mind that only single posts will contain that information, so stars will show up in search results on those pages only.
Forum: Plugins
In reply to: [Post Ratings] Display stars Only?Sure, create a copy of the “post-ratings-control.php” template, put it in your child theme folder (create a child theme of your curremt theme, if you don’t have one active already), and edit it. To show only the stars, remove the meta block from the template.
This is the nice way.
To fast and ugly way is to hide that text with CSS:
.ratings .meta{ display: none; }
Forum: Plugins
In reply to: [Post Ratings] [Plugin: Post Ratings] Numbers on left sideThe reason you see those numbers is because of negative text-indent values from the plugin CSS. The idea was to hide text meant to be there for accessibility reasons.
You can just remove it (I`ll do the same in the next update).
If you customize the rating control template, copy it to your theme / child theme, to avoid losing your changes if you update…
Forum: Plugins
In reply to: [Ad Manager] [Plugin: Ad Manager] Last update is escaping javascript! :(fixed in 0.9.4 – thanks.
but you’ll have to edit your old ads and remove the slashes manually, because the code got escaped on input.
Forum: Plugins
In reply to: [Ad Manager] [Plugin: Ad Manager] Add "ad location" to themeIf you’re doing this for a public theme, replace
if(defined('AdManager::VERSION'))
with
if(class_exists('AdManager'))
because some PHP distributions throw a fatal error when checking for a constant belonging to a non-existent class.
I don’t think a plugin option is necessary for this. But if more people request it, I’ll add one.
To disallow post authors to vote on their own posts, drop this code in the .php file that you use for your customizations (theme functions.php?)
add_filter('post_ratings_access_check', 'no_ratings_for_authors', 10, 2); function no_ratings_for_authors($passed_checks, $post_id){ // not a logged in user, or default checks failed if(!$passed_checks || !is_user_logged_in()) return $passed_checks; $current_user = wp_get_current_user(); $post = &get_post($post_id); // the post doesn't belong to this user if($current_user->ID != $post->post_author) return true; // it does, disallow ratings return false; }
Forum: Plugins
In reply to: [Post Ratings] [Plugin: Post Ratings] Plugin not runningThis should be now fixed in 2.2
Apparently some PHP versions throw this fatal error when checking if a class constant exists, and the class is missing (instead of just returning “false”).
Forum: Plugins
In reply to: [Post Ratings] [Plugin: Post Ratings] Conflict with "Pages Posts" pluginshould be “fixed” in 1.9, though the problem is with the other plugin…
If you’re concerned about security, that won’t help very much, because the password is still stored in its original format as text in the database (unlike user password which get hashes).
So anyone with admin access to your blog can get to see that password, the simplest method would probably be to just look in the html source for the password field value. And now you understand why the author didn’t bother to use a pw field ??
Forum: Themes and Templates
In reply to: How to show only one categories posts on page?Why not just create a menu item that links to the desired category page?
Or am I missing something here?Forum: Plugins
In reply to: [Post Ratings] [Plugin: Post Ratings] Can't see rating formIt’s true, the shortcode isn’t working on pages This is now fixed in 1.8. Thanks ??
Forum: Plugins
In reply to: Widget Logic / Widget Context replacing callbackWell I ran into this issue when developing the same type of functionality that these plugins do.
And I didn’t need to override any callbacks. Just hook your widget visibility checking function to the
widget_display_callback
filter, and return false if the widget should not be visible on the current page, the $instance array otherwise.Your forms go inside
in_widget_form
(andwidget_update_callback
for updating your options).I don’t see why do you have to interfere with the widget properties, like the callback.
For example, for the “Uncategorized” category:
add_filter('post_ratings_visibility', 'rate_only_my_category'); function rate_only_my_category(){ $categories = get_the_category(); foreach($categories as $category) if($category->name === 'Uncategorized') return true; // don't display return false; }
I’m hesitating to add the ability to visually choose the category context too, for the reasons SeancoJr mentioned…
A) Already there, by default ratings are added to all posts.
B) There’s no option for this, but it’s easily possible by hooking a filter on the
post_ratings_visibility
tag, in which you return false if the current category is not the right one.C) Already implemented, you can insert the [rate] shortcode into the post to show the rating links
Forum: Themes and Templates
In reply to: Mystique theme fatal errorsIt’s a warning, not a fatal error.
The issue is inside the “Translate” module, which you can disable if you’re using English and don’t need to translate the theme.
(this will be fixed in the next update).