Is there a way to restrict someone to just entering image descriptions?

  • Hi, I want to start a non-paying job for someone to start entering contextual descriptions on all of my images. I have way too many to do myself and it would take me years to add descriptions to 43,000 images. In the past couple of days I've been entering descriptions like crazy, and opened my Search function so that a person looking for any one tag or word that is in the description shows the corresponding image(s). That works well enough. I've been doing a lot of research and testing how I think it might be done, and it can't be done just by giving someone "manager" or "editor" access in Joomla. I have to give them Full Admin control, same as me so they have access to the Joomgallery component, in order for them to be able to get into each image (either in the front end or back end) so they can start editing. That gives them control to delete all of my images and categories and I'm just not ready to have someone I don't really know start willy-nilly deleting everything. I need someone I can trust.


    How do I restrict someone from deleting my entire library and ONLY allow them to enter desciptions for each image in the Joomgallery component? I checked Joomla permissions and found out I would need to give them the same access I have in order to do this, something I hoped I could have avoided. Is there a way to do this? Maybe allow them to log in on the Front end and click the Edit button under each image, or allow them to log on to the back end (which I know how to grant) and not have them ruin my entire image collection?


    This is all very frustrating. Thanks to anyone who can help.

  • dan40

    Hat den Titel des Themas von „How to restrict someone to just entering descriptions“ zu „Is there a way to restrict someone to just entering image descriptions?“ geändert.
    • Offizieller Beitrag

    The frontend editing is definitely the right place to realize that. The thing is that a user will only see his own images in the frontend userpanel as long as he is not administrator. As soon as he is administrator he is allowed to do anything with the images even delete them.


    So you will need to modify this behavior such that a user can see all images in the frontend even he is not administrator. For this you need to create a core hack since there is no other possibility to realize that.
    This it the line of code to be modified:

    Code
    // A Super User will see all images if the correspondent backend option is enabled
        if(!$this->_config->get('jg_showallpicstoadmin') || !$this->_user->authorise('core.admin'))
        {
          $query->where('owner = '.$this->_user->get('id'));
        }

    JoomGallery/userpanel.php at d8d1fb984153275ddd9121c3e76b393f8727cda6 · JoomGalleryfriends/JoomGallery
    A native image gallery component for Joomla! Contribute to JoomGalleryfriends/JoomGallery development by creating an account on GitHub.
    github.com


    For testing you can comment the line between the if clause. With commenting this line users should be able to see all images in the frontend userpanel.

    • Offizieller Beitrag

    Additionally you could create a template override of the userpanel list view and hide the edit button. Then your users will only see the possibility of the Quick-Edit in the frontend. With Quick-Edit you can only change

    • Image name
    • Author
    • Description
    • Metadata description (if enabled in the config manager)


    With the core hack and this template override your editor will see all images in the frontend and can use the quick-edit to change the description. If he has bad intention he can only change the image name and author - nothing else.

  • Hi Elfangor93, thanks for the detailed explanation and possible resolution to my problem.


    Given all the effort you took and research you did to respond to my question I kind of fixed this on my own after fiddling with Joomla permissions.


    What I did was create a new Joomla user and gave it admin privileges and removed "Delete" from the user ID Permissions and set the user ID so that it can only log on to the Frontend and not the back end like I can, so therefore the only thing the new user can do is logon to the Frontend and there is no danger of anyone deleting my categories and images.


    When I logged on as the user, I went to the detail view of several images and there is an "Edit Image" icon but no "Delete" icon, excactly what I needed in the scenario I was thinking about.


    If I can find a successful candidate or prospect to help me with this monumental task, I'll share the ID and password with the user. This might not be a very secure way of doing this as the user will easily be able to give the user ID and password to someone else and potentially flood my descriptions with spam, but at least if it's a legitimate user that I get to help me with this then I won't have to do it all myself. Or, what I could do is open up registrations and have the user create his own account, then do the same thing for his ID that I did for the one I created, that way, the person is less likely to share the password for his own account. Plus, if the user ends up spamming my site then I can just delete the ID and close registrations, no questions asked and no (further) harm done.


    I won't have descriptions showing under the image, only key words in the description can be searched, like if a person looks for the word "sunset" in the search bar all the images containing a sunset will be shown but they will not see the description under the image. I'm a fan of not having too much clutter on my gallery pages so for me it'll be good to hide the descriptions, and only enable them when I want to see what descriptions have been left by my helper, and then turn them off again if I think they are fairly accurate descriptions or key words.


    Thanks again, I appreciate your time and effort in helping me with my issue.


    Dan

    • Offizieller Beitrag

    Have you seen that there is the possibility to use Joomlas SmartSearch for searching images since JG 3.6?

    With Smartsearch you can even search with multiple search words to make the search more specific. Especially useful for huge image galleries...

  • Have you seen that there is the possibility to use Joomlas SmartSearch for searching images since JG 3.6?

    With Smartsearch you can even search with multiple search words to make the search more specific. Especially useful for huge image galleries...

    I think I saw something in the recent past about that, but I'm not sure how that would work for me. For images with no descriptions, that wouldn't be useful anyway, I'd still have to touch/edit each image individually.


    What I would really like to see is the ability to add multiple tags to an image, for example, like #sunset, #cloudy, #clear, #night, #moon, #stars, #landscape, basically every tag one could think of to describe the conditions around a sunset, and then have the search look for the tags instead of or in addition to what's in the description. But I am no expert on programming, so I guess it will be quite awhile before we see integrated image tagging.

    • Offizieller Beitrag

    Hi,


    in addition to what has already been said:

    1. With the help of Joomla's access rights, you can determine which user group is allowed to 'delete' or 'edit'.

    You can define the setting for the respective user group once in the JoomGallery options, then this is normally inherited by all categories and images.

    Here is a short example: https://www.en.joomgalleryfriends.net/checklist.html


    2. In order to prevent a user from changing certain data fields, you have to set a

    Code
    readonly="true"

    for the corresponding field in the xml-file.

    For the frontend edit form you can find the corresponding file here: ...components/com_joomgallery/models/forms/edit.xml

    Then you could leave only the description field changeable for example.


    Regards

    MrMusic

    • Offizieller Beitrag

    I'd still have to touch/edit each image individually.

    Yes you still have to do that. Its just a more powerful search. But you will see as soon as you have searchable content.


    What I would really like to see is the ability to add multiple tags to an image

    This is exactly what we are going to do for JoomGallery 4.