forum.coppermine-gallery.net
Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: Paver on December 12, 2005, 07:06:32 pm
-
Note: This post gives the most recent version of this plugin. The original post that announced the first release of this plugin is provided below the version list.
This plugin allows you to control access to the full-size and intermediate photos/files by usergroup. Versions 1.2 and earlier only control the full-size photo. Versions 1.3 and later include intermediate photo/file control. You may read the CHANGELOG included with the plugin to follow the development, as well as read this thread.
Full-size photo restriction is done by removing the link on the intermediate (displayimage.php) page. Note that users can still access the full-size photos by guessing & typing in the URL to the file directly into their web browsers (which avoids Coppermine completely). You must use some sort of hot-linking protection (described in other threads) to stop such access. This plugin only restricts access through Coppermine.
Intermediate photo/file restriction is done by removing the link on the corresponding thumbnail and also by denying access to the intermediate page for the file. Once again, the full-size and intermediate files can still be accessed by typing in the direct URL to the files (which avoids Coppermine completely).
Version 1.0 is the initial release and is described at the bottom of this post.
Version 1.1 is described in this post below (http://forum.coppermine-gallery.net/index.php?topic=25010.msg115060#msg115060).
Version 1.1b is a bug-fix. I mistakingly hard-coded the config table in 2 queries.
Version 1.2 is described in this post below (http://forum.coppermine-gallery.net/index.php?topic=25010.msg117873#msg117873).
Note: Even though the filename says 1.4.2, this plugin works with the entire 1.4.x series.
Version 1.3 is described in this post below (http://forum.coppermine-gallery.net/index.php?topic=25010.msg171917#msg171917). The main addition is the control of intermediate images. Versions prior to 1.3 only controlled the full-size images.
Version 1.4 is described in this post below (http://forum.coppermine-gallery.net/index.php?topic=25010.msg172318#msg172318). This version includes an option to control images only and a message hover/box for the intermediate file control.
Original posting (for version 1.0):
Here's my first plugin contribution. It's very simple. You select which groups you allow to access full-size photos and it does the access validation for you. This access control is gallery-wide, no choices for categories or albums. You configure the groups on installation. If you want to change this, uninstall and re-install. (I hope there's a plan to add a "configure" button to installed plugins so that the configure function can be run after installation. Yes I could put together an admin page for the plugin but it seems to me that a simple configure button would be useful and logical and easy to implement.)
This plugin takes a scorched-earth method of filtering the <img src> tag; it kills all other tags (and then blanks out the alt attribute appropriately).
A few thoughts I had while writing this plugin:
- If groupmgr.php had a plugin hook, I could add a "allow full-size access" setting there.
- I assume it's OK to add plugin config settings to 'cpg_config'. It seems to me that configuration settings for plugins belong there, with maybe the caveat that the names should be prefixed by "plugin_" and then the shortplugin name (as I did). If people agree, I think this guideline for config settings should go on the guideline list in the sticky thread above.
- The 'file_data' filter is only used in themes.inc.php (so the following discussion is not relevant in this case) but I was wondering if it's possible for the plugin function to figure out which function or script called the plugin function. Besides searching passed parameters for certain patterns, it seems to me that knowing from whence the plugin function was called might be useful.
- Finally, I haven't yet figured out the advantages or disadvantages of using the 'uninstall' action versus using the 'cleanup' action. Any tips on that?
Versions 1.2 and 1.4 of the plugin are available for download below.
[Edited By Sami]:
Minor Bug fix
There is a minor template bug (http://forum.coppermine-gallery.net/index.php?topic=45889.0) on both version of this plugin,
position of intermediate image get little messy
to fix this problem you need to edit codebase.php and change
$cpicdata['html'] = strip_tags($cpicdata['html'],'<img>');
to this
$cpicdata['html'] = strip_tags($cpicdata['html'],'<img><br>');
-
Nice! Thanks for doing this. I'm sure that many people will like it.
I'll take a look at it to see how it works. From your text it appears that there is no control via the groups admin panel. It would be nice to alllow control this way so different options could be set for the different classes of users and administered easily without having to 'install/uninstall'.
It appears that most of the plug-ins are being supported on this other board: http://cpg-contrib.org/board/index.php I'm still trying to catch up on what's there.
Thanks again!
-
You're welcome. As I said, right now there is no way to re-configure a plugin without setting up a custom admin page for each plugin which I would prefer to avoid since you can imagine having 10 extra admin pages (with associated buttons on the admin menu) for 10 plugins. Yes, it would be very easy for me to do this and I will do so if you find that you are re-configuring the access control often. And there's also no way to modify the group manager page without hacking it, which I want to avoid doing since that negates the usefulness (and sanity) of a plugin.
One suggestion I have is to create a new group called something like "FullSizePhotosAllowed". Install the plugin and check off this group only. Then, on the User Manager page, check off all the users you want and at the bottom, select "With Selected: Add secondary membergroup", then choose that group. When you want to add more users, check off only the new users, and "Add secondary membergroup". It's an add process, so you don't have to check everything off each time. To remove users, you'll have to go to each user's page and uncheck that group from their secondary membergroup list. Hmm... a option to "With Selected: Remove secondary membergroup" might be useful, wouldn't it?
-
I just added version 1.1 of this plugin in the first post above. I noticed a thread on the freelance board (http://forum.coppermine-gallery.net/index.php?topic=24594.0 (http://forum.coppermine-gallery.net/index.php?topic=24594.0)) that seemed simple to add on to this plugin so I did. With the new addition, you can now require users to comment on a photo before they are able to view the full-size photo. I'm not sure if this is exactly what Roadster wanted in that thread mostly because I'm not sure why such a user control would be useful. In any case, there it is. This new condition can be ANDed or ORed onto the group requirement.
-
I don't quite see the need to force a comment, but some people may like it.
Suggestion, how about adding a configuration control for your plug in to allow this as well as which groups have access to be controlled by it's own configuration panel since there is no way to add to the groups permission managment panel?
Take a look at the CPGMark plug-in (http://cpg-contrib.org/board/index.php?board=14.0), it has it's own configuration panel.
-
I'd also like to clarify (or modify) my suggestion.
I'd like to be able to control which albums (or categories) can be viewed by group. This would be the ultimate control! :)
Since the group permissions admin panel seemed to have the ability to control access by group, I thought the two would go together. But I suppose that's not a good assumption! ;)
-
I'd like to be able to control which albums (or categories) can be viewed by group. This would be the ultimate control! :)
Agreed! Adding this feature would be the icing on the cake. Hope it can be done.
-
You know, you effectively already have this control when using my current plugin. It's not slick but it does work.
* Set up a group
* Choose which albums are viewable by the group
* Set up permission for this group with my plugin
* Repeat for each set of albums you want to control
But, yes, I agree it could be more intuitive: I want this person or group to view this album or category and to be able/not able to view the full-sized photos. I'm learning how to write plugins and set things up the way I want for my own family's site and in the process contribute back to this excellent project. Your requests have been noted and I am thinking about ways to answer them in an organized and extensible way (so I can apply them to other plugins). I will see what I can do.
But it does seem to me that you have the functionality you requested already, just not in a friendly interface. If I am not correct, please let me know so I can understand exactly what you are suggesting.
-
Thanks for your work on this. It appears to be working well.
It's not so bad to have the configuration of which groups have full size access done at install time. But it would be nicer if you can create a configuration panel for it similar to what CPGMark has.
Here's another minor suggestion. When someone does not have access to view full size, provide for the option of a message which will be displayed. Something like, "Sorry, you must be logged in and a member of the 'family' group to view view full sized images.". If this message was configurablle (Display message, or Don't display message), I think this plug in would be even more useful to others.
An additional step may also be to control viewing of intermediate files too. This way this plug in could provide almost ultimate control:
1) control of intermediate images by group
2) control of full size images by group
I don't know how important it may be to some people to have the control of intermediate images to be by different groups than full size images.
I'm so glad that coppermine has plug-ins now ;D. Previously it was a pain to upgrade if mods were made. Plug-ins will make coppermine a much better tool! At one time I was going to ask if anyone ever created a tool like phpbb has called "EasyMod", which would help a lot, but plug-ins are much better in the long run if they allow enough hooks in the core code to do what is needed.
-
Here's my first bug report for you, sorry! :)
My gallery has some video's as well as images.
With this installed, users were not able to see the videos. These video's have a thumbnail which I created, but when the user clicks on the thumbnail to view the video, there's just s small square displayed, but no video! Admin and those with rights to view full size could see the video ok.
Since videos have no 'intermediate' file, they only are 'full size' so to speak. My guess is that any other document type besides images may also have this problem.
I had to 'un-install' this plug in for now.
-
It would be nice to add user notification or somethig else for users that not loged in that thay can see full size pictures.
Now anonimous users don't suspect pictures have full size
-
Works great, but I would also like to see some kind of notification that there are full size pictures
-
Ok, I've released version 1.2 of this plugin. The plugin is attached to the first message above.
- fixed error with non-image files; now plugin only validates image files - others are left alone
- added language support by moving all text (config & user) to lang/english.php
- added tooltip notification that full-size image exists to logged-in and anonymous users
- added configuration panel accessible from button on admin config toolbar
- installation now does not involve configuration; default params are added as records to the config table
- updates to configuration are now logged in Coppermine if admin log setting is set
- added 'plugin manager' button to configuration panel for easy (and logical placement for) uninstall
I wasn't sure what sort of notification is best. Do you want people who are not currently allowed to view the full-size photos to ask you for permission? Do you really want to list the allowed groups in the notification message as mentioned above? If someone is not logged in, how do you know when they log in, they will be in the correct group to view full-size images? Do you want a message box to pop up? Do you want a mouse hover box? What I added here is fairly vague and general. I added a simple message in a tooltip for the intermediate image. The message is different for anonymous and logged-in users. You can set each message in the configuration panel.
For other languages, use the lang/english.php as a guide and create your own language file. The labels and comments may not be completely clear (mostly due to the fact that this plugin is still pretty raw). Use the plugin to see which is which. If you want to share your language file with others, attach it here and I'll add it to the plugin package.
As I said before, I prefer to avoid adding a separate config button for every single plugin installed. Of course, I do see the use of such a panel. But I would like it to be accessible from a single "Plugin Config" button. I'll probably put one together sometime and see if others agree once they see it in action. (something akin to the current config drop-down table but for plugins)
Please give me feedback. I think I tested the plugin thoroughly but I might have missed something.
-
Will this plug-in work with version 1.4.3?
-
It is flagged as working for CPG1.4.x
-
scottycdl: If you are curious why "Coppermine 1.4.2 Plugin" is listed in each of the plugin files, that's because I didn't think ahead for future 1.4.x versions. I removed that text in my own copy of the plugin and the next version (whenever that is) will not have that text. Using the tag on this thread is a good way to flag the version.
-
Okie Dokie. Thanks
Clearly you're a PHP wizard....... how about this, then: member 'timers' that can be set for users such as an expiry time. If I want to offer a 10 day trial, I can add these users to the trial group, and their membership will expire after --- yep, 10 days.
This could be done for a month, year, half-year or whatever is required. This way, I don't need to manually check users' accounts. ONce their time is up, their accounts are locked out. Sound good? Is this even possible?
I have no clue. I just wrestle with the stuff, it is all Greek to me...... but it would be a nice feature, especially for me.
Regards, and thanks for the reply.
ps - I am finding version 143 *so* much better than previous versions and I really like the BLACKBIRCH theme. Right now, I am hoping to incorporate an SWF file on the homepage. I mananged to get an image there, so why not an embedded movie?
Link is http://www.pdistudios.com/cpg143/index.php (http://www.pdistudios.com/cpg143/index.php)
-
You're welcome.
If you are asking about expirations for full-size photo access, then that is relevant to this plugin and I will consider it. If you are asking for accounts to expire, that's an issue for a separate thread, in the "Feature Requests" forum. Please keep to one question/request per thread. If your P.S. includes a question, the same applies.
-
Is there an idiot's guide to installing this plug in?
Do I dump it directly into the root of my PLUGIN folfer, or must I create a subfolder for it and then point the app to that folder?
I have not installed plug-ins (or anything else) before and would like to give this one a try
Many thanks
-Scotty -
-
extract the zip into your plugin folder, preserving the folder structure in the zip file. This way, a sub-folder within the plugin folder will be created and populated with the needed files. Then go to your plugin manager and install the plugin by clicking the "i" button next to it.
-
OK, I did that, and I see the existing plug-ins, i.e. sample and SEF, but the new one is not visible and therefore I cannot click on the " I " to install it.
Ideas?
-
For the record .....
I had to create a subfolder caled control_fullsize and then I could install it. The button apeared on the admin bar and all is hunky-dory
Very cool ...... no brainer
Now I shall test it.....
- Scotty -
-
Besides creating the folder yourself and manually unzipping the plugin to the correct place, you can also use the BROWSE button on the plugin manager to point to the zip file wherever it is, then use the UPLOAD button to have Coppermine automagically unzip the package and put all the files in the correct place.
Ah, I was going to point to the place in the documentation, but then realized (or remembered reading before) that plugin documentation doesn't exist yet. I think I can contribute to that sometime. Time to start a new thread to ask if anyone else has started on this...
-
Anyway my friend, your effort works marvelously! Thank you.
Please feel free to test it (and other CPG stuff) at my site if you wish.
The link is http://www.pdistudios.com/cpg143/index.php (http://www.pdistudios.com/cpg143/index.php)
Regards
- Graham -
(now I wonder how to stop the XP balloons from blabbing file info on mouse hover.... *sigh* )
-
this seems like such a sill question but, i downloaded the zip file, extracted it and then dumped the extracted files into my plugins folder in coppermine. Now i have no idea where the configure panel is for it. I looked in the "config" panel withing my photo album but it doesn't seem to be there. Need help.
Eric
djstretch@msn.com
-
On the config page, under general settings, there's a Yes/No Enable Plugins choice, with a link to "Manage Plugins" next to it. From the plugin manager you can install new plugins that aren't in the plugins folder yet by clicking Browse, pointing to the zip file, then clicking upload. Coppermine will upzip the package, create the folder and move the files in there.
-
First of all, let me say, excellent idea for a plugin, i've been waiting for a simple way to do it for some time now.
I downloaded, unzipped, uploaded & installed your plugin in coppermine.
But I cannot get it to work for the love of god.
I set the groups that can view pics to 'Registered' only, but i was still able to view them when logged out.
Is there something i'm missing ?
BTW, i'm running the MiniCPG & Multiline-comments plugins on a CPG 1.4.3(stable).
-
I just tested things out and my plugin works on my installation fine. When you're logged out, your user group is "Guests" or whatever you named the Guest/Anonymous group and as long as you don't have that group checked off in my plugin configuration, you shouldn't be able to access the full-size photos.
Make sure you refresh the page after you log out. Maybe your web browser cached the page and is showing you the old one from when you were logged in.
At first I read your post incorrectly and thought it wasn't working for certain members even though you had Registered checked off. Here's what I typed when I thought that (and include here in case this information is useful for someone):
The Registered group is actually not a special group at all. Each user has to be a member of this Registered group; it's not an automatic behind-the-scenes thing. So usually (and by default) each user has a primary group of "Registered" and then you set the secondary groups to be any other ones. If you changed the primary group to something other than "Registered", then that user cannot be a member of the Registered group as secondary group - so I guess the "Registered" group is special only in that it cannot be listed as a secondary group.
So ideally, set each user to Registered for the primary and add the other groups as secondary memberships. You can mass-apply secondary group membership to multiple users on the group manager page using the "With Selected" drop-down box - very useful!
-
Paver, I'm REALLY Sorry Did not realize your post @ mine topic... I've had ask DJMaze to fix mine first comment then download problem for me.. And I had already payed him.. But untill 2day still no answer from him..
2night I'm going to try your add on and wil test it! Thanks in advance.
-
I've set-up the plugin exactly als you told me to, as you can see from the screenshot :
(http://brol.docgonzo.com/cpg_fspac-config.gif)
but still, as an unregistered, not-logged-in visitor, i can still see the full size pictures.
My groups config is below :
(http://brol.docgonzo.com/cpg_groups-config.gif)
I've tried lots of different settings, but none make it so that 'Anonymous/Guest' users cannot see the full size picture.
It doesn't have anything to do with the 'Assigned Albums', or am I wrong?
-
Roadster: No problem. As I said, it was easy to add your request to my plugin so I did. If it works for you, that's great. If not, let me know and I might be able to add something to my plugin. No worries about pay. It's great that you offered to pay for a mod. That's very generous.
-
docgonzo: Using your image URL, I went over to your site, and I think I figured out what the issue is. (OK, it wouldn't have been that difficult to guess.)
My plugin removes the full-size pop-up link from the intermediate image on the display-image page. If you don't have an intermediate image, then the full-size photo is used directly on the display-image page and my plugin is not applicable since there is no link for a full-size popup.
Others have mentioned controlling the intermediate image display as well, and I put that in the back of my head for future investigation. The FAQ in the Coppermine documentation has used to have a simple hack to only show thumbnails to anonymous users and intermediate/full-size images to registered users. It's a one-line hack to the displayimage.php script. It used to be in the docs but I don't see it right now. It's not ideal because it merely outputs an error when the displayimage.php script is loaded by an anonymous user. Ideally, you shouldn't have the link on the thumbnails page to begin with.
If this describes your issue and you don't want to use the one-line hack (found somewhere - it's been mentioned at least once on the forums), then I guess wait to see if I add this control to my plugin. I'll take a look at it today and do a feasibility analysis.
If this is not your issue, then let me know and we'll do some more troubleshooting.
By the way, there should be a blank line between the User Comment Yes/No and the checkbox for the "display notice". In your screenshot there isn't and I just want to make sure that's not a theme issue where the line breaks are ignored. If you modified my plugin_config form, that's fine. If not, what theme are you using so I can look at that sometime. If it's a custom theme, that's cool. I'm just curious.
-
Ahh, forgot about that :-[ I should have mentioned i don't use the full size pop-up :/
But I've had coppermine configged like this for such a long time, i had forgotten there even was a full size pop-up...
My excuses for that.
I'm not too happy about going in and hacking to only show thumbnails to anonymous users and intermediate/full-size images to registered users...
And if you've searched on my nickname, you would see that I've already been waiting a long time for this feature ;)
But I don't wanna rush you or anything, i've waited 2 years for this, so i'm not really in that big of a hurry.
(just wanted to make it more interesting to become a registered user)
I'm using a lighly modded version of the BlackBirch theme, only changed the position of the adminmenu and the bannerposition in template.html and my own banner
I didn't touch the plug-in, though.
-
docgonzo: It looks like what you're asking for can be done in your theme.php file. Since you're only asking for a simple "registered or not" condition (instead of choosing groups that may change in the future), you can modify the thumbnail display in your theme.php to remove the link to the intermediate/full-size photo for those not logged in. I assume you would want a tooltip/mouse hover message that says "Login/Register to see full-size photos' instead of the current tooltip with the filename/dimensions/etc (which would be good to remove since the filename would give people more of an idea how to bypass any checks you set up - then again, looking at the thumbnail image would give people who want to figure it out enough information to figure it out, so unless you are using random filenames for the thumbnails or using an .htaccess rule, you cannot stop people from manually typing in the address of the full-size photo - but I digress).
It doesn't look too difficult to add this control to my plugin as well. I'll do something similar to modifying the theme variables & functions, but with the added configuration of groups and being able to disable & enable such a control programatically.
Would you like me to tell you how to modify your theme.php to do what you want? It's more than a few steps but not too difficult. Or do you want to just wait for the next version of the plugin? I cannot promise a release date but I'm thinking it will be soon - i.e. a day or two - unless I get waylayed.
-
Take your time Paver...
But i want to be able to add more user categories in the future, because i'm gonna work with multiple standalone photographers, and then the full sizepicture will matter, as that is the way they have to get it on the server...
So then my registered users would only be able to see the thulbnails and the intermediates, and the photographers would be able to see intermediate AND full size
I'm not in a rush...
-
The FAQ in the Coppermine documentation has used to have a simple hack to only show thumbnails to anonymous users and intermediate/full-size images to registered users. It's a one-line hack to the displayimage.php script. It used to be in the docs but I don't see it right now.
http://coppermine-gallery.net/demo/cpg13x/docs/faq.htm#viewThumbnailsOnly
-
docgonzo: Roger that. We'll see what happens. It's often a mystery to me when I do things, what with a baby's desires to contend with. :D
GauGau: Gracias. I thought I had seen it in the 1.4 docs but now I'm sure I overlooked the fact that I was looking at the 1.3 docs instead. The new 1.4 theme system has made this particular hack moot and not preferrable for all the reasons hacks are not preferrable. I'll search to see if anyone has posted about how to do this with a theme customization in 1.4 and if not, I'll post it (not here of course).
-
@Paver, I've installed the plugin last night... And you're the best!!
It works excellent!!! I've already send you a pm with a question..
-
You're welcome. As I said in my reply to your PM, let's keep questions on the public boards.
-
First: Great mod! I installed the plugin and it works fine.
Now my question: When anonymous users hover over the intermediate picture they get a ALT/TITLE message that there is a full size picture but they are only able to see it when they're logged in. Is it possible to use a pop up window when clicking on the intermediate picture instead of the alt text?
I know how to make such a pop up but I don't get it to work with the plugin... I'm not very good when it comes to PHP so I don't know which code I have to replace etc.
-
I'm working on the next release of this plugin to include control of the intermediate image (or the full-size one if you don't use intermediate images - i.e. the image on displayimage.php page with the filmstrip below it). I could easily add in a pop-up option for the "not allowed" message. I asked in a previous post above about this and you are the first to request something different.
I could tell you how to modify things to do so, but since I can add it to the next release, is that sufficient? You can see then what I did. :)
-
I could tell you how to modify things to do so, but since I can add it to the next release, is that sufficient? You can see then what I did. :)
I asked a friend to help me... he knows PHP better than me.. and he just replaced this code in codebase.php
$cpicdata['html'] = preg_replace('/alt=\".*\"/i','alt="'.$alt_text.'" title="'.$alt_text.'"',$cpicdata['html']);
with this one:
$cpicdata['html'] = preg_replace('/alt=\".*\"/i',"onClick=\"alert('".$alt_text."')\"",$cpicdata['html']);
Works fine for me right now but I'm still looking forward to the next release of this plugin. :) Great work, really. ;)
-
Thank you Paver & Trulla ;D Great Plugin
-
;D
Thank You Paver. U are owesome. Plugin worked PERFECT.
THANK YOU...
:D
-
Just a quick thanks for a slick plugin, great work Paver :)
-
Any word on progress with the new version?
I've recently switched my setup, to accomodate use of your plugin,
and was wondering of you were going to develop it further, with the suggested features.
I don't want to rush you or anything though.
I'm just curious :)
-
In the back of my mind, I knew I had a few things to add to this plugin, but I forgot how much I had discussed this, especially in the last post above where I mentioned the next version as if it were imminent. Sorry about that. I should be careful about promising anything.
I'll take a look and see what it takes to do what we discussed. Thanks for the bump. 6 months is surely a reasonable time for a bump & check.
-
Just want to say thanks - I have been pulling my hair out all day trying to do something like this!
-
Thanks for this great plugin Paver!
@ Tulla: thanks for the code you provided in order to allow a window to pop up, however, I don't understand where you're supposed to enter the link to the window you want to pop up. Could you please explain?
Thank you!
-
I'm just noticing that, when logged as admin but in "user mode", full size pics are blocked. I don't think being a config problem, as except guest/anonymous, all groups have access to full size pics.
-
Never leave "admin mode" then. ;D
-
hi there Ive tried installing the plugin but getting error when opening index.php
Fatal error: Call to undefined function: get_meta_album_set() in /home/rawimage/public_html/gallery/index.php on line 757
also when opening plugin_config.php codebase.php getting Not in Coppermine...and configuration.php getting a blank white page any ideas whats going on?
link www.raw-image.net/gallery/
-
@spewbert: I don't understand why you would get the index.php error when using this plugin. For the other errors, those are "as designed" - you're not supposed to open those plugin scripts outside of Coppermine. So the only error you have is the "Call to undefined function" error. And I don't understand how that happened. "get_meta_album_set()" is a function defined in include/functions.inc.php and has nothing to do with the plugin, as far as I can tell.
As a side issue, you are running a fairly old version of Coppermine (1.4.5). You should upgrade to the latest version (1.4.9). I don't think this upgrade will fix the issue - unless you have modified one of the core scripts and upgrading will restore the original (correct) code. When doing an upgrade, you'll have to re-apply any hacks you have made to the core scripts.
-
I do not want to be a nuisance but you said in January that you're working on the version that count with intermediate thumbs :'( Is there any chance you'll get it working any time now?
-
Version 1.3 of this plugin has been released. See the first post in this thread (http://forum.coppermine-gallery.net/index.php?topic=25010.40).
The new features are:
- "Administrators - User Mode" can now be given permissions like any other group. As before, administrators in "admin mode" will always have full access to the photos. As noted above (http://forum.coppermine-gallery.net/index.php?topic=25010.msg165044#msg165044), "user mode" was blocked in version 1.2 and there was no way to set permissions for "user mode".
- The popup message box noted above (http://forum.coppermine-gallery.net/index.php?topic=25010.msg124942#msg124942) has been added as a configuration option, with the "mouse hover" or "tooltip" message changed to a configuration option as well. Select one or both as desired.
- Intermediate images can now be controlled. You select a permission level for each group: thumbnail-only access, intermediate access, or full-size access. Please read the note on the plugin configuration panel carefully. Basically, this plugin is stupid (i.e. unaware) about the case where a gallery doesn't use intermediate images (where a gallery has the full-size image shown on the "Displayimage.php" page and therefore doesn't use the full-size popup). If you have such a gallery, you must ignore the "intermediate" permission level. If you don't ignore it, note that "intermediate" = "full-size" for galleries with no intermediate images.
edit: Note that I did not implement any message on the thumbnails page for users that are not allowed to view the intermediate images. Since the "mouse hover" message is taken up by the file info, I'm not sure what would be appropriate. If people that use the intermediate access control think a message is required, please suggest precise details of how this message should appear (in a popup alert box, in a "mouse hover" message, in a link to another page like a registration page).
-
Nice work Paver :)
-
This is what i have been looking/waiting for. Brilliant!
One issue... unregistered users cannot click on/open video thumbnails. This mod seems to affect videos as well as images. I didn't install the previous version. But, I thought i read that you had fixed it so that this only affects images. Is that not the case anymore?
Thanks again. This is so freaking awesome!
With regards to text informing the unregistered user that they must login/register to see the intermediary or fullsize version... i would vote to have some sort of pop up. Or even a message at the top of the thumnail page... indicating that they must login to see the intermediary. It would seem like clicking on the image would be appropriate. As it is a natural occurance... a user clicks on the image to get the larger picture... and then a pop up appears informing the person to login/register. Right now, if you were a new user and you tried to click on the thumbnail, there would be no link - nothing happens. They would have no clue that it was possible to see a larger version of the file. Upon clicking on the image (which is natural internet behavior) they currently do not get a response so the implication is that clicking does nothing and they would have no idea that registering would give them this ability. Let me know if I make no sense...
-
@tutone: You're welcome. Your comments on the intermediate popup and text next to the album title are good ones. I'll consider them, since as you said, a user blocked from intermediate photos might not realize such photos are available.
As for the video thumbnails, you are correct in saying that I fixed an issue with non-image files in version 1.2. That version only validated image files for full-size access (as does version 1.3 in regards to full-size access). I forgot about this when adding the intermediate control, so the intermediate control removes all access to displayimage.php for all files. Once again, I'll have to modify the plugin to treat only image files. In this case, it's not an error as it was in the previous version, but rather a control-happy plugin. I'll add in an option to do what it does now - control all files on the thumbnail page - versus controlling only images.
I have no idea when I'll finish this next version, but since version 1.3 is still clear in my mind, there's a good chance I'll look at it soon.
-
Version 1.4 has been released and is included on the first post, as usual.
The additions are:
- added option to control everything or images only
- added message (hover + box) for intermediate restrictions
Non-image files are only controlled for intermediate access (clicking on the thumbnail to pull up the intermediate page). "Full-size" access is not applicable to such non-image files.
For the intermediate message, you can include the tag {TYPE} to include the file type (whatever it is for the particular thumbnail). The default message uses this tag, so you can see it in action.
-
Simply Amazing!!!! I seriously have been waiting for this since I installed coppermine years ago. Exactly what I wanted. Your the best. Now if I can just find a plugin to show the user's on the main page :)
Seriously... very grateful!!!
-
You're welcome again. Let me know if there are any issues.
For the users on the main page, do you mean something like this: "User albums" on the index-page? (http://forum.coppermine-gallery.net/index.php?topic=32825.0) Since this is off-topic, please start your own thread (on the appropriate support board) if you have something else in mind.
-
Thanks for that! We needed this for a restriced photo-community; so you made my day!:-)
-
Awesome plugin Paver, thank you it's just what I needed.
However, it seems to overlook permissions for individual albums. Meaning when you configure the plugin so that guests can only view thumbnails, but if you have also assigned some albums to unlogged users, then guests can't see any intermediate & full-size, no matter what.
I would like to have guests restricted to thumbnails only set by default, but allow them to view inter. & full pictures in some albums. Would that be possible?
-
@Shades: I've thought about this briefly before, but not in much detail. The main question is how much should the plugin do? On one end, the plugin has a section where it lets you set permission levels for every single album; on the other end, the plugin looks at album permissions and takes them into account in some reasonable way. Obviously, it would be simplest from the interface-point-of-view to have the permission level right there on the album properties page, but that would take a lot of work using the plugin framework and may be rendered moot if & when the core permission system for Coppermine is overhauled.
So, thinking about your question now, I would suggest the following. Add an option where either the plugin overrides all permissions site-wide (as it is now) or the plugin overrides only those albums with permission set to "everyone" or "registered" (maybe another option) and leaves alone albums with permission set to another usergroup. People in that usergroup will have full access to the album, with the plugin not getting involved at all.
There might be some issues from the user-point-of-view, so please let me know if you think of any. (When I say "user", I mean the user of the plugin, which is actually the gallery admin.) Would this suggestion do what you want?
-
Thanks for your reply, Paver.
Yes, what you suggested sounds convenient for what I'm trying to do! I can't really think of any admin issues, though.
In my gallery there are none but the "Guests" and "Registered" groups, and I only have a minor number of albums that I wish to make 100% public, so in my personal case your option idea would suit me perfectly well.
Thanks again.
-
FYI. The control_fullsize (1.2 & 1.4) plug-in files are not working with Safari ( Mac OS 10.4.8 ). The lower options are not shown and the DONE button is not present. Using IE 5.2 is a workaround.
PDA
-
Installed on CPG 1.4.10
Tested with IE 7 and FF 2.0
Great plugin Paver, it does the job perfectly!
Cheers!
Hein
p.s. Dutch language file added to post
-
I've installed the Full-Size Photos Access Control v1.4 plugin, and it works fine fore a month.
Now i've got a problem with it. When use this plugin, it works for a few hour, till the server at my providers crashed.
My site has today killed the providerserver for three times today. And many all the sites that they hosted on that server was down.
My provider has contact me, and told that the webserver and the database server crashed, by my site.
My site overkilled the databaseserver, en the link the gave me, leads to this plugin.
Now i've uninstalled this plugin, and my site gives no problem anymore with the server, and my provider has no problem anymore.
So i think this plugin take too much of dbserver processing. Maybe i've not set the good settings in the plugin.
-
Strange. What was the link they gave you?
-
the url they gave me was
httpdocs/plugins/control_fullsize
They told me that this plugin is the problem.
-
Hi,
first of all thanks for this great plugin. I need it really but I have some small problems with it.
I am using Stramms Package and Photo Shop v1.3.3.
Installation of Full-Size Photos Access Control v1.4 was succesfull, with the controll panel I could select rights, which I set to Intermediate for guests. After this I could no more use the pulldown of the shop. I got the content of the pulldown in text form and the pic is gone to the right an 'distroyed' the table layout.
Is there a problem to use Photo Shop and this plugin?
best regards
www.volleyball.lu/fotogallery
EDIT:
=====
Problem solved. I change the plugin order and it works realy fine.
Again thanks for this GREAT plugin
-
Obviously this is a problem my end, but hopefully someone can help. I have used this mod for quite a while now, but I have just discovered that new groups I create in my forums are no longer shown in this mod. I use coppermine bridged with IPB. For some reason, the full size access mod is showing old groups that I have removed, and not new ones. Is this a problem with my database tables? If someone could help me, I would really appreciate it. Oh, and I don't have a clue about PHP, so please be patient with me ;D
-
You need to visit the groups page in Coppermine to resync the groups.
-
Sweet! Thanks Nibbler! (Again)
-
Thanks very much for the great plug in. I am using 'cpg1.4.2_plugin_control_fullsize_1.2.zip' on cpg1.4.10.
For those who are not allowed to view the full size pictures, the border around the pic in intermediate view gets unsymmetrical or non-uniform in size. Happens with all skins and on IE7 and Firefox2.
Screenshots:
http://www.timos-welt.de/BorderBug_Firefox.jpg
http://www.timos-welt.de/BorderBug_IE.jpg
Any solution?
TIA
Timo
-
I run the plugin on classic_vertical_filmstrip theme.. no such problem here. Did you try uploading a picture that was not in your CPG before ?
-
Yes, same result. :(
-
ok im running the 1.2 version of this plug cause thats all i really need but when i check "Display this notice to users not allowed to view full-size photos" it doesnt show the message i cant even click on the picture...i wanted to get it so they have to register if they want to see the pic full sized but it wont even let me send them to the message...any ideas????
-
Very nice plugin indeed, but as mentioned above, it would be real nice if it was possible to allow guests to view full size images in chosen albums while in the rest they will have 0 access.
-
Hi Paver,
thanks a lot for this plug-in.
I have CGP 4.10 and integtated with phpBB forum.
The plugin works well in the album where are photo but not in other album where are video or audio files....
Ex.
http://www.fkvllaznia.net/main/album/thumbnails.php?album=2 (here the plugin function)
http://www.fkvllaznia.net/main/album/thumbnails.php?album=4 (here the plugin do not function)
-
There should be an option for non image file
What do you want to control? -> everything
-
There should be an option for non image file
What do you want to control? -> everything
Thanks Sami,
I haven't see that option ::) :-\
-
Hey,
Sorry if this has been asked b4. I am using a modded version of CPG, with stramms mod pack. I see that init.php and the lang file will need editited. What parts do i edit to make both work?
Also does this mod remove the alt attribute of the file location too?
Thanks.
-
Great plugin but it dont work when Lightbox is used for fullsize images.
Is it possible to get this plugin to restrict Lightbox popup to show for logged in users only?
It does not work just to disable full size view :0(
Ref: Lightbox [ http://forum.coppermine-gallery.net/index.php/topic,35539.0.html ]
Regards/ Stefan
-
A few thoughts I had while writing this plugin:
- If groupmgr.php had a plugin hook, I could add a "allow full-size access" setting there.
Why not add such a hook now to cpg1.5.x while you still can *hint* ;)
Joachim
-
Hi all! I have this error massage after click to normal picture (600x400px). I can open original large picture.
Fatal error: Cannot redeclare loginform() (previously declared in .../include/themes.inc.php:2717) in ...theme.php on line 833
Thanks
Paul__cz
-
The file include/themes.inc.php doesn't contain a function named loginform(). You must have introduced that in error. Undo it. Not related to this thread. Read up board rules, then start a thread of your own if you can't get this issue solved on your own.
-
Danish language file updated for v. 1.4 based on english.php.
Revision 1.1
Mimer 8)
-
There is one problem ;(
I am using Enlargeit plugin as well, and unfortunetly that both plugins did not work togheter.
Even if I set that Guest can only see thumbnails, after click, Enlargeit shown pictture in full size.
Any chances make that plugins cooporate?
-
Ok, solved.
It did not notice I can set it in Enlargeit config.
-
It's me again.
This is great plugin Paver, really very usefull. But I wonder, is it possible to apply this plugin only for one album? For instatnt, album numer 5 ?
In other words: registered users have full size access for every albums, except album number 5. They can see only thumbnails picture.
What do you think ?
-
This mod is excellent has all the options I needed. Thanks!
-
IM so very happy i ran into this, i was just sitting here thinking of a way to keep joe smoe public from downloading any photo they wanted and two seconds into that thought i ran into this mod, its installed and running PERFECTLY, really nice job... excellent by brain thanks you...
-
A user with 'intermediate' access level can view fullsize picture by directly accessing the right URL with the browser.
Patch proposed:
Index: codebase.php
===================================================================
@@ -137,7 +137,7 @@
// Restrict access to DisplayImage.php if not allowed to view intermediate images
if ($CONFIG['plugin_controlfullsize_controleverything'] && defined('DISPLAYIMAGE_PHP') && !GALLERY_ADMIN_MODE) {
- $validuser = controlfullsize_validate('intermediate');
+ $validuser = controlfullsize_validate('fullsize') || (is_null($_REQUEST['fullsize']) && controlfullsize_validate('intermediate'));
if (!$validuser) {
load_template();
pageheader($lang_error);