"No links yet" with include

Problems installing LinkMan?
Post Reply
Susanne
Posts: 5
Joined: Thu Nov 13, 2008 10:23 am

"No links yet" with include

Post 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
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Susanne
Posts: 5
Joined: Thu Nov 13, 2008 10:23 am

Post by Susanne »

That's really sad. :( I already tried your way, but it doesn't work.
But thank you for your answer!
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post 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.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Susanne
Posts: 5
Joined: Thu Nov 13, 2008 10:23 am

Post by Susanne »

Okay, I'll try it again tomorrow :!:
Regards
Susanne
DC
Posts: 138
Joined: Sun Dec 09, 2007 9:28 am

Post 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
To Code Or Not To Code That Is The Question?

Was my post of any help to you? if so please do [url=http://www.clickcraft.net/slice_donations.php][b]Buy Me A Slice[/b][/url] ...
Post Reply