Moving a plugin file to cpg root? Moving a plugin file to cpg root?
 

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

Main Menu

Moving a plugin file to cpg root?

Started by just_some_guy, September 29, 2007, 08:54:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

just_some_guy

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!
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

Sami

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
‍I don't answer to PM with support question
Please post your issue to related board

just_some_guy

ok, thanks, while im at it is there a restrictions to urls accessing profile.php?  the page wont load.

Thanks for your help.
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

just_some_guy

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,
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

just_some_guy

Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums