Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
| [ Anmelden zum schreiben ] |
| Intro mit Cookie | |||
|---|---|---|---|
| Damostos Mitglied
Posts: 16 |
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
Posts: 12770 |
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
Posts: 16 |
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
Posts: 12770 |
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ä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
Posts: 16 |
Zitat
Notice: Undefined index: design in /home/www/hp/index.php on line 20 Design nicht gefunden: neu wählen 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
Posts: 12770 |
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
Posts: 16 |
Gleicher Fehler immernoch
Meckert immer wegen der Zeile 20 |
||
| Rock@wulf Ilch 2.0 Entwickler
Posts: 1332 |
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ä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
Posts: 12770 |
War einfach schon zu spät für mich um die Zeile zu verschieben
![]() Und auch immer mal ein Blick auf die FAQ werfen. | Mairus Ilchseite |
||
| Damostos Mitglied
Posts: 16 |
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
Posts: 12770 |
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
Posts: 16 |
Kein Stress
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 ] |