|
|
Joined: Dec 2004
Posts: 36
Junior Member
|
Junior Member
Joined: Dec 2004
Posts: 36 |
I have tried to insert phpadsnew code into header.php That produces a problem that users get logged out after a couple of seconds , sometimes minutes - very annoying. Where to (into which file) must I insert this code to get flawless functioning without atomatic logouts? <center><?php<br /> if (@include(getenv('DOCUMENT_ROOT').'/adsrota/phpadsnew.inc.php')) {<br /> if (!isset($phpAds_context)) $phpAds_context = array();<br /> $phpAds_raw = view_raw ('zone:2', 0, '_blank', '', '0', $phpAds_context);<br /> echo $phpAds_raw['html'];<br /> }<br />?></center> ---------------------- phpads inserts this code into the board cookies: phpAds_blockAd[3] 1103822652 www.nobody.com/1024 3441436160 29682040 3580020352 29681938
nosleep
|
|
|
|
Joined: Feb 2002
Posts: 295
Member
|
Member
Joined: Feb 2002
Posts: 295 |
Hi, You need to select the Javascript option for displaying Ads. The piece of code we have in our header is: <br /><script language='JavaScript' type='text/javascript'><br /><!--<br /> if (!document.phpAds_used) document.phpAds_used = ',';<br /> phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);<br /> <br /> document.write ("<" + "script language='JavaScript' type='text/javascript' src='");<br /> document.write ("http://tnmedia.th.net/ads/adjs.php?n=" + phpAds_random);<br /> document.write ("&what=zone:1");<br /> document.write ("&exclude=" + document.phpAds_used);<br /> if (document.referer)<br /> document.write ("&referer=" + escape(document.referer));<br /> document.write ("'><" + "/script>");<br />//--><br /></script><noscript><a href='http://tnmedia.th.net/ads/adclick.php?n=a495e2fc' target='_blank'><img src='http://tnmedia.th.net/ads/adview.php?what=zone:1&n=a495e2fc' border='0' alt=''></a></noscript><br /> Sanuk!
|
|
|
|
Joined: Dec 2004
Posts: 36
Junior Member
|
Junior Member
Joined: Dec 2004
Posts: 36 |
yes, I tried the js code too. Members still get logged out after a few seconds. I'm really puzzled. Cookies are set / HTTP Referer Check is disabled, Spider friendly URL's disabled, zlib compression enabled, cookie prefix: ac2ubb, Cookie Expiration Time: 63200, Session files disabled.
What can be the cause of this annoying problem?
nosleep
|
|
|
|
Joined: Dec 2004
Posts: 36
Junior Member
|
Junior Member
Joined: Dec 2004
Posts: 36 |
you can find this cookie forced logout problem referenced here: http://forum.phpadsnew.com/index.php?showtopic=6454To my opinion this renders phpadsnew 2.0 unusable for implementation on any larger site.
nosleep
|
|
|
|
Joined: Apr 2003
Posts: 359
Enthusiast
|
Enthusiast
Joined: Apr 2003
Posts: 359 |
NoSleep, I too use PHPAdsNew with my Threads.
I added the java to my header.php file in the includes directory. I've not had any issues with the code included there.
I do not use java on my threads for this code however...
Here's what one of my banner's code looks like:
if (@include(getenv('DOCUMENT_ROOT').'/phpadsnew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:3', 0, '_blank', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
Hopefully this helps in some way for ya....
|
|
|
|
Joined: Dec 2004
Posts: 36
Junior Member
|
Junior Member
Joined: Dec 2004
Posts: 36 |
This is Local Mode code. I tried that too. Same cookie problem.
Imagine 7000 users complaining that they always get fired ....
nosleep
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
You could include PHP in the ubbt_header.tmpl file.
Insert this:
[code]
UBBTPRINT;
// Your PHP code here
echo <<<UBBTPRINT
Put it after <body>
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|