Forum Replies Created

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter gregfuller

    (@gregfuller)

    Ahhh, the style map is a file inside the docx. That explains that. And I was happy to learn that span.MyClass works.

    >>>Are you saying that you start with a document that converts normally using Mammoth (albeit with missing styles), you try embedding a style map, and then it no longer converts at all?

    Not exactly, The WP plugin never failed to convert. I was never able to try a wp post with a docx that had an embedded style map.

    That’s because I could not get the conversion tool at https://mike.zwobble.org/projects/mammoth/embed-style-map/ to work, first on a docx of rather normal complexity, then on a simple docx with only one line of text and one style mapping. I thought document complexity might be a factor because I erroneously thought you were imbedding the style map inside document.xml.

    So, back to the embed-style-map page. When I upload the docx, type in the style mappings, and press “embed” it takes me to a blank page with no downloads available.

    I’m going to try again later. If it still doesn’t work for me, I will get you the docx that I couldn’t get to work with the embed-style-map page. It’s probably something I’m doing wrong.

    ————————————————————-

    BTW, just for grins, I tried unzipping a docx, putting in a small whatever.txt file, and re-zipping it with a rename to *docx. MS Word 2016 Mac refused to open it, and tells me “There are problems with the content.”

    ———————————————————-

    One another topic, I know from another post that you don’t have the time to enhance the plugin to let a user enter a style map in wp admin. Totally understandable. I’m going to present a simpler solution and ask if you would consider that.

    Would you consider adding a couple of JS “hooks” to mammoth-editor.js? Of course these are not the PHP hooks of WordPress, but they would work similarly for javascript. If the applicable callback function happened to be defined and loaded before mammoth-editor.js, it would be called, otherwise things would work as before.

    Something like this – not trying to be exact, but to present an idea:

    ——————————————————————–

    The first js “hook” would allow a wp theme or plugin developer to add to the default style map or replace it:

    if (typeof mammoth-getExtraStyleMap == ‘function’) {
    extraStyleMap = mammoth-getExtraStyleMap();
    }

    getExtraStyleMap return an object containing a style map array as sell as a value indicating if this should be added to the default map or replace it.

    ——————————————————————————

    The second would allow for modifying the preview html before it was echo’d to the user:

    if (typeof mammoth-filterPreview == ‘function’) {
    filtered-preview-html = mammoth-filterPreview(html);
    }

    The filtered-preview-html would then be used to display the preview to the user.

    ———————————————————————————————————

    If you decide you are willing to make these changes, I would be happy to write some good documentation for the plugin and the github page.

    I appreciate your taking the time to respond. I believe your plugin has commercial value, and would be more than happy to pay for it to support development.

    Thanks -Greg

    Just reverted to version 3.3. Problem went away.

    Same problem, exporting to file. Seem to start with upgrade to 3.4.

    Forum: Reviews
    In reply to: [FakerPress] Nice Plugin
    Thread Starter gregfuller

    (@gregfuller)

    Thanks for the quick response.

    One thing I forgot to mention is the length of the generated tag and category names. Sometimes they were 5 or 6 words long. I had to go in and do a quick edit to shorten them to a more realistic one word name.

    I disconnected. Then, if I remember correctly, when I hit the link to reconnect it didn’t appear to do anything. But I think that was because I was already logged in to Facebook. Anyway, it reconnected and it’s working for me now. Hope that helps.

    I’m having the same issue.

    In WooCommerce, reviews are just regular wordpress comments for the custom post type “product”. So, you might be able to modify a plugin that adds comments to the user profile. You would have to change the post type on the code that pulled the comments. Here is one such plugin.

    This is not directly answering your question, and you probably already know this, but you could create a “dummy” unpublished product and use the product duplicate feature.

    You can hide the price entirely by placing this in your theme’s style.css file:

    .products .price {
        display: none !important;
    }

    To display the second lowest price would require a modification to a template.

    Elegant themes estore integrates with two ecommerce plugins, and woocommerce is not one of them. At a minimum you would need to change the woocommerce theme wrappers as explained in this post: https://wcdocs.woothemes.com/codex/third-party-custom-theme-compatibility/

    After that, you will still probably need to make some css tweaks to have it look right.

    Make the following change to your wp-config.php file:

    Change this line:
    define('WPLANG', '');

    To this:
    define ('WPLANG', 'ru_RU');

    Try putting this in your theme’s functions.php file:

    function my_unregister_widgets() {
    	unregister_widget('WooCommerce_Widget_Recent_Products');
    	unregister_widget('WooCommerce_Widget_Featured_Products');
    	unregister_widget('WooCommerce_Widget_Product_Categories');
    	unregister_widget('WooCommerce_Widget_Product_Tag_Cloud');
    	unregister_widget('WooCommerce_Widget_Cart');
    	unregister_widget('WooCommerce_Widget_Layered_Nav');
    	unregister_widget('WooCommerce_Widget_Price_Filter');
    	unregister_widget('WooCommerce_Widget_Product_Search');
    	unregister_widget('WooCommerce_Widget_Top_Rated_Products');
    	unregister_widget('WooCommerce_Widget_Recent_Reviews');
    	unregister_widget('WooCommerce_Widget_Recently_Viewed');
    	unregister_widget('WooCommerce_Widget_Best_Sellers');
    	unregister_widget('WooCommerce_Widget_On_Sale');
    	unregister_widget('WooCommerce_Widget_Login');
    	unregister_widget('WooCommerce_Widget_Random_Products');
    }
    add_action('widgets_init', 'my_unregister_widgets');
    Thread Starter gregfuller

    (@gregfuller)

    I should add that a previous hook was implemented that allowed a contributor to edit a published post, like so:

    / contributor can edit published posts (but leaves published, want to set to pending)
    function allow_contributor_edit_published_posts() {
    	$contributor = get_role('contributor');
    	$contributor->add_cap('edit_published_posts');
    }
    if ( current_user_can('contributor') && !current_user_can('edit_published_posts') )
    	add_action('admin_init', 'allow_contributor_edit_published_posts');

    This code comes before the other hook.

Viewing 13 replies - 16 through 28 (of 28 total)