| Author |
Message |
Mischieffer
Nuke Soldier


Joined: Feb 13, 2003
Posts: 19
Location: UK
|
Posted:
Wed Feb 19, 2003 8:21 am |
  |
Hi,
I have been using the code snippet below to add html pages into Nuke modules which works great but have a problem with one page.
I am trying to add a colour chart where people move a slider and variant to get the appropriate numbered value for a particular colour but it calls on .class files to perform the task.
I wondered if this is a problem with Nuke as embedding the Microsoft streaming media player into a page worked fine but this colour chart fails to load ??.
Any ideas would be much appreciated.
-------------------------------------------------------------------------------------
1. create folder in nuke/html/modules call it what you want it to appear as in the modules menu (no spaces)
2. create a text file called index.php inside this folder (its a php file not text. use notepad or something similar)
3. insert the following code
###do not add this line, start code###
<?php
if (!isset($mainfile)) {include("mainfile.php"); }
include ("header.php");
include ("xxxxxx.html");
include ("footer.php");
?>
##end code##
4. change the xxxxxx.html to the address of your html page, this is better if its a full URL. this html file can be anywhere.
TO LINK TO ANOTHER PAGE FROM THIS ONE....
make a xxx.php file and include the same code as above (change the xxxx.html again) then place this with the original html file and make the hyperlink go to http://mydomain.com/path/to/file/xxxxx.php and your off. |
|
|
   |
 |
peaceV
Corporal


Joined: Feb 15, 2003
Posts: 50
Location: USA
|
Posted:
Wed Feb 19, 2003 11:22 am |
  |
if you embed html page this well, if i have an ad banner in this html,
will the ad banner set as refered from the html page or the php page? |
|
|
   |
 |
ArtificialIntel

Joined: Jan 31, 2004
Posts: -88
|
Posted:
Wed Feb 19, 2003 11:24 am |
  |
the html page will appear as it is in the html file, but won't be @ the top of the page cause it'll appear underneath the header.php file which includes the logo and any topnav bars.
ArtificialIntel |
|
|
   |
 |
Mischieffer
Nuke Soldier


Joined: Feb 13, 2003
Posts: 19
Location: UK
|
Posted:
Thu Feb 20, 2003 11:35 am |
  |
The HTML page I am embedding loads fine on its own but when I call it using the php code snippet the box for the colour chooser stays gray instead of running the .class files it needs and showing the controls.
The html page is fine on its own and works so I wondered if Nuke has a problem recognizing .class files or if there is something I have to put into a php page to get it to understand certain file types ??. |
|
|
   |
 |
Mischieffer
Nuke Soldier


Joined: Feb 13, 2003
Posts: 19
Location: UK
|
Posted:
Sun Mar 02, 2003 9:12 am |
  |
Hi guys,
Just wanted to post a quick message for others who make the same mistakes I do
When embedding html into the nuke php pages I assumed that just having all files in the same directory would work, I found out this is not the case.
I had a file called colour.class in a module called Colour and left the links in the html page as simply "colour.class" which didn't work.
Once I altered each link to "modules/Colour/colour.class" the page loaded properly.
Hope this helps any other newbies like me. |
|
|
   |
 |
JackX
Corporal


Joined: Feb 12, 2003
Posts: 58
Location: USA
|
Posted:
Sun Mar 16, 2003 9:52 pm |
  |
I have a question for you. If you have created an HTML page using the following code (different from above), how would you include a customized page title for it?
| Code: |
<?php
if (!isset($mainfile)) { include("mainfile.php"); }
include("header.php");
OpenTable();
?>
HTML MESSAGES HERE
<?php
CloseTable();
include("footer.php");
?> |
I have tried to get it to work by adding the following code into the page...
| Code: |
| $pagetitle = "Custom Page Title goes here!"; |
However that does not seem to work.... any clues or hints as to get this operating correctly??? Thanks in adance! |
|
|
   |
 |
JackX
Corporal


Joined: Feb 12, 2003
Posts: 58
Location: USA
|
Posted:
Mon Mar 17, 2003 7:47 pm |
  |
| Code: |
<?php
if (!isset($mainfile)) { include("mainfile.php"); }
$pagetitle = "Custom Page Title goes here!";
include("header.php");
OpenTable();
?>
HTML MESSAGES HERE
<?php
CloseTable();
include("footer.php");
?> |
That code works - but I now have another question... How would you get that same page to display correctly from a subfolder?
for example, from /misc/page.php instead of /page.php  |
|
|
   |
 |
saladin
Nuke Cadet


Joined: Dec 28, 2003
Posts: 8
|
Posted:
Wed Dec 31, 2003 11:40 am |
  |
I want to make it a block how do i go about that? |
|
|
   |
 |
duhduhdude
Corporal


Joined: Mar 30, 2003
Posts: 58
|
Posted:
Sat Jan 17, 2004 2:08 pm |
  |
|
   |
 |
everyartist
Nuke Soldier


Joined: Jan 08, 2004
Posts: 21
|
Posted:
Wed Jan 21, 2004 1:39 pm |
  |
I used the code below to add a subscription form (through paypal) into my modules block. However, i get the following error on the top (the page works perfectly fine exept for this error):
Warning: main(): stream does not support seeking in /home/everyart/.panel/web/portal/cms/modules/Subscribe/index.php on line 4
The code I used is below:
<?php
if (!isset($mainfile)) {include("mainfile.php"); }
include ("header.php");
include ("http://www.everyartist.net/subscribe.html");
include ("footer.php");
?>
What am I doing wrong? Please reply to this post!!! I'm desperate |
|
|
   |
 |
aabbcc
Corporal


Joined: Feb 20, 2004
Posts: 60
|
Posted:
Sat Feb 21, 2004 2:12 am |
  |
| Quote: |
| $pagetitle = "Custom Page Title goes here!"; |
Just put it in a language file in your language directory of the module in question...
| Quote: |
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$pagetitle = ""._PAGETITLE."";
include("header.php");
include("xxxxxxxx.php");
include("footer.php");
?> |
|
_________________ World of Warcraft Nation |
|
    |
 |
|
|