|
Feeds
- Downloads
- FAQ
- News
- Tutorials
|
|
|
View previous topic :: View next topic |
Author |
Message |
SharisseB webmaster
Joined: Dec 21, 2007 Posts: 10
|
Posted: Fri Dec 21, 2007 2:02 pm Post subject: Custom Head question |
|
|
I already have a custom_head:
<?php
// Custom head section to include the ESCal CSS
$CSS=1; require ("calendar/calendar.php");
// Start Who is where / Début Qui est ou
$content = "";
global $user, $cookie, $prefix, $user_prefix, $dbi, $anonymous,$name,$REQUEST_URI;
cookiedecode($user);
$ip = getenv("REMOTE_ADDR");
$wiw_username = $cookie[1];
if (!isset($wiw_username)) {
$wiw_username = "$ip";
$guest = 1;
}
$past = time()-900;
sql_query("DELETE FROM $prefix"._whoiswhere." WHERE time < $past", $dbi);
$result = sql_query("SELECT time FROM $prefix"._whoiswhere." WHERE username='$wiw_username'", $dbi);
$ctime = time();
if ($row = sql_fetch_array($result, $dbi)) {
sql_query("UPDATE $prefix"._whoiswhere." SET username='$wiw_username', time='$ctime', host_addr='$ip', guest='$guest',module='$name',url='$REQUEST_URI' WHERE username='$wiw_username'", $dbi);
} else {
sql_query("INSERT INTO $prefix"._whoiswhere." (username, time, host_addr, guest,module,url) VALUES ('$wiw_username', '$ctime', '$ip', '$guest','$name','$REQUEST_URI')", $dbi);
}
// End Who is where / Fin Qui est ou
?>
Please tell me what should I do with the custom_head included with my feed Nukefeed?
if(!defined('ADMIN_FILE') and !defined('MODULE_FILE'))
{
header('Location: ../../index.php');
die();
}
include_once('includes/custom_files/nukeSEO/nukeFEEDhdr.php');
?>
should I add it somewhere in the old custom_head? Please advise... Thank you so much! |
|
Back to top |
|
|
Guardian webmaster
Joined: Dec 25, 2005 Posts: 364 Location: Vsetin, Czech Republic
|
Posted: Fri Dec 21, 2007 3:10 pm Post subject: Re: Custom Head question |
|
|
If you already have a custom_header file in the correct place you will only need to ad this line
Code:include_once('includes/custom_files/nukeSEO/nukeFEEDhdr.php');
|
Your custom_header file should already have the other code in it (if you have all the latest nuke security patches). |
|
Back to top |
|
|
SharisseB
|
Posted: Fri Dec 21, 2007 3:25 pm Post subject: Re: Custom Head question |
|
|
Thank you.. I am all set with that now. This is just wonderful! Exactly what I needed. Now one more question, please...
I have a module web links and module web links2.
I copied the web links in content area and recreated it with adding the "2" I changed it ...seems fine. Except when I go to create as new feed it doesn't come up in my choices. What may I have missed? Do you have any thoughts? |
|
Back to top |
|
|
SharisseB
|
|
Back to top |
|
|
kguske Site Admin
Joined: May 12, 2005 Posts: 876
|
Posted: Fri Dec 21, 2007 4:45 pm Post subject: Re: Custom Head question |
|
|
Make sure the admin, preferences setting is correct for your PHP-Nuke URL. _________________ |
|
Back to top |
|
|
SharisseB
|
Posted: Fri Dec 21, 2007 6:08 pm Post subject: Re: Custom Head question |
|
|
ok.. how do I do this? please advise |
|
Back to top |
|
|
SharisseB
|
Posted: Fri Dec 21, 2007 6:30 pm Post subject: Re: Custom Head question |
|
|
I can't get into any part of my website. My maine directoy is /sweeps/index.php
all pages redirect to index only ( no sweeps) |
|
Back to top |
|
|
kguske
|
Posted: Fri Dec 21, 2007 10:09 pm Post subject: Re: Custom Head question |
|
|
Did you add this to your header?
Code:f(!defined('ADMIN_FILE') and !defined('MODULE_FILE'))
{
header('Location: ../../index.php');
die();
}
|
If so, remove that and just leave the one include line as Guardian instructed. |
|
Back to top |
|
|
SharisseB
|
|
Back to top |
|
|
kguske
|
Posted: Fri Dec 21, 2007 11:11 pm Post subject: Re: Custom Head question |
|
|
I'm afraid neither the feeds nor the database has anything to do with it.
What did you add to your custom_header file? |
|
Back to top |
|
|
SharisseB
|
Posted: Fri Dec 21, 2007 11:36 pm Post subject: Re: Custom Head question |
|
|
<?php
// Custom head section to include the ESCal CSS
$CSS=1; require ("calendar/calendar.php");
// Start Who is where / Début Qui est ou
$content = "";
global $user, $cookie, $prefix, $user_prefix, $dbi, $anonymous,$name,$REQUEST_URI;
cookiedecode($user);
$ip = getenv("REMOTE_ADDR");
$wiw_username = $cookie[1];
if (!isset($wiw_username)) {
$wiw_username = "$ip";
$guest = 1;
}
$past = time()-900;
sql_query("DELETE FROM $prefix"._whoiswhere." WHERE time < $past", $dbi);
$result = sql_query("SELECT time FROM $prefix"._whoiswhere." WHERE username='$wiw_username'", $dbi);
$ctime = time();
if ($row = sql_fetch_array($result, $dbi)) {
sql_query("UPDATE $prefix"._whoiswhere." SET username='$wiw_username', time='$ctime', host_addr='$ip', guest='$guest',module='$name',url='$REQUEST_URI' WHERE username='$wiw_username'", $dbi);
} else {
sql_query("INSERT INTO $prefix"._whoiswhere." (username, time, host_addr, guest,module,url) VALUES ('$wiw_username', '$ctime', '$ip', '$guest','$name','$REQUEST_URI')", $dbi);
}
// End Who is where / Fin Qui est ou
?>
I took out includes to see if that would make it work. I have not added it yet:
include_once('includes/custom_files/nukeSEO/nukeFEEDhdr.php');
not sure if I have correct patch. Patches confuse me |
|
Back to top |
|
|
kguske
|
Posted: Sat Dec 22, 2007 2:28 pm Post subject: Re: Custom Head question |
|
|
OK. I'm guessing you don't have the correct patch / distribution of PHP-Nuke. Let's try adding a line to modules.php, somewhere after the comments: Code:define('MODULE_FILE', true);
|
|
|
Back to top |
|
|
SharisseB
|
Posted: Sun Dec 23, 2007 7:09 am Post subject: Re: Custom Head question |
|
|
Hi, I went to add it.. it was already there:
define('MODULE_FILE', true);
require_once("mainfile.php");
$module = 1;
$name = $_GET['name'];
$name = trim($name);
if (isset($name)) {
if (eregi("http\:\/\/", $name)) {
die("Hi and Bye");
See, I had wonderful help from a Nuke guy before. He helped me customize my site. I am afraid to use patch, because there is so much customized I don't want to hurt programming. I do see there are a few things labled "update"
Anyways, the define('MODULE_FILE', true); was in there...
Last edited by SharisseB on Sun Dec 23, 2007 7:13 am; edited 1 time in total |
|
Back to top |
|
|
SharisseB
|
Posted: Sun Dec 23, 2007 7:12 am Post subject: Re: Custom Head question |
|
|
oh, and I did add
include_once('includes/custom_files/nukeSEO/nukeFEEDhdr.php');
BTW.
Thank you for being so patient |
|
Back to top |
|
|
|
|
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
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|