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 » Tue Jul 29, 2008 1:22 am

Is that possible?

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: External php plugin in footer?

Post by garvinhicking » Tue Jul 29, 2008 10:38 am

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 » Tue Jul 29, 2008 6:18 pm

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

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking » Tue Jul 29, 2008 7:29 pm

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 » Tue Jul 29, 2008 8:22 pm

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?

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking » Wed Jul 30, 2008 10:23 am

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 » Thu Jul 31, 2008 4:11 am

It works,thanks.

Post Reply