Tutorials and programming - Advertisement Page needed

drhtm - Dec 05, 2004 - 07:49 PM
Post subject: Advertisement Page needed
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 Smile.
Chestnut - Dec 05, 2004 - 08:06 PM
Post subject: Re: Advertisement Page needed
Apparently, he did not shut down... he just made sure he annoys everyone with his little htaccess Laughing ...

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.
Wink
drhtm - Dec 05, 2004 - 08:44 PM
Post subject: Re: Advertisement Page needed
yeah i knew that Smile. 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 - Dec 05, 2004 - 09:06 PM
Post subject: Re: Advertisement Page needed
drhtm wrote:
yeah i knew that Smile. 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. Laughing
drhtm - Dec 05, 2004 - 09:11 PM
Post subject:
thanks.

i'll see what i come up with. and yes i agree ads aren't very exciting to work with. Crying or Very sad

tchau
All times are GMT + 1 Hour
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits