1
rushy
php in block
  • 2004/6/29 22:23

  • rushy

  • Just popping in

  • Posts: 16

  • Since: 2004/6/14


I cant seem to get a php script to work in a block i have even tried using the code thing i know this script works on other sites any help would be greatly apreaciated thank you

2
Ghoti
Re: php in block
  • 2004/6/29 22:53

  • Ghoti

  • Just popping in

  • Posts: 5

  • Since: 2004/6/29


I'm having a similar issue- perhaps we can help each other out of this hole. What precisely appears when you enable the custom block?

3
chapi
Re: php in block
  • 2004/6/29 23:08

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


I can't directly help you, because you don't say anything about your script and you don't post error messages.

If you want to put a php script in a custom block, set the block format to PHP. Also don't add the <?php at the beginning and the ?> at the end of your script.

4
ian-m
Re: php in block
  • 2004/6/29 23:36

  • ian-m

  • Just popping in

  • Posts: 7

  • Since: 2004/6/29


I'm also having this problem, and I have yet to figure it out. I'm not adding the <?php and ?> to the script, content type is set to "PHP Script" and the script works when I put it in a new file and just have the plain text load. I've tried a simple include() of the seperate file, that also doesn't work. I'd post errors, but none get printed to the page, so I can't. This is rather frustrating. Further testing shows that putting anything in the block while it is selected as PHP Script will not execute or print to the screen.

5
chapi
Re: php in block
  • 2004/6/29 23:39

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


Set Debug Mode to PHP in

Administration > System Admin > Preferences

Then you probably should get error messages.

6
ian-m
Re: php in block
  • 2004/6/29 23:57

  • ian-m

  • Just popping in

  • Posts: 7

  • Since: 2004/6/29


Thank you for your very fast reply. Enabling this allowed me to track down the problem very quickly and get my code working again. My problem had to do with lots of <?php echo $var; ?> statements embedded within some html for the formatting that (for whatever reason) I was ignoring. Modifying my code to echo the html instead fixed everything.

Thanks again,
Ian

7
GIJOE
Re: php in block
  • 2004/6/30 0:16

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


Another choice you can.

Use TinyD.

- put the file of the script into modules/tinycontent*/content/
- add page wrap to the file in TinyD's admin
- clone a content block and assign the content to the block in block's admin in TinyD.


8
rushy
Re: php in block
  • 2004/6/30 0:39

  • rushy

  • Just popping in

  • Posts: 16

  • Since: 2004/6/14


Thanks i got it

Login

Who's Online

143 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 143


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