20.3. Simple Content block

Figure 20-3. Administration panel: Content.

Administration panel: Content.

PHP-Nuke comes with a Content module (Figure 20-3). But how about a Content block? How to display links to Content pages in a PHP-Nuke block? A block may be desirable in case you wish to place a link summary of the Content module's er...content, somewhere in the left, central or right columns.

After you have created the desired categories for the Content module, you can then go to http://yoursite.com/admin.php?op=content and start adding pages to the categories. To find out the link to these pages, you will have to click on the Content link in the modules block, view each page and copy its url from the browser's address window, then just add these urls to a html block with maybe the following HTML code:

&nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href="modules.php?name=Content...etc...1">Page Title 1</a><BR>
&nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href="modules.php?name=Content...etc...2">Page Title 2</a><BR>
&nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href="modules.php?name=Content...etc...3">Page Title 3</a><BR>
&nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href="modules.php?name=Content...etc...4">Page Title 4</a><BR>
&nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href="modules.php?name=Content...etc...5">Page Title 5</a><BR>

A block that does the job is the following:

<?php
if (eregi("block-Content.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
$content  =  "&nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href=\"modules.php?name=Content...etc...1\">Page Title 1</a><BR>";
$content  .= "nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href=\"modules.php?name=Content...etc...2\">Page Title 2</a><BR>";
$content  .= "nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href=\"modules.php?name=Content...etc...3\">Page Title 3</a><BR>";
$content  .= "nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href=\"modules.php?name=Content...etc...4\">Page Title 4</a><BR>";
$content  .= "nbsp;&nbsp;<b><big>&middot;</big></b> <img src=images/blocks/icon_dot.gif>
&nbsp;<a href=\"modules.php?name=Content...etc...5\">Page Title 5</a><BR>";
?>

Name it block-Content, put it in the blocks folder, then "create" it in the blocks administration (see Section 7.1).