Content Management System - CMS : eXV2 
Home
News
Forum
Downloads
Download Module
Sitemap
Partnerseiten
RSS News
Kontakt/Info
Sprache
EnglishFrench
Suchen
Login
Nickname
Passwort

Registrieren?
Passwort?
Navigation
 Home News  Forum Neueste Beiträge  Downloads Download Module eXV² Themes  Weblinks Tutorial Changelog 2.3.1 Jobcenter Gebrauchtmarkt OSMap  Sponsor Kalendersystem Sitemap Partnerseiten RSS News Kontakt/Info Webseiten Wetter
Willkommen im Free Web CMS : eXV² Forum!
  Forenarchiv
     eXV2 Module
  Banner und code?

Forum : eXV2 Module

Titel : Banner und code?

© 2004-2012 www.exv2.de
http://www.exv2.de

URL dieser Diskussion
http://www.exv2.de/modules/newbb_plus/viewtopic.php?topic_id=3755&forum=7


 gcniva :

17.04.2007 15:36
 Hallo

Hätte da mal ne frage...

Wenn ich im Banner-Modul einen neuen Banner einfüge diesen aber als html-code in diesem code (java) wird ein cookie gesetzt.

Der hintergrund ist es soll sich ein banner öffen aber nur ein mal pro tag. sonst nerft das ding Smile

Der cookie wir auch gesetzt aber der banner öffnet sich nicht?

Einstellung ist N: Banner Normal hab auch andere ausprobiert
gehen aber auch nicht.

Hier mal der code


<head>
<title></title>
<script language="JavaScript">
<!-- Begin
var expDays = 1; // number of days the cookie should last

var page = "http://www.lada-niva-ig.de.dd16712.kasserver.com/werbung/lada.html";
var windowprops = "width=775,height=95,toolbar=no,menubar=no,scrollbars=no,resizable=yes,status=no,top=150,left=100";

function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {

var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function SetCookie (name, value)
{
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name)
{
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

window.open(page, "", windowprops);

}
else {
count++;
SetCookie('count', count, exp);
}
}
// End -->
</script>


<body >
</head>
<body text="#000000" bgcolor="#336699" link="#FF0000" alink="#FF0000" vlink="#FF0000" OnLoad="checkCount()">

</body>



Kann mir da jemand helfen

Danke Gerd

[ Geändert von gcniva an 17.04.2007 15:37 ]

 Nobse :

17.04.2007 19:42
 Schau mal unter systemadministration einstellungen ob überhaupt banner eingeschaltet ist

 gcniva :

17.04.2007 20:17
 Hi

Ja banner ist eingeschaltet.

Wenn ich einen banner einfügen wird dieser auch angezeit
so will ich das aber nicht er sollte als einmaliger popup
kommen und dann so lange wie ich mich auf der seite bewege
nicht mehr. Über den java kommt er erst einen tag später wieder ist aber auch ok...

Oder sollte man das ganze besser mit
funktion Neues Fenster () mit php machen und den
code dann irgend wo einfügen??

Dann könnte man ja das banner-html mit code
öffnen lassen..

Gruß Gerd

 Nobse :

17.04.2007 22:11
 Also
<head>
<title></title>

ist blödsinn da das schon vom system erzeugt wird

das auch
<body >
</head>

da wird body eingeleitet im head

dann kommt
<body text="#000000" bgcolor="#336699" link="#FF0000" alink="#FF0000" vlink="#FF0000" OnLoad="checkCount()">

</body>

OnLoad funktioniert nur im body
das ist aber schon abgeschlossen weil, das vom system erzeugt wird und du das nicht mehrfach machen kannst

 gcniva :

20.04.2007 23:01
 Hi Ho

OK... geht net

muss mir halt was anderes suchen...

Danke Gerd

 bama :

22.04.2007 11:19
 es müsste aber funktionieren, wenn du dieses Script als Datei auf deinem Server speicherst: /cache/xxxx.php

dann im Adminmenü des Banner modules, den Banner unter Benutzercode als iframe einträgst:

Code:
<iframe name='test' src='http://deine Domain.de/cache/xxxx.php' marginwidth='0' marginheight='0' height='60' width='468' scrolling='no' align='middle' frameborder='0'></iframe>


wenn du keinen Banner anzeigen möchtest, versuche mal
height='0' width='0'

ich habe das so bei mir auf mehreren Pages laufen, aber ohne Cookie Confused Confused Confused
Partnerseiten
http://service.bama-webdesign.de/

Vote für eXV2
php
Kontakt/Info
  Kontakt
  Impressum
  Link zu uns
  AGB
  Datenschutzhinweis
Downloads
  eXV² Core
  Core Sprachfiles
eXV² Filecenter
  Downloads
  Download Module
  eXV² Themes
  Multilanguage Module
  Sprachfiles eXV² Module
eXV² Support
  France