biralucena
Forum Replies Created
-
Forum: Plugins
In reply to: [BP Xtra Signup] [Plugin: BP Xtra Signup] bp xtra sigup doesn't workJulien760, I forced the plugin to load the scripts and now it works just fine. In the bp-custom.php I put the wp_enqueue_scripts:
function bpxjscripts() { if (!is_admin() && function_exists('bp_core_screen_general_settings')) { wp_register_script( 'availability', plugins_url() . '/bp-xtra-signup/js/availability.js', array('jquery'), NULL); wp_enqueue_script('availability'); wp_register_script( 'strengthmeter', plugins_url() . '/bp-xtra-signup/js/strengthmeter.js', array('jquery'), NULL); wp_enqueue_script('strengthmeter'); wp_register_script( 'emailcheck', plugins_url() . '/bp-xtra-signup/js/email-check.js', array('jquery'), NULL); wp_enqueue_script('emailcheck'); wp_register_script( 'emailcompare', plugins_url() . '/bp-xtra-signup/js/email-compare.js', array('jquery'), NULL); wp_enqueue_script('emailcompare'); } } add_action('wp_enqueue_scripts', 'bpxjscripts');
lottamadness,
It happened to me also. The problem was that I was selecting the crop area before clicking the edit button. To properly use the plugin you shouldn’t use the wordpress default crop tool. First you select the custom size to be edited on the dropdown, click on the edit buttom, then you select the crop area in the pop-up window and save the image.
Hi Alkorr,
On OS X You can unselect everything by pressing the command key and clicking the last selected option. I don’t know how to do it on Windows, but I know it’s possible (try the control key).
I don’t know how new this feature is, but it is just a matter of unchecking post & page in the “Custom Post Types for SEO Column Support” field on the AIOSE settings page.
Forum: Plugins
In reply to: [comments-likes] [Plugin: comments-likes] pulling top 5 likesHi Maxemil,
Many thanks for your code again
Actually I’ve studied a bit of SQL and I did it!
I’ve noticed also that we should get only the approved comments, in case we need to delete any of them after they’ve received likes.Here is the code:
function cl_return_top_5($postorpageID) { global $wpdb; $cl_table_name = $wpdb->prefix . "comments_likes"; $wp_comments_table_name = $wpdb->comments; $liketop = $wpdb->get_results($wpdb->prepare("SELECT comment_ID FROM $wp_comments_table_name INNER JOIN $cl_table_name ON comment_ID = like_comment_ID WHERE comment_post_ID = '$postorpageID' and comment_approved = '1' GROUP BY like_comment_ID ORDER BY COUNT( like_ID ) DESC, comment_date DESC LIMIT 5") ); foreach ($liketop as $acomment) { $id_acomment = $acomment->comment_ID; $commentauthor = get_comment_author($id_acomment); $readmore = '<a href="'.get_comment_link($id_acomment).'">' . __('[Read more]', 'afrec') . '</a>'; $comment = get_comment_excerpt($id_acomment) . " " .$readmore; echo '<p>'.$comment.'</p>'; echo '<p class="right"><strong>'.$commentauthor.'</strong></p>'; } } //to get the top five comments for the Post or page with ID = 2 <?php cl_return_top_5('2') ?>
VanlsleLife, U could use the plugin wp-no-category-base.
Lincoln Lemos, take a look at this thread: need-to-change-default-events-category-to-french-evenements
Simple Tags 1.8 => simple-tags.php => line 70, below “// Load translations”
Forum: Hacks
In reply to: Children templateMixing some functions from here and here I wrote the code below in my functions.php:
function the_slug($pageID) { // Is there any other way to get the parent page slug? $post_data = get_post($pageID, ARRAY_A); $slug = $post_data['post_name']; return $slug; } function child_page_template(){ global $post; $parent_page_slug = the_slug($post->post_parent); $page_template = 'page-'. $parent_page_slug . '-child.php'; //name it on your own $parents = get_post_ancestors($post->ID); // if is child if($parents){update_post_meta($post->ID,'_wp_page_template',$page_template);} } add_action('save_post','child_page_template');
Now, every time a child page is created or updated it will have as page template a file named “page-parentslug-child.php.
for example:
‘PARENT’ => page-slug.php (default)
‘parent’> ‘CHILD’ => page-‘PARENTSLUG’-child.php
‘parent’> ‘child’> ‘GRANDCHILD’ => page-‘CHILDSLUG’-child.php
‘parent’> ‘child’> ‘grandchild’ > ‘GRAND-GRANDCHILD’ => page-‘GRANDCHILDSLUG’-child.php (…) and so on.That it
Forum: Plugins
In reply to: [comments-likes] [Plugin: comments-likes] pulling top 5 likesHi Maxemil, Thanks for the code.
I must say I’m completely newbie to mysql queries. Could you please show me how I could limit this query to return ‘likes’ for a specific post, lets say post_ID = ‘1’.
Thanks again
Forum: Plugins
In reply to: [Breadcrumb NavXT] Breadcrumb NavXT and qTranslateDennis,
You just have to use the language short tags [:en], [:fr] etc.
For example:
[:en]<a title="Go to %title%." href="%link%">[:pt]</a><a title="Ir para %title%." href="%link%">[:fr]</a><a title="Aller à %title%." href="%link%"></a>
Forum: Fixing WordPress
In reply to: Home Page: using index.php instead of home.phpI don’t know why but sometimes the home.php doesn’t work form me (possibly something related to the qtranslate plugin?). Now, instead of home.php I use the front-page.php and voilà, no problems.