Forum Replies Created
-
AuthorPosts
-
fireflyParticipant
Fixed in the version sent by email – thanks!
fireflyParticipantYes that’s done the job nicely – thanks!
fireflyParticipantUpdate: the same errors are displayed on the front end when the values are unset.
Notice: Undefined index: show_excerpt in …\\plugins\wti-like-post\wti_like_post_widgets.php on line 238
Notice: Undefined index: show_thumbnail in …\\plugins\wti-like-post\wti_like_post_widgets.php on line 239
Notice: Undefined index: show_categories in …\\plugins\wti-like-post\wti_like_post_widgets.php on line 240
Notice: Undefined index: show_tags in …\\plugins\wti-like-post\wti_like_post_widgets.php on line 241
Notice: Undefined index: show_author in …\\plugins\wti-like-post\wti_like_post_widgets.php on line 242
Notice: Undefined variable: hour in …\\plugins\wti-like-post\wti_like_post.php on line 776
Notice: Undefined variable: day in …\\plugins\wti-like-post\wti_like_post.php on line 777
Notice: Undefined variable: year in …\\plugins\wti-like-post\wti_like_post.php on line 777fireflyParticipantCould I get a hold of this updated file also? I’m seeing the same error on new post and when saving a menu in /wp-admin/nav-menus.php
Will the fix be rolled out as an update?
fireflyParticipantGotcha ok.
On the off chance this helps someone else, here are some utility methods for dealing with buttons/counts (based on ripping apart GetWtiLikePost). Just stick them in functions.php
They all take an optional post_id as an argument so can be used outside the loop. Additionally they check for the existence of plugin methods (using ff_is_like_enabled), so disabling the ‘like’ plugin doesn’t break the theme.
The method names follow general wordpress convention:
ff_XX = echo XX
ff_get_XX = return XX as stringWherever you place the tally number has to have the class ‘lc lc-{{post_id}}’ – e.g.
$id = $post->ID;
$num_likes = ff_get_like_count($id);
printf(‘<span class=”tally-value lc lc-%d”>%d</span>’, $id, $num_likes);That way you don’t need to mess with the default plugin javascript and all the ajax stuff works.
fireflyParticipantIt’s a quick change to make this happen. Might be worth rolling into the core?
wti_like_post_site.php
line 7: // pass post ID
function GetWtiLikePost($arg = null, $post_id=NULL)Line 9: // use loop ID if post ID not specified
if($post_id == NULL) $post_id = get_the_ID();Line 33: // get categories for post ID
$category = get_the_category($post_id);You can then call:
GetWtiLikePost(NULL, $post->ID); // echo the output
GetWtiLikePost(‘put’, $post->ID); // return the output string instead of echoGetWtiLikePost(); // will do what it did before the mods
- This reply was modified 10 years, 4 months ago by firefly.
fireflyParticipantupdate: had to uninstall (delete settings) and then it displayed correctly.
-
AuthorPosts