Hello, would anyone have a tip to make the tydipics photo pages public?

Hello, would anyone have a tip to make the tydipics photo pages public? I have tydipics and I have login required. I took the tydipics start.php line of code: elgg_register_plugin_hook_handler ('public_pages', 'walled_garden', 'tidypics_walled_garden_override'); And I added in the start.php of the login required: $ add [] = 'photos / album / 6996 / fantasias-e-eu-mesmo'; But the page did not appear public. Do you have any tips?
 

 
  • It's not as easy as to just make a single album page public. The album entity also needs to be public for the album to be visible. Problem here is that with Login Required plugin enabled the public access level is not selectable if you edit the album (or a blog etc.). That's intentionally! So, you would have to disable Login Required and then make the album public. Or you would have to rewrite the Login Required plugin considerably. Next problem: the album page is not the only page necessary to be public. There are also the pages of the images plus the handler for the thumbnails. If you want to keep it easy, you could make all pages of Tidypics public ($add[] = 'photos/.*';) - which would result in all albums/images with access level "public" getting visible when logged out.

    What's the point anyway? A walled-garden site is supposed to hide its content from logged-out visitors. If your intention is to use the images for other purposes (e.g. as part of theming of your site), you might better add them / reference them directly in the code of your theme plugin as static (cachable) images.

  • Thank you Master Iionly. I'll try "pages of the public Tidypics ($ add [] '/.*' 'photos); - which would result in all albums / images commenting" public "access being visible when disconnected"
     
    
     
  • It's

    $add[] = 'photos/.*';

    and as I said the access level of albums needs to be changed to public, too (images access level will always set to the same as the their album on changing the access level of an album).

  • Master Iionly, I tried $add[] = 'photos/.*';  in plugin login requirid  start.php.   
    But did not get the result. The message "This content has been removed or you do not have permission to view." Is there anything you can do in tidypics? Where would the file be? Grateful!

     

     

    My goal in having the photo pages published is that the network user could share photos with unlogged users (a user's requirement). This would even help to have new users.
     
    
     
     
    
     
  • If you have added the line at the right place in start.php it works fine AS LONG AS you ALSO have set the access level of the album(s) you want to be visible to "public". Without the second step you can access the Tidpics pages but you want see any content.

    The line needs to be added in the function login_required_default_allowed_list() in start.php (seemed self-evident to me to add it there).

    As I also already explained, the "public" access level is disabled by the Login Required plugin. That's the whole idea of the Login Required plugin to prevent access to content for anonymous visitors! If you want content to be accessible why do you use the Login Required plugin in the first place?

    I thought you wanted a single album's images being accessible. For this case I suggested to temporarily disable the Login Required plugin, then editing this album to change the access level to public and then re-enable Login Required again.

    If you also want your users to be able to make albums public, then you could comment out the line

    elgg_register_plugin_hook_handler('access:collections:write', 'all', 'loginrequired_remove_public_access', 9999);

    in start.php of Login Required and delete the file mod/loginrequired/views/default/groups/edit/access.php. Then the access level selection of content (ANY kind of content) allows to set the access level of the content to be public again for all users without the necessity to disable Login Required. This doesn't mean that all this content will be visible for logged-out visitors automatically. They will only get access if the page is made a public page in the login_required_default_allowed_list() function.

    But as I said, this is kind of against the purpose of the Login Required plugin as I see it (and might confuse your users also if they expect their content to be restricted to members only). I won't make any changes in Login Required or Tidypics. The plugins work on a walled-garden site as intended.

  • Thank you Master Iionly. I'm trying these tips but so far nothing. $ Add = 'photos /.*'; $ Allow = 'photos /.*'; When I get something I'll post it here.
     
    
     
  • Upper/lower case matters? In both cases it necessary to use a lower case "a" in $add or $allow.

    And you need to change the access level of any album that should be visible when logged out in any case or it won't work. I've told you so in each reply now.

  • Yes master, "a" minuscule. I'm messing with tidypics now. One hour I can. I think I've done everything I needed in the required plugin. Now all you need to do is play tidypics.
     
    
     
     
    
     
  • Master iionly, I managed to make public the page of albúns and photos of a specific user without problems. I have decided that only some users will have their albúsn and photos public. I'm just having a problem. Do not load the photo in larger size when I click on the thumbnail. Would you have any tips? Below I put what I put in the required plugin code: 
    $add[] = 'photos / album / 6363 / july';
    $Add[] = 'photos / album / 6687 /pamela-rivers';
    $Add[] = 'photos / image /.*';
    $Add[] = 'photos / owner / MaiteBotticelli';
    $allow[] = 'photos/album/6363/july';
    $allow[] = 'photos/album/6687/pamela-rios';
    $allow[] = 'photos/image/.*';
    $allow[] = 'photos/owner/MaiteBotticelli';

     

    $add[] = 'photos/album/6363/july';   
    $add[] = 'photos/album/6687/pamela-rios';
    $add[] = 'photos/image/.*';
    $add[] = 'photos/owner/MaiteBotticel

     

  • $add[] = 'photos/thumbnail/.*';

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking