Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.5
Author Message
TheosEleos
Life Cycles Becoming CPU Cycles



Joined: Sep 18, 2003
Posts: 960
Location: Missouri

PostPosted: Fri Sep 19, 2003 9:39 pm Reply with quote

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?) Laughing

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Sep 19, 2003 9:45 pm Reply with quote

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.
 
View user's profile Send private message
TheosEleos







PostPosted: Fri Sep 19, 2003 9:51 pm Reply with quote

I apologize in advance for my stupidity. Laughing

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







PostPosted: Fri Sep 19, 2003 10:07 pm Reply with quote

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







PostPosted: Fri Sep 19, 2003 10:32 pm Reply with quote

What the heck. Here's the easiest way Wink 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
Worker



Joined: Aug 28, 2003
Posts: 227

PostPosted: Fri Sep 19, 2003 10:50 pm Reply with quote

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.
 
View user's profile Send private message
TheosEleos







PostPosted: Sat Sep 20, 2003 2:13 am Reply with quote

Hehe Raven. You are just too nice. Laughing

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







PostPosted: Sat Sep 20, 2003 2:56 am Reply with quote

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







PostPosted: Sat Sep 20, 2003 6:06 am Reply with quote

TheosEleos wrote:
Hehe Raven. You are just too nice. Laughing

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







PostPosted: Sat Sep 20, 2003 6:08 am Reply with quote

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







PostPosted: Sat Sep 20, 2003 10:26 am Reply with quote

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







PostPosted: Sat Sep 20, 2003 11:09 am Reply with quote

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







PostPosted: Sat Sep 20, 2003 11:18 am Reply with quote

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







PostPosted: Sat Sep 20, 2003 11:25 am Reply with quote

Save this script to a file called phpinfo.php and load it to your web root.
Code:
<?

phpinfo();
?>
Then point your browser to it. Then report back the following settings.

open_basedir
safe_mode_include_dir

Then delete the file.
 
TheosEleos







PostPosted: Sat Sep 20, 2003 11:33 am Reply with quote

open_basdir: /home/httpd/vhosts/ccfministries.com/httpdocs:/tmp no value

safe_mode_include_dir: no value no value
 
Raven







PostPosted: Sat Sep 20, 2003 11:37 am Reply with quote

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







PostPosted: Sat Sep 20, 2003 11:44 am Reply with quote

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







PostPosted: Sat Sep 20, 2003 11:46 am Reply with quote

My error. Try the second way.
 
Raven







PostPosted: Sat Sep 20, 2003 11:49 am Reply with quote

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







PostPosted: Sat Sep 20, 2003 11:56 am Reply with quote

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

PostPosted: Sat Sep 20, 2003 11:59 am Reply with quote

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 
View user's profile Send private message Visit poster's website
TheosEleos







PostPosted: Sat Sep 20, 2003 12:01 pm Reply with quote

Sure man, let me see it.

james@ccfministries.com
 
Nukeum66







PostPosted: Sat Sep 20, 2003 12:02 pm Reply with quote

LOL ! I was to slow !
 
TheosEleos







PostPosted: Sat Sep 20, 2003 12:04 pm Reply with quote

You can still send it to me if you would like. I have a lot more pages like this one to do.
 
TheosEleos







PostPosted: Sat Sep 20, 2003 12:04 pm Reply with quote

Laughing Spam!

This way is pretty easy now that Raven has done all the work for me. Razz
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 6.5

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©