1
hui11
Re: Include Own Contents in Layout??
  • 2003/12/29 5:57

  • hui11

  • Just popping in

  • Posts: 6

  • Since: 2003/12/28


<table cellspacing="0" width="100%">
<tr><td><div align="center"><strong>Information</strong></div>
<img src="{X_SITEURL}themes/no00oi/images/dot.jpg"> <a href="{X_SITEURL}main.php?page=wcxstory">Story</a><br>
<br><div align="center"><strong>Files</strong></div>
<img src="{X_SITEURL}themes/no00oi/images/dot.jpg"> <a href="{X_SITEURL}main.php?page=wcxhack">Hacks</a><br>
<img src="{X_SITEURL}themes/no00oi/images/dot.jpg"> <a href="{X_SITEURL}main.php?page=wcxtools">Utilties</a><br>
<img src="{X_SITEURL}themes/no00oi/images/dot.jpg"> <a href="{X_SITEURL}main.php?page=wcxpatch">Patches</a></td>
</tr></table>



2
hui11
Re: Include Own Contents in Layout??
  • 2003/12/29 4:36

  • hui11

  • Just popping in

  • Posts: 6

  • Since: 2003/12/28


anyways thanks for all your helps. i figured out the include code and got my way around. i dont have to use the freecontents and other modules to include the contents into XOOPS and i can make different blocks to catagorize my links, but then not sure if it's save or not. anyways, here's the code i used if anyone is interested in trying it out

include('mainfile.php');
include('header.php');
$xoopsOption['show_rblock'] = 1;

$page = $_GET['page'];
$ext = ".php";
$email = "your email addy for 404"; //for 404 error purpose
$includepath = "contents/";
$filepath = $includepath.$page.$ext;

if(file_exists($filepath))
{
include($filepath);
} else {
print ("<br><b>404</b><br>Sorry but this page does not exist. Click <a href=\"http://www.gamerz-place.net/xoops\">here</a> to go back to the main page. If you have any question email the webmaster <a href=\"mailto:$email\">here</a>.");
}

include('footer.php');

now i can just customized my own blocks with my own links. i just gotta save that code as a .php file (i saved it as main.php) in the XOOPS folder and create a sub subfolder, in this case contents, and just put all my content files into that folder. then in the customized blocks just used links such as main.php?page=therequestedcontent

here's my site as an example if u want to see what i meanhttp://www.gamerz-place.net/xoops/

hope this will help some of you guys out.



3
hui11
Re: Include Own Contents in Layout??
  • 2003/12/28 9:06

  • hui11

  • Just popping in

  • Posts: 6

  • Since: 2003/12/28


section is not what i'm looking for since i want the links to be in blocks on the side of the layout. as for imeun i can't seem to be able to install it. i uploaded to the modules folder and it doesn't show up in the Modules Administration.



4
hui11
Re: Include Own Contents in Layout??
  • 2003/12/28 7:54

  • hui11

  • Just popping in

  • Posts: 6

  • Since: 2003/12/28


the thing is that i think they only put all the links in one block. i want to catagorize my contents into different ones hehe. i'm kinda picky about these things.



5
hui11
Re: Include Own Contents in Layout??
  • 2003/12/28 7:44

  • hui11

  • Just popping in

  • Posts: 6

  • Since: 2003/12/28


i have about 40 pages of plain contents (just plain text and some pictures) so i dont want to open every single one of them and add the include code in. i am wondering if i can just an addition include code which allow me to call contents by using content.php?page=othercontents



6
hui11
Include Own Contents in Layout??
  • 2003/12/28 6:52

  • hui11

  • Just popping in

  • Posts: 6

  • Since: 2003/12/28


To include my own customized pages into the center of the layout i used the following code and saved it as content.php

include("mainfile.php");
include("header.php");
OpenTable();
include("myfile.php");
CloseTable();
include("footer.php");

but if i want my link to be something likehttp://mydomain.com/content.php?page=othercontents i used this

include("mainfile.php");
include("header.php");
OpenTable();
include("$page.php");
CloseTable();
include("footer.php");

but doesn't seem to work. for example i have the file othercontents.php and when i go tohttp://mydomain.com/contents.php?page=othercontents only the layout shows and the content doesn't. can anyone please help me out. thanks




TopTop



Login

Who's Online

163 user(s) are online (103 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

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

Latest GitHub Commits