Social Media
Foren
Thema 'Seite Bearbeiten' goes WYSIWYG
- 1
- 2
Thema 'Seite Bearbeiten' goes WYSIWYG
hallo,
irgendwie scheint was mit dem Quelltext nicht zu stimmen. Nach dem Abspeichern in der site-edit.php sehe ich keinen editor und auch die beschriebene Verhaltensweise, dass man beim Einfügen auf die CMS-Startseite kommt, kann ich nicht bestätigen. Hat sich da ein Fehler ins Tutorial eingeschlichen?
auch gibt es eine Dopplung am Ende:
irgendwie scheint was mit dem Quelltext nicht zu stimmen. Nach dem Abspeichern in der site-edit.php sehe ich keinen editor und auch die beschriebene Verhaltensweise, dass man beim Einfügen auf die CMS-Startseite kommt, kann ich nicht bestätigen. Hat sich da ein Fehler ins Tutorial eingeschlichen?
auch gibt es eine Dopplung am Ende:
Quellcode |
|
1 |
<textarea name="content"><?PHP echo $page->readContent("../"); ?></textarea> |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <title>Admin-Bereich</title> <style type="text/css"> body{ margin:0; padding:0; font-family:Tahoma, sans-serif;; } label{ display:block; } #adminmenue{ list-style-type : none; margin:0; margin-bottom:40px; padding:0; background-color:#333; width:100%; height:20px; } #adminmenue a{ color:#fff; } #adminmenue li{ display:inline; } thead{ background-color:#ddd; color:#333; } fieldset{ width:50%; } fieldset input{ width:95%; } </style> </head> <body> <ul id="adminmenue"> <li><a href="/admin">Dashboard</a></li> <li><a href="index.php?page=sites">Seiten</a></li> <li><a href="index.php?page=menues">Menüs</a></li> <li><a href="index.php?page=settings">Einstellungen</a></li> <li><a href="index.php?page=stats">Statistik</a></li> <li><a href="index.php?page=logout">Logout</a></li> </ul> <h1>Seite bearbeiten</h1> <form action="/admin/index.php?page=site_edit&site=testseite" method="post"> <div style="float:left;width:50%;"> <h2>Inhalt</h2> <label for="title">Titel:</label> <input name="title" value="Testseite" /><br /> <label for="alias">Alias:</label> <input name="alias" value="testseite" /><br /> <label for="content" />Inhalt</label> <textarea name="content"> <h1>Testseite</h1> </textarea> </div> <div> <h2>Seitenmenü</h2> <select name="menu" onchange="document.form.submit();"> <option value="1">Testmenü</option><option value="2">Zweites Testmenü</option></select> <div id="menupreview"> </div> </div> <div style="clear:both;"> <input type="submit" value="Ändern" /> </div> </form> </body> </html> |
So! Zweiter Versuch:
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <title>Admin-Bereich</title> <style type="text/css"> body{ margin:0; padding:0; font-family:Tahoma, sans-serif;; } label{ display:block; } #adminmenue{ list-style-type : none; margin:0; margin-bottom:40px; padding:0; background-color:#333; width:100%; height:20px; } #adminmenue a{ color:#fff; } #adminmenue li{ display:inline; } thead{ background-color:#ddd; color:#333; } fieldset{ width:50%; } fieldset input{ width:95%; } </style> </head> <body> <ul id="adminmenue"> <li><a href="/admin">Dashboard</a></li> <li><a href="index.php?page=sites">Seiten</a></li> <li><a href="index.php?page=menues">Menüs</a></li> <li><a href="index.php?page=settings">Einstellungen</a></li> <li><a href="index.php?page=stats">Statistik</a></li> <li><a href="index.php?page=logout">Logout</a></li> </ul> <h1>Seite bearbeiten</h1> <form action="/admin/index.php?page=site_edit&site=testseite" method="post"> <div style="float:left;width:50%;"> <h2>Inhalt</h2> <label for="title">Titel:</label> <input name="title" value="Testseite" /><br /> <label for="alias">Alias:</label> <input name="alias" value="testseite" /><br /> <label for="content" />Inhalt</label> <script type="text/javascript" src="/system/WYSIWYG/tiny_mce.js"></script> <script type="text/javascript"> <input name="alias" value="testseite" /><br /> <label for="content" />Inhalt</label> <script type="text/javascript" src="/system/WYSIWYG/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "textareas", theme : "advanced", plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink, emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace, print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars, nonbreaking,xhtmlxtras,template,imagemanager,filemanager", // Theme options theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright, justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent, indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|, forecolor,backcolor", theme_advanced_buttons3 : "tablecontrols,|,visualaid,|charmap,|,fullscreen,spellchecker,|,visualchars,template,blockquote,|, insertfile,insertimage", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "css/example.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "template_list.js", external_link_list_url : "link_list.js", external_image_list_url : "js/image_list.js", media_external_list_url : "js/media_list.js", // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } }); </script> <textarea name="content"> <h1>Testseite</h1> </textarea> </div> </script> <textarea name="content"> <h1>Testseite</h1> </textarea> </div> <div> <h2>Seitenmenü</h2> <select name="menu" onchange="document.form.submit();"> <option value="1">Testmenü</option><option value="2">Zweites Testmenü</option></select> <div id="menupreview"> </div> </div> <div style="clear:both;"> <input type="submit" value="Ändern" /> </div> </form> </body> </html> |
PHP-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
<?php
$page = new Page();
$page->loadProperties(mysql_real_escape_string($_GET['site']));
?>
<h1>Seite bearbeiten</h1>
<form action="/admin/index.php?page=site_edit&site=<?php echo $_GET['site']; ?>"
method="post">
<div style="float:left;width:50%;">
<h2>Inhalt</h2>
<label for="title">Titel:</label>
<input name="title" value="<?php echo $page->title; ?>" /><br />
<label for="alias">Alias:</label>
<input name="alias" value="<?PHP echo $page->alias; ?>" /><br />
<label for="content" />Inhalt</label>
<script type="text/javascript" src="/system/WYSIWYG/tiny_mce.js"></script>
<script type="text/javascript">
<input name="alias" value="<?PHP echo $page->alias; ?>" /><br />
<label for="content" />Inhalt</label>
<script type="text/javascript" src="/system/WYSIWYG/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,
emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,
print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,
nonbreaking,xhtmlxtras,template,imagemanager,filemanager",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,
justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,
indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,
forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,visualaid,|charmap,|,fullscreen,spellchecker,|,visualchars,template,blockquote,|,
insertfile,insertimage",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "css/example.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "template_list.js",
external_link_list_url : "link_list.js",
external_image_list_url : "js/image_list.js",
media_external_list_url : "js/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<textarea name="content"><?PHP echo $page->readContent("../"); ?></textarea>
</div>
</script>
<textarea name="content"><?PHP echo $page->readContent("../"); ?></textarea>
</div>
<div>
<h2>Seitenmenü</h2>
<select name="menu" onchange="document.form.submit();">
<?php
foreach(sys::getMenues() as $menue){
echo "<option value="".$menue['id'].""";
if($_POST['menu'] == $menue['id']){
echo " selected="selected"";
}
else if($page->menu == $menue['id']){
echo " selected="selected"";
}
echo ">".$menue['name']."</option>";
}
?>
</select>
<div id="menupreview">
<?php
if($_POST['menu']){
Menu::display($_POST['menu'],"<ul>","</ul>","<li>","</li>","");
}
else if($page->menu > 0){
Menu::display($page->menu,"<ul>","</ul>","<li>","</li>","");
}
?>
</div>
</div>
<div style="clear:both;">
<input type="submit" value="Ändern" />
</div>
</form>
|
hi stefan,
ich glaub, da haben wir uns missverstanden. Das doppelte Textarea hatte ich nur nebenher erwähnt, weil ich dadurch auf den Trichter gekommen bin, dass der Quelltext nicht stimmt. Den Fehler hatte ich schon längst ausgemerzt. :-)
Mein Problem ist eher, dass der WYSIWYG-Editor nicht angezeigt wird.
gruß
andré
ich glaub, da haben wir uns missverstanden. Das doppelte Textarea hatte ich nur nebenher erwähnt, weil ich dadurch auf den Trichter gekommen bin, dass der Quelltext nicht stimmt. Den Fehler hatte ich schon längst ausgemerzt. :-)
Mein Problem ist eher, dass der WYSIWYG-Editor nicht angezeigt wird.
gruß
andré
|
Schau mal in deinen Firebug (oder Opera Dragonfly) ob es Javascript-Fehler gibt.
Ist denn die Textarea zu sehen?
Ist denn die Textarea zu sehen?
hallo stefan,
jetzt kann ich mich garnicht mehr im adminbereich anmelden. geb ich benutzer und passwort ein, erhalte ich die fehlermeldung, dass das login fehlgeschlagen ist und die anmeldemaske ist plötzlich dopelt. user und passwort sind aber definitiv richtig. ist halt schon knapp zwei wochen her, seit ich das tutorial gemacht habe.
könnte ich die dateien bis zu diesem kapitel irgendwo runterladen?
LG
andré
jetzt kann ich mich garnicht mehr im adminbereich anmelden. geb ich benutzer und passwort ein, erhalte ich die fehlermeldung, dass das login fehlgeschlagen ist und die anmeldemaske ist plötzlich dopelt. user und passwort sind aber definitiv richtig. ist halt schon knapp zwei wochen her, seit ich das tutorial gemacht habe.
könnte ich die dateien bis zu diesem kapitel irgendwo runterladen?
LG
andré
sorry, für die verwirrung.
ich hatte doch das falsche passwort. war ja doch ne weile her.
ich hab das backend jetzt mal in mehreren browsern getestet. überall kein WYSIWYG Editor zu sehen..in den kommentaren wird auch davon gesprochen, dass der editor so nicht funktioniert.
der doppelte eintrag hat sich aber schonmal durch deinen hinweis erledigt.
im anhang mal ein screenshot, wie es aussieht. vielleicht hab ich ja wirklich was übersprungen.
gruss
andré
ich hatte doch das falsche passwort. war ja doch ne weile her.
ich hab das backend jetzt mal in mehreren browsern getestet. überall kein WYSIWYG Editor zu sehen..in den kommentaren wird auch davon gesprochen, dass der editor so nicht funktioniert.
der doppelte eintrag hat sich aber schonmal durch deinen hinweis erledigt.
im anhang mal ein screenshot, wie es aussieht. vielleicht hab ich ja wirklich was übersprungen.
gruss
andré
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »andrej« (23. Februar 2012, 20:51)
hallo stefan,
kein problem. bin ja dankbar, dass du hilfst! :-)
hier mal mein aktueller stand der site-edit.php:
kein problem. bin ja dankbar, dass du hilfst! :-)
hier mal mein aktueller stand der site-edit.php:
PHP-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
<?php
$page = new Page();
$page->loadProperties(mysql_real_escape_string($_GET['site']));
?>
<h1>Seite bearbeiten</h1>
<form action="/admin/index.php?page=site_edit&site=<?php echo $_GET['site']; ?>"
method="post">
<div style="float:left;width:50%;">
<h2>Inhalt</h2>
<label for="title">Titel:</label>
<input name="title" value="<?php echo $page->title; ?>" /><br />
<label for="alias">Alias:</label>
<input name="alias" value="<?PHP echo $page->alias; ?>" /><br />
<label for="content" />Inhalt</label>
<script type="text/javascript" src="/system/WYSIWYG/tiny_mce.js"></script>
<script type="text/javascript">
<input name="alias" value="<?PHP echo $page->alias; ?>" /><br />
<label for="content" />Inhalt</label>
<script type="text/javascript" src="/system/WYSIWYG/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,
emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,
print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,
nonbreaking,xhtmlxtras,template,imagemanager,filemanager",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,
justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,
indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,
forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,visualaid,|charmap,|,fullscreen,spellchecker,|,visualchars,template,blockquote,|,
insertfile,insertimage",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "css/example.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "template_list.js",
external_link_list_url : "link_list.js",
external_image_list_url : "js/image_list.js",
media_external_list_url : "js/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
<textarea name="content"><?PHP echo $page->readContent("../"); ?></textarea>
</div>
<div>
<h2>Seitenmenü</h2>
<select name="menu" onchange="document.form.submit();">
<?php
foreach(sys::getMenues() as $menue){
echo "<option value="".$menue['id'].""";
if($_POST['menu'] == $menue['id']){
echo " selected="selected"";
}
else if($page->menu == $menue['id']){
echo " selected="selected"";
}
echo ">".$menue['name']."</option>";
}
?>
</select>
<div id="menupreview">
<?php
if($_POST['menu']){
Menu::display($_POST['menu'],"<ul>","</ul>","<li>","</li>","");
}
else if($page->menu > 0){
Menu::display($page->menu,"<ul>","</ul>","<li>","</li>","");
}
?>
</div>
</div>
<div style="clear:both;">
<input type="submit" value="Ändern" />
</div>
</form>
|
- 1
- 2
Ähnliche Themen
-
- Neue Ideen »
- HTML-Highlighter Plugin (3. Februar 2012, 15:55)
-
- Neue Ideen »
- YouTube Plugin (3. Februar 2012, 15:53)