Page 1 of 1
"No links yet" with include
Posted: Thu Nov 13, 2008 10:34 am
by Susanne
Version of script: 1.5
Hi,
the script works fine, except one thing.
If I try to put it into my homepage code with
Code: Select all
<? include("php-bin/linklist/links.php"); ?>
that works, but there are no links shown. Just
No links yet!
So I changed the
linkinfo.txt
at the admin settings to
php-bin/linklist/linkinfo.txt
Now the links are shown on my homepage but the script doesn't find the linkinfo.txt anymore to add new links.
How can I solve that?
Regards
Susanne
Posted: Sat Nov 15, 2008 9:07 am
by Klemen
links.php wasn't designed to work with includes, but if you want to use it like that maybe you can create a new file (links-include.php) and use the path that works there and on your links page use the original links.php file.
Posted: Sat Nov 15, 2008 12:41 pm
by Susanne
That's really sad.

I already tried your way, but it doesn't work.
But thank you for your answer!
Posted: Sat Nov 15, 2008 6:56 pm
by Klemen
I'm quite sure it should work (haven't tested it though), try it like this:
1. in admin settings leave the file as linkinfo.txt
2. make a copy links.php and name it links-include.php
3. in links-include.php change
Code: Select all
$lines = file($settings['linkfile']);
to
Code: Select all
$lines = file('php-bin/linklist/'.$settings['linkfile']);
Then use links-include.php as the include file and links.php as the normal LinkMan file.
Posted: Sat Nov 15, 2008 7:02 pm
by Susanne
Okay, I'll try it again tomorrow

Posted: Fri May 01, 2009 9:12 pm
by DC
Hi Klem, I know this is an older post but I too was wondering about that. Is there a reason you do not make your scripts as includable instead?
The mod that I did on 1.6-1.7 changes the way the script works entirely and can be included in any php based page while all the script files still remain in the scripts dir and no header footer files are called or required just seems that an includeable version is the way to go.
I will show you my mod test shortly I think its pretty slick.
DC