CraftyMc
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] Username variable / constant?Is there any help on this?
Need a solution urgently.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Show field data elsewhere?Tried it, didn’t work ??
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Show field data elsewhere?That’s no good as it should be id of the bd profile which is being viewed, it’s basically a profile card of the use when you hover over their avatar. so using $user_id would set a fixed standard for all profiles and not the age of the profile which you’re viewing. =(
Thanks
Forum: Plugins
In reply to: [BadgeOS] Badge for publishing a new post of custom post typeGot it working from your paste mate =D thank you ever so much. Now i can mod it to my liking and turn it into a plugin.
Thanks so much for the help bud.
Forum: Plugins
In reply to: [BadgeOS] Badge for publishing a new post of custom post typehmmm, I changed this line
if ($post_type == 'custom_type') {
to use ideas and $ideas still keeping the save for testing but can’t get the badge to award.I can move it to another file / plugin, just trying to get it to work first ??
How can i find out for sure what the custom post type is?
Thanks
Forum: Plugins
In reply to: [BadgeOS] Badge for publishing a new post of custom post typeI actually just tried your method about half an hour ago but i can’t seem to get it to work.
My custom type is $ideas,
I added this to the bottom of my triggers.php file,
function custom_trigger($triggers) { $triggers['new_trigger'] = 'New Trigger'; return $triggers; } add_filter('badgeos_activity_triggers', 'custom_trigger'); function increment_custom_trigger($post_id) { // Set the database as a global variable. global $wpdb; // Get the post object and use the object to determine the type and author. $post = get_post($post_id); $post_type = $post->post_type; $post_author = $post->post_author; // Get the author as an object so we can retrieve a username. $user = get_userdata( $post_author ); $username = $user->user_login; // Test for our custom post type slug if ($post_type == 'custom_type') { // Iterate the trigger count and save the new count as a variable. $new_count = badgeos_update_user_trigger_count($post_author, 'new_trigger'); // Log the new trigger count. badgeos_post_log_entry( null, $author, null, sprintf('%1$s triggered %2$s (%3$dx)', $username, 'new_trigger', $new_count)); // Here's where things get fun. We're going to search the // database for achievements that use the trigger that we've // just incremented and save them in an array. $triggered_achievements = $wpdb->get_results( $wpdb->prepare( " SELECT post_ID FROM $wpdb->postmeta WHERE meta_key = '_badgeos_trigger_type' AND meta_value = %s ", 'new_trigger' ) ); // Now we iterate through that array and use an existing // function to determine if we should award any of those // achievements to the author of the post. foreach ($triggered_achievements as $achievement) { badgeos_maybe_award_achievement_to_user( $achievement->post_ID, $post_author, 'new_trigger', get_current_blog_id(), '' ); } } } add_action('save_post', 'increment_custom_trigger');
Then I setup a badge using the ‘new trigger’ but it didn’t fire. No badge was given upon save / submit.
Not sure where i have gone wrong as it’s not throwing up any errors but it’s not giving badges either. Also how would i get it to award on publish and not save?
Much appreciated. Thank You.
Forum: Plugins
In reply to: [BadgeOS] Badge for publishing a new post of custom post typeDid anyone figure out exactly what lines to add / edit to include another step for custom post type?
Thanks
Forum: Plugins
In reply to: [Postman SMTP Mailer/Email Log] Using HTML template please help!I managed to get it to work but Iv’e had to remove all spaces and new lines. Lets hope I never have to go there again because it looks a complete mess now lol just imagine 150 lines with no spaces or new lines, *my head hurts* lol
It would appear it was converting all the new lines to
<br />
instead of ignoring them. ??Forum: Plugins
In reply to: [Postman SMTP Mailer/Email Log] feature request, log processed emails?Hey bud, yeah it’s awesome. I’m fully up to date and everything is working smoothly and as it should. I would recommend this plugin to anyone and everyone. I run it on all of my websites now. Keep up the good work. ?? Thanks
Forum: Plugins
In reply to: [Postman SMTP Mailer/Email Log] feature request, log processed emails??? perfect, looking forward to it. Keep up the great work bud.
Forum: Plugins
In reply to: [Blackjack] Mycred IntegrationmyCRED, myCRED, myCRED please support it, so many people use it….
Forum: Plugins
In reply to: [Participants Database] Shortcode for number of records in the database?Perfect, thank you!!