Adding code to a file. Adding code to a file.
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Adding code to a file.

Started by just_some_guy, September 30, 2007, 04:30:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

just_some_guy

I have several sets of php code that need to be inserted to displayimage.php, what do i put in the codebase to achive this?

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

Nibbler

You don't. Use the provided plugin hooks and filters or provide instructions to the user about what hooks/filters to add if there are none suitable.

just_some_guy

Ok, so i would use
Quote$thisplugin->add_filter('file_footer','vhp_file_footer');
to apply the code to displayimage.php.

But i still dont understand how to add code to a specific location example: "code on line 403 of upload.php"

How do i do this?

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

Nibbler

You don't. That's what makes a plugin different to a mod. If you need people to make code changes then write it up as a mod instead. Not everything can be made into a plugin,

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