11
Longrifle
Re: Need help please
  • 2010/6/22 22:26

  • Longrifle

  • Just popping in

  • Posts: 28

  • Since: 2010/2/16


so what's wrong with this code...my link does not show up.. just a blank page.

include(dirname(__FILE__)."/mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
?>

include(XOOPS_ROOT_PATH."/footer.php");
?>

12
ghia
Re: Need help please
  • 2010/6/22 22:53

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


See this.

13
Longrifle
Re: Need help please
  • 2010/6/22 23:06

  • Longrifle

  • Just popping in

  • Posts: 28

  • Since: 2010/2/16


what about getting an image to show as the link. this is what the code looks like and the image resides in the Xoops1 directory.

include(dirname(__FILE__)."/mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
?>

include(XOOPS_ROOT_PATH."/footer.php");
?>

I get a blank page.


14
ghia
Re: Need help please
  • 2010/6/22 23:21

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Where is your mainfile in respect to the file with that content?
If it is in the same directory use:
include("mainfile.php");
or
echo dirname(__FILE__)."/mainfile.php";

If it is in the parent directory use
include("../mainfile.php");

If it is two directories down use
include("../../mainfile.php");


For optimal readability of your posts, after selecting the code, push on the code button ( <> ).

15
Longrifle
Re: Need help please
  • 2010/6/23 0:12

  • Longrifle

  • Just popping in

  • Posts: 28

  • Since: 2010/2/16


maybe I worded that wrong.

I just want a picture to show in the main frame of xoops and for that picture to be a link.

right now it just shows the header and footer but no pic.

16
ghia
Re: Need help please
  • 2010/6/23 0:53

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


And the picture is in the same directory as the PHP file? If not, use an absolute URL or relative path to it.

17
linux-ws
Re: Need help please
  • 2010/7/20 20:58

  • linux-ws

  • Just popping in

  • Posts: 39

  • Since: 2010/7/20


Reply to: Longrifle

If all else fails, you should always backup the original files, before editing them, so that in case something does not work the way it should, you can always just replace the modified files.

Usually this fixes the problems.

It worked for me, when I had to edit some files to make new template work.

Thank you very much.

Login

Who's Online

429 user(s) are online (328 user(s) are browsing Support Forums)


Members: 0


Guests: 429


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits