Welcome to Geeklog, Anonymous Friday, July 12 2024 @ 04:02 pm EDT

Geeklog Forums

unable to use php code in block


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.

Status: offline


Site Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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)


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 Smile

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

Text Formatted Code

<title>Arcane Chat</title>

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>";


All times are EDT. The time is now 04:02 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content