1
Lupin
php custom block in xoops 2.4.4
  • 2010/3/3 0:45

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


Do you have used php custom block in XOOPS 2.4 ... ?

In version XOOPS 2.0.18 , If I have to print CICCIO , I had to write in php custom block :

echo "CICCIO" ;

if I had to show an image I had to write :

echo" ";

but with character (\) before the internal characters (") - ( also the editor of present forum eliminate those charatcters )

.. try to do it and tell me if it works ...

It seems this PHP custom block in x 2.4 works different ...

Thanks

Pino

2
andrey3761
Re: php custom block in xoops 2.4.4

What exactly doesn't work?

3
Lupin
Re: php custom block in xoops 2.4.4
  • 2010/3/3 10:00

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


all php code is printed as text ... then the block execute everithing executable as HTML.

This is the real code I need ( and works in php custom block of 2.0.18 )

global $xoopsUser; if( $xoopsUser ) { $mynick=$xoopsUser->getVar('uname'); } else {  echo "registrati per fare Login";} echo "left"> 0">                    http://win.vsksailing.it/visubox/box.asp?nick=$mynick" name="visubox" width="152" marginwidth="0" height="290" marginheight="0" scrolling="No" frameborder="0" id="visubox" allowtransparency="true" >                           
n";


note also here in quoted code space the character (\) I put before the characters (") is deleted

You can see the block working HERE ( Sailing Visubox - top of left column )

Pino

P.S. Tried do disable protector : nothing changes ...

4
sailjapan
Re: php custom block in xoops 2.4.4

silly question, perhaps, but have you tried a forward slash instead of a back slash?

5
Lupin
Re: php custom block in xoops 2.4.4
  • 2010/3/3 13:35

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


Idon't think this is the problem ...

the problem is the php script is not executed ...

a further strange thing : online with this script has no effects ... no blocks are shown , nor right nor wrong ...

In the "preview" mode of block building , the php script is print as text and the "iframe" works ...

Ciao

Pino

6
andrey3761
Re: php custom block in xoops 2.4.4

The given code works in the block php? (Without slashes)

echo '';

7
Lupin
Re: php custom block in xoops 2.4.4
  • 2010/3/3 18:14

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


FOUND !

as you told I don't need (\) character before Character (") or (').

And block works with this structure :

global $xoopsUser; if( $xoopsUser ) { $mynick=$xoopsUser->getVar('uname'); } else {  echo "registrati per fare Login";} echo "                     $mynick'  name='visubox' width='152' marginwidth='0' height='290' marginheight='0' scrolling='No'  frameborder='0' id='visubox' allowtransparency='true' >                           
";


with external (") in echo command , and (') in internal data definition ...

Thanks to everybody for support ...

Attention 2.0.xxx users ...

THIS is the preview in custom block of 2.0.18 version ....

And THIS is the preview in custom block of 2.4.4 version ...

But if you turn to see mainpage by browser , it works well...

( don't ask me why )

Pino

8
dvpicella
Re: php custom block in xoops 2.4.4
  • 2010/3/17 17:36

  • dvpicella

  • Just popping in

  • Posts: 5

  • Since: 2005/9/1 1


I'm having the same problem.

php scripts don't execute in custom blocks in 2.4.4 .

For example:

echo "this is a test";


Produces the code in a block.

I am not using protector. I don't think ... unless this is a new feature in 2.4.4 ...

Is there a security feature that prevents me from using php?

Login

Who's Online

177 user(s) are online (52 user(s) are browsing Support Forums)


Members: 0


Guests: 177


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