Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 08:16 pm EST
Geeklog Forums
Including files that change.
Anonymous
Anonymous
Hi,
Is it possible to include the content of a file inside a story? I would like to have the content of an every 3hours changing file inside my geeklog site, especially with all the fancy layout of a story. The content of the file is nothing more than a html table.
I have messed for quite a while with both the staticpages plugin and the story importer.. Both couldnt do this for me. Am i doing something wrong or is this not possible yet? Im running gl v1.3.6 with staticpages v1.2.
Basicly any solution would be alright as long as i can display it in the middle of the site with both left and right blocks enabled. (i have even thought about writing the content of the file directly into the gl database.. ).
Any help or points into the right direction would be mucho apreciated.
/g
7
9
Quote
Anonymous
Anonymous
i tried:
<?php include('filename.html'); ?>
and it showed me nothing :<
7
6
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Please read this story on Tom's Site and then try again ...
bye, Dirk
6
9
Quote
Anonymous
Anonymous
So in other words, what i want(including filecontent in a story) is not possible. At least not with my current gl setup.
Guido.
12
9
Quote
Status: offline
tomw
Forum User
Full Member
Registered: 08/12/02
Posts: 300
You give up too easy.
How about using a static page with php enabled and putting the following in it:
$display = implode('',file('/path/to/your/file'));
return $display;
Or you could create a seperate file that had this in it:
<?php
require_once('lib-common.php');
$display = COM_siteHeader('menu'); // use 'none' if you do not want the left blocks
$display = COM_startBlock("Some fancy Title"
$display = implode('',file('/path/to/your/file'));
$display = COM_endBlock();
$display .= COM_siteFooter(yes); // use no if you do not want the right blocks
echo $display;
?>
Tom
6
8
Quote
All times are EST. The time is now 08:16 pm.
- 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