acn
Forum Replies Created
-
Forum: Plugins
In reply to: [Timeline Express] 1.2.1 broke some functionality!I guess this code isn’t full proof – only the last link is actually “clickable” even though the links all get in place. It’s probably some kind of script working behind that’s blocking it.
Forum: Plugins
In reply to: [Timeline Express] 1.2.1 broke some functionality!Hi Evan,
Thanks for the update and sorry about the delay. I’ve tested 1.2.2 and the backend table is now working perfectly.
I also took your advice and extended the plugin to what I needed, basically adding a custom metabox for an URL and wrapping it around the featured timeline express image:
// Timeline Express - Frontend - Wrap custom Article URL around image function acn_timeline_express_image_wrap_article_url( $image_html, $post_id ) { //global $post; $article_url = timeline_express_get_custom_meta( $post_id, 'announcement_article_url', true ); if ( !empty ($article_url) ) { $image_html = '<a href="' . $article_url . '" target="_blank">' . $image_html . '</a>'; } return $image_html; } add_filter( 'timeline_express_image', 'acn_timeline_express_image_wrap_article_url', 10, 2 ); // Timeline Express - Backend - Add Article URL custom metabox to backend announcement item function timeline_express_article_url_metabox( $options ) { $announcement_custom_metabox = new_cmb2_box( array( 'id' => 'announcement_article_url_metabox', 'title' => 'Custom Data', 'object_types' => array( 'te_announcements' ), // Post type 'context' => 'advanced', 'priority' => 'high', 'show_names' => true, // Show field names on the left ) ); // Container class $announcement_custom_metabox->add_field( array( 'name' => 'Article URL', 'desc' => 'If filled it will wrap as a link around the featured image', 'id' => 'announcement_article_url', 'type' => 'text', ) ); } add_action( 'timeline_express_metaboxes', 'timeline_express_article_url_metabox' );
It doesn’t have any “bling” but it does the job.
Thanks for your update!
ps: very good extensibility and documentation!
Forum: Plugins
In reply to: [Timeline Express] 1.2.1 broke some functionality!I’m sorry but no, I’m using a 27inch apple Thunderbolt display + MBPr 15, browsing with the latest Chrome for Mac version. I attached a screenshot (OP) for you to see the issue.
And going back to the frontend part: please don’t confuse my suggestions as for what I was asking for.
To be clear, I thought that the fact that we now couldn’t include a hyperlink in the excerpt’s content was a bug, but I understand now that it was purposely removed without warning to current users as a premium feature, which is in your right, though not nice.
Cheers
Forum: Plugins
In reply to: [Timeline Express] 1.2.1 broke some functionality!Hi Evan,
The fact is that the current version is unusable in the backend. It’s not a matter of responsiveness, the table is completely messed up. But that should be a simple styling issue you should address.
On the frontend you removed a crucial feature for my current usage, which is the ability to have just a simple link inside the excerpt and it sucks that now that simple thing is a premium feature. I don’t use the excerpt page at all and I don’t want users to even see it, I’m using Timeline Express for creating a timeline of external articles. I don’t know if there are other users out there with similar uses, but I don’t like to create duplicate content with plugins. If I can point to a blog article that is just excellent; in such cases I would suggest you to have a custom URL to point to that will override any excerpt linking. Oh, and the central button link is completely counter-intuitive, I never even noticed it was there before looking at this today; the link should be the featured image or a specific “+” button.
I’m sorry but I’ll stick with 1.1.8.3 while it works, in spite of its caveats.
Cheers
edit: and this is not resolved, at least the backend issue.
Forum: Plugins
In reply to: [Timeline Express] 1.2.1 broke some functionality!I’ve rolled back to Timeline Express v1.1.8.3 and this works as it should.
https://downloads.www.ads-software.com/plugin/timeline-express.1.1.8.3.zip
Forum: Plugins
In reply to: [Easy Table] ResponsiveI’m using some custom CSS to get some responsive behavior:
.easy-table table, .easy-table thead, .easy-table tbody, .easy-table th, .easy-table tr, .easy-table td { display: block; } .easy-table thead { display: none !important; } table.easy-table td { border: none !important; } table.easy-table tr:nth-of-type(odd) { background: rgba(255,255,255,.5); } .easy-table td { display: table-caption; caption-side: bottom; width: 300%; } .easy-table td:first:before { /*content: "can place dummy content here"; */ float: left; text-align: left; width: 50%; display: inline-block; }
One big limit with this is that the headers will still be present one time (or none at all in the example above). If someone know how to relocate the headers to repeat before each cell it would be a whole lot better.
There are certainly better ways of doing this (this is a 4 column layout), but it works for me.
I ended up having to delete all attributes and variations and recreate them. That is not working properly.
Just to clarify: I’m referring to global attributes, not local ones (those work fine).
Forum: Plugins
In reply to: [Plugin Inspector] Not runningYou’re right, that was the issue. WPML Media Translation in particular, I’ll have to see with them what’s wrong.
Excellent plugin, btw!
Forum: Plugins
In reply to: [WooCommerce] Inconsistent behavior in production server with custom pluginI think I’m getting somewhere. I ended up not using AJAX, it wasn’t necessary for what I’m doing. I’m still having issues with WPML compatibility and strange bugs on the production server, but I’m trying to sort them out.
Thanks for the pointers thoughForum: Plugins
In reply to: [WooCommerce] Inconsistent behavior in production server with custom pluginThanks for those pointers. I ended up going back up a bit to see if I was doing something wrong that seemed to be working properly.
So, with all client sessions cleared, transients cleared and empty cart, I was able to identify one thing that is going wrong, can’t say if it happened before or not. Considering the code I wrote before, with these hooks:
add_action('wp_ajax_' . 'my_custom_data', 'my_ajax_custom_data_callback_inline', 1); add_action('wp_ajax_nopriv_' . 'my_custom_data', 'my_ajax_custom_data_callback_inline', 1); add_filter( 'woocommerce_add_cart_item_data', 'my_add_cart_item_data', 10, 2 );
What I’m seeing is that the AJAX php callback is getting called after the woocommerce_add_cart_item_data filter. As I have custom data being set with the ajax call that is supposed to be later used when actually adding the data to cart, what happens is that the custom data is being added only to the next cart item addition.
Is there any way to streamline this properly?
– AJAX sets data in session:WC()->session->set( my_meta_data' , $_POST['my_post_data'] );
– Data is merged when adding to Cart:
$my_data_from_session = WC()->session->get( 'my_meta_data' );
Thanks
Forum: Plugins
In reply to: [WooCommerce] Inconsistent behavior in production server with custom pluginThanks for the suggestion. I’ve changed from php sessions to WC based sessions, and the behavior is still the same: on my local server it works fine but on the production server it’s not.
Here’s some part of my code, the most pertaining to sessions at least. Again, this owrks fine on the local server:
if ( ! function_exists('my_ajax_custom_data_callback_inline')) { function my_ajax_custom_data_callback_inline () { global $woocommerce; do_action( 'woocommerce_set_cart_cookies', true ); if ( !empty ( $_POST['my_post_data'] ) ) { WC()->session->set( my_meta_data' , $_POST['my_post_data'] ); } wp_die(); } } // AJAX hooks add_action('wp_ajax_' . 'my_custom_data', 'my_ajax_custom_data_callback_inline', 1); add_action('wp_ajax_nopriv_' . 'my_custom_data', 'my_ajax_custom_data_callback_inline', 1); add_filter( 'woocommerce_add_cart_item_data', 'my_add_cart_item_data', 10, 2 ); function my_add_cart_item_data ( $cart_item_data, $product_id) { global $woocommerce; $new_value = array (); $my_data_from_session = WC()->session->get( 'my_meta_data' ); if ( !empty ( $my_data_from_session ) ) { $new_value['my_meta_data_in_cart'] = $my_data_from_session; $merged_arrays = array_merge ( $cart_item_data, $new_value ); return $merged_arrays; } return $cart_item_data; } add_filter( 'woocommerce_get_cart_item_from_session', 'my_get_cart_items_from_session', 10, 3 ); function my_get_cart_items_from_session ( $cart_item, $values, $key ) { if ( array_key_exists ( 'my_meta_data_in_cart' , $values ) ) { $cart_item['my_meta_data_in_cart'] = $values['my_meta_data_in_cart']; } return $cart_item; }
I’m really lost with this :/
Forum: Plugins
In reply to: [WooCommerce] Inconsistent behavior in production server with custom pluginThanks for your reply. I did read about that, I think regarding using wp transients, but frankly I couldn’t find a way to apply it to my situation. But the strange thing is that it really does run without issues whatsoever on my local server.
What I’m doing, in respect to managing the $_SESSION data, is fairly as described in this blog post:
https://wisdmlabs.com/blog/add-custom-data-woocommerce-order/Forum: Plugins
In reply to: [Code Snippets] VersionsNo worries, you’re welcome!
Than you for the wonderful plugin!Forum: Plugins
In reply to: [Sell Media] Theme compatibility – Sell Media Loads in Footer…?Looking into the html output I attached in the OP I still find strange how Sell Media is hooking within the footer tag.
As for your suggestion, given that this is the only plugin (which I don’t use and was thinking of using) that does not hook properly with mu current WP setup, I will have to look elsewhere.
Cheers