to previous topic Print topic to next topic

 Root :: Developments :: Tutorials and programming :: Advertisement Page needed
 Moderated by:
 
  Bottom  Advertisement Page needed
drhtm Posted: 05.12.2004, 20:49
Pizzaman
Pizzaman


registered: Jul 21, 2004
Posts: 33

Status:  offline
last visit: 05.12.04
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 :).
Top  drhtm send PM
 
Chestnut Posted: 05.12.2004, 21:06
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
Apparently, he did not shut down... he just made sure he annoys everyone with his little htaccess icon_lol ...

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:


Chestnut ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
drhtm Posted: 05.12.2004, 21:44
Pizzaman
Pizzaman


registered: Jul 21, 2004
Posts: 33

Status:  offline
last visit: 05.12.04
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?
Top  drhtm send PM
 
Chestnut Posted: 05.12.2004, 22:06
Site Admin
avatar

registered: Jun 02, 2002
Posts: 1320

Status:  offline
last visit: 07.02.08
drhtmyeah 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
  1. function redirect_index($message, $url = "index.php")
  2. {
  3.     //$ThemeSel = pnConfigGetVar('Default_Theme');
  4.     $ThemeSel = pnUserGetTheme();
  5.     echo "<html><head><META HTTP-EQUIV=Refresh CONTENT=\"2; URL=$url\">\n";
  6.     if &#40;defined("_CHARSET") && _CHARSET != "") {
  7.         echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=" . _CHARSET . "\">\n";
  8.     &#125;
  9.     echo "<LINK REL=\"StyleSheet\" href=\"".WHERE_IS_PERSO."themes/$ThemeSel/style/styleNN.css\" type=\"text/css\">\n";
  10.     echo "<style type=\"text/css\">";
  11.     echo &quot;@import url&#40;\"".WHERE_IS_PERSO."themes/$ThemeSel/style/style.css\"); ";
  12.     echo "</style>\n";
  13.     echo "</head><body bgcolor=\"$GLOBALS&#91;bgcolor1]\" text=\"$GLOBALS[textcolor1]\">\n";
  14.     echo "<div style=\"text-align&#58;center\" class=\"pn-title\">\n";
  15.  
  16.  
  17. echo "<!-- YOUR ANNOUCE OR CODE HERE -->\n";
  18. echo "It could be an include like this &#58;\n";
  19.  
  20. include &#40;'yourfile.php");
  21.  
  22.  
  23.  
  24.  
  25. echo "</div></body></html>";
  26.  
  27. &#125;
  28.  


This line :
Code
  1. echo "<html><head><META HTTP-EQUIV=Refresh CONTENT=\"2; URL=$url\">\n";


The 2 says how many seconds before redirecting...

drhtm
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. icon_lol

Chestnut ! Cool
Site Admin
Top  Chestnut send PM Homepage
 
drhtm Posted: 05.12.2004, 22:11
Pizzaman
Pizzaman


registered: Jul 21, 2004
Posts: 33

Status:  offline
last visit: 05.12.04
thanks.

i'll see what i come up with. and yes i agree ads aren't very exciting to work with. :cry:

tchau
Top  drhtm send PM
 



Powered by pnForum Version 2.0.1
DarkMindZ