» Forum » Clanscript » Fehlersuche und Probleme » Intro mit Cookie
  Mitglieder   |   Gallery   |   FAQ's   |   Regeln

[ Anmelden zum schreiben ]

Intro mit Cookie
Damostos
Mitglied
0 Beitragspunkte
Posts: 16

0 Mitglieder finden den Beitrag gut.

Merkliste 26.08.2009 - 00:11:57     Zitieren
Bin jetzt ein bisschen durcheinander gekommen.

1) Ich möchte ein Intro (.htm Datei bereits gebastelt)
2) Das Intro, eine einfache .htm Datei, verweist auf 2 Designs (auch schon erledigt)
3) Nachdem der User ein Design gewählt hat, soll das am besten per Cookie gespeichert werden, und er sieht fortan das Intro nicht mehr, sondern gleich das gewählte Design.

Problem:

1) Wie schalte ich das Intro vor? Hier gabs mal nen Mod, aber der schaltet das Intro A) IMMER vor und B) unterstützt augenscheinlich nur Bilder/Flash.
2) Wie bewerkstellige ich, dass er sich die Auswahl merkt und das Intro danach nicht wieder kommt?

Ein verwirrter User,

Grußc Christian


verwendete ilchClan Version: 1.1

betroffene Homepage: www.die-philosoffen.com


Zuletzt modifiziert von Damostos am 26.08.2009 - 00:14:32
Mairu
Coder
128 Beitragspunkte
Posts: 12770

User Pic

0 Mitglieder finden den Beitrag gut.

Merkliste 26.08.2009 - 14:07:10     Zitieren
Gib mal den Quelltext deiner vorhandenen Introseite und ggf. noch der index.php, falls du diese verändert haben solltest.


Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite
Damostos
Mitglied
0 Beitragspunkte
Posts: 16

0 Mitglieder finden den Beitrag gut.

Merkliste 26.08.2009 - 15:27:32     Zitieren
intro.htm:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Willkommen bei den Philosoffen - Triff deine Auswahl!</title>

<script>
function EvalSound(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Play();
}
function EvalSoundStop(soundobj)
{
var thissound;
thissound=eval("document."+soundobj);
thissound.stop();
thissound.currentPosition = 0;
}
</script>

<embed src="dp_aion.wav" autostart=false width=0 height=0 name="sound1"
enablejavascript="true">
<embed src="dp_sound.wav" autostart=false width=0 height=0 name="sound2"
enablejavascript="true">

</head>

<body bgcolor=black>



<center>
<img src="http://www.die-philosoffen.de/logo.png" />
</center>

<center>

<table width="500">


<tr>
<th colspan="2">
<center>
<font color="#FFFFFF" size="5">Triff bitte deine Auswahl:</font>
  <br />
  <br />
<font color="#FFFFFF">( Das linke Design ist speziell für unsere Aion-Spieler, das rechte für alle Multigaming-Interessierten. Ihr könnt das Design später noch wechseln, also keine Bange ;))</font>  
  <br />
  </p>
</center>
</th>



</tr>

<tr>
<th>
<a href="http://www.die-philosoffen.com/index.php?design=ilch_aion_dp" onMouseOver="EvalSound('sound1')" onMouseOut="EvalSoundStop('sound1')" ><img src="http://www.die-philosoffen.com/banner/aion_intro.jpg" align="left" border="0" /></a>
</th>

<th>
<a href="http://www.die-philosoffen.com/index.php?design=design_58-rot" onMouseOver="EvalSound('sound2')" onMouseOut="EvalSoundStop('sound2')" ><img src="http://www.die-philosoffen.com/banner/dp_intro.jpg" align="right" border="0" /></a>
</th>
</tr>

<tr>
<th align="left">
<font color="#FFFFFF">Aion Design</font>
</th>

<th align="right">
<font color="#FFFFFF">Classic Design (Multi)</font>
</th>
</tr>

</table>



</center>

<br />

<div id="sound"></div>


</body>
</html>


index.php (nach deinem Post angepasst):

<?php
#   Copyright by: Manuel Staechele
#   Support: www.ilch.de
#   Codeedit by Topolino

define ( 'main' , TRUE );

//Konfiguration zur Anzeige von Fehlern
//Auf http://www.php.net/manual/de/function.error-reporting.php sind die verfügbaren Modi aufgelistet
@error_reporting(E_ERROR | E_WARNING | E_PARSE);
@ini_set('display_errors','On');

session_name  ('sid');
session_start ();

require_once ('include/includes/config.php');
require_once ('include/includes/loader.php');

if (isset($_GET['design'])) $_SESSION['authgfx'] = $_GET['design'];
db_connect();
$allgAr = getAllgAr ();
$menu = new menu();
user_identification();
site_statistic();

if (is_admin()) { 
      require_once ('include/contents/'.$menu->get_url());
       } 


if ( $allgAr['wartung'] == 1) {
      require_once ('include/contents/wartung.php');
    }else {
require_once ('include/contents/'.$menu->get_url());
}

db_close();
debug('anzahl sql querys: '.$count_query_xyzXYZ);
debug('',1,false);

?>



Dank im vorraus...

greets
Mairu
Coder
128 Beitragspunkte
Posts: 12770

User Pic

0 Mitglieder finden den Beitrag gut.

Merkliste 26.08.2009 - 19:06:37     Zitieren
Mhh habs ehrlich gesagt nicht getestet, aber versuchs mal damit.
Und falls du eine .htaccess hast, die deine intro.htm vor die index.php setzt, diese entfernen bzw. die Zeile daraus.

<?php
#   Copyright by: Manuel Staechele
#   Support: www.ilch.de
#   Codeedit by Topolino
 
define ( 'main' , TRUE );
 
//Konfiguration zur Anzeige von Fehlern
//Auf http://www.php.net/manual/de/function.error-reporting.php sind die verfügbaren Modi aufgelistet
@error_reporting(E_ALL ^ E_WARNING);
@ini_set('display_errors','On');
 
session_name  ('sid');
session_start ();

require_once ('include/includes/config.php');
require_once ('include/includes/loader.php');

if (!isset($_COOKIE['ic_design'])) {
	$_GET['design'] = escape($_GET['design'], 'string');
	if (isset($_GET['design'])) {
		$_GET['design'] = escape($_GET['design'], 'string');
		if (!file_exists('include/designs/'.$_GET['design'].'/index.htm')) {
			die('Design nicht gefunden: <a href="intro.htm">neu w&auml;hlen</a>');
		}
		$_SESSION['authgfx'] = $_GET['design'];
		setcookie('ic_design', $_GET['design'], strtotime('+1 year'));
	} else {
		header('Location: intro.htm');
		exit();
	}
} elseif (!isset($_SESSION['authgfx'])) {
	$_SESSION['authgfx'] = $_COOKIE['ic_design'];
}
 
db_connect();
$allgAr = getAllgAr ();
$menu = new menu();
user_identification();
site_statistic();
 
if (is_admin()) {
	require_once ('include/contents/'.$menu->get_url());
}
  
if ( $allgAr['wartung'] == 1) {
	require_once ('include/contents/wartung.php');
}else {
	require_once ('include/contents/'.$menu->get_url());
}
 
db_close();
debug('anzahl sql querys: '.$count_query_xyzXYZ);
debug('',1,false);
 
?>



Zuletzt modifiziert von Mairu am 26.08.2009 - 23:47:46


Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite
Damostos
Mitglied
0 Beitragspunkte
Posts: 16

0 Mitglieder finden den Beitrag gut.

Merkliste 26.08.2009 - 22:13:25     Zitieren
Zitat

Notice: Undefined index: design in /home/www/hp/index.php on line 20
Design nicht gefunden: neu wählen



Traurig leider nicht ganz...trotzdem schon mal danke für deine Mühe.

Edit: Bin kein Crack, aber liegts daran, dass "design" als Variable beim ersten Besuch noch leer ist? Beschissen ausgedrückt, ich weiss...


Zuletzt modifiziert von Damostos am 26.08.2009 - 22:29:44
Mairu
Coder
128 Beitragspunkte
Posts: 12770

User Pic

0 Mitglieder finden den Beitrag gut.

Merkliste 26.08.2009 - 23:47:25     Zitieren
Stimmt, hab die Zeile nachher erst eingefügt und nicht richtig aufgepasst, einfach nur 2 Zeilen getauscht, dann sollte es passen, habs mal oben gemacht.


Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite
Damostos
Mitglied
0 Beitragspunkte
Posts: 16

0 Mitglieder finden den Beitrag gut.

Merkliste 27.08.2009 - 00:18:17     Zitieren
Gleicher Fehler immernoch Traurig Meckert immer wegen der Zeile 20
Rock@wulf
Ilch 2.0 Entwickler
13 Beitragspunkte
Posts: 1332

User Pic

0 Mitglieder finden den Beitrag gut.

Merkliste 27.08.2009 - 07:03:08     Zitieren
Versuchs mal so


<?php
#   Copyright by: Manuel Staechele
#   Support: www.ilch.de
#   Codeedit by Topolino
 
define ( 'main' , TRUE );
 
//Konfiguration zur Anzeige von Fehlern
//Auf http://www.php.net/manual/de/function.error-reporting.php sind die verfügbaren Modi aufgelistet
@error_reporting(E_ALL ^ E_WARNING);
@ini_set('display_errors','On');
 
session_name  ('sid');
session_start ();
 
require_once ('include/includes/config.php');
require_once ('include/includes/loader.php');
 
if (!isset($_COOKIE['ic_design'])) {
    if (isset($_GET['design'])) {
        $_GET['design'] = escape($_GET['design'], 'string');
        if (!file_exists('include/designs/'.$_GET['design'].'/index.htm')) {
            die('Design nicht gefunden: <a href="intro.htm">neu w&auml;hlen</a>');
        }
        $_SESSION['authgfx'] = $_GET['design'];
        setcookie('ic_design', $_GET['design'], strtotime('+1 year'));
    } else {
        header('Location: intro.htm');
        exit();
    }
} elseif (!isset($_SESSION['authgfx'])) {
    $_SESSION['authgfx'] = $_COOKIE['ic_design'];
}
 
db_connect();
$allgAr = getAllgAr ();
$menu = new menu();
user_identification();
site_statistic();
 
if (is_admin()) {
    require_once ('include/contents/'.$menu->get_url());
}
  
if ( $allgAr['wartung'] == 1) {
    require_once ('include/contents/wartung.php');
}else {
    require_once ('include/contents/'.$menu->get_url());
}
 
db_close();
debug('anzahl sql querys: '.$count_query_xyzXYZ);
debug('',1,false);
 
?>


MFG Rock@wulf
Mairu
Coder
128 Beitragspunkte
Posts: 12770

User Pic

0 Mitglieder finden den Beitrag gut.

Merkliste 27.08.2009 - 09:20:44     Zitieren
War einfach schon zu spät für mich um die Zeile zu verschieben Auslachen


Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite
Damostos
Mitglied
0 Beitragspunkte
Posts: 16

0 Mitglieder finden den Beitrag gut.

Merkliste 31.08.2009 - 20:56:33     Zitieren
Endlich mal dazu gekommen, es zu testen, klappt an sich prima, nur produziert die eigentliche Seite etz nen haufen Fehler:

In der Umfrage-Box:

Zitat

Notice: Undefined variable: tovote in /home/www/hp/include/boxes/vote.php on line 40

Notice: Undefined variable: tovote in /home/www/hp/include/boxes/vote.php on line 40

Notice: Undefined variable: woR in /home/www/hp/include/boxes/vote.php on line 71




In der Statistik-Box:

Zitat

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90

Notice: Undefined property: stdClass::$name in /home/www/hp/include/boxes/statistik.php on line 90



Was das denn??
Mairu
Coder
128 Beitragspunkte
Posts: 12770

User Pic

0 Mitglieder finden den Beitrag gut.

Merkliste 31.08.2009 - 23:30:19     Zitieren
Hatte das error reporting geändert, allerdings falsch muss
@error_reporting(E_ALL ^ E_NOTICE);
sein, sorry.


Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite
Damostos
Mitglied
0 Beitragspunkte
Posts: 16

0 Mitglieder finden den Beitrag gut.

Merkliste 02.09.2009 - 20:13:52     Zitieren
Kein Stress Zwinker Hab Display Errors einfach auf off gesetzt, ging auch.

So, klappt jetzt alles. Vielen Dank an euch beide. Wäre das hier nicht was für die FAQ?

[ Anmelden zum schreiben ]