Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 11:00 am EST
Geeklog Forums
External Pages Plugin
Status: offline
tomw
Forum User
Full Member
Registered: 08/12/02
Posts: 300
Because of a need, I have created another Geeklog Plugin. This plugin allows pages external to geeklog to participate in Geeklog security, searches, and statistics.
Features:
- External Pages can participate fully in Geeklog Security.
- External Pages are search-able through Geeklogs Search -- even dynamic pages.
- Access to external pages is recorded in a hit counter and External pages are added to the Geeklog Statistics Page.
- External Pages that have the External Page code added to them are automatically added to the system the first time they are accessed.
- Templates are provided for creating pages that contain php or php and html and for pages that contain the Geeklog header and footer and those that do not.
You can get it from my Download Page or Here
Enjoy
Tom
8
7
Quote
Status: offline
Robin
Forum User
Full Member
Registered: 02/15/02
Posts: 725
Another great stuff from Tom. At last I can take full control over the pages I couldn't process via static pages (way too big files). It works smoothly (as usual:-). Thank you Tom and keep up the great job!
Geeklog Polish Support Team
Geeklog Polish Support Team
8
5
Quote
Status: offline
keystone
Forum User
Chatty
Registered: 09/21/02
Posts: 50
Tom. I've installed an external app. and your plugin with only a couple of glitches. I'm now a little confused. Do I need to use the admin tool to "set up" the external application or can I just add the snippet of code to the application?
9
8
Quote
Status: offline
tomw
Forum User
Full Member
Registered: 08/12/02
Posts: 300
Either/Or. After you add the code to your app (or make a new file with the code and include your app in it), then the first time you access it, a record for it is created. You can then go and edit the displayed name for this page or leave it as is. Or you can create the record for it beforehand. Whatever suits your fancy. I would recommend that at first you let it create the entry so you can see exactly how it works.
Tom
7
4
Quote
Status: offline
keystone
Forum User
Chatty
Registered: 09/21/02
Posts: 50
When I insert
require_once('/home/virtual/site208/fst/var/www/html/olwig.familynotepad.com/lib-common.php');
And run the external app I get three error messages like this
Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site208/fst/var/www/html/olwig.familynotepad.com/geneology/search.php:197) in /home/virtual/site208/fst/var/www/html/olwig/system/lib-sessions.php on line 273
I saw some other posts that discuss this error but it seems strange that there would be a problem with my lib-common.php file now since my site has been running fine for a couple of months.
Thanks, Bob
7
11
Quote
Status: offline
tomw
Forum User
Full Member
Registered: 08/12/02
Posts: 300
Usually the cannot send header is because you have something before the initial <?php . There can be nothing before it. Where are you inserting the call to lib-common?
Use the templates I provided and you should not have any problems. If you cannot figure it out, give me some code to look at. I may not understand english but I understand computer.
Tom
6
6
Quote
Status: offline
keystone
Forum User
Chatty
Registered: 09/21/02
Posts: 50
Tom, I appreciate the help since I'm a novice at PHP. The external application includes a meta.html file that is included in the header of each php script. For example, here is a snippet of code from the search.php file.
<html>
<head>
<title><? echo $text[searchresults]; ?></title>
<? include( "meta.html" ); ?>
</head>
Here is what I have in meta.html:
<?php
// +---------------------------------------------------------------------------+
// | geekphphtml.php |
// | This is the php/html template for the External Pages Plug-in! |
// | |
// +---------------------------------------------------------------------------|
// | Copyright (C) 2002 by the following authors: |
// | |
// | Author: |
// | Constructed with the External Pages Plugin Template |
// | Copyright (C) 2002 by the following authors: |
// | Tom Willett - tomw@pigstye.net |
// +---------------------------------------------------------------------------|
// | This program is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License |
// | as published by the Free Software Foundation; either version 2 |
// | of the License, or (at your option) any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA|
// | |
// +---------------------------------------------------------------------------|
//
// Make sure this points to your lib-common.php wherever you have this page
//
require_once ('/home/virtual/site208/fst/var/www/html/olwig.familynotepad.com/lib-common.php');
?>
<link href="genstyle.css" rel="stylesheet">
9
7
Quote
Status: offline
tomw
Forum User
Full Member
Registered: 08/12/02
Posts: 300
Ok, Now I see -- the reason for the error is that your page has already sent the headers before you include the file. I always look at it backwards from that. I include the page I want to include in Geeklog within one of my templates. Here is how I would do it. Begin with the geekphphtml template as you have done, in the place it says :
<center><b>Put your HTML or combined HTML and PHP code here</b></center>
take out that line and insert all the code from the page you are trying to integrate. What this will do is encapsulate the page you are trying to integrate with the geeklog header and footer and allow you to controll access, etc with geeklog.
You are trying to make it too hard, I did all the work for you. If you still have problems contact me off list and I will do a page for you. Seeing someone elses code is the best teacher.
Tom
9
8
Quote
All times are EST. The time is now 11:00 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content