Neuigkeiten:

moziloCMS verwendet Cookies. Wenn Sie auf unserer Seite weitersurfen, stimmen Sie der Cookie-Nutzung zu Datenschutzerklärung
moziloCMS Layouts
moziloCMS Plugins

Hauptmenü

SlimBox innerhalb einer Tabelle ist vermurkst

Begonnen von Rainer, 24. Mai 2010, 18:24:59

« vorheriges - nächstes »

Rainer

Servus,

die SlimBox funktioniert ja soweit sehr gut, aber nicht innerhalb einer Tabelle, da wird die Vorschau und das große Bild angezeigt.
http://www.momann.com/beta1/index.php?cat=BERGE

Da ich jetzt nicht weis wo der Fehler sitzt: im Plugin oder in der Beta, hab ichs mal hier reingesetzt. Wenns doch zu den Plugins muss dann bitte verschieben.

Gruß
Rainer

Ps.:
Darf das Plugin auch kommerziell genutzt werden?
moziloCMS über Facebook bekannt machen
•• moziloCMS auf GitHub
••• Nichts ist einfacher, als das, was uns fremd ist, zu verachten.
•••• Mein moziloCMS

Rainer

#1
Getestet: wenn ich eine Tabelle innerhalb [html|] erstelle funkeniert's.
moziloCMS über Facebook bekannt machen
•• moziloCMS auf GitHub
••• Nichts ist einfacher, als das, was uns fremd ist, zu verachten.
•••• Mein moziloCMS

stefanbe

#2
wenn du in der cms/Syntax.php das austauschts solte es gehen
            // Tabellen
            elseif ($attribute == "tabelle") {
                // Nach Plugins suchen die ein | haben da der | als trennung in tabelle genutz wird
                preg_match_all("/{([^{}]+)|([^{}]*)}/Um", $match, $plugins);
                if(isset($plugins[0])) {
                    foreach($plugins[0] as $pos => $plugin) {
                        $replace_tmp[$pos] = '~plugin '.$pos.'-';
                        $replace_plugin[$pos] = $plugin;
                    }
                }
                if(isset($replace_tmp))
                    $value_tmp = str_replace ($replace_plugin, $replace_tmp, $value);
                else
                    $value_tmp 
= $value;
                // Tabelleninhalt aufbauen
                $tablecontent = "";
                $j = 0;
                // Tabellenzeilen
                preg_match_all("/(<|<<)(.*)(>|>>)/Umsie", $value_tmp, $tablelines);
                foreach ($tablelines[0] as $tablematch) {
                    // Kopfzeilen
                    if (preg_match("/<<([^>]*)/Umsi", $tablematch)) {
                        $linecontent = preg_replace('/|/', '</th><th class="contenttable">', $tablelines[2][$j]);
# Table Hack recursive Table siehe weiter unten
#                        $linecontent = preg_replace('/&#38;/', '&', $linecontent);
                        $linecontent = preg_replace('/&lt;(.*)/', "$1", $linecontent);
                        $tablecontent .= "<tr><th class="contenttable">$linecontent</th></tr>";
                    }
                    // normale Tabellenzeilen
                    else {
                        // CSS-Klasse immer im Wechsel
                        $css = "contenttable1";
                        if ($j%== 0) {
                            $css = "contenttable2";
                        }
                        // Pipes durch TD-Wechsel ersetzen
                        $linecontent = preg_replace('/|/', '</td><td class="'.$css.'">', $tablelines[2][$j]);
# Table Hack recursive Table siehe weiter unten
#                        $linecontent = preg_replace('/&#38;/', '&', $linecontent);
                        $tablecontent .= "<tr><td class="$css">$linecontent</td></tr>";
                    }
                    $j++;
                }
                $content = str_replace ("$match", "<table class="contenttable" cellspacing="0" border="0" cellpadding="0" summary="">$tablecontent</table>", $content);
                if(isset($replace_tmp))
                    $content = str_replace ($replace_tmp,$replace_plugin, $content );
            } 

gruss stefanbe

Rainer

#3
Servus stefanbe,

das wars: funkeniert sehr gut  :D
Allerbesten Dank

Gruß Rainer
moziloCMS über Facebook bekannt machen
•• moziloCMS auf GitHub
••• Nichts ist einfacher, als das, was uns fremd ist, zu verachten.
•••• Mein moziloCMS