Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2 3 4   Go Down

Author Topic: [PLUGIN] File2albummover  (Read 100635 times)

0 Members and 1 Guest are viewing this topic.

ge-flopt

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
[PLUGIN] File2albummover
« on: September 22, 2005, 10: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.
« Last Edit: September 23, 2005, 06:32:25 am by GauGau »
Logged

ge-flopt

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: [PLUGIN] File2albummover
« Reply #1 on: September 28, 2005, 07:15:17 pm »

Hmmm the first who reacts on my own topic :P

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
Logged

tutone

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
Re: [PLUGIN] File2albummover
« Reply #2 on: October 10, 2005, 08: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

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: [PLUGIN] File2albummover
« Reply #3 on: October 10, 2005, 09:28:38 pm »

Woei the first to reply  :P

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
  • **
  • Offline Offline
  • Posts: 64
Re: [PLUGIN] File2albummover
« Reply #4 on: October 10, 2005, 10:26:30 pm »

That didn't work... still get the same error...
Logged

ge-flopt

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: [PLUGIN] File2albummover
« Reply #5 on: October 10, 2005, 11:42:19 pm »

Just to make sure, if you use the variable as i entered it, what happens then?
Logged

tutone

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
Re: [PLUGIN] File2albummover
« Reply #6 on: October 11, 2005, 12:09:49 am »

I used the variable as you suggested and i get the same error.
Logged

ge-flopt

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: [PLUGIN] File2albummover
« Reply #7 on: October 11, 2005, 06: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
  • **
  • Offline Offline
  • Posts: 64
Re: [PLUGIN] File2albummover
« Reply #8 on: October 12, 2005, 06: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

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: [PLUGIN] File2albummover
« Reply #9 on: October 12, 2005, 09:15:49 pm »

And isf you replace cpg_db_query with db_query?
Logged

Nibbler

  • Guest
Re: [PLUGIN] File2albummover
« Reply #10 on: October 12, 2005, 09: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

ge-flopt

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: [PLUGIN] File2albummover
« Reply #11 on: October 12, 2005, 10:11:27 pm »

But how come that it works at my pc?
Logged

Nibbler

  • Guest
Re: [PLUGIN] File2albummover
« Reply #12 on: October 12, 2005, 10:23:49 pm »

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

tutone

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
Re: [PLUGIN] File2albummover
« Reply #13 on: October 12, 2005, 11: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
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [PLUGIN] File2albummover
« Reply #14 on: October 13, 2005, 01: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

ge-flopt

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: [PLUGIN] File2albummover
« Reply #15 on: October 13, 2005, 03:51:56 pm »

Nibbler, was the last remark about me or about tutone?
Logged

Nibbler

  • Guest
Re: [PLUGIN] File2albummover
« Reply #16 on: October 13, 2005, 08: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

tutone

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 64
Re: [PLUGIN] File2albummover
« Reply #17 on: October 14, 2005, 08:47:56 pm »

ge-flopt,

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

tutone
Logged

ge-flopt

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 49
Re: [PLUGIN] File2albummover
« Reply #18 on: October 19, 2005, 03: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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [PLUGIN] File2albummover
« Reply #19 on: October 20, 2005, 08: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 ;D.
Logged
Pages: [1] 2 3 4   Go Up
 

Page created in 0.021 seconds with 21 queries.