Subject: unable to use php code in block

Posted on: 12/11/03 02:57pm
By: Anonymous

A script I installed says I should be able to use the following code to show their script on a PHP page



Problem is, it doesn't show anything? Is there something I'm missing or doing wrong? I put it in as a Normal block.

Re:unable to use php code in block

Posted on: 12/11/03 03:37pm
By: Dirk

You can't use PHP in blocks directly. You will need to add a function to your lib-custom.php and create a block of type "PHP block" to call it.

Also see the FAQ.

bye, Dirk

(Edit: lib-custom.php, of course, not lib-common.php)

unable to use php code in block

Posted on: 07/03/06 05:49pm
By: Anonymous

I'm trying to use a block to trigger php121 chat window. I basically want to put a button in a block to trigger the chat. The button requires php so I need to make a function call from the custum library which I understand. Problem is I have no idea how to do that. Please Help

Anyway to see an example of this using the following code:

<html>
<head>
<title>Arcane Chat</title>
</head>
<body>
<?php

echo "<script type="text/javascript">n";
echo "<!--n";
echo "var newwindow;n";
echo "function poptastic(url){n";
echo "newwindow=window.open(url,'name','height=500,width=230,left=20,top=20,toolbar=no,menubar=no,directories=no,location=no,scrollbars=yes,status=no,resizable=yes,fullscreen=no');n";
echo "if (window.focus) {newwindow.focus()}n";
echo "}n";
echo "//-->n";
echo "</SCRIPT>nn";

echo "<font style="FONT-FAMILY: Verdana,Helvetica; FONT-SIZE: 12px">";


echo "<b>PHP121 Standalone version</b><p>";

echo "<a href="javascript:poptastic('php121im.php');">Instant Messenger</a><br>n";
echo "</font>";
?>
</body>
</html>


Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=26757