External php plugin in footer?

Creating and modifying plugins.
Post Reply
JACOBKELL
Regular
Posts: 31
Joined: Tue Sep 05, 2006 3:33 pm

External php plugin in footer?

Post by JACOBKELL »

Is that possible?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: External php plugin in footer?

Post by garvinhicking »

Hi!

Yes, either through Smarty, a custom PHP event plugin or code in your config.inc.php template file. Depends on what exactly you want to do.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JACOBKELL
Regular
Posts: 31
Joined: Tue Sep 05, 2006 3:33 pm

Post by JACOBKELL »

What exactly what i want?Nothing special,i just want to include php script and show it in footer instead sidebar.
File which i want to include is in includes folder.
I added <?php include("/includes/counter.php") ?> in config.php.inc but it seems that doesnt work
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

This should work. Does your webspace really have a path /includes in the root?

Usually it should rather be something like /var/www/html/mydomain.com/htdocs/includes -- using /includes as a full absolute path is VERY VERY rare. So, look up the real, right absolute path and it should work.

Maybe something like include $_SERVER['DOCUMENT_ROOT'] . '/includes/counter.php' will, depending on your directory structure.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JACOBKELL
Regular
Posts: 31
Joined: Tue Sep 05, 2006 3:33 pm

Post by JACOBKELL »

Before i puted on footer on config,and that caused blank output.Now i puted on first line of config and it shows normaly on footer.But now there is new problem-script also shows in admin panel,and admin panel is totaly messed.Neither it should show there neither it should do what it do.How to exclude script showing from admin panel?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You can change your config.inc.php to:

Code: Select all

if (!defined('IN_serendipity_admin')) {
  include '/path/to/footer.php';
}
Regards,
GArvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JACOBKELL
Regular
Posts: 31
Joined: Tue Sep 05, 2006 3:33 pm

Post by JACOBKELL »

It works,thanks.
Post Reply