Forum Replies Created

Viewing 15 replies - 316 through 330 (of 341 total)
  • You would need to edit the function wpuf_show-meta_front() in the file wpuf-functions.php to filter out the custom field you want to hide.

    At the moment you can only change the profile code by editing the code or hooking actions in wpuf-editprofile.php.

    Tareq is toying with the idea of providing customerized forms for edit/add post which may extend to profiles but such a change may be way into the future

    It’s certainly possible if you edit the code as it only requires commenting out a few areas of wpuf-add-post.php and wpuf-edit-post.php as far as I can see.

    However if you are not able to do this yourself or get someone to do it for you Tareq is toying with the idea of providing customerized forms (the whole lot rather than the custom fields Frontend already provides). However such an update may be way in the future.

    Thread Starter professor99

    (@professor99)

    The next release of this development fork 3.0 is now available.

    This hasn’t yet been tested on Internet Explorer 9 & 10 and I would be grateful if someone could test this especially with the WordPress 2010 and 2011 themes.

    The main differences from 1.1-fork-2RRR-2.1 follow:

    – Optionally add Excerpts to the Add/Edit Post forms.
    – Add/Edit Post forms re-styled to suit excerpts.
    – Publish and expiration times can now be edited on the Edit Post form.
    – A Delete button can be optionally added to the Edit Post Form.
    – Attachment/Featured Image buttons fixed for Flash/Silverlight.
    – CSS has been strengthened for use in other themes.
    – CSS has been rearranged and formatted for readability.
    – CSS has been tested and fixed for popular browsers using 2010/2011 WordPress themes.

    Other changes are listed in the README at the following link

    http://2rrr.org.au/downloads/wp-user-frontend/2RRR_3_0/README_2RRR_3_0.txt

    Screenshots for the edit page can be found at the following links

    http://2rrr.org.au/downloads/wp-user-frontend/2RRR_3_0/screenshot_top_2RRR_3_0.png

    http://2rrr.org.au/downloads/wp-user-frontend/2RRR_3_0/screenshot_bottom_2RRR_3_0.png

    It currently has only been tested in the following configurations.

    WordPress 3.4.2
    Apache Server
    PHP 5.2 & 5.3
    WordPress 2010 Theme
    WordPress 2011 Theme
    Firefox 16.0.2
    Safari 5.0.533.16 (should work 4.1+)
    Chrome 23.0.1271.95m (should work 5.0+)
    Internet Explorer 7.0 & 8.0
    Windows XP

    Bug Reports for other configurations would be greatly appreciated.

    The update can be downloaded at the following link

    http://2rrr.org.au/downloads/wp-user-frontend/2RRR_3_0/wp-user-frontend_1_1_2RRR_3_0_alpha.zip

    A Github repository is available at the following link

    https://github.com/professor99/WP-User-Frontend/tree/2RRR

    Cheers
    TheProfessor

    “As I read it, it will come in the next version – Please see this post:”

    http://wordpress.org/support/topic/frontend-updates-2rrr-fork

    Probably but this is a development version fork for testing where not everything will be included in subsequent versions. That’s up to Tareq who is the author of this project. However I do need people to test this on different platforms to mine.

    However the following post gives the code if you just want to make a small change rather than install the development version.


    Close Button and return on Post

    Some prior discussion is here.


    redirecting after posting

    Cheers
    The Professor

    Thread Starter professor99

    (@professor99)

    Bugfix for servers where PHP version < 5.3

    Download here

    Big thanks to Carlos-Vazquez for reporting this. Can you re-test?

    Cheers
    TheProfessor

    Thread Starter professor99

    (@professor99)

    The next release of this development fork is now available. This version adds Ajax form style updates and better error and info messages. It also adds a redirect option for Add/Edit Post pages and the ability to filter options. There are lots of other changes as well including bug fixes plus visual changes to buttons and attachments for the Add/Edit Post pages.

    Here’s a link to a screenshot of the Edit Post Page.

    And here’s the readme

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

    README WP User Frontend Version: 1.1-fork-2RRR-2.0 alpha
    ========================================================
    
    Modified Code: Andy Bruin (professor99)
    Original Code: Tareq Hassan (tareq1988)
    
    Introduction
    -------------
    
    This is a fork from WP User Frontend Version 1.1.
    It is a major update of WP User Frontend concentrating on useability and customerisation.
    It focuses on Add Post and Edit Post functionality.
    There are some bug fixes included as well.
    
    This version adds Ajax form style updates and better error and info messages.
    It also adds the ability to filter options.
    There are some additional bug fixes included as well.
    
    Some of these changes are outlined by the following items on the WP User Frontend support forum.
    
    http://wordpress.org/support/topic/custom-editors
    http://wordpress.org/support/topic/plugin-wp-user-frontend-redirecting-after-posting
    http://wordpress.org/support/topic/allow-to-choose-category-filter
    http://wordpress.org/support/topic/close-button-and-return-on-post
    http://wordpress.org/support/topic/security-problem-doesnt-observe-user-capabilities
    
    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).
    Also 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 
    
    http://wordpress.org/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.
    
    http://wordpress.org/support/plugin/wp-user-frontend
    
    Download
    --------
    
    http://2rrr.org.au/downloads/wp-user-frontend/wp-user-frontend_1_1_2RRR_2_0_alpha.zip
    
    A Github repository is availiable
    
    https://github.com/professor99/WP-User-Frontend
    
    Examples
    ---------
    
    Examples of use are provided in the directory /examples.
    
    AddPost Shortcodes
    --------------------
    
    Shortcode examples::
    
    	[wpuf_addpost]
    	[wpuf_addpost close="false"]
    	[wpuf_addpost close="false" redirect="none"]
    
    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:
    	redirect: none | auto | current | new | last
    		none: do nothing
    		auto: If close==true will load last page on post.
    		      Else will reload current page on post. (default)
    		current: will reload current page on post
    		new: will load new page on post
    		last: will load last page on post 
    
    EditPost Shortcodes
    ------------------
    
    Shortcode examples::
    
    	[wpuf_editpost]
    	[wpuf_editpost close="false"]
    	[wpuf_editpost close="false" redirect="none"]
    
    Shortcode options:
    
    	close: true | false
    		true: will display close button and redirect to last page on close (default)
    		false:
    	redirect: none | auto | current | new | last
    		none: do nothing
    		auto: If close==true will load last page on post.
    		      Else will reload current page on post. (default)
    		current: will reload current page on post
    		new: will load new page on post
    		last: will load last page on post 
    
    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.
    
    Changelog
    ---------
    
    = 1.1-fork-2RRR-2.0 professor99 =
    * Now uses jquery.form to do Ajax style updates.
    * Post redirect shortcut option added.
    * Better info and error messages.
    * Suppress "edit_post_link" on WP User Frontend pages
    * Added wpuf_get_option filter
    * Removed wpuf_allow_cats filter
    * Re-styled buttons
    * Re-styled attachment display
    * Added wpuf prefix to some css classes
    
    = 1.1-fork-2RRR-1.0 professor99 =
    * 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.
    
    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

    An idea along this line is to put the following code into your functions.php file.

    <?php
    /*
     * Suppress/show items if user not logged in.
     *
     * class login: Display if user logged in.
     * class logout: Display if user logged out
     */
    
    add_filter(  'wp_head' , 'loginout_css' );
    
    function loginout_css() {
    	if (is_user_logged_in()){
    ?>
    		<style type="text/css" media="screen">
    			.logout{
    				display:none;
    			}
    		</style>
    	<?php } else { ?>
    		<style type="text/css" media="screen">
    			.login{
    				display:none;
    			}
    		</style>
    <?php
    	}
     }
    ?>

    Then just add the login/logout class to any html tag you want displayed/suppressed for logged in/out users.

    In the case of menu items first proceed to the menu admin screen. Select screen options (window top right) and make sure the ‘CSS Classes’ checkbox item is checked.

    Then on the relevant menu bar click on the down arrow on it’s right to display it’s options. Then add ‘login’ or ‘logout’ to the ‘CSS Classes (optional)’ item.

    Works a dream!

    Cheers
    TheProfessor

    Thread Starter professor99

    (@professor99)

    Carter does visit this forum and we now are working on a development package that does address this and other issues + adds many new features. It should be available for alpha testing soon.

    Alternatively you can make the code change yourself if you experience this problem in the meantime.

    Cheers
    The Professor

    Thread Starter professor99

    (@professor99)

    I’ve also noticed that posts are automatically given the post status set by the option “Post Status” in the “Frontend Posting” tab of “WP User Frontend Settings”.

    This goes against default WordPress post settings which doesn’t allow contributors to publish posts. Instead their posts are given the status “pending” review.

    There are also WP Frontend options to stop all users from editing or deleting posts.

    The ideal is that permissions should be initially the same as WordPress defaults with options to override this.

    The only thing I think we should do is not allow non-logged in users to post, edit, or delete (although a filter should allow this to allow a programmer to change this with appropriate security measures such as a captcha) as this compromises the security of frontend too much.

    So along the lines of current options I propose the following Frontend options.

    Default = WordPress defaults
    Registered = Logged in users (of any role)

    Users who can post?:
    Default
    Registered
    None

    Users can edit post?: Users will be able to edit their own posts
    Default
    Registered
    None

    Users can delete post?: Users will be able to delete their posts
    Default
    Registered
    None

    Post Status: Default post status after user submits a post
    Default
    Publish
    Draft
    Pending

    Strictly speaking I think “Users can edit” and “Users can delete” are not necessary as “Users can post” can cover this.

    Note that if the option chosen for all except post is “registered” then standard WordPress roles will be ignored and “subscribers” will be able to post, edit, and delete their own posts.

    If the “Post Status” option is not “Default” then that status will be assigned for all posts and standard WordPress roles will be ignored.
    For example if “Post Status” = “Publish” then all posts from Contributors will be published instead of being marked as “pending” which is the standard default for WordPress.

    If users want more fine grained control over this they can either

    1. Set the options to “default” and install one of the many plugins which manage WordPress roles and capabilities.
    2. Write a program which uses Frontend filters to override this.

    As I require the above functionality for my application I will add this to my Frontend development fork.

    Cheers
    TheProfessor

    Simple bug due to omission of global $userdata declaration.

    Change the following lines in the file wpuf-dashboard.php

    /**
         * Delete a post
         *
         * Only post author and editors has the capability to delete a post
         */
        function delete_post() {
            $nonce = $_REQUEST['_wpnonce'];

    to

    /**
         * Delete a post
         *
         * Only post author and editors has the capability to delete a post
         */
        function delete_post() {
            global $userdata;
    
            $nonce = $_REQUEST['_wpnonce'];

    Cheers
    TheProfessor

    Hi Phil,

    1. The answer is yes. Otherwise the page has no way of knowing which post to edit. Howver I’m curious to why you ask this.

    2. This is a bug which I have already come across and fixed in my development version.

    If you want to fix it itself you need to change the following lines in the file wpuf-edit-post.php.

    //process post
            if ( isset( $_POST['wpuf_edit_post_submit'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'wpuf-edit-post' ) ) {
                $this->submit_post();
            }

    to

    //process post
            if ( isset( $_POST['wpuf_edit_post_submit'] ) && wp_verify_nonce( $_REQUEST['_wpnonce'], 'wpuf-edit-post' ) ) {
                $this->submit_post();
    		$curpost = get_post( $post_id );
            }

    Cheers
    The Professor

    Thread Starter professor99

    (@professor99)

    Even if it is changed to be the same as WordPress defaults you would be able to override it without changing WP User Frontend by using the $can_post filter

    $can_post = apply_filters( 'wpuf_can_post', $can_post );

    The changes I outline here make this even more versatile as I integrate the user login check into this so you would be able to use this filter to let non logged users post (though I would recommend that this be done with a catcha or similar to stop spam). Note some other changes need to be done to allow this which I’ve included in the updated code mentioned below.

    In my case I use this filter to restrict the addition of articles to a custom taxonomy (much like a category) to designated users only. This is somewhat similar to what you are doing.

    Once I finished a few more updates the complete code will be posted with the examples of use mentioned. It will also be forked on Github from the main Frontend code source for anyone who wants to use it.

    As an aside did you know you can use Frontend to restrict use of the standard WordPress Dashboard? Try the option “Admin area access” in the “Others” tab of the “WP User Frontend: Settings” admin screen.

    In any case a new version of Frontend wont break your current installation unless you update and my advice as always is don’t update unless you want to take advantage of new features or to fix security bugs (like this) because 9 times out 10 for customized applications such as yours something always breaks.

    Having this as an option on the admin is risking disaster for the general user. The use of the filter is the best way of ensuing security for all.

    Hope Ive been helpful but understand I made assumptions about your programming skills and your application that may be astray.

    Cheers
    TheProfessor

    Thread Starter professor99

    (@professor99)

    Have relented and decided to keep the login form option so it remains backward capable with the current Frontend installation.

    I’ve done it in a way that allows programmers to use ‘wpuf_can_post’ filter to allow unlogged in users to post if they wish which isn’t possible in the current version and has been asked for by a few users. Unlogged users posts in this case will be mapped to the user given by the admin option “Map posts to poster”. Whilst an admin option could be provided to make this possible without using the filter it isn’t a good idea as spambots could exploit this. So if you do use this filter for this in my updated version make sure you include something like a captcha to stop this kind of exploit.

    Will post soon the link to the code for this

    Thread Starter professor99

    (@professor99)

    Quick update

    The only way I can think of to allow for easy optional use of the “Close” button is to allow for it in the wpuf_addpost shortcode as follows.

    [wpuf_addpost shortcode close=”true”]
    [wpuf_addpost shortcode close=”false”]
    [wpuf_addpost shortcode] //default close=”false”

    I will code it so the default (close=”false”) conforms to the default WP User Frontend installation except that it will redirect to the current page for submitted posts as I think that is preferable to the present where it redirects to the new post (and I cant see it causing any problems with updates of old installs).

    Cheers
    theProfessor

Viewing 15 replies - 316 through 330 (of 341 total)