Author |
Message |
TheosEleos
Life Cycles Becoming CPU Cycles

Joined: Sep 18, 2003
Posts: 960
Location: Missouri
|
Posted:
Fri Sep 19, 2003 9:39 pm |
|
I need to have an area at my site that will list a mission statement as well as other info for my organization. I am not really sure the best way to go about doing this. I would prefer having a module that people could use to go strait to a "mission statement" page or even a "what do you believe" type page. Do you have a recommendation on this?
(I guess I need to learn how to write php?)  |
_________________ Only registered users can see links on this board! Get registered or login! |
|
 |
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Fri Sep 19, 2003 9:45 pm |
|
I would design it in pure HTML. Then, construct a module that does nothing but includes the html page. That way nuke will build the link in the Modules block and will display it in the center area. Don't use the HTML or BODY tags as nuke already supplies those. To allow your theme to control the colors, stay away from any styles, fonts, etc. unless absolutely needed to override the Nuke theme. |
|
|
|
 |
TheosEleos

|
Posted:
Fri Sep 19, 2003 9:51 pm |
|
I apologize in advance for my stupidity.
Since I know almost nothing about HTML I am tempted to type out what I need in MS Word and let it do the HTML for me.
I am sure that, with a little study, I could learn enough php to take an existing module and change it to work.
What do you think? I am not looking to have you do it for me. This seems like a good way to get my feet wet with php and HTML writing. |
|
|
|
 |
Raven

|
Posted:
Fri Sep 19, 2003 10:07 pm |
|
Word will add a lot of crap, but it's worth a try. I can help you with the module if you'd like. It's only about 12 lines at the most. Give it a shot. if you need help, let me know. |
|
|
|
 |
Raven

|
Posted:
Fri Sep 19, 2003 10:32 pm |
|
What the heck. Here's the easiest way Replace YOUR_HTML_FILE.HTML with your html file name, with path of course.Code:<?php
if (!eregi("modules.php", $PHP_SELF)) die ("You can't access this file directly...");
require_once("mainfile.php");
$pagetitle = "- Hello World";
include("header.php");
OpenTable();
include("YOUR_HTML_FILE.HTML");
CloseTable();
include("footer.php");
?>
|
|
|
|
|
 |
paranor
Worker


Joined: Aug 28, 2003
Posts: 227
|
Posted:
Fri Sep 19, 2003 10:50 pm |
|
I did my mission statement, greeting from pastor, etc. using the Content module and added that particular link to the menu item or you can do it within a block. It's only an HTML call. |
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 2:13 am |
|
Hehe Raven. You are just too nice.
I used your code but of course being the n00b I am I got an error.
Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/ccfministries.com/httpdocs/modules/Mission_Statement/index.php on line 10 |
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 2:56 am |
|
I got it working. I made a module called Mission_Statement. Is there reason I can't put the html file in that module directory? |
|
|
|
 |
Raven

|
Posted:
Sat Sep 20, 2003 6:06 am |
|
TheosEleos wrote: | Hehe Raven. You are just too nice.
I used your code but of course being the n00b I am I got an error.
Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/ccfministries.com/httpdocs/modules/Mission_Statement/index.php on line 10 | You need to move the file under your web root directory. |
|
|
|
 |
Raven

|
Posted:
Sat Sep 20, 2003 6:08 am |
|
TheosEleos wrote: | I got it working. I made a module called Mission_Statement. Is there reason I can't put the html file in that module directory? | Put it in the same folder as the module. |
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 10:26 am |
|
I did put it there. It gave me that error and still put the text under the error.
I created another folder in the root directory and put the file in there and pointed to it in the script and now the error is gone. |
|
|
|
 |
Raven

|
Posted:
Sat Sep 20, 2003 11:09 am |
|
TheosEleos wrote: | I did put it there. It gave me that error and still put the text under the error.
I created another folder in the root directory and put the file in there and pointed to it in the script and now the error is gone. | Then your host has set your account up wrong. They probably need to correct your base_dir setting, but as long as you have a work around, it's your call as to whether to complain or not. |
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 11:18 am |
|
What settings need to change then? I want to look into it. For two reasons really. I want to test their customer support since I have not been with them long. I also would like to have the site set up right in case future issues come up. |
|
|
|
 |
Raven

|
Posted:
Sat Sep 20, 2003 11:25 am |
|
Save this script to a file called phpinfo.php and load it to your web root.Then point your browser to it. Then report back the following settings.
open_basedir
safe_mode_include_dir
Then delete the file. |
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 11:33 am |
|
open_basdir: /home/httpd/vhosts/ccfministries.com/httpdocs:/tmp no value
safe_mode_include_dir: no value no value |
|
|
|
 |
Raven

|
Posted:
Sat Sep 20, 2003 11:37 am |
|
That looks ok. When you did your include, did you write it like this?
include("your_file.html"); //This should work if it is in the same folder.
or possibly
include("/modules/YOUR_MODULE/your_file.html"); //This should work regardless of where it is, but assumes it is the same folder also.
It depends on where you are trying to include it from as to which syntax will work. |
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 11:44 am |
|
Code:<?php
if (!eregi("modules.php", $PHP_SELF)) die ("You can't access this file directly...");
require_once("mainfile.php");
$pagetitle = "- Celebration Community Fellowship Mission Statement";
include("header.php");
OpenTable();
include("mission_statement.html");
CloseTable();
include("footer.php");
?>
|
|
|
|
|
 |
Raven

|
Posted:
Sat Sep 20, 2003 11:46 am |
|
My error. Try the second way. |
|
|
|
 |
Raven

|
Posted:
Sat Sep 20, 2003 11:49 am |
|
Alternatively, add this line towards the top of the index.php file in your module
$module_name = basename(dirname(__FILE__));
Then, make your include like this
include("modules/$module_name/your_file.html");
Code:<?php
if (!eregi("modules.php", $PHP_SELF)) die ("You can't access this file directly...");
$module_name = basename(dirname(__FILE__));
require_once("mainfile.php");
$pagetitle = "- Celebration Community Fellowship Mission Statement";
include("header.php");
OpenTable();
include("modules/$module_name/mission_statement.html");
CloseTable();
include("footer.php");
?>
|
|
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 11:56 am |
|
Your final solution did it!
Thanks Raven! (feels good to get some phpnuke support) |
|
|
|
 |
Nukeum66
Life Cycles Becoming CPU Cycles

Joined: Jul 30, 2003
Posts: 551
Location: Neurotic, State, USA
|
Posted:
Sat Sep 20, 2003 11:59 am |
|
I have a mod like that http://mycws.org I'll send it to you if you wish! |
_________________ Scott Johnson MIS Ubuntu/Linux 11.10 |
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 12:01 pm |
|
|
|
 |
Nukeum66

|
Posted:
Sat Sep 20, 2003 12:02 pm |
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 12:04 pm |
|
You can still send it to me if you would like. I have a lot more pages like this one to do. |
|
|
|
 |
TheosEleos

|
Posted:
Sat Sep 20, 2003 12:04 pm |
|
Spam!
This way is pretty easy now that Raven has done all the work for me.  |
|
|
|
 |
|