1
fishspon
Adding a single page to Xoops under a specific URL
  • 2006/12/17 8:35

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


Hello,

I need to add a page to my XOOPS installation under a new directory.

My site: http://www.hififorum.co.uk/

The page i want to add: http://www.hififorum.co.uk/advertising/

Obviously, i could just create the directory on my web server and put an HTML file in there, but then i would have the dynamic side-bars and the bannerad bar along the top.

The only content i need on that page is text, preferably with the ability of placing HTML into it.

Does anyone know how i can do this?

Thanks in advance!
[size=x-small]><> fishsponge <><
[HiFi Forum] [UNIX/Linux Forum] [Richard Hobbs][/size]

2
irmtfan
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 8:47

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Huum
still dont know you want the XOOPS theme or not

try this faq if you want to add your HTML in xoops:]
include HTML pages in xoops

3
wizanda
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 9:04

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


If you have a look at any of the extra modules they are simple to make...all you need to do is
add the html into a smarty template....call a smarty template from an index.php...write a XOOPS version and you have it as a module

4
fishspon
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 13:24

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


thanks for the responses... an extra module is not really what i'm after, so i decided to implement method 1 on the above URL - basic include statements, but i'm having a little difficulty.

The header and footer are included perfectly, but i have no right-hand side bar.

Please take a look at the page for what i'm on about: http://www.hififorum.co.uk/advertising/

Do you know how to get the right side bar to appear as well?

My index.php file looks like this:

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


Thanks in advance!
[size=x-small]><> fishsponge <><
[HiFi Forum] [UNIX/Linux Forum] [Richard Hobbs][/size]

5
wizanda
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 13:48

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


My Content module in total look like this
Index.php
require('header.php');
include(
XOOPS_ROOT_PATH.'/header.php');
$xoopsOption['template_main'] = 'content.html';
include(
XOOPS_ROOT_PATH.'/footer.php');
?>

Header.php
include "../../mainfile.php";
?>

.Html
Even text can go here and smarty will add ithtml ect

$modversion['name'] = 'Content';
$modversion['version'] = 1.00;
$modversion['description'] = 'Iframe to another site';
$modversion['credits'] = "www.wizanda.com";
$modversion['author'] = "Wizanda";
$modversion['license'] = "Mine";
$modversion['official'] = 0;
$modversion['image'] = "images/slogo.png";
$modversion['dirname'] = "content";
// Admin
$modversion['hasAdmin'] = 0;
$modversion['adminmenu'] = '';
// Menu
$modversion['hasMain'] = 1;
// Templates
$modversion['templates'][1]['file'] = 'content.html';
$modversion['templates'][1]['description'] = 'Contents';
?>

It is a lot quicker to get Smarty to post a Template...then to try and render html in php as we use to..untill found out how easy it was to do any module in seconds like this...

6
wizanda
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 13:52

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Oh and to get a second page, you can add a page to the Xoops_version.php file and then just add a second Template of html...
That is easier to place it where you need also....as the second page can be directed in the XOOPS version to a diffrent folder....still unsure on how to redirect the index.php of main from not being a module folder my self...

7
fishspon
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 15:36

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


thanks for this, but to be honest, it all looks too complex for me to bother with...

given that the method i'm already using partially works, isn't it going to be a minor tweak to get the right-hand side-bar to appear as well as the header, left side bar and footer?

Thanks again, but creating a module is not really what i'm after. The URL i care about (domain.com/advertising/) and i don't want the page to appear on the main menu anyway.

Does anyone know how to get the right-hand side bar to appear using the "basic include statement" method above?
[size=x-small]><> fishsponge <><
[HiFi Forum] [UNIX/Linux Forum] [Richard Hobbs][/size]

8
fishspon
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 15:43

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


ok, i've figured it out almost...

in order to get the right-hand side bar to appear on my custom page, i have to enable each of the right-hand blocks for "All Pages".

BUT, the problem is that once i do that, they appear on pages i don't want them to.

So, is there a way to exclude certain modules from a block's display properties, instead of include certain modules?

In other words, i want everything *except* the forum, but the only way to do that currently is to select "Top Page", "Contact Us", "Web Links", "News", "Members" etc... which then excludes my custom pages.
[size=x-small]><> fishsponge <><
[HiFi Forum] [UNIX/Linux Forum] [Richard Hobbs][/size]

9
irmtfan
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 19:45

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


now you want a special permission and it is not a basic one so for this purpose you should use a static page module.
try wraps module.

10
fishspon
Re: Adding a single page to Xoops under a specific URL
  • 2006/12/17 21:09

  • fishspon

  • Not too shy to talk

  • Posts: 164

  • Since: 2003/11/23


problem is... the URL will then be in the "modules/" directory.

i need the URL to be at the root level (e.g. "XOOPS_ROOT/advertising", not "XOOPS_ROOT/modules/advertising").

Any other suggestions?

Thanks again!
[size=x-small]><> fishsponge <><
[HiFi Forum] [UNIX/Linux Forum] [Richard Hobbs][/size]

Login

Who's Online

376 user(s) are online (300 user(s) are browsing Support Forums)


Members: 0


Guests: 376


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