Tubal
Forum Replies Created
-
Forum: Plugins
In reply to: [Sociable] [Plugin: Sociable] Uncheck “Sociable disabled?” not workingI’ve suffered the same problem too in a recent project.
In order to make Sociable work correctly you have to replace these two functions “sociable_meta” and “sociable_insert_post” in file “sociable.php” by the ones I’ve pasted below, and that’s it…Sociable will be deactivated or reactivated at your will. TESTED!!
THE SOLUTION:
Revised function sociable_meta:
function sociable_meta($post) { $sociableoff = false; if (get_post_meta($post->ID,'_sociableoff',true)) { $sociableoff = true; } ?> <input type="checkbox" id="sociableoff" name="sociableoff" <?php checked($sociableoff); ?>/> <label for="sociableoff"><?php _e('Sociable disabled?','sociable') ?></label> <?php }
Revised function sociable_insert_post:
function sociable_insert_post($pID) { if ($_POST['sociableoff'] == 'on') { add_post_meta($pID, '_sociableoff', true, true); } else { delete_post_meta($pID, '_sociableoff'); } }
This solution works up to WordPress 3.0.1 using Sociable 3.5.2.
Hope this helps!!
Forum: Plugins
In reply to: [Plugin: Sociable] Re-activation impossibleI’ve suffered the same problem too in a recent project.
In order to make Sociable work correctly you have to replace these two functions “sociable_meta” and “sociable_insert_post” in file “sociable.php” by the ones I’ve pasted below, and that’s it…Sociable will be deactivated or reactivated at your will. TESTED!!
THE SOLUTION:
Revised function sociable_meta:
function sociable_meta($post) { $sociableoff = false; if (get_post_meta($post->ID,'_sociableoff',true)) { $sociableoff = true; } ?> <input type="checkbox" id="sociableoff" name="sociableoff" <?php checked($sociableoff); ?>/> <label for="sociableoff"><?php _e('Sociable disabled?','sociable') ?></label> <?php }
Revised function sociable_insert_post:
function sociable_insert_post($pID) { if ($_POST['sociableoff'] == 'on') { add_post_meta($pID, '_sociableoff', true, true); } else { delete_post_meta($pID, '_sociableoff'); } }
This solution works up to WordPress 3.0.1 using Sociable 3.5.2.
Hope this helps!!