jbx
Forum Replies Created
-
Forum: Plugins
In reply to: [Facebook] Version 1.1 releasedThis update totally sucks. After updating the comments do not appear any more on my pages and in the wp-admin I get this error:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Facebook_Application_Settings::enqueue_scripts' was given in ~/httpdocs/wordpress/wp-includes/plugin.php on line 403Facebook! Do you even test your stuff before releasing it?!
Thanks for that!
This is the code I actually used, in case anyone else is looking for it. It checks if the year is the same before omitting it, and then checks if the month is the same before omitting it. If the day is also the same it does nothing because EM already works perfectly in that case.
add_filter('em_event_output_placeholder','my_em_placeholder_mod',1,3); function my_em_placeholder_mod($replace, $EM_Event, $result) { if ( $result == '#_EVENTDATES' ) { $day_start = date_i18n('d', $EM_Event->start); $day_end = date_i18n('d', $EM_Event->end); if ($day_start != $day_end) { $date_format_start = 'd'; $year_start = date_i18n('Y', $EM_Event->start); $year_end = date_i18n('Y', $EM_Event->end); if ($year_start != $year_end) { $date_format_start .= ' M Y'; } else { $month_start = date_i18n('M', $EM_Event->start); $month_end = date_i18n('M', $EM_Event->end); if ($month_start != $month_end) { $date_format_start .= ' M'; } } $replace = date_i18n($date_format_start, $EM_Event->start). ' - ' . date_i18n('d M Y', $EM_Event->end); } } return $replace; }Fixed by just putting the_content() in single-event.php and moving all the Event template placeholders to event-single.php under /plugins/event-manager/templates
So do not follow the advice in the URL I mentioned above when customising your Events Manager Single Events template or you risk running into the problems above.
The reason was that the_content() was not being called in these special custom content types.
Its working fine now that I added the_content() and fixed the content types to play well with the the_content() function.
Forum: Plugins
In reply to: [WordPress Share Buttons Plugin – AddThis] PinterestIts most probably because the default behaviour of the AddThis plugin displays the user’s preferred social networking links rather than the ones displayed there.
You can force it to display the ones you want through configuration though. Go to the Advanced tab and put the list of service codes, coma delimited, in the field named ‘Custom service list:’ in the Display Options section.
Instead of polluting my functions.php (which is already becoming quite big) can I put it somewhere else under my theme’s folder in a separate file named em-events.php?
That was it! Thanks a lot for that.
I actually did not have any page.php defined yet, so it was reverting to index.php which is not designed to display the_content() but it displays a list of articles.
Cheers!
OK I’ve got closer to what the issue is, however no idea how to solve it.
I’ve enabled the default twentyeleven theme and the list of events appeared.When I enable my own theme the list of events just displays the word ‘CONTENT’. So evidently I have something missing in my theme that twentyeleven is doing. I’ve had a quick look through the files and no idea what it could be. I’ve copied over page.php but it didn’t make a difference so it must be something in the other files.
What could be the reason for the CONTENTS not being parsed and replaced by the list of events in my theme?
Yes I realised that after digging in further in the code of the AddThis WP plugin.
I have actually modified it and added an option to also include the counter option, and put a separate support request here with the extra code needed (just a few lines), because I am not authorised to add it myself to SVN. I hope someone from the AddThis guys sees it and just pastes it in.
I don’t have a sample link unfortunately because its still not online.
The settings -> pages -> event list/archives is just the default settings.
Its pointing to the Events page.I went to the Events page and there is the message on top saying:
“This page corresponds to Events Manager events page. Its content will be overriden by Events Manager, although if you include the word CONTENTS (exactly in capitals) and surround it with other text, only CONTENTS will be overwritten. If you want to change the way your events look, go to the settings page.”However, the CONTENTS text is not really being replaced for some reason when I go to the Events page. I didn’t touch the page or anything, its exactly the default settings you get after installing the plugin.
I tried turning Override with Formats ON and OFF and without any effect.
Where is this ‘CONTENTS’ word coming from?
Re 1: Yes its CONTENTS, however I want the list of events not the word CONTENTS. How do I get that?
Re 2: Thanks, I’ll try to create a template using the approach you suggested.