Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 21, 2009, 02:40:32 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Maintenance release cpg1.4.25 - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix an issue with http uploads that could occur in particular versions of PHP.The fix is not security-critical, so if your gallery is running fine with cpg1.4.23 or cpg1.4.24 you don't need to upgrade. If you are running an older version than cpg1.4.23, you must update to this latest version as soon as possible because of the security impact (the past few maintenance releases before cpg1.4.24 all were security-related).
[more]
   Home   Help Search Board rules Login Register  
Pages: [1] 2 3 4   Go Down
  Send this topic  |  Print  
Author Topic: [PLUGIN] File2albummover  (Read 21545 times)
0 Members and 1 Guest are viewing this topic.
ge-flopt Topic starter
Contributor
***
Posts: 30


« on: September 22, 2005, 09:42:31 pm »

Hi All,

I wanted to place this in the plugin forum, but it stated i couldn't post there, that i had to post it in the corresponding support forum. Well this forum is the only one dedicated to 1.4, so i hope it has to go in this one.

I would like to present to you my piece of software (plugin) for the 1.4 version of Coppermine.
All the info is in the file but i'll give you a bit of info about what this plugin do:
It sorts images according to the album they are in.
So let's say a picture is in the album Green and the directory the image is placed in is called Blue. After running File2albummover the directory the file is in is Green. If the directory didn't exist it was created.

Please read the info.txt before you install the plugin!
The codebase.php is well documented, so if you want to modify stuff, it'll be easy.

Hope you have fun with it.

* file2albummover.zip (3.14 KB - downloaded 429 times.)
« Last Edit: September 23, 2005, 05:32:25 am by GauGau » Logged
ge-flopt Topic starter
Contributor
***
Posts: 30


« Reply #1 on: September 28, 2005, 06:15:17 pm »

Hmmm the first who reacts on my own topic Tongue

Well, I don't do this to have a reply and don't have something interresting to tell. So here's the real reason to reply, version 0.2 (Codename: Machine Head) has arrived!

Difference from v0.1 (Soulfly) to v0.2 (Machine Head)
- Created Log Facility:
      - Counting of how many files are moved
      - Color codes if copy/move went correct or not
      - Error_code to see what went wrong
- Better checking if all files are moved

ToDo:
- Better integration with Coppermine (Can anyone explain how to do this?!) <- A big help would be someone who can help me with this!
- If the file has the same name, maybe change the filename and then move it

* file2albummover-v0.2.zip (3.86 KB - downloaded 382 times.)
Logged
tutone
Coppermine regular visitor
**
Posts: 64


« Reply #2 on: October 10, 2005, 07:19:44 pm »

Great idea.  I was thinking that my folders are getting out of hand.  But, i can't get this to work...

Not sure what you mean by "change $imagefolder variable".  Not sure what to change this too.  i put in a /

when i try to call up the plugin i get:


Fatal error: Call to undefined function: cpg_db_query() in /plugins/f2am/codebase.php on line 23

let me know what i am doing wrong.

thanks
Logged
ge-flopt Topic starter
Contributor
***
Posts: 30


« Reply #3 on: October 10, 2005, 08:28:38 pm »

Woei the first to reply  Tongue

Well that variable is a directory under the images directory. In my case:
the variable is:
$imagefolder='folder/';
and then the directory is:
albums/folder

If you want to place everything in the root of albums, you need to set the variable as:
$imagefolder='';

Hmm found a little bug, not a severe one, place a ; afters the line

note that you have to be logged in and in a seperate (Internet browser) screen you need to start the plugin like this: index.php?file=mp2d/codebase
Mp2d is the directory you have placed the plugin in
Logged
tutone
Coppermine regular visitor
**
Posts: 64


« Reply #4 on: October 10, 2005, 09:26:30 pm »

That didn't work... still get the same error...
Logged
ge-flopt Topic starter
Contributor
***
Posts: 30


« Reply #5 on: October 10, 2005, 10:42:19 pm »

Just to make sure, if you use the variable as i entered it, what happens then?
Logged
tutone
Coppermine regular visitor
**
Posts: 64


« Reply #6 on: October 10, 2005, 11:09:49 pm »

I used the variable as you suggested and i get the same error.
Logged
ge-flopt Topic starter
Contributor
***
Posts: 30


« Reply #7 on: October 11, 2005, 05:35:23 pm »

What i think is strange is that the function : cpg_db_query is used in coppermine but at your place you get an "undefined function: cpg_db_query" error in the script.. Strange because, if you would have an error with the script it would have it through out coppermine.

Maybe i'v found something, after the cpg_db_query on line 23 is a tab, would you like to replace it with a space?

Maybe found another solution... Which version are you using? 1.3? This one is only tested on 1.4 a possible solutions is posted here:
http://forum.coppermine-gallery.net/index.php?topic=14600.msg102271#msg102271
Logged
tutone
Coppermine regular visitor
**
Posts: 64


« Reply #8 on: October 12, 2005, 05:45:59 pm »

I took out the tab after cpg_db_query but still get the same error.

I am using 1.4x bridged with mambo.  Let me know if you want me to send you anything else.
Logged
ge-flopt Topic starter
Contributor
***
Posts: 30


« Reply #9 on: October 12, 2005, 08:15:49 pm »

And isf you replace cpg_db_query with db_query?
Logged
Nibbler
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #10 on: October 12, 2005, 08:39:20 pm »

include/init.inc.php doesn't get included if you call the plugin using ?file= - check the code at the top of index.php
Logged

I don't care about what they say, I won't live or die that way.
ge-flopt Topic starter
Contributor
***
Posts: 30


« Reply #11 on: October 12, 2005, 09:11:27 pm »

But how come that it works at my pc?
Logged
Nibbler
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #12 on: October 12, 2005, 09:23:49 pm »

You are probably running an outdated version of 1.4 - update from cvs.
Logged

I don't care about what they say, I won't live or die that way.
tutone
Coppermine regular visitor
**
Posts: 64


« Reply #13 on: October 12, 2005, 10:16:21 pm »

ge-flopt,

Based on Nibbler's suggestions... what do you want me to add to the code?

Logged
Stramm
Dev Team member
****
Gender: Male
Posts: 5622



« Reply #14 on: October 13, 2005, 12:53:57 pm »

ge-flopt,

Based on Nibbler's suggestions... what do you want me to add to the code?




you should update your CPG 1.4
Logged

my CPG sandbox: Version 1.4.18 with modpack running my Tentacle theme:
http://stramm.st.funpic.org/
ge-flopt Topic starter
Contributor
***
Posts: 30


« Reply #15 on: October 13, 2005, 02:51:56 pm »

Nibbler, was the last remark about me or about tutone?
Logged
Nibbler
Dev Team member
****
Gender: Male
United Kingdom United Kingdom

Posts: 19445



WWW
« Reply #16 on: October 13, 2005, 07:06:26 pm »

The plugin only works because ge-flopt is running an outdated version of Coppermine. It is vital that those testing 1.4 keep their installation up to date.
Logged

I don't care about what they say, I won't live or die that way.
tutone
Coppermine regular visitor
**
Posts: 64


« Reply #17 on: October 14, 2005, 07:47:56 pm »

ge-flopt,

Let me know when you have something for me to test.

tutone
Logged
ge-flopt Topic starter
Contributor
***
Posts: 30


« Reply #18 on: October 19, 2005, 02:59:50 pm »

Nibbler,

I've updated CM to the latest cvs version. Now i want te update the script, but is there some info on how to work at best?

Regards
Logged
Joachim Müller
Administrator
*****
Gender: Male
Germany Germany

Posts: 45051


aka "GauGau"


WWW
« Reply #19 on: October 20, 2005, 07:18:27 am »

There's no documentation what mod authors are suppossed to do - this would be a very complicated task to come up with a documentation for all steps of an app that is under development. I suggest using a diff viewer to see what actually changed. Then apply your existing plugin to the most recent cvs checkout files and test-drive it. Welcome to the world of bug-hunting Grin.
Logged
Pages: [1] 2 3 4   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.043 seconds with 17 queries.