• professor99

    (@professor99)


    Hi all,

    The code updates I have been mentioning in various packages are finally to a point where they can be released.

    The Readme follows.

    [ Moderator note: Backticks inserted, you really don’t need to post that here. A link would have sufficed. ]

    README 2RRR 1.0 For WP User Frontend Version: 1.1 fork: 2RRR 1.0 alpha
    ========================================================
    
    Introduction
    ------------
    
    This is a fork from WP User Frontend Version 1.1.
    It currently only applies to the Add Post and Edit Post functionality on WP User Frontend.
    Use of AjaxForm for Ajax style posts is the next step in this project.
    It focuses on both useability and ease of customerization.
    There are some bug fixes included as well.
    
    Some of these changes are outlined by the following items on the WP User Frontend support forum.
    
    https://www.ads-software.com/support/topic/custom-editors
    https://www.ads-software.com/support/topic/plugin-wp-user-frontend-redirecting-after-posting
    https://www.ads-software.com/support/topic/allow-to-choose-category-filter
    https://www.ads-software.com/support/topic/close-button-and-return-on-post
    https://www.ads-software.com/support/topic/security-problem-doesnt-observe-user-capabilities
    
    Changes from WP User Frontend Version 1.1
    -----------------------------------------
    
     * Main Changes from Version 1.1:
    
     * Custom editor option added.
     * Editors use max availiable width.
     * Close button added as shortcut option and redirects set to suit.
     * wpuf_allow_cats filter added.
     * Security checks updated.
     * Code updated to allow use of wpuf_can_post filter for non logged in users.
    
    Status
    -------
    
    This code is ALPHA! Use it at you own risk!
    
    It currently has only been tested in the following configuration.
    
    Wordpress 3.4.2
    Firefox 16.0.2
    IBM PC
    
    This code is a public development fork of WP User Frontend.
    It is not written by or supported by the author of WP User Frontend (Tareq Hasan) and is not an official release of WP User Frontend.
    So please be aware this code may not be included in the next official release of WP User Frontend.
    
    Bugs
    -------
    
    Please report bugs via this special topic on the WP User FrontEnd forum 
    
    https://www.ads-software.com/support/topic/frontend-updates-2rrr-fork
    
    Please report only bugs here. 
    
    All suggestions for updates to WP User Frontend need to go to the normal support forum.
    
    https://www.ads-software.com/support/plugin/wp-user-frontend
    
    Download
    --------
    
    https://2rrr.org.au/downloads/wp-user-frontend/wp-user-frontend_1_1_2RRR_1_0_alpha.zip
    
    Installation
    ------------
    
    This update requires the pre-installation of WP User FrontEnd version 1.1.
    If you have another version of WP User Front End installed this update will not work.
    Changed code is in /wp-user-frontend in the same directory structure as the original files.
    Before using make a copy of your original files for safe keeping just in case something breaks.
    Then copy the files across.
    
    Examples
    --------
    
    Examples of use are provided in the directory /examples.
    
    Add Post Shortcodes
    -------------------
    
    Shortcode examples::
    
    	[wpuf_addpost]
    	[wpuf_addpost close="false"]
    
    Shortcode options:
    
    	post_type: post | <otherPostType>
    		post: (default)
    		<otherPostType>: other post types
    	close: true | false
    		true: will display close button and redirect to last page on close (default)
    		false: 
    
    Edit Post Shortcodes
    -------------------
    
    Shortcode examples::
    
    	[wpuf_edit]
    	[wpuf_edit close="false"]
    
    Shortcode options:
    
    	close: true | false
    		true: will display close button and redirect to last page on close (default)
    		false: 
    
    Last word
    ----------
    
    Hope you find this useful. Please report bugs as mentioned above.
    
    Big thanks to Tareq Hasan for his work putting together WP User Frontend.

    Cheers
    TheProfessor

    https://www.ads-software.com/extend/plugins/wp-user-frontend/

Viewing 15 replies - 61 through 75 (of 134 total)
  • Professor99,

    A little question, how can I redirect to custom URL?

    I tried $redirect_url = get_permalink( ‘462’ );

    but its not working

    Thread Starter professor99

    (@professor99)

    Hi Rkarel,

    To get a WP gallery why don’t you just set the editor to a ‘Rich Text’ editor and select ‘Gallery’ as the ‘Post Format’. The old Attachment fields is only useful if you want to restrict your users to a ‘Plain Text’ editor but still allow the uploading of attachments.

    Thread Starter professor99

    (@professor99)

    Hi wp student,

    Not sure if your mean as code or as the redirect shortcode option.

    The shortcode redirect to a custom url is not implemented yet. My prior discussion with you mentioned it as a good idea for the next release.

    If your doing it in code you need to change $redirect_url at the end of submit_post() in wpuf-add-post.php and wpuf-edit-post.php. However there is a filter ‘wpuf_post_redirect’ provided especially for that case which you can add to your functions.php file in your theme.

    Thread Starter professor99

    (@professor99)

    Of note the redirect bug found by wp student a few posts back only occurs if the add post page is called directly from the address bar. This will never be the case in a normal installation as all referrals will come from an html link. However it will be fixed in the next development version.

    Thread Starter professor99

    (@professor99)

    For wp student and those wanting the ability to specify a redirect url you can amend the code as follows to allow the redirect option of the add post shortcode to include urls. For example [wpuf_addpost redirect=”https://www.ads-software.com/support/plugin/wp-user-frontend”%5D

    In the function submit_post() change the following lines from

    //Set after post redirect
    switch ($_POST['wpuf_redirect']) {
    	case "auto":
    		if ($_POST['wpuf_close'] == true) {
    			$redirect_url = $_POST['wpuf_referer'];
    		} else {
    			$redirect_url = $_POST['wpuf_self'];
    		}
    		break;
    	case "current":
    		$redirect_url = $_POST['wpuf_self'];
    		break;
    	case "last":
    		$redirect_url = $_POST['wpuf_referer'];
    		break;
    	case "new":
    		$redirect_url = get_permalink( $post_id );
    		break;
    	default:
    		$redirect_url = "";
    }

    to

    //Set after post redirect
    switch ($_POST['wpuf_redirect']) {
    	case "auto":
    		if ($_POST['wpuf_close'] == true) {
    			$redirect_url = $_POST['wpuf_referer'];
    		} else {
    			$redirect_url = $_POST['wpuf_self'];
    		}
    		break;
    	case "current":
    		$redirect_url = $_POST['wpuf_self'];
    		break;
    	case "last":
    		$redirect_url = $_POST['wpuf_referer'];
    		break;
    	case "new":
    		$redirect_url = get_permalink( $post_id );
    		break;
    	default:
    		if ( $_POST['wpuf_redirect'] ) {
    			//Redirect to url given by wpuf_redirect
    			$redirect_url = htmlspecialchars( $_POST['wpuf_redirect'], ENT_QUOTES, "UTF-8" );
    			$redirect_url = add_query_arg( 'wpuf_referer', $_POST['wpuf_referer'], $redirect_url );
    		}
    }

    Hi professor, Because it is harder for simple users. If they load photos using your plugin, the files are automatically inserted into the end of a post. If they use WordPress Media gallery system, they have first of all to click on “Add media file” in the editor, then to create a gallery, then to upload files and finally insert it into the post. Last, but not the least, they have to select the zone where the gallery would be located afterwards so that it is inserted correctly. New users might forget to insert a gallery or insert it in the middle of the post instead of the end.

    In your plugin I can set a limit for a number of photos in galleries, but not in galleries in the WordPress Media Uploader.

    On my sites all users are able to post, but not all of them know how to do it correctly. We would like new users to use a simplified form of photo uploader so that once finished writing article they are able to insert photos as a gallery shown in the end of the post. While other users, if they need to do so, are able to insert photos into the post itself.

    Please can you tell me if it is possible to make the file upload button of your plugin call a standard WordPress function, but a user won’t select where to insert the gallery in a post; instead, it will be automatically inserted to the end of the post. A function to set a limit for a number of photos in the gallery, but leave a number of photos in the post itself unlimited.

    Thanks professor,

    Just tested it. It successfully redirects to provided URL but also adds a string (?wpuf_referer) at the end of URL. Don’t know if its a bug or a regular action.

    https://localhost/thanks/?wpuf_referer

    Thread Starter professor99

    (@professor99)

    Hi wp student

    Not a bug (no prize :(). This adds the url of the page (HTTP_REFERRER) that linked to your frontend add/edit page (if defined) as a query option which is useful if you want to display a thank you message before auto-redirecting to this page.

    Thread Starter professor99

    (@professor99)

    Hi Rkarel,

    I definitely see your point. If the internet consisting of only web programmers it would be virtually a much simpler world. Users! God love them!

    As to the Media Library even though the new WordPress library is much improved in a lot of regards it’s still a minefield for users and of course they have access to all other images there which is both a curse and a bonus.

    So your submission for a media type gallery here is probably apt. We did in the old version just display images down the line on the submission page but it looked horrible particulary when images were huge. However I gather the need is for an image gallery on both the submission page and the resultant post. This probably is a bit of work and I have no idea of any WordPress functionality that would help.

    Does anybody have any ideas on how such a thing should look and work (Maybe another plugin that does this well). Note we have to allow for non image files as well.

    I have a question now for me is working well the V 4.3 but in the image:

    https://2rrr.org.au/downloads/wp-user-frontend/2RRR_4_3/screenshot_top_2RRR_3_0.png

    no is visible the opcion visual or text in the edit the post, but i see TinyMCE options.

    How is this possible?

    Thread Starter professor99

    (@professor99)

    We have discovered a bug with TheStyle theme from Elegant Themes with the development versions and WordPress 3.5.1.

    With the above combination clicking on the attachment button (if enabled) will only result in FrontEnd scrolling to the top of the screen.

    This problem exists because TheStyle theme presently uses a version of jQuery UI (1.7.2) which is incompatiable with WordPress 3.5.1 (which uses 1.9.2).

    The fix is of to update TheStyle theme to use the jQuery version compatiable with the WordPress version it is installed on.

    So in the directory /wp-content/themes/TheStyle do the following chages:

    1. Add the following code to header.php just before wp_head()

    <?php
    //Used by /includes/scripts.php
    wp_enqueue_script(‘jquery-ui-core’);
    wp_enqueue_script(‘jquery-ui-effects’);
    wp_enqueue_script(‘jquery-ui-widget’);
    wp_enqueue_script(‘jquery-ui-tabs’);
    ?>

    2. Delete the following line from include/scripts.php

    <script type=”text/javascript” src=”https://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js”></script&gt;

    Thread Starter professor99

    (@professor99)

    Hi koruitch,

    Finding it a bit hard to understand you .

    I think your referring to the normal TinyMCE “Visual/Text” tabs on the the text editor window which are missing in my screenshot.

    The reason for this is I use a custom editor for this site.

    If you want similar for your site the code for it is already included in the development version in the examples directory in the file Showtime example.php. Just include everything from the line below to the end of that file

    //Add custom editor for WP User Frontend

    I also talked about this on the forum

    Thanks for your interest. I forgot about this when I took the screenshot so it could be a bit confusing.

    Hi there professor99..

    Really awesome job with the fork, really impressed.

    In relation to the status update from the user dashboard.
    I’m having a problem getting it to work.

    1. User logs in through front end
    2. User submits post – post is in pending
    3. Admin rejects post by saving it back to draft
    4. User logs in through front end again and edits post
    4.1 Puts status = pending.
    4.2 Presses update.
    4.3 Update successful – except for the status still in draft (Or ‘Offline’ as it states in the dashboard.

    Any tips?

    Also the child category for a post never seems to be picked up when editing a post from dashboard.

    Thank you for all your help.

    Thread Starter professor99

    (@professor99)

    4.3 Is correct. Edit Post only has one response if the update is successful and that is it (Add Post is a lot more verbose). Edit Post doesn’t change the status of the post unless the post status field is allowed and the user changes it. However in the case the post status field is not enabled it would make sense to set the post status to the default if the current post status is draft.

    On my part up to now no thought has been given on how to handle blog post rejections (or on WordPress for that matter) as most of our effort has been spent on porting rear end WordPress functions to the frontend. It is certainly worth a thought.

    What do you mean by child category?

    Hi there Professor99,

    Thanks for getting back to me so quickly :^)

    On my config I have Post Status field allowed, so upon editing the post the user does change the status from Draft to Pending.
    But after the user updates, the status does not change.

    The user type is : contributor

    I have also used the admin account, with a post that the admin has made, the drop down has all the various status’ (pending, draft, publish,etc) but when trying to update the post it will not keep the update.

    Does this function work properly on your 4.3? Or is it only me? ??

    In terms of the child category, please take a look at this screen cap:

    https://i47.tinypic.com/11walvm.png

    Thanks so much for your help!
    Hope I’m also helping by finding bugs for you :^))

Viewing 15 replies - 61 through 75 (of 134 total)
  • The topic ‘Frontend Updates 2RRR Fork’ is closed to new replies.