Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Creating a 'safe word' plug-in  (Read 6891 times)

0 Members and 1 Guest are viewing this topic.

Tempy111

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Creating a 'safe word' plug-in
« on: April 13, 2010, 09:08:12 pm »

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
Logged

Tempy111

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Creating a 'safe word' plug-in
« Reply #1 on: April 14, 2010, 04:40:44 pm »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Creating a 'safe word' plug-in
« Reply #2 on: April 14, 2010, 07:21:05 pm »

Please share your plugin with the community.
Logged

Tempy111

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Creating a 'safe word' plug-in
« Reply #3 on: April 14, 2010, 10:32:36 pm »

I will. I just need to make the interface bit
Logged

Tempy111

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Creating a 'safe word' plug-in
« Reply #4 on: April 15, 2010, 12:14:35 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.