Hey
It would be very nice to have a step by step explanation on how to configure the plug-in and perhaps some examples where to place the application-files.
Kind regards
Jensolav
external php application plug-in
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: external php application plug-in
Sure:
The External PHP application plugin is there, so that you can embed an external .php script into a serendipity page. The whole content will show the external php application, but the fraiming design of Serendipity remains, with all sidebars.
An external PHP application can be any PHP file on your server. It does not matter where you store it. It only matters that the application needs to pay respect to the serendipity framework and that the application is embedded into a Class and global variables are a problem, and that follow-up links (if the application offers any) needs to use the URL for your blog. Since this is a bit hard, it is usually suggested to not embed "big" applications inside this functinaloty. It is more thought for including your own PHP scripts that show statistics, or a form, or whatever.
Now to the configuration:
1. The permalink defines which URL you want to use to access your external PHP application. Just enter the full path, it needs to be within your serendipity directory and needs to end with .htm or .html and may not use any of the internal permalink paths Serendipity already uses (so don'T use /archives or /authors).
2. URL shorthand name: This variable needs to be a single string that is used to access the page with a URL like http://yourblog/serendipity/index.php?s ... page]=XXXX. This is needed in case your PHP script wants to link to subpages of itself, because it needs to use that link then to get to its own page. The permalink can make trouble for this since POST/GET variables are not transferred.
3. File to include. This is the path to your PHP script you want to include.
4. Format as article: If your php script should look like an article (with header, body formatting and stuff) you need to enable this. If you want your php script to use the full space allocated by serendipity for external content, disable the setting.
Best regards,
Garvin
The External PHP application plugin is there, so that you can embed an external .php script into a serendipity page. The whole content will show the external php application, but the fraiming design of Serendipity remains, with all sidebars.
An external PHP application can be any PHP file on your server. It does not matter where you store it. It only matters that the application needs to pay respect to the serendipity framework and that the application is embedded into a Class and global variables are a problem, and that follow-up links (if the application offers any) needs to use the URL for your blog. Since this is a bit hard, it is usually suggested to not embed "big" applications inside this functinaloty. It is more thought for including your own PHP scripts that show statistics, or a form, or whatever.
Now to the configuration:
1. The permalink defines which URL you want to use to access your external PHP application. Just enter the full path, it needs to be within your serendipity directory and needs to end with .htm or .html and may not use any of the internal permalink paths Serendipity already uses (so don'T use /archives or /authors).
2. URL shorthand name: This variable needs to be a single string that is used to access the page with a URL like http://yourblog/serendipity/index.php?s ... page]=XXXX. This is needed in case your PHP script wants to link to subpages of itself, because it needs to use that link then to get to its own page. The permalink can make trouble for this since POST/GET variables are not transferred.
3. File to include. This is the path to your PHP script you want to include.
4. Format as article: If your php script should look like an article (with header, body formatting and stuff) you need to enable this. If you want your php script to use the full space allocated by serendipity for external content, disable the setting.
Best 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/
# 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/
-
Guest
I have made the following configuration
Permalink
http://bjoerchmart.dk/serendipity/index ... sebog.html
Shorthand
adressebog
URL where my php-file is stored
http://bjoerchmart.dk/adressebog/index.php
But I get
Warning: show(): Failed opening '' for inclusion (include_path='.::/home/web/web12253/serendipity/:/home/web/web12253/serendipity/bundled-libs/') in /home/web/web12253/serendipity/plugins/serendipity_event_externalphp/serendipity_event_externalphp.php on line 112
What's wrong
Kind regards
Jensolav
Permalink
http://bjoerchmart.dk/serendipity/index ... sebog.html
Shorthand
adressebog
URL where my php-file is stored
http://bjoerchmart.dk/adressebog/index.php
But I get
Warning: show(): Failed opening '' for inclusion (include_path='.::/home/web/web12253/serendipity/:/home/web/web12253/serendipity/bundled-libs/') in /home/web/web12253/serendipity/plugins/serendipity_event_externalphp/serendipity_event_externalphp.php on line 112
What's wrong
Kind regards
Jensolav
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
You cannot include URLs, you must include files. So don't give the include_file a URL parameter, give it the path to your addressbook.
It seems you might rather want to use the WrapURL plugin for embedding a full application inside your serendipity layout!
Regards,
Garvin
It seems you might rather want to use the WrapURL plugin for embedding a full application inside your serendipity layout!
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/
# 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/
-
Guest