1
Dondick
Custom Block
  • 2003/12/16 23:27

  • Dondick

  • Just popping in

  • Posts: 15

  • Since: 2003/10/8


Hi All,

Is there an easy way to make a custom page/block in the middle, with the link to that page on the left side without the use of the cjay content module?

Thanx a lot

DonDick
NL

2
ackbarr
Re: Custom Block

This is going to sound like a silly question, but what about the cjay content module prevents you from using it?

There are several other content modules available. You could try (in no particular order)
FreeContent
WF-Sections
WF-Channels
Sections

However none of these modules will automatically create a link in the main-menu block to that particular page (although WF-Channels comes close). This is not a failing of those modules, but a limitation of the current Main Menu block. To get around this limitation, I would recommend the main menu block created by iMenu 2, which lets you (as the admin) define the links in the "Main Menu"

* Edit - I should have also pointed out that if you know html, you have full control over the html created by the Main Menu block by going to "System" -> "Templates" and modifying the system_block_mainmenu.html template for the System Module.

3
JackJ
Re: Custom Block
  • 2003/12/16 23:58

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Very good answer above. I have a simple little hash of a "module" which you can clone multiple times to create single pages in XOOPS which will add a link to the left menu.

I think the names that appear in the browser might be offputting to some.

www.mysite.com/modules/freeconent/

"Third party content from another site?"

www.mysite.com/modules/cjaycontent

"Welcome to Cjay's content"

www.mysite.com/modules/tinycontent

"The sparse or lacking in meaningful content page"

www.mysite.com/modules/wfsections

"What Sections?"

I could be wrong of course..

grand modules all the same..


The hash contains about two files (which coders can improve) works for me though..

index.php with something like this in it

<?php
include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 1;
?>
your html here

<?php
include(XOOPS_ROOT_PATH."/footer.php");

?>

And a xoops_version.php with this in it:

<?php
$modversion['name'] = "mypage";//name of module
$modversion['version'] = 1.01;
$modversion['description'] = "My Module";
$modversion['author'] = "";
$modversion['credits'] = "";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "whatever.gif";
$modversion['dirname'] = "mypage";//name of directory

// Admin things
$modversion['hasAdmin'] = 0;
$modversion['adminpath'] = "";

// Menu
$modversion['hasMain'] = 1;//make 0 to not have this appear in main menu
$modversion['sub'][1]['name'] = _MI_MYPAGE_SMNAME1;
$modversion['sub'][1]['url'] = "../../modules/ipboard/";
$modversion['sub'][2]['name'] = _MI_MYPAGE_SMNAME2;
$modversion['sub'][2]['url'] = "../../modules/weblog/";

?>

The $modversion lines are not needed--but if used they add the submenus that appear in your main menu when the page is loaded

define these lines _MI_MYPAGE_SMNAME1 in:

language/english/global.php i.e.

define("_MI_MYPAGE_SMNAME1","Forum");//your own text
define("_MI_MYPAGE_SMNAME2","User Journals");

Keep the "_MI" bit, and use capitals. make sure the language defines match your own text


Then create a directory in your modules folder, call it anything you wish, but make sure it matches these lines:

$modversion['name'] = "mypage";//name of module

$modversion['dirname'] = "mypage";//name of directory

Upload into the folder:

index.php (With any HTML content added)
and xoops_version.php
and any image file named in: $modversion['image'] = "whatever.gif";

Then go to admin and install the module

You can do this multiple times, just call them different names as above.

I have a download at my site in the forum topic "submenus"

Login

Who's Online

218 user(s) are online (137 user(s) are browsing Support Forums)


Members: 0


Guests: 218


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits