1
arrakis
PHP script into a Block
  • 2005/3/14 17:49

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


Hello all, I saw in the admin of XOOPS that I can add a block and specify that it is a PHP script, I never did it before but this time I needed to put a small php script into a cental block in the Home Page of the site (Top page of Xoops).

This script just check the date and display a different image if a certain date is passed.

I did the script separately and then I made a new block and put there the php code, and specified in the drop down menu that this block is a php script.

But the strange thing is that it works perfectly but I don't see anything else than the executed code, if i disable the script the site is ok, if i enable it i only see the script output and the site is gone

I looked for long here (Q&A, Faq, suppor) but I couldn't find any information regarding how to add a PHP script into a block in the top page.

Is there a special way how to add it or there is something wrong in my site? (btw it is a fresly new installation)

Thanks!

2
arrakis
SOLVED!!!
  • 2005/3/14 18:06

  • arrakis

  • Just popping in

  • Posts: 50

  • Since: 2004/10/1


After hours and hours melting my mind over the problem I had an illumination

I put an "exit" inside a php function, that was intendend to end the function, but it was ending the WHOLE XOOPS processes!!

So now is all ok!

3
vogelor
Re: SOLVED!!!
  • 2005/3/15 10:59

  • vogelor

  • Just popping in

  • Posts: 1

  • Since: 2005/3/4 1


The command Exit not only ends the XOOPS script, it also ends the execution of the page - this works in EVERY php page - not only in XOOPS (the comand "die" does the same, but with message)

Login

Who's Online

352 user(s) are online (294 user(s) are browsing Support Forums)


Members: 0


Guests: 352


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