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: anyone interested in writing a prefix mod?  (Read 7670 times)

0 Members and 1 Guest are viewing this topic.

Eudemon

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Posts: 11
    • Eudemon
anyone interested in writing a prefix mod?
« on: July 01, 2011, 02:21:27 am »

andre said it's a pretty easy to create
i can't do it right now bcuz i'm not familiar with coppermine

so if u interested see this topic for more detail
http://forum.coppermine-gallery.net/index.php/topic,72959.0.html

thanks in advance  :-X
Logged

Eudemon

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Posts: 11
    • Eudemon
Re: anyone interested in writing a prefix mod?
« Reply #1 on: July 06, 2011, 10:28:06 pm »

never mind, i figured it out myself
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: anyone interested in writing a prefix mod?
« Reply #2 on: July 13, 2011, 12:44:57 pm »

Resolve your threads
If you have found an answer to your question, resolve your thread. Don't just post "I have found the answer", but tell others what you actually did to solve your issues. Posting a link to the page where you found the answer might help. Describing what you did might help as well.
Logged

Eudemon

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Posts: 11
    • Eudemon
Re: anyone interested in writing a prefix mod?
« Reply #3 on: July 21, 2011, 05:39:43 pm »

solution
go to upload.php, find the function that gets the file name
add a prefix to it
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: anyone interested in writing a prefix mod?
« Reply #4 on: July 21, 2011, 06:29:32 pm »

For the benefit of other users, I guess you're talking about that line:
Code: [Select]
$picture_name = replace_forbidden($picture_name);
E.g. you have to change it to
Code: [Select]
$picture_name = replace_forbidden('my_prefix_' . $picture_name);
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: anyone interested in writing a prefix mod?
« Reply #5 on: September 02, 2011, 12:22:03 pm »

The same change has to be applied to db_input.php if you want to use it with the simple upload form.

To avoid modifying core files I've added a new plugin hook 'upload_file_name' to our svn repository in revision 8251. As an example I also added a plugin, which adds a random suffix to your newly uploaded files' names.
Logged

Eudemon

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Posts: 11
    • Eudemon
Re: Re: anyone interested in writing a prefix mod?
« Reply #6 on: February 01, 2012, 09:52:13 pm »

For the benefit of other users, I guess you're talking about that line:
Code: [Select]
$picture_name = replace_forbidden($picture_name);
E.g. you have to change it to
Code: [Select]
$picture_name = replace_forbidden('my_prefix_' . $picture_name);

yeah that's one of the ways
however i personally prefer adding an extra line after that (in case some1 need it)
   $picture_name = 'lalalallalalala.org '.$picture_name;
bcuz replace_forbidden function will replace "." and " " with under score
we could modify the replace_forbidden function so that it ignores certain characters
but that just extra modifications, or maybe in the admin setting has these values im not sure

and yes, like andre says, do the same to db_input.php
was playing with menalto gallery for a while and here i'm back  :P

i'm a mod/plugin author in smf, probably will jack around here a little bit, so hi everyone
btw will rly appreciated if u guys can get the moderator thinggy done in the future
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 931
  • +Tinyportal Support team.
Re: Re: anyone interested in writing a prefix mod?
« Reply #7 on: February 01, 2012, 11:23:28 pm »


i'm a mod/plugin author in smf, probably will jack around here a little bit, so hi everyone
btw will rly appreciated if u guys can get the moderator thinggy done in the future


Hi Eudemon, (again) ;)

What "moderator thingy" are you ralking about? 
Logged
Running SMF 2.0.15  / Tinyportal 1.6.4, bridged with Coppermine 1.6.06, plus cpmfetch 2.0.0

Eudemon

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Posts: 11
    • Eudemon
Re: anyone interested in writing a prefix mod?
« Reply #8 on: February 01, 2012, 11:29:54 pm »

oh hi lurkalot
by that i mean moderation permissions (assigned to specific member or group to have move, edit, delete  etc others' upload)
just like a board moderator in smf

the last time i searched here i saw someone (i think it's andre) said it was planed as a core feature
but didn't get done bcuz didn't have proper documentation??
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 931
  • +Tinyportal Support team.
Re: anyone interested in writing a prefix mod?
« Reply #9 on: February 01, 2012, 11:41:51 pm »

oh hi lurkalot
by that i mean moderation permissions (assigned to specific member or group to have move, edit, delete  etc others' upload)
just like a board moderator in smf

the last time i searched here i saw someone (i think it's andre) said it was planed as a core feature
but didn't get done bcuz didn't have proper documentation??

I'd love this feature too tbh, but not sure how easy / difficult it would be especially when using a bridged setup, like Coppermine bridged with SMF 2.0.2 for example.   If I were you, I'd add your suggestion to the Feature requests board. ;)
Logged
Running SMF 2.0.15  / Tinyportal 1.6.4, bridged with Coppermine 1.6.06, plus cpmfetch 2.0.0

Eudemon

  • Coppermine newbie
  • Country: us
  • Offline Offline
  • Posts: 11
    • Eudemon
Re: anyone interested in writing a prefix mod?
« Reply #10 on: February 02, 2012, 12:12:21 am »

 ??? i thought it's alrdy planned by the team
adding permission to bridged setup should be easy i think, since coppermine alrdy have some permissions based bridged users/groups
the difficult part is writing this new permission up in the main script, i don't rly know how cop is setup so if im wrong forgive me

i did a search in the feature request board, it seems like moderator permission is been asked numerous times
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: anyone interested in writing a prefix mod?
« Reply #11 on: February 02, 2012, 08:53:32 am »

Please stop the unrelated discussion about the moderator feature. If you want to know why it has been disabled, see here.
Logged
Pages: [1]   Go Up
 

Page created in 0.039 seconds with 20 queries.