coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: just_some_guy on September 29, 2007, 08:54:14 PM

Title: Moving a plugin file to cpg root?
Post by: just_some_guy on September 29, 2007, 08:54:14 PM
Hey,

My plugin needs a file to be in the root directory of coppermine, the plugin manager uploads the files to .../plugins/plugin_name can you specify where to upload the file to in the codebase, or will i need to use a php copy() in the codebase?

$file = 'plugin.php';
$newfile = '' . $CONFIG['site_url'] .'/plugin.php';

if (!copy($file, $newfile)) {
    echo "Plugin error";
}


Thanks!
Title: Re: Moving a plugin file to cpg root?
Post by: Sami on September 29, 2007, 10:27:24 PM
It would be better to copy it manually by user (You can describe it under installation doc of plugin as well)
using file system function of PHP could create permission problem under badly configured servers
Title: Re: Moving a plugin file to cpg root?
Post by: just_some_guy on September 29, 2007, 10:34:23 PM
ok, thanks, while im at it is there a restrictions to urls accessing profile.php?  the page wont load.

Thanks for your help.
Title: Re: Moving a plugin file to cpg root?
Post by: just_some_guy on September 30, 2007, 01:09:14 AM
Almost finished plugin  ;D. However i need a hand with the plugin syntax, i have a section of code that needs to be inserted into changethumb.php how is this done?

Also, for a language file do you do this?
add this to the lang file

$jsg_plugin = 'Text here';

then on a file you would say:

$jsg_plugin ="Text here" to call up the text.

example: <a href="http://www.google.com"> $jsg_plugin <a />

Correct?

Thanks,
Title: Re: Moving a plugin file to cpg root?
Post by: just_some_guy on October 02, 2007, 08:39:34 AM
Solved, thanks.