Main Menu
Login
Username:

Password:

Remember me



Lost Password?

Register now!
Search
Web Tools


Help


Help for XOOPS Block Creator

  [  Back to XOOPS Block Creator  ]  
Let's assume that we have this html code
 
Code:

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
<p align="center"><font size="7">XOOPS Web Tools</font></p>
<p align="center">based on PHP-Nuke Tools by<a href="http://www.disipal.net/"><font size="7">Disipal site</font></a></p>
</body>
</html>

 

Remove this

Code:
 
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>

</body>
</html>


 


And now the code looks like this

Code:

<p align="center"><font size="7">XOOPS Web Tools</font></p>
<p align="center">based on PHP-Nuke Tools by<a href="http://www.disipal.net/"><font size="7">Disipal site</font></a></p>

 

To make the block, we copy and paste this code in the XOOPS Block Creator top block

We click on “Create Block” and as a result we have

Code:

<?php
function whatever_show() {
$block['content'] = "<p align=\"center\"><font size=\"7\">PHP-Nuke tools</font></p> ";
$block['content'] .= "<p align=\"center\">by</p> ";
$block['content'] .= "<p align=\"center\"><a href=\"http://www.disipal.net/\"><font size=\"7\">Disipal site</font></a></p> ";
return $block;
}
?>
 


Now open notepad and paste the code generated in the XOOPS Block Creator bottom block, and place inside the newly created file whatever_block.php

Create a folder inside the module folder called “blocks” and inside copy whatever_block.php
 

Then add these lines to xoops_version.php file:

Code:

$modversion['blocks'][1]['file'] = "whatever_block.php";
$modversion['blocks'][1]['name'] = "Block Name";
$modversion['blocks'][1]['description'] = "Block Description";
$modversion['blocks'][1]['show_func'] = "whatever_show";
 

And you are ready!!
Activate the block from hyoursite.modules/system/admin.php?fct=blocksadmin
 


  [  Back to XOOPS Block Creator  ]  
  [  Back  ]  
XOOPS Web Tools ver 1.1
By arabxoops based on PHP-Nuke Tools created by disipal
Hosted by PC Backup © 2009 PC Backup Networks