• I can see that adding photos to a guest book entry requires the paid version. However, we want to allow any visitor to our web site to add photos (without them having to login). Is this possible?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hello Chris,

    The Add-On is now part of the main plugin.

    For uploading images a visitor needs the capability gwolle_gb_upload_files. With a plugin like User Role Editor, this can be added to certain roles.

    Please understand that there is the possibility for abuse. What is uploaded is immediately available for download.

    Regards, Marcel

    Thread Starter chriswooff

    (@chriswooff)

    Hi Marcel thanks for the reply. As I understand it casual visitors don’t have a role so couldn’t upload a picture. Is that correct?

    Thread Starter chriswooff

    (@chriswooff)

    Hi Marcel, I have gone ahead and downloaded and installed the User Role Editor then created the gwolle_gb_upload_files capability. This is shown as present for the Editor role. However, when I login as an editor the Upload capability does not appear. See: https://settlecarlislerailway.org.uk/get-involved/your-ribblehead/

    Plugin Author Marcel Pol

    (@mpol)

    Hi Chris,

    To your first question, yes, I think capabilities only work for users that are logged in. I am not sure if there are ways around that.

    I don’t understand what is happening then.
    I just tried and it works here. The gwolle_gb_upload_files capability already existed, it is defined in the plugin. It should be added by default to the Editor role.
    I had a second Editor role from an old plugin, that had the slug ap_editor. Make sure you select the slug editor as role for the user.

    Regards, Marcel

    Thread Starter chriswooff

    (@chriswooff)

    Thanks for the replies Marcel. I found the problem. I needed a tick box in the Visual formatting and Emoji: setting.

    Thread Starter chriswooff

    (@chriswooff)

    Sorry it’s not solved I see that the Visual formatting and Emoji only allows an image from a URL rather than an upload of a file. The editor role has both gwolle_gb_moderate_comments and gwolle_gb_upload_files enabled. The editor role doesn’t have ap_editor. More help would be appreciated, please.

    Plugin Author Marcel Pol

    (@mpol)

    Ah, thank you, that is good to remember again 🙂
    I added that to the settingspage for image upload, the visual editor.

    Does it not work?
    The flow is that with the upload button you select an image to upload to the media library. When the upload was successful, it will be added as an img bbcode to the editor, with the image being now local.

    Thread Starter chriswooff

    (@chriswooff)

    Hi Marcel, thanks for getting back to me. Can I just check I have this right.

    1 User has an image in his/her local filestore

    2 (S)he uploads it to the WP Media Library

    3 (S)he notes the URL and copies it to the clipboard

    4 Within the guestbook (s)he click on the Picture button and pastes in the URL

    Is there not a more direct way?

    Plugin Author Marcel Pol

    (@mpol)

    Yes, there is a more direct way 🙂

    1. User goes to the guestbook and opens the form.
    2. User selects an image file to go with the image upload.
    3. User presses the button for uploading that image. It now gets added to the media library and also to the editor as img bbcode with the correct url in the website’s media library.
    4. After sending in the entry (or clicking preview) the image becomes visible in the guestbook entry.
    Thread Starter chriswooff

    (@chriswooff)

    Thanks Marcel, that seemed to work but for some reason the entry hasn’t yet appeared. I’ll check back in the morning.

    Plugin Author Marcel Pol

    (@mpol)

    Good morning Chris,

    So, I decided to cave in 🙂
    There is now a filter for free upload for any visitor. It is disabled by default.

    It can be enabled by a PHP filter. Example here:
    https://plugins.trac.wordpress.org/browser/gwolle-gb/trunk/docs/filters/gwolle_gb_upload_files_free_for_all.txt

    You can add this code to the functions.php of your theme, preferably a child theme, or to your own custom plugin.

    Edit, it is only availble in svn (development) and git for now, I haven’t made a new release.
    https://codeberg.org/cyclotouriste/gwolle-gb

    Regards, Marcel

    • This reply was modified 1 week, 2 days ago by Marcel Pol.
    Thread Starter chriswooff

    (@chriswooff)

    Thanks very much Marcel, how soon do you expect it to be part of a new release?

    Plugin Author Marcel Pol

    (@mpol)

    Hi Chris,

    You’re welcome.

    It’s really the only change there is for now, so it should be safe to use it.

    Thread Starter chriswooff

    (@chriswooff)

    Thanks. Is there any code I would subsequently need to remove when this change became part of the official release?

    Plugin Author Marcel Pol

    (@mpol)

    Hi,

    No, there is no need to change anything after the release of the next version.
    What is now in the plugin should stay there. What is meant as separate code, the custom filter from the example, will stay custom.

    I am not planning to change this anytime soon. I think there should be some friction to have this wide-open functionality enabled. That means it should be a very consious decisio to add the filter as custom code.

Viewing 15 replies - 1 through 15 (of 16 total)

You must be logged in to reply to this topic.