1
eric235u
PHP Script Block Question
  • 2006/12/6 13:54

  • eric235u

  • Not too shy to talk

  • Posts: 149

  • Since: 2004/12/19


hi all. i'm trying to learn php and thought i'd use a block in XOOPS as a place to test out my little scripts. yet it doesn't seem to be working or i'm just not understanding how the blocks work. like when i do:

<?php echo 'xoops is the best cms in the world.'; ?>

nothing appears in my block. regardless of the content type setting. i'm using 2.2x. thanks for any tips.

2
stefan88
Re: PHP Script Block Question
  • 2006/12/6 14:15

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


Hi,
just type:
echo 'xoops is the best cms in the world.';

without <?php and ?> part.
..

3
eric235u
Re: PHP Script Block Question
  • 2006/12/6 14:20

  • eric235u

  • Not too shy to talk

  • Posts: 149

  • Since: 2004/12/19


ahhh.



it's funny how the little things can get ya.

awesome. this is really going to help me learn more quickly. thanks man!

4
konaafob
Re: PHP Script Block Question
  • 2006/12/6 16:53

  • konaafob

  • Just popping in

  • Posts: 57

  • Since: 2005/1/10


Is there anyway to get XOOPS Variables into Block.

I mean I want to use

XoopsDB->prefix.('newbb')
XoopsDB->fetchArray()

etc.

thanks in advance.

Regards,
Kona

5
fragttdg
Re: PHP Script Block Question
  • 2006/12/7 5:42

  • fragttdg

  • Just popping in

  • Posts: 34

  • Since: 2004/6/13


dont forget to include mainfile.php;

if your senario is in a function, be sure to declare

"global $xoopsDB;"
Xoops Based site -http://www.xiubei.com

6
konaafob
Re: PHP Script Block Question
  • 2006/12/7 10:50

  • konaafob

  • Just popping in

  • Posts: 57

  • Since: 2005/1/10


Thanks for the info. I will try it out.

regards
Kona

Login

Who's Online

249 user(s) are online (154 user(s) are browsing Support Forums)


Members: 0


Guests: 249


more...

Donat-O-Meter

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

Latest GitHub Commits