forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: Eudemon 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
-
never mind, i figured it out myself
-
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.
-
solution
go to upload.php, find the function that gets the file name
add a prefix to it
-
For the benefit of other users, I guess you're talking about that line:
$picture_name = replace_forbidden($picture_name);
E.g. you have to change it to
$picture_name = replace_forbidden('my_prefix_' . $picture_name);
-
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 (http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/random_file_name_suffix/), which adds a random suffix to your newly uploaded files' names.
-
For the benefit of other users, I guess you're talking about that line:
$picture_name = replace_forbidden($picture_name);
E.g. you have to change it to
$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
-
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?
-
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??
-
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 (http://forum.coppermine-gallery.net/index.php/board,7.0.html) board. ;)
-
??? 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
-
Please stop the unrelated discussion about the moderator feature. If you want to know why it has been disabled, see here (http://forum.coppermine-gallery.net/index.php/topic,64408.msg323489.html#msg323489).