ThomasLG
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Links] Empty on tag/category pagesThanks a lot, that seems to work fine π
Forum: Plugins
In reply to: [Simple Links] Empty on tag/category pagesAha, thanks. I seem to have found the issue, which is with a pre_get_posts filter in my functions.php file. Is there any way to avoid the issue without having to remove the filter altogether? Tried adding ‘simple_links’ in the post_type array, without any luck…
add_filter('pre_get_posts', 'query_post_type'); function query_post_type($query) { if(is_category() || is_tag()) { $post_type = get_query_var('post_type'); if($post_type) $post_type = $post_type; else $post_type = array('nav_menu_item','post','aktuelt', 'blogg'); $query->set('post_type',$post_type); return $query; } }Sounds sweet. I’ve looked through a whole bunch of booking/reservation plugins, this seems to be the only one with a calendar, customizable form, and a bookings backend. I don’t mind coding a bit to make the customizations for now, but if you make an UI for it, this plugin will be even better π
An issue: I’m using the shortcode to print the form in a floating DIV, but when I click submit to validate it, it jumps to the defined bookings page and prints a form with the error msgs along with it. It might have to be this way cus of the way the plugin is made(?), but if you did the validation feedback through AJAX or javascript (before the necessary php validation of course) the user wouldn’t have to load the bookings page when using the shortcode. Unless you see some quickfix for this, I guess it’s a future feature request…
That seems to work fine. So basically I can make any type of fields I want, as long as I make a new function with a unique name, and it outputs some value which can be processed by the plugin (inserted in bookings, metadata etc)?
Is there any way to add a dropdown (select) form field instead of the standard text input/textarea? I noticed in the github template-functions.php, it contains a function for this, while in the wordpress plugin it’s deleted from template-functions.php, so using “rtb_print_form_select_field” just throws me an error.
Yes that seems to work fine, so the code for adding a new column is:
//Add column in backend add_filter( 'rtb_bookings_table_columns', 'buoy_custom_col' ); function buoy_custom_col( $columns ) { $columns['retter'] = 'Retter'; return $columns; }(For anyone else interested)
Ok, I’ll take a look at it tomorrow then, along with the possibility to change input field types etc. Thanks a lot anyways, this one works like a charm now.
(Oh yes, I’ll use $booking instead of $post, sanitize, sanitize!)Thanks a lot, this all makes sense. And I noticed the $this that was supposed to be $post π
I can’t make it work though, I get an email notification saying Retter: {retter} as if it isn’t set. I’ll continue playing with it…Btw, is there any way to add the new form field to the backend bookings list?
If I using “rtb_insert_booking_metadata” try storing for instance $meta[‘retter’] = $this->retter; I get a fatal error from the web server for using $this…. Apparently that’s not the way to do it, although that’s how you do it in the insert_post_data function itself in Booking.class.php….
Ok, thanks! Marking as resolved.
Do you have any ETA on the future release?
I have a csv with hundreds of rows, which is updated once in a while by a client. I can’t ask them to go through the document replacing special characters for hundreds of rows π
Thanks!
The original csv has some hundred rows, I removed all but one row which contains a special character (ΓΈ) in the column called “Hovedgruppe_Navn”. When I tried uploading it at your test website, this column came up blank.
This is the csv to use for testing.(I didn’t create the csv myself, so I was thinking there could be something fuzzy about it, but I tried copying the contents to a blank/new csv in excel, same problem when uploading.)