Thanks, Mesum, but I'm really sorry to be a total noob.. but which file do I copy/paste the code into?
And at the very bottom of that file, I'm assuming?
Mesum Support Staff
Joined: Mar 11, 2003
Posts: 842
Location: Chicago
Posted:
Sat Oct 16, 2004 11:41 am
Sorry, I just came back to edit my post to tell you which file you edit and I saw your post. It's footer.php, located in your PHP-Nuke's root directory/folder.
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("footer.php",$_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
$footer = 1;
function footmsg() {
global $foot1, $foot2, $foot3, $copyright, $total_time, $start_time;
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$end_time = $mtime;
$total_time = ($end_time - $start_time);
$total_time = ""._PAGEGENERATION." ".substr($total_time,0,5)." "._SECONDS."";
echo "<font class=\"footmsg\">\n";
if ($foot1 != "") {
echo "$foot1<br>\n";
}
if ($foot2 != "") {
echo "$foot2<br>\n";
}
if ($foot3 != "") {
echo "$foot3<br>\n";
}
// DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
// IF YOU REALLY NEED TO REMOVE IT AND HAVE MY WRITTEN AUTHORIZATION CHECK: http://phpnuke.org/modules.php?name=Commercial_License
// PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
echo "$copyright<br>$total_time<br>\n</font>\n";
}
foot();
?>
<!-- Chart Basis HTML kode start v003 -->
<script language="javascript" type="text/javascript">
<!--
document.write('<a href="http://www.chart.dk/ref.asp?ct=v003&id=106998" target="_blank">');
var myref; myref=document.referrer; if(top.document.referrer!=null) myref=top.document.referrer;
document.write('<img src="http://cluster.chart.dk/chart.asp?id=106998&style=7&secID=' + Math.random()*10000000 + '&ref=' + escape(myref) + '" border="0" alt="Chart.dk"><');
document.write('/a>');
//-->
</script>
<noscript>
<a href="http://www.chart.dk/ref.asp?ct=v003&id=106998" target="_blank"><img src="http://cluster.chart.dk/chart.asp?id=106998&style=7&secID=1" border="0" alt="Chart.dk"></a>
</noscript>
<!-- Chart Basis HTML kode slut v003 -->
<?
?>
I'm really sorry to be such a pain .. but I copied and pasted everything you said...
Mesum Support Staff
Joined: Mar 11, 2003
Posts: 842
Location: Chicago
Posted:
Sat Oct 16, 2004 12:00 pm
Try this:
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("footer.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}
$footer = 1;
function footmsg() {
global $foot1, $foot2, $foot3, $copyright, $total_time, $start_time;
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$end_time = $mtime;
$total_time = ($end_time - $start_time);
$total_time = ""._PAGEGENERATION." ".substr($total_time,0,5)." "._SECONDS."";
echo "<font class=\"footmsg\">\n";
if ($foot1 != "") {
echo "$foot1<br>\n";
}
if ($foot2 != "") {
echo "$foot2<br>\n";
}
if ($foot3 != "") {
echo "$foot3<br>\n";
}
// DO NOT REMOVE THE FOLLOWING COPYRIGHT LINE. YOU'RE NOT ALLOWED TO REMOVE NOR EDIT THIS.
// IF YOU REALLY NEED TO REMOVE IT AND HAVE MY WRITTEN AUTHORIZATION CHECK: http://phpnuke.org/modules.php?name=Commercial_License
// PLAY FAIR AND SUPPORT THE DEVELOPMENT, PLEASE!
echo "$copyright<br>$total_time<br>\n</font>\n";
}
Ah Mesum, you're a star!! It works absolutely wonderfully now.. I owe you <3
GnBanditoCI5 Corporal
Joined: Sep 15, 2004
Posts: 50
Posted:
Wed Sep 28, 2005 7:49 pm
Hey guys,
Recently I set up an account with a web host that offers free corporate type sites, the only requirement is that you include one of their advertisements on every page of your site.( either a banner, or advanced text link).
Being that i am putting up a nuke site, I am considering creating a custom block with the advanced text link in it, to place on the top left side above the navigation, in essence meeting their requirement to have the link on every page of the site etc.
However, the problem is, is that the code they supply for you to use is Javascript, and we all know that nuke and javascript don't play well together.
So anyway, what i need to do is create a custom block file I can then use to activate a new block that has the link.
I have tried creating the block according to peoples suggestions, but when I activate it, it offsets my entire site and I can no longer access anything including the admin area until I delete the block via ftp.
So anyway...here is the code that i need in the custom block....
As I said, I have tried making a block file looking like this....
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-Ad.php",$_SERVER[PHP_SELF])) {
Header("Location: ../index.php");
die();
}
And this is the code I made using a default block document....
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-Ad.php",$_SERVER[PHP_SELF])) {
Header("Location: ../index.php");
die();
}
I though phpnuke REQUIRED you when creating a custom block file to incluse this code first....
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Advanced Content Management System */
/* ============================================ */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-Ad.php",$_SERVER[PHP_SELF])) {
Header("Location: ../index.php");
die();
}
Which does NOT have any $content variable area to place the code needed in my case...which is...
So this is my reason for asking you to form an example of what is needed in my case, not lack of willingness to do it on my part, but rather my confusion as to your suggestion.
Sorry guys, just at my wits end with this peticular file usage...
I will copy and paste an explanation of what I am trying to do that I initially posted in the webhosts forums...this should adequatly explain what I need....
As per the requirements of having either the banner or the smart link code placed on EVERY page of our sites, and in a location easily seeeable by visitors...I would like to create a custom SMART LINK code BLOCK for my nuke site, that I can then activate and position the block on the top left corner of my site, just above the navigation, which would in essence make that block visible no matter where the user navigated to on the site.
However nuke and javascript dont play well together...so what you you NEED to do is create a custom BLOCK file named something like... "block-Ad.php" , in the custom block file...include the advertisement code you wish used... and place it in your BLOCKS directory, and then go into your nuke admin panel and activate it, then finally position it where you wish.
However, I have tried MANY and various different uses of the smart link code in a custom block file....and when I activate it in the nuke admin panel...it offsets the entire site to the right, and in essence make the site un-navigable because its forced everything off screen. I then need to MANUALLY log into FTP and delete the file to correct the issue....simply deactivating the block is then no longer an option, as the site being offset makes the ADMIN panel no accessable.
Here is an example of my most recent attempt at creating the custom block file that includes the code you require to show the text link....
I then take this file and upload it to my BLOCKS directory....and as I said...activate it in my nuke admin panel....but again...something is wrong and it will not work correctly...
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