| Author |
Message |
drhtm
Joined: Jul 21, 2004
Posts: 33
Status: Offline
|
  Posted:
Dec 05, 2004 - 07:49 PM |
|
Hi Chestnut,
wondering if you know how this can be done. http://mods.postnuke.com/Article2408.html
apparently the orginal author shut down his site. If you know or anyone know of a script that can handle this, let me know. thanks . |
|
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Dec 05, 2004 - 08:06 PM |
|
Apparently, he did not shut down... he just made sure he annoys everyone with his little htaccess ...
http://www.autothemes.com
Other than that, you can do many things by hacking the tools.php file in NS-User/ folder.
function redirect_user (All the code for a page is in this function except that it has a refresh redirection link.
 |
_________________ Chestnut !
Administrator
PNConcept.com |
|
 |
 |
drhtm
Joined: Jul 21, 2004
Posts: 33
Status: Offline
|
  Posted:
Dec 05, 2004 - 08:44 PM |
|
yeah i knew that . but i can't seem to find it at that site either. anyhow, i know it had to do with that file. could you help me set this up? I am not very familiar with this and wouldn't know how to start it correctly.
by the way, do you think its possible to extend this idea beyond just the login page and say to every 10 pages or so, probably using a cookie of some sort? |
|
|
|
 |
Chestnut
Site Admin
Joined: Oct 08, 2003
Posts: 1065
Location: Paris - France
|
  Posted:
Dec 05, 2004 - 09:06 PM |
|
| drhtm wrote: | yeah i knew that . but i can't seem to find it at that site either. anyhow, i know it had to do with that file. could you help me set this up? I am not very familiar with this and wouldn't know how to start it correctly.
|
I am not well versed in this kind of advertisement code but if you look at the file this way :
| Code: |
function redirect_index($message, $url = "index.php")
{
//$ThemeSel = pnConfigGetVar('Default_Theme');
$ThemeSel = pnUserGetTheme();
echo "<html><head><META HTTP-EQUIV=Refresh CONTENT=\"2; URL=$url\">\n";
if (defined("_CHARSET") && _CHARSET != "") {
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=" . _CHARSET . "\">\n";
}
echo "<LINK REL=\"StyleSheet\" href=\"".WHERE_IS_PERSO."themes/$ThemeSel/style/styleNN.css\" type=\"text/css\">\n";
echo "<style type=\"text/css\">";
echo "@import url(\"".WHERE_IS_PERSO."themes/$ThemeSel/style/style.css\"); ";
echo "</style>\n";
echo "</head><body bgcolor=\"$GLOBALS[bgcolor1]\" text=\"$GLOBALS[textcolor1]\">\n";
echo "<div style=\"text-align:center\" class=\"pn-title\">\n";
echo "<!-- YOUR ANNOUCE OR CODE HERE -->\n";
echo "It could be an include like this :\n";
include ('yourfile.php");
echo "</div></body></html>";
}
|
This line :
| Code: |
echo "<html><head><META HTTP-EQUIV=Refresh CONTENT=\"2; URL=$url\">\n";
|
The 2 says how many seconds before redirecting...
| drhtm wrote: |
by the way, do you think its possible to extend this idea beyond just the login page and say to every 10 pages or so, probably using a cookie of some sort? |
Probably... but if you don't plan to use a html block or something like that, it's more hacking (header.php probably).
And as I said, can't help you much as I am a fervent "advertisement free Internet" dude... so I never look how to use all those Banners and affiliation twinkies. Even less cookies I must admit.  |
_________________ Chestnut !
Administrator
PNConcept.com
Last edited by Chestnut on Dec 05, 2004 - 09:07 PM; edited 1 time in total |
|
 |
 |
drhtm
Joined: Jul 21, 2004
Posts: 33
Status: Offline
|
  Posted:
Dec 05, 2004 - 09:11 PM |
|
thanks.
i'll see what i come up with. and yes i agree ads aren't very exciting to work with.
tchau |
|
|
|
 |
|
|
| |