Creating a 'safe word' plug-in Creating a 'safe word' plug-in
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Creating a 'safe word' plug-in

Started by Tempy111, April 13, 2010, 09:08:12 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Tempy111

http://www.tempy.man-ma.de (18+)

I am currently trying to create a plug-in that:
1) checks for a set up 'safe word' in the keywords of an image and if this word is the same as the one on an album, it displays that image as part of that album.
-This bit sounds like it is something that is build in to coppermine anyway. This is true.
2) Will display the image even if the target album is a public album, and it is in a private album.
- I believe (though i may be incorrect) that since it will display it in the public album if loged in, thus able to view the private albums, it does display BUT if not loged in, it doesn't display it in the public album.

Now. Like i said. I'm creating this plug-in. I am just wondering if any one knows the location (which PHP files etc) of the code that checks if the image has the right album keyword and checks if it is allowed to display that image in a public folder.

Thank you

Tempy111

Don't worry.. I've created this 'Miracle' plug-in.. I just need to do up a little inferface so you can add custom safe-words.

Joachim Müller

Please share your plugin with the community.

Tempy111

I will. I just need to make the interface bit

Tempy111

while I'm going to get laughed at, I am not too 'proud' to admit fault but I'm probably gonna call this a wash out. While I can get the code to do what i want, therefore achieving my end result, i can not get it into the form of a plugin that will allow you to edit the 'safe word' in question.. Partly, cause i can't get the bloody create table code to work (for some reason) and secondly, because i made a stupid mistake in comparing the structure of coppermine to other PHP based systems like phpbb. I was under the idea that it was possible to insert new lines of code into places via an automatic updater, like with the said named Phpbb, but this appears not to be the case, so it would be hard to find another way to call the require code at the right time.

So i have learnt a limit here and i have gained from the knowledge, as all learning should come from trial, error & Experience. Well.. since i have been able to create the main part of what i wanted, that's a win for me i guess.