PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
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 Back to top

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
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

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.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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");
?>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
paranor
Worker
Worker


Joined: Aug 28, 2003
Posts: 227

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

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
Life Cycles Becoming CPU Cycles


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

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

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
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

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?
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

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.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

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.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

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

safe_mode_include_dir: no value no value
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

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");
?>
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

My error. Try the second way.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

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

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");
?>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

Your final solution did it!

Thanks Raven! (feels good to get some phpnuke support)
View user's profile Send private message Visit poster's website AIM Address ICQ Number
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 Back to top

I have a mod like that
Only registered users can see links on this board!
Get registered or login to the forums!
I'll send it to you if you wish!
View user's profile Send private message Visit poster's website
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

Sure man, let me see it.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website AIM Address ICQ Number
Nukeum66
Life Cycles Becoming CPU Cycles


Joined: Jul 30, 2003
Posts: 551
Location: Neurotic, State, USA

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

LOL ! I was to slow !
View user's profile Send private message Visit poster's website
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

You can still send it to me if you would like. I have a lot more pages like this one to do.
View user's profile Send private message Visit poster's website AIM Address ICQ Number
TheosEleos
Life Cycles Becoming CPU Cycles


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

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

Laughing Spam!

This way is pretty easy now that Raven has done all the work for me. Razz
View user's profile Send private message Visit poster's website AIM Address ICQ Number
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum