1
whiteout
Adding a HTML page to Xoops 2.2.3
  • 2006/4/22 17:32

  • whiteout

  • Just popping in

  • Posts: 19

  • Since: 2006/3/12


I have a java chat page that I want to somehow either link to my website, or have it embedded into it. Is there any way add an offsite link into the menu? Or is there anything that will allow me to embed a html page into my site that actually works with 2.2.3?

2
JMorris
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/4/22 17:35

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Yes, a simple blank module like PageWrap (MyPage by JackJ) can be used. You can put any HTML/PHP/Javascript you wish in the index.php file, then install it like a regular module.

HTH.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
whiteout
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/4/22 17:36

  • whiteout

  • Just popping in

  • Posts: 19

  • Since: 2006/3/12


Thanks. I'll give that a try.

4
whiteout
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/4/25 12:32

  • whiteout

  • Just popping in

  • Posts: 19

  • Since: 2006/3/12


Before I ask this question: Yes, yes, I know I'm terrible at this stuff and I know it's incredibly noobish question.

The index.php file included with this mod has the following text:

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

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


If I want to wrap just a regular html page, what should I add?

5
netpuppy
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/4/25 12:45

  • netpuppy

  • Just popping in

  • Posts: 8

  • Since: 2006/4/20


Try this...

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

put everything between your html page body tags in here

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



6
whiteout
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/4/25 16:26

  • whiteout

  • Just popping in

  • Posts: 19

  • Since: 2006/3/12


Works fine. Thanks!

7
whiteout
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/4/26 12:19

  • whiteout

  • Just popping in

  • Posts: 19

  • Since: 2006/3/12


Sorry about all the questions, but is it possible with this mod to get a link in the menu to go straight to an offsite address?

The code in the other file in this mod is:

$modversion['name'] = "PageWrap"; //name of module
$modversion['version'] = 1.01;
$modversion['description'] = "Empty module for wrapping static content, for including extermal content, or for displaying content in center blocks";
$modversion['author'] = "James Morris";
$modversion['credits'] = "Original concept by JackJ of http://www.macambridge.com/";
$modversion['help'] = "https://xoops.org/";
$modversion['license'] = "GPL";
$modversion['official'] = 0;
$modversion['image'] = "admin.png";
$modversion['dirname'] = "pagewrap"; //name of directory

// Admin things
$modversion['hasAdmin'] = 0;
//$modversion['adminindex'] = "admin/admin.php";
//$modversion['adminmenu'] = "admin/menu.php";

// Menu for submenus in main menu when page loads
$modversion['hasMain'] = 1;
//$modversion['sub'][1]['name'] = "Second Page";
//$modversion['sub'][1]['url'] = "index2.php";
//$modversion['sub'][1]['name'] = "Third Page";
//$modversion['sub'][1]['url'] = "index3.php";
?>

8
netpuppy
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/4/26 22:15

  • netpuppy

  • Just popping in

  • Posts: 8

  • Since: 2006/4/20


All I can think of doing is to hack the system_block_mainmenu.html and make a conditional if/else statement to check for the $module.name your looking for then direct it to the page you want.

I think smarty codes allow for this, but it is a very messy hard coded way of doing it and I am still new to XOOPS and trying to get to know the structure so I'm not much help I'm afraid... maybe one of the more experienced members can help here?

9
netpuppy
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/4/26 22:37

  • netpuppy

  • Just popping in

  • Posts: 8

  • Since: 2006/4/20


I just checked the smarty site and it looks like their codes do accept functions (I'd be surprised if they didn't).

Try this code in your system_block_mainmenu.html file, it is in your system templates (remember to clone from the default set or you will not be able to edit it).

<table cellspacing="0">
  <
tr>
    <
td id="mainmenu">
      <
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}>a>
      
      <{foreach 
item=module from=$block.modules}>


        <{if 
$module.name == '}>
      <
class="menuMain" href="target="_blank"><{$module.name}>a>
    <{else}>


            <
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}>a>
            <{foreach 
item=sublink from=$module.sublinks}>
              <
class="menuSub" href="<{$sublink.url}>"><{$sublink.name}>a>
            <{/foreach}>

      <{/if}>

        <{/foreach}>
      
    
  


Let us know how you get on.

10
Rickb
Re: Adding a HTML page to Xoops 2.2.3
  • 2006/5/26 5:28

  • Rickb

  • Not too shy to talk

  • Posts: 118

  • Since: 2004/10/24


Using a menu mod I think you have better control. Try for starters iMenu. You may then assign menu items by groups. You can all of this without having to edit the mod.

Rick

Login

Who's Online

399 user(s) are online (301 user(s) are browsing Support Forums)


Members: 0


Guests: 399


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