[geeklog-users] Adding Blocks to article.php

geeklog-users-admin at lists.geeklog.net geeklog-users-admin at lists.geeklog.net
Wed May 21 23:36:00 EDT 2003


Jerry,

Not to sound rude, but I'm well aware of how to call it using the block
function and I did mean lib-custom.php (bad habit of typing lib-common.php)

Anyway, I have the blocks working fine on every page, however if you look at
any article where you have 'read more' the article.php file only returns to
left blocks (what's related & story options). I wish to add on of my custom
blocks to show up under those two blocks or add the entire left side blocks
underneath them.

Does that make more sense?

Shane

-----Original Message-----
From: geeklog-users-admin at lists.geeklog.net
[mailto:geeklog-users-admin at lists.geeklog.net]
Sent: Wednesday, May 21, 2003 5:52 PM
To: geeklog-users at lists.geeklog.net
Subject: Re: [geeklog-users] Adding Blocks to article.php


>I wish to add a custom block to article.php.
>
>However, I'm not really good at coding and I was looking for a little help
>as to where I would put the code, and how could I call it from
>lib-common.php?

In what way do you mean "block"? Normally, you wouldn't add anything to
lib-common.php for a block that shows up on the right or left column.

If the block contains no dynamic content, you can do it directly from the
block editor.

If the block contains dynamic content (i.e., PHP code), you add the code to
lib-custom.php in the "geeklog/system" directory. For example, the following
will create a php_block that displays the current weekday:

function phpblock_weekday() {
	$theDayName = date('%l');
	$theText = "Today is $theDayName.";
	return $theText;
}

Any phpblock has to begin with "phpblock". You then add the function's name
to the phpblock section of the block editor.

Jerry
--
jerry at sandiego.edu
http://www.sandiego.edu/~jerry/
Serra 188B/x8773
--
"The major difference between a thing that might go wrong and a thing that
cannot possibly go wrong is that when a thing that cannot possibly go wrong
goes wrong it usually turns out to be impossible to get at and
repair."--Douglas Adams (Mostly Harmless)
_______________________________________________
geeklog-users mailing list
geeklog-users at lists.geeklog.net
http://lists.geeklog.net/listinfo/geeklog-users




More information about the geeklog-users mailing list