1
pauleley
new page to my site ??.
  • 2002/10/13 7:55

  • pauleley

  • Just popping in

  • Posts: 13

  • Since: 2002/10/10


How do i add a new page to my site ??.
If i make a new block and put eg: Fish Help. How do i make it load a new page in the center of my site. As i am new to XOOPS and only youd HTML for my site in the past.
Any Help Please my old site is runing HTML marine-aquarium.co.uk
Thanks
Paul Eley

2
freeop
Re: new page to my site ??.
  • 2002/10/13 8:25

  • freeop

  • Just popping in

  • Posts: 25

  • Since: 2002/4/12


Go to this forum entry..A module name freecontent, and a Page Wrapper hack..


Forum Message

3
pauleley
Re: new page to my site ??.
  • 2002/10/13 22:41

  • pauleley

  • Just popping in

  • Posts: 13

  • Since: 2002/10/10


Hi Thanks for the info i have downloaded FreeContent & installed it but when i try to it i get: Sorry, we were unable to find this Link-ID in our Database
Dos any one no my problem.
Thanks
Paul Eley

4
swisslyons
how to make a module
  • 2002/10/13 22:54

  • swisslyons

  • Just popping in

  • Posts: 43

  • Since: 2002/6/23


The way i usually do this is to make my own module for each page I want to display in the middle of Xoops. To make your own custom module, you only need to create 2 files: index.php and xoops_version.php in a new folder. Lets call this folder 'myModule' for example.

Then, in the index.php,

should copy/paste this code:
*****************************


include("../../mainfile.php");
include("../../header.php");
include("header.php");
OpenTable();

?>

your HTML content goes here, between these php tags ;) This also works for Flash content, just copy/paste from your flash.htnl file and place it here

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

**********************************
Here is a second possibility for creating your index.php, using an include(); instead of hardcoding the HTML in the php page. This helps make the code a bit more modular and easier to handle.
Create your html in Dreamweaver or whatever editor, then upload all files to this same module directory (myModule) for example)...and use this code to include it:

**********************************


include("../../mainfile.php");
include("../../header.php");
include("header.php");
OpenTable();

include("nameOfYourPage.html");


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

**********************************

OK, then in xoops_version.php

copy/paste this code:
**********************************

$modversion['name'] = "title that you want to display in main menu";
$modversion['version'] = "alpha testing only";
$modversion['description'] = "description here";
$modversion['credits'] = "The XOOPS Project
Thanks to blah blah blah....";
$modversion['author'] = "John Lyons (http://www.flashbuilder.ch/)";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "logo.gif";
$modversion['dirname'] = "myModule";

// Menu
$modversion['hasMain'] = 1;



?>

Then upload this new folder to your modules directory. Log into your site as admin, go to Modules, and add this module. Don't forget to give group rights to access this module.

That should do it, I hope its all ok becuase its late here and I am tired.

P.S. --> if you are trying to include content that is on another URL and you cant copy/paste the code, try using the
framebrowser script

5
pauleley
Re: new page to my site ??.
  • 2002/10/13 23:09

  • pauleley

  • Just popping in

  • Posts: 13

  • Since: 2002/10/10


Thanks for the Info & all you Help.
I will give it a go and let you no how i get on.
Kind Regerdes
Paul

6
swisslyons
Re: new page to my site ??.
  • 2002/10/13 23:11

  • swisslyons

  • Just popping in

  • Posts: 43

  • Since: 2002/6/23


Sure! no problem Paul and if you have any questions /problems just ask!

Regards,
john

7
freeop
Re: new page to my site ??.
  • 2002/10/13 23:13

  • freeop

  • Just popping in

  • Posts: 25

  • Since: 2002/4/12


Nice.. Thx I can use this.. I created a little script using the filename as a variable so I didn't have to add the code to each page :

ie : wrap.php?file=mypage.html
ie : wrap.php?file=MyDir/mypage.html
--------------------------------------
include("mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
OpenTable();
include($file);
CloseTable();
include(XOOPS_ROOT_PATH."/footer.php");
?>
----------------------------------------


EDITED :
This works ok.. If you put this code into the root call it wrap.php.. Using http://your site/wrap.php?file=your.html or ?file=mydir/your.html as the link, it will show your html or php script in XOOPS display.. However the problem I had was any links from the page your calling had to be the same : mypage.html had to be changed to http://yoursite/wrap.php?file=

That is what the problem was, it doesn't read file and rewrite output changing links... But if you just want to show pages without editing each one it works great.. ( guess you can't really call it a wrapper )

8
pauleley
Re: new page to my site ??.
  • 2002/10/14 18:33

  • pauleley

  • Just popping in

  • Posts: 13

  • Since: 2002/10/10


Thanks swisslyons
This works grate.

9
Akshara
Re: new page to my site ??.
  • 2002/10/14 20:01

  • Akshara

  • Just popping in

  • Posts: 5

  • Since: 2002/8/9 4


Wow... this is one of the clearest and most informative posts I have ever come across. I would like to vote that this suggestion be placed in the "Module Docs" section here. Thank you swisslyons... Excellent.

10
Wardee
Re: new page to my site ??.
  • 2002/11/3 13:40

  • Wardee

  • Just popping in

  • Posts: 1

  • Since: 2002/10/27


This is a great topic, I will try and make my own module when I have switched computers!!

Login

Who's Online

231 user(s) are online (128 user(s) are browsing Support Forums)


Members: 0


Guests: 231


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