Forum Replies Created
-
AuthorPosts
-
Andy Fragen
ModeratorIt’s located in the WordPress Settings > General just above the Save button. It is not part of the plugin.
Andy Fragen
ModeratorBarry, you are ‘the man’ !!
Andy Fragen
ModeratorBarry, thanks. I was only using “\n” not “\r\n”. Now it seems to be working. Off to more testing.
Andy Fragen
ModeratorNow I’m trying to figure out how to call ‘Save Changes’ after the new field has been added.
Andy Fragen
ModeratorJust one more thing. It seems I need to also ‘Save Changes’ for the formatting to work correctly, otherwise every item shows up on same line no as distinct dropdown items.
Andy Fragen
ModeratorBarry, that seems to be the key. Looks like it’s working. Thanks a bunch.
Andy Fragen
ModeratorBut it does create the Additional Field 😉
Andy Fragen
ModeratorBarry, code looks very promising but I get the following error.
Call to a member function flush_rules() on a non-object in /…/wp-content/plugins/the-events-calendar/lib/the-events-calendar.class.php on line 1386
I’m calling this in add_action( ‘plugins_loaded’, ‘myscript’ );
Andy Fragen
ModeratorYes, I have set up an Additional Field via Events > Settings > Additional Fields. I couldn’t get it to happen programatically, that’s what I was originally after. As TribeEventsCustomMeta::save_meta_options is more of a filter than an action.
I’ve settled for just making a warning if there is no Alarm field present. I went into the code of TribeEventsCustomMeta::get_custom_field_by_label to do the checking. Using the method directly just doesn’t work. I assume you mean that being the bug I stumbled upon.
Andy Fragen
ModeratorFWIW, I did the following
var_dump(TribeEventsCustomMeta::get_custom_field_by_label(‘Alarm’));
or
$alarm = TribeEventsCustomMeta::get_custom_field_by_label(‘Alarm’);
var_dump($alarm);The result is always bool(false)
Andy Fragen
ModeratorBarry, thanks for the explanation and PHP teaching. I can always use more.
As for the purpose of my question, I guess it’s really not practical to try and set this Additional Field within the plugin code, better to just report that it’s necessary for the plugin. If this is truly the case, consider this thread closed.
Thanks again.
Andy Fragen
ModeratorOK, I got rid of all the errors, but it doesn’t create an Additional Field. I’m calling this from my Events Calendar PRO Alarm plugin. I want to create the required Additional Field if it doesn’t exist. But it’s not working.
Am I misreading the class TribeEventsCustomMeta? Is there no method to directly save data and create an Additional Field?
Andy Fragen
ModeratorThanks Barry. gist updated but now I get a real interesting error.
Class ‘TribeEvents’ not found in /path-to-plugins/events-calendar-pro/lib/tribe-ecp-custom-meta.class.php on line 151
August 28, 2012 at 2:37 pm in reply to: Any recommendations for a freelancer to create a custom CSS for me? #24251Andy Fragen
ModeratorSteven, you could effectively create 2 (and only 2) overlapping genres by using both the left border color and background color for a category. This will require 3 categories though, rock, jazz and rock + jazz. As for icons, all you would really have to do is look at the CSS generated by the plugin and for each category selector create something like the following.
.tribe-events-calendar .cat_rock { background: (‘path/to/image.png’) no-repeat left }If you do this for every category/image and place it in your override events.css file it should do the trick.
In order to have multiple images you might have to have a single image file with multiple images in it. When making separate categories for these icons you would just set the category colors options to transparent. That might work.August 27, 2012 at 3:57 pm in reply to: Line breaks in event description lost in ical file for Outlook subscribers #24160Andy Fragen
ModeratorTry this.
$description = $eventPost->post_content;
It’s possible the strip_tags was also removing stuff.
-
AuthorPosts
