fvl2000
Forum Replies Created
-
Forum: Plugins
In reply to: Rating programmatically a new article with GD Star RatingI think I’ve got it:
gdsrBlgDB::save_vote($post_id, $user_ID, $ip, $ua, $vote, $comment_id);
Insert in the theme
wp_gdsr_comment_integrate_standard_result(get_comment_ID());
Forum: Plugins
In reply to: Rating programmatically a new article with GD Star RatingI’ve got it partially:
gdsrBlgDB::save_vote($post_id, $user_ID, $ip, $ua, $vote);
Now I need to see the rating for the post for each voter near their comment. So I need to find the missing class part to call.
Forum: Plugins
In reply to: Removing Quick EditYou can insert this code in a plugin. This will remove the quick edit from wp-admin/edit.php
function remove_quick_edit( $actions ) { unset($actions['inline hide-if-no-js']); return $actions; } add_filter('post_row_actions','remove_quick_edit',10,1);
Forum: Plugins
In reply to: Hide Some Media Upload Buttons/Functions@superann I can’t make it work :/
I’m using this one with WP3.01 without any problem:function rm_upld() { return; } add_filter('media_upload_tabs', 'rm_upld', 1, 2);
Forum: Fixing WordPress
In reply to: Only author posts approve commentsForum: Hacks
In reply to: WordPress doesn't recognize my custom taxonomyIf you check the existence of the custom taxonomy before it has been registered it returns false
After your custom taxonomies have been registered you can use:add_action( ‘init’, ‘check’, 0 );
function check() {
if (taxonomy_exists(‘my_taxonomy’)) {
print “YES”;
}
else {
print ‘NO’;
}
}Forum: Plugins
In reply to: Hide Some Media Upload Buttons/FunctionsHi. No pluggable functions can do that (WP3.0) You need to hack
wp-admin/includes/media.php
wp-admin/edit-attachements-row.phpI’ve created a quick post for that on
https://blog.mondayinthesun.com.au/2010/09/wp-hide-photos-uploaded-by-other-in.htmlHope this help.
Forum: Fixing WordPress
In reply to: How to make post on different pagesHi,
Here is an example:
Once your posts are in their right category eg: Podcast and News and you have 2 different pages PODCAST and NEWS that will display only posts from their correspondant category (via a page template) you can do something like:
<li class="<?php if (is_home()) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="https://www.mydomainname.com/wordpress/">HOME</a></li> <li class="<?php if ( is_page('7') || (is_single() && !in_category('Podcast'))//exclude posts from the podcast cat ){ ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="https://www.mydomainname.com/wordpress/news">News</a></li> <li class="<?php if ( is_page('66') || (is_single() && in_category('Podcast')) ){ ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="https://www.mydomainname.com/wordpress/podcast">Podcast</a></li> <li class="<?php if ( is_page('31') ){ ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a href="https://www.mydomainname.com/wordpress/about">ABOUT</a></li>
After that you can also create a filter that will drive each post from a selected category into a custom template.