• 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 - 16 through 30 (of 134 total)
  • Thread Starter professor99

    (@professor99)

    Thanks justinwhedon for the info.

    Submit Post Problem
    ———————
    Version 1.1 behaviour is totally different in this area. For the fork for Add Post on pressing “Submit Post” the button should change to “Please Wait…” as you have seen. On success a info message “Post published sucessfully” should appear above the button and the button should change back to “Submit Post”.

    The article is submitted by Ajax and the info/submit button changes are done by javascript. Either the Ajax callback may not be happening or the javascript has a problem. I’ve run the code with the same PHP version you have (5.2) and didn’t have a problem. My WordPress version is 3.4.2 and yours is 3.3.2 so it could be related to that but don’t update yet because I would like to see whats going on in case others have the same problem.

    What you can do which would be enormously helpful is to open Firefox and then select from the menu Tools->Web Developer -> Web Console.
    This may be different on your MAC.

    Tick all the logging options (Net,JS,Logging) except for CSS.

    Then load your new post page.

    Add your info to the new post and press the submit button.

    Select and copy all the output from the web console and post it to me as a text file at the following address abruinATihugDOTcomDOTau

    YouTube
    ——–

    As for the contributor problem this is a WordPress capability problem. In order to embed code like this you need the “unfiltered_html” capability which only admin has. See this post for more info.

    In that post there is the following submission by zer0ruth which outlines the solution I mentioned earlier.

    Youtube Solution 1.
    ——————-

    I had the same exact problem: admin tries to embed video, no problem. Author tries to embed same video (same exact code) and it shows up as a link instead.

    This is because wordpress has the Author user role defined as someone who can only write and edit their own posts AND cannot post javascript or complicated html.

    to change this you have to modify the default user capability. Thankfully, this is easy to do.

    Open up the functions.php file in your theme folder. At the top of this file add the following code:

    // get the "author" role object
    $role = get_role( 'author' );
    
    // add "organize_gallery" to this role object
    $role->add_cap( 'unfiltered_html' );

    Basically, you are just giving the author user role access to post any kind of code they want by adding the ‘unfiltered_html’ capability. Just make sure that you can trust all of your authors before adding this, because without html filtering, a user could do considerable harm to your site if they decided to post some nasty javascript

    YouTube Solution 2
    ——————

    A much better way is outlined here.

    Simply watch the video on you tube and copy the youtube address from the browsers address bar and paste it directly into the visual area of the editor.

    YouTube Solution 3
    ———————

    Also mentioned in the same article is shortcodes that give you more control over your video window

    Thread Starter professor99

    (@professor99)

    Also helpful would be if you can email me at abruinATihugDOTcomDOTau a link to your add post page and give me a login/password as a user with contributor role (that way all test posts will be given pending status and wont appear on your website).

    I’m currently having a small issue with your fork.
    The submit button says “Please Wait”, but it never changes anything on the posting page after that. It just stays at “Please Wait”. I know it’s done because the page refresh at the top of the browser stops.

    But, if I go to the user dashboard, the post is there and can be edited. I’m using WP 3.5, Catchbox Theme.

    I don’t have much else activated on that site.

    Also, once the post is made, then the contents of the “Attachment Label” shows up above the attachment. There shouldn’t be anything showing from the labels on the add post page. This I think I can correct myself.

    Otherwise, Thanks for the fork. I like the improvements.

    Update to my last post.
    I followed your suggestion Professor99.
    I have looked at the process through the console in firefox and found the following with regard to adding post, editing a post and attempting to delete a post from the edit post page and the add post page. If I go to the dashboard and delete a post, it works fine.

    Here is what I found using the console.
    TypeError: $ is not a function wpuf-add-post.js:47
    Clicking on the link “wpuf-add-post.js:47” the code highlighted is “success = $(‘success’, responseXML).text();”

    TypeError: $ is not a function wpuf-edit-post.js:50
    Clicking on the link “wpuf-edit-post.js:50” the code highlighted is “success = $(‘success’, responseXML).text();”

    TypeError: $ is undefined wpuf-edit-post.js:90

    Clicking on the link “wpuf-edit-post.js:90 the code highlighted is “$.ajax({” exactly.

    I hope this helps you see what is happening.
    I have php 5.4.10
    latest versions of ff and chrome.

    Okay…. here is the solution to the issue of the add post and edit post and delete post from the add post page and edit post page.

    All instances of the “$(” in the two files I mentioned above (according to what they say to do on this page https://elementdesignllc.com/2009/08/wordpress-jquery-is-not-a-function/ )

    I replaced the $ with jQuery and it’s working as it should.
    Everything gets updated and the success messages show.

    The issue I have with the Label text for attachments showing up in the post is still there. Any assistance with that being printed in the post would be appreciated..

    Thanks for this fork..

    Oh, I am so tired.. It’s time for me to leave this alone.
    I figured out what the Label is for… DUH!!!

    So I changed it to “Attachment(s)” and it shows the attachments below it. I was thinking the Label was like the “Help text”…
    Disregard my issue.. it’s only local… lol

    I am experiencing a degradation in attachment functionality.

    WP: 3.5
    IIS: 6.0
    PHP 5.3
    Browsers: IE8, Chrome 23, FF 17

    Users can delete an attachment, but when they upload attachments they are not being rightfully attached and associated to their posts, instead they are going to the media gallery as unattached. From their perspective, the submit button simply changes to “please wait…” and nothing happens. Any advice on where to start troubleshooting this?

    Thread Starter professor99

    (@professor99)

    Much thanks ellsweb for your work in finding the jquery $ bug. That’s probably justinwhedon’s problem as well.

    As you have found the fix is to replace $(…) with jQuery(…) in the files wpuf-add-post.js wpuf-add-post.js.

    The other javascript files are wrapped in the function($) anonymous function which is another way of avoiding this problem.

    The cause is a conflict with another plugin or theme that uses a library such as Prototype or Mootools which uses $ for it’s own uses.

    More on ways of addressing this problem here.

    Thread Starter professor99

    (@professor99)

    Runamok81 the notes in the last post should get rid of the “please wait” message on the button. However I think there is more to your problem. Can you change the files wpuf-add-post.js wpuf-add-post.js as mentioned above and retest. Thanks.

    It turns out my issue was a plugin conflict with the popular Relevanssi “better search” plugin. Activating Relevanssi introduces the problem, deactivating it removes the problem. I confirmed the conflict on a few of my other sites.

    Professor99, this issue is also present in the main fork.

    This worked perfectly… Thanks everyone!

    Hey… a few more issues…

    1. I downloaded a User Roles plugin and gave Contributors the ability to ‘unfiltered uploads’ and ‘unfiltered html’… this did NOT solve my problem of Contributors not being able to embed YouTube videos… it looks like the post works but then where the video would be it’s just blank

    2. Now Contributors can upload featured images and upload/insert images into posts, but the featured images button ONLY gives the option to upload a featured image. Is there a way to let them choose from the library on the featured images also?

    Thanks again for all your help…

    ~ Justin

    Thread Starter professor99

    (@professor99)

    Thanks Runamok81 for the info. Some other users have been reporting similar problems with attachments and I would like to know more.

    I checked out Relevansi and installed it on my website without any problems with Attachments (though I confirmed the jquery$ “Please Wait problem). I’m keeping Relevansi on my site as it’s quite a good search tool and it’s search stats are very useful.

    Could you install Firebug on your Firefox browser and check is there is any Javascript errors on pressing “Submit Post”? Also interested in the contents of the returned net message (if any).

    Better still if you can give me a contributor login I can look into this more thoroughly. Email me at abruinATihugDOTcomDOTau a link to your add post page and give me a login/password as a user with contributor role (that way all test posts will be given pending status and wont appear on your website). Obviously I will need the Relevanssi plugin enabled to see the problem

    Thread Starter professor99

    (@professor99)

    Hi justinwhedon.

    Did you try the option of just using the youtube url as mentioned? It seems to be the easiest way. But then again I’m supposing your trying to make life easy for your contributors by letting them do things the old way though it’s potentially risky. Otherwise probably you need to add another capability though I can’t say what. Check if it works for authors and then just look at the differences in capabilities for clues.

    The featured image button is only intended to add a new featured image for each post (for everybody allowed to upload images) so this isn’t a contributor specific problem. I don’t see a huge need for using the library here. However it may be consistent and useful to have it given the editor uses it so I will see if it can be easily done.

    Thread Starter professor99

    (@professor99)

    Hi justinwhedon,

    Had a look at the media library code and found that it is only usable to add featured images for pre-existing posts (not new posts) in Frontend in WordPress 3.2.4 and below. This is because it requires a pre-existing post. WordPress’s admin post uses auto-drafts for this purpose.

    There was some talk on trac on making the media library more usable for frontend posting and indeed WordPress 3.5 does improve Featured Image usability although I’m yet to check the code in this regard.

    So the status of this is that I’m not going to do it for WordPress 3.2.4 and below unless I add a Preview facility (which requires auto-drafts). I may add Previews but it is some time off. Even then I may not do it as the current implementation is simple and obvious where Media Library’s Featured Image upload for WordPress 3.2.4 is anything but obvious.

    WordPress 3.5 implementation depends on WordPress codebase but due to older WordPress’s being incompatible I probably wont do this for WordPress 3.5 alone.

    Note I’m only talking about this development version. Tareq may have other ideas about the official version.

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