gpspake
Forum Replies Created
-
@sebastian
I’m no php master, and by that I mean I’m brand new, so a lot of what I did involved copying and pasting. In my case I used this tutorial to make a metabox that saved custom fields for posts. I had to tweak the code in the tutorial to save a value from a checkbox instead of text. Even if this tutorial doesn’t apply to what you are trying to do, I would recommend reading and walking through it because it does a very good job of explaining a lot of important things like saving meta data. So once I had completed this tutorial, I literally just added the hooks from Tareqs article in the previous post and with minor tweaking it works. The key is to get something to work at all and understand why, for instance get a checkbox you made to appear in the add post page and then come back and make it functional. I should also mention that I put all of my code in to a plugin, which is actually very easy if you google it and find a good tutorial.Good luck!
@professor99
Ok, I might have some input. I should mention that I am using the user-role-editor-plugin and the only capabilities that contributors have are ‘read’ and ‘edit-posts.’So, I added the code (Here’s a screenshot just for reference). You’ll notice that I changed the capability to ‘edit_published_posts’ as I have granted the edit_posts capability to contributors. This code effectively prevents contributors from submitting stories; that’s not the goal but we’re on the right track.
Contributors should be able to:
Submit posts as pending (wpuf handles this well out of the box)
Edit and delete pending posts (There should be a way to utilize the ‘edit_published_posts’ capability to prevent published posts from appearing in the dashboard.)I think, really, the only thing I need to do is hide the “live” posts on the wpuf dashboard but I’m not having much luck.
@runamok81 I already have the user role editor plugin installed; wp-user front-end overrides it though. Even if the user has no editing capabilities, they can still edit posts from the front end dashboard.
@professor99 Thanks for the response, I’m going to check your fix out and see if it works for me. I’ll post here with the results.
Ok, I got this to work using Tareq’s ‘How to extend wp front end’ post (Here: https://tareq.wedevs.com/2012/04/how-to-extend-wp-user-frontend/). The bad news is it had to be coded manually, which I won’t go in to. I already had a plugin made with some checkboxes so I just hooked it in with his tutorial and added some additional code. Not too difficult but it should certainly be an option in the plugin settings, it involves very little code so it would be really simple to add.
Bump. This Plugin is perfect but the checkbox/radio button feature is essential. This should be easy to code in because the ‘type’ dropdown already contains Text Box, Text Area, and Dropdown. Why would it not include checkbox and radio button? I made a plugin that creates a metabox with checkboxes that write to wp_postmeta table (which is just what wp-user-frontend does) and it was really simple. Any hope for this in the near future?
Ok, I got it to work.
You have to create the dashboard page, which will allow users to see their posts. When they click edit it will take them to the edit page where they can edit their post.I’m having the same problem. I wonder if it has anything to do with the fact that the post is not yet published (I have it set to go in as pending). The page shows up if I’m logged in as an admin but not a contributor and it isn’t really clear how it’s supposed to work.
Ok, so I wasn’t going about this correctly. Here is the proper way to redirect users after login based on their roles. https://codex.www.ads-software.com/Plugin_API/Filter_Reference/login_redirect
Forum: Fixing WordPress
In reply to: problem with capabilities and current_user_can()Someone in another forum suggested using ‘administrator’ instead of ‘edit_posts’ but this didn’t work. If I understand correctly, current_user_can() only applies to capabilities and not user roles. Can anyone help me figure out why this won’t work when I’m using a capability that is exclusive to admins?
Forum: Fixing WordPress
In reply to: problem with capabilities and current_user_can()Thanks for the quick response.
I get the same results when I use ‘edit_posts’Forum: Plugins
In reply to: [Plugin: Sidebar Login] Edit Form Widthadd this to custom.css
.custom #user_pass { padding:0.308em;}Forum: Plugins
In reply to: [Plugin: Sidebar Login] Edit Form WidthSorry heres the site
If it helps, I have tried several different login plugins and I seem to be having the same issue with all of them so I assume the problem is on my end, anyone have any ideas?
Forum: Plugins
In reply to: [Plugin: Sidebar Login] Edit Form WidthI am using sidebar login but the username and password fields are completely different sizes.
Even when I try the solution above, it effectively changes their width but they are still not the same width. Also the username box is larger, in terms of height, too and the password box is really thin.
I also tried increasing the width of my sidebar and removing all of the othe widgets, no luck.