11
BlueStocking
Re: Open Link in the center of the page [Solved]

EDITED SO YOU CAN HAVE THE INFORMATION FOUND AT
https://xoops.org/modules/smartfaq/faq.php?faqid=280
Quote:

Don't reinvent the wheel, use an existing module.
With the module repository you will find some very good modules.

If you want to display your own html content here's an idea...

Sometimes it is preferable to display your own html content in a module and not a block. This can be achieved very easily with just 2 files and a new module folder.

The following is adapted from a module called mypage by JackJ http://www.macambridge.com

create 2 php files as follows

1- index.php
2- xoops_version.php

index.php contains

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

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

?>

And xoops_version.php contains

$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 on server

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

// Menu/Sub 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/";

$modversion['sub'][2]['name'] = _MI_MYPAGE_MYPHPFILE;//ANY PHP FILE IN SAME FOLDER AS MODULE
$modversion['sub'][2]['url'] = "myphpfile.php";

?>


- 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 this text _MI_MYPAGE_SMNAME1 in: (this text can be different as long as it matches the language defines)

- language defines language/english/global.php i.e.

- define("_MI_MYPAGE_SMNAME1","Forum");//whatever you wish
- define("_MI_MYPAGE_SMNAME2","User Journals");


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.

See also this FAQ HERE

--- Additional details submitted by Misatbt on 19-Dec-2004 06:35

Quote:

- language defines language/english/global.php i.e.



for me better use modinfo.php then global.php

Misa


This solution was found by the original poster, Tapioca, on FAQ...

BS
hhttps://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

12
tapioca
Re: Open Link in the center of the page
  • 2007/4/1 19:58

  • tapioca

  • Just popping in

  • Posts: 13

  • Since: 2006/12/15


RTFM !!!

I have found how to do this the faq :

check HERE

Thanks for your help

Login

Who's Online

244 user(s) are online (172 user(s) are browsing Support Forums)


Members: 0


Guests: 244


more...

Donat-O-Meter

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

Latest GitHub Commits