Up to 50 percent off

Forum Replies Created

Viewing 13 Topics - 1 through 13 (of 13 total)
Author Posts
March 8, 2015 at 7:41 am in reply to: Enable/disable comments in frontend 38489
Chris Swede Chris Swede

Hi Sekander and Ari. This is a late reply and I am sorry for that, but I only had the opportunity to sort this out recently. The culprit in my case was a hidden field being added by WPUF, which sets comment status to “c” or “o” for reasons I have not researched. So by simply commenting out the line of code I got this to work with Sekander’s function above. The line of code is in render-form.php, line 545:

<input type="hidden" name="comment_status" value="<?php echo esc_attr( $cur_post->comment_status ); ?>">

Hope this helps!

October 20, 2014 at 1:15 am in reply to: First value and label in dropdown field always empty 28695
Chris Swede Chris Swede

Hi Nayem,

Indeed the latest update has fixed this. Thanks for your help!

October 20, 2014 at 1:10 am in reply to: Enable/disable comments in frontend 28694
Chris Swede Chris Swede

Hi Sekander,

Thank you for your patience with this. I have updated to 2.2.6 and the same problem persists. If comment status is set on a new post I can’t change it in post edit and comments will never display. In fact, what is saved in the post’s comment_status in the database is neither “open” nor “closed” but instead “o” or “c”. In both cases “o” and “c” the comments do not display since those are not a valid comment_status.

October 17, 2014 at 6:33 pm in reply to: First value and label in dropdown field always empty 28579
Chris Swede Chris Swede

This is what is saved in the database:

"dropdown_field";s:8:"required";s:2:"no";s:5:"label";s:7:"Ranking";s:4:"name";s:14:"_pn_apr_rating";
s:7:"is_meta";s:3:"yes";s:4:"help";s:0:"";s:3:"css";s:0:"";s:5:"first";s:5:"Rate";s:7:"options";a:6:{s:0:"";s:0:"";i:1;s:9:"one star";i:2;s:9:"two stars";i:3;s:11:"three stars";i:4;s:10:"four stars";i:5;s:10:"five stars";}

I can fix this manually, by deleting empty options in phpMyAdmin:

"dropdown_field";s:8:"required";s:2:"no";s:5:"label";s:7:"Ranking";s:4:"name";s:14:"_pn_apr_rating";
s:7:"is_meta";s:3:"yes";s:4:"help";s:0:"";s:3:"css";s:0:"";s:5:"first";s:5:"Rate";s:7:"options";a:5:{i:1;s:9:"one star";i:2;s:9:"two stars";i:3;s:11:"three stars";i:4;s:10:"four stars";i:5;s:10:"five stars";}
October 16, 2014 at 2:41 am in reply to: Not updating after 2.2.4 28495
Chris Swede Chris Swede

Hi Sekander,

Thanks for your reply. I have activated my license some time ago, but now all I can see under the WPUF “Updates” tab in wp-admin is the text “Enter the E-mail address that was used for purchasing the plugin and the license key. We recommend you to enter those details to get regular plugin update and support.”

Below that it says “plugin is activated” and at the bottom there is a button which says “delete license”. My license key is not visible. I can only see it here in my wedevs account.

October 11, 2014 at 12:14 am in reply to: image size H/W and file size a big issue 28150
Chris Swede Chris Swede

Hi,

You can set the maximum image size uploaded in your Settings -> Media in WP-admin. Any images larger than the size you set will be downsized.
For greater control, you can auto resize uploaded images with the function add_image_size

An example:

if ( function_exists( 'add_image_size' ) ) { 
	add_image_size( 'size-140', 140, 140 );
	add_image_size( 'size-400', 400, 350 );
	add_image_size( 'center', 550, 367, array( 'center', 'center' ) ); //center crop
}

In a loop, you can then get the image you choose, eg size-400 with

$image = wp_get_attachment_image_src( get_post_thumbnail_id(), 'size-400'); $url = $image[0];

and display it:

<img src="<?php echo $url ?>" />

To use this in a single post, read Chip Bennet’s reply in this thread (untested).

October 9, 2014 at 3:54 pm in reply to: Enable/disable comments in frontend 28113
Chris Swede Chris Swede

Hi Sekander,
sorry for my late reply. Yes, that’s correct, changing the comment status when editing a post doesn’t get updated when edits are saved. If the comment status can be selected with a single checkbox “enable comments” like in WP-admin back-end post edit screen it would be great!

September 17, 2014 at 5:55 pm in reply to: Enable/disable comments in frontend 26942
Chris Swede Chris Swede

Hi again,

I mark this as unresolved since it is not working correctly. It would be a very useful and appreciated feature to include this option in the WPUF form builder. Preferably displayed as a single checkbox in the front-end add post and edit post forms, like its done in the WP-admin post edit area. At the moment it works but in a clumsy way due to the dropdown in the add new post form, whereas in the edit post form it does not work at all.

September 17, 2014 at 5:46 pm in reply to: Too Many ReDirects 26939
Chris Swede Chris Swede

Denis, try the following edits of WPUF file login.php:

Comment out line 28:

// add_filter( 'logout_url', array($this, 'filter_logout_url'), 10, 2 );

And from line 360:

// function process_logout() {
     //   if ( isset( $_GET['action'] ) && $_GET['action'] == 'logout' ) {
     //       check_admin_referer('log-out');
     //      wp_logout();

     //       $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : add_query_arg( array( 'loggedout' => 'true' ), $this->get_login_url() ) ;
     //       wp_safe_redirect( $redirect_to );
     //       exit();
     //   }
    // }

Should solve your problem.

September 2, 2014 at 9:38 pm in reply to: WPUF logout error 26186
Chris Swede Chris Swede

Thanks for addressing the above issue in the latest update to 2.2.4 and for improving WPUF with the ability to add image caption as well. Great work!

August 3, 2014 at 8:55 pm in reply to: Enable/disable comments in frontend 24452
Chris Swede Chris Swede

Hi Sekander,

Thanks a lot for this. It is really useful. It works with one exception. If you turn off the comments on the wpuf frontend edit post page and save, then you can’t turn them back on again. In the wpuf frontend create new post it works.

The ideal solution would be to have a checkbox just like WordPress does in the backend, where you can check/uncheck to enable comments since a dropdown is not meant when the selection is between only two alternatives. When the wpuf wpuf_add_post_args are filtered an empty checkbox (comments disabled) won’t save as a meta key.

August 3, 2014 at 7:41 pm in reply to: WPUF logout error 24448
Chris Swede Chris Swede

Thank you for your help. The login is in a menu on every page by means of WordPress Super Socializer plugin so your suggestion is not an alternative. Commenting out parts of WPUF file login.php fixes the issue, but perhaps you can make it an option to disable WPUF filtering of logout url?

Comment out on line 28:

// add_filter( 'logout_url', array($this, 'filter_logout_url'), 10, 2 );

and from line 360:

// function process_logout() {
     //   if ( isset( $_GET['action'] ) && $_GET['action'] == 'logout' ) {
     //       check_admin_referer('log-out');
     //      wp_logout();

     //       $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : add_query_arg( array( 'loggedout' => 'true' ), $this->get_login_url() ) ;
     //       wp_safe_redirect( $redirect_to );
     //       exit();
     //   }
    // }
July 21, 2014 at 4:16 pm in reply to: Loading of scripts 23871
Chris Swede Chris Swede

Hi, please put this in your theme’s functions.php

function disable_wpuf_scripts() {
    // Remove scripts from all pages except where needed - match IDs to WPUF page IDs
    if( ! is_page(array('278','279','280')) ) {
        wp_dequeue_style( 'wpuf-css' );
	wp_dequeue_script( 'wpuf-form' );
	wp_dequeue_script( 'google-maps' );
    }
}
// Set priority to run after scripts are enqeued by the plugin
add_action( 'wp_enqueue_scripts', 'disable_wpuf_scripts', 100 );
Viewing 13 Topics - 1 through 13 (of 13 total)