PHPFusion-4you.de » PHP-Fusion v7 -Hilfe und Support » Allgemeine Fragen und Probleme für V7
 Thema drucken
Artikeleinsendung
derRobert
Hallo @ all

ich hätt da mal wider ein Problemchen Wink

Ich habe bei mir die Artikeleinsendung so umgemodelt das ich im Artikelfenster den vollen Tiny mce habe mit Bildupload und dem ganzen Spa�. (über die Sicherheitslücke will ich nicht reden!!!) der Editor wird Angezeigt und Funktioniert auch. aber das Absenden eines Artikels geht nicht es kommt dann immer eine Meldung das man das Formular ausfüllen soll. �ber den Adminbereich kann ich problemlos Artikel einsenden

für die jenigen die es versuchen wollen habe ich testuser1 mit gleichem pw mal auf www.openfotoforum.de angelegt. !!! Tutorial einsenden hei�t das bei mir !!!

entsprechenden quellcode kann ich nachreichen wenn ich weis was verlangt wird Wink

danke im voraus
derRobert
 
www.garkeine.deWeb
Septron
Hallo Robert,

ich habe es mal versucht zu Testen
es ist sogar so das er bei einer Vorschau sagt das das Formular ausgefüllt werden soll also ist dort schon irgendwo noch eine lücke zu füllen nur welche wüsste ich jetzt apprubt auch nicht *-.-

LG
Septron
 
https://www.septron.deWeb
derRobert
stimmt das vergaÃ? ich zu sagen.

kann ja nur an den zweien liegen...


submit.php:


Download Code  Code
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: submit.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
require_once THEMES."templates/admin_header_mce.php";
require_once "tiny.php";
include LOCALE.LOCALESET."admin/articles.php";

include LOCALE.LOCALESET."submit.php";


if (!iMEMBER) { redirect("index.php") }

if (!isset($_GET['stype']) || !preg_check("/^[a-z]$/", $_GET['stype'])) { redirect("index.php") }

$submit_info = array()

 if ($settings['tinymce_enabled']== 1) echo "<script language='javascript' type='text/javascript'>advanced()</script>\n";
if ($settings['tinymce_enabled']== 1) echo "<script language='javascript' type='text/javascript'>simple()</script>\n";
if ($_GET['stype']== "l") {
   if (isset($_POST['submit_link'])) {
      if ($_POST['link_name']!= "" && $_POST['link_url']!= "" && $_POST['link_description']!= "") {
         $submit_info['link_category']= stripinput($_POST['link_category'])
         $submit_info['link_name']= stripinput($_POST['link_name'])
         $submit_info['link_url']= stripinput($_POST['link_url'])
         $submit_info['link_description']= stripinput($_POST['link_description'])
         $result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('l', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')")
         add_to_title($locale['global_200'].$locale['400'])
         opentable($locale['400'])
         echo "<div style='text-align:center'><br />\n".$locale['410']."<br /><br />\n";
         echo "<a href='submit.php?stype=l'>".$locale['411']."</a><br /><br />\n";
         echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
         closetable()
      }
   } else {
      $opts = "";
      add_to_title($locale['global_200'].$locale['400'])
      opentable($locale['400'])
      $result = dbquery("SELECT * FROM ".DB_WEBLINK_CATS." WHERE ".groupaccess("weblink_cat_access")." ORDER BY weblink_cat_name")
      if (dbrows($result)) {
         while ($data = dbarray($result)) {
            $opts .= "<option value='".$data['weblink_cat_id']."'>".$data['weblink_cat_name']."</option>\n";
         }
         echo $locale['420']."<br /><br />\n";
         echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=l' onsubmit='return validateLink(this)'>\n";
         echo "<table cellpadding='0' cellspacing='0' class='center'>\n";
         echo "<tr>\n<td class='tbl'>".$locale['421']."</td>\n";
         echo "<td class='tbl'><select name='link_category' class='textbox'>\n$opts</select></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['422']."</td>\n";
         echo "<td class='tbl'><input type='text' name='link_name' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['423']."</td>\n";
         echo "<td class='tbl'><input type='text' name='link_url' value='http://' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['424']."</td>\n";
         echo "<td class='tbl'><input type='text' name='link_description' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td align='center' colspan='2' class='tbl'><br />\n";
         echo "<input type='submit' name='submit_link' value='".$locale['425']."' class='button' />\n</td>\n";
         echo "</tr>\n</table>\n</form>\n";
      } else {
         echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
      }
      closetable()
   }
} elseif ($_GET['stype']== "n") {
   if (isset($_POST['submit_news'])) {
      if ($_POST['news_subject']!= "" && $_POST['news_body']!= "") {
         $submit_info['news_subject']= stripinput($_POST['news_subject'])
         $submit_info['news_cat']= isnum($_POST['news_cat']) ? $_POST['news_cat']: "0";
         $submit_info['news_body']= descript($_POST['news_body'])
         $submit_info['news_breaks']= (isset($_POST['line_breaks']) ? "y" : "n")
         $result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES('n', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')")
         add_to_title($locale['global_200'].$locale['450'])
         opentable($locale['450'])
         echo "<div style='text-align:center'><br />\n".$locale['460']."<br /><br />\n";
         echo "<a href='submit.php?stype=n'>".$locale['461']."</a><br /><br />\n";
         echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
         closetable()
      }
   } else {
      if (isset($_POST['preview_news'])) {
         $news_subject = stripinput($_POST['news_subject'])
         $news_cat = isnum($_POST['news_cat']) ? $_POST['news_cat']: "0";
         $news_body = phpentities(descript(stripslash($_POST['news_body'])))
         $breaks = (isset($_POST['line_breaks']) ? " checked='checked'" : "")
         opentable($news_subject)
         echo (isset($_POST['line_breaks']) ? nl2br($news_body) : $news_body)
         closetable()
         tablebreak()
      }
      if (!isset($_POST['preview_news'])) {
         $news_subject = "";
         $news_cat = "0";
         $news_body = "";
         $breaks = " checked='checked'";
      }
      $cat_list = ""; $sel = "";
      $result2 = dbquery("SELECT * FROM ".DB_NEWS_CATS." ORDER BY news_cat_name")
      if (dbrows($result2)) {
         while ($data2 = dbarray($result2)) {
            if (isset($_POST['preview_news'])) { $sel = ($news_cat == $data2['news_cat_id']? " selected" : "") }
            $cat_list .= "<option value='".$data2['news_cat_id']."'".$sel.">".$data2['news_cat_name']."</option>\n";
         }
      }
      add_to_title($locale['global_200'].$locale['450'])
      opentable($locale['450'])
      echo $locale['470']."<br /><br />\n";
      echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=n' onsubmit='return validateNews(this)'>\n";
      echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
      echo "<td class='tbl'>".$locale['471']."</td>\n";
      echo "<td class='tbl'><input type='text' name='news_subject' value='$news_subject' maxlength='64' class='textbox' style='width:300px;' /></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td width='100' class='tbl'>".$locale['476']."</td>\n";
      echo "<td width='80%' class='tbl'><select name='news_cat' class='textbox'>\n<option value='0'>".$locale['477']."</option>\n".$cat_list."</select></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td valign='top' class='tbl'>".$locale['472']."</td>\n";
      echo "<td class='tbl'><textarea name='news_body' cols='60' rows='8' class='textbox' style='width:300px;'>$news_body</textarea></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td align='center' colspan='2' class='tbl'><br />\n";
      echo "<input type='checkbox' name='line_breaks' value='yes'".$breaks." />".$locale['473']."<br /><br />\n";
      echo "<input type='submit' name='preview_news' value='".$locale['474']."' class='button' />\n";
      echo "<input type='submit' name='submit_news' value='".$locale['475']."' class='button' />\n</td>\n";
      echo "</tr>\n</table>\n</form>\n";
      closetable()
   }
} elseif ($_GET['stype']== "a") {
   if (isset($_POST['submit_article'])) {
      if ($_POST['article_subject']!= "" && $_POST['article_body']!= "") {
         $submit_info['article_cat']= isnum($_POST['article_cat']) ? $_POST['article_cat']: "0";
         $submit_info['article_subject']= stripinput($_POST['article_subject'])
         $submit_info['article_snippet']= descript($_POST['article_snippet'])
         $submit_info['article_body']= descript($_POST['article_body'])
         $submit_info['article_breaks']= (isset($_POST['line_breaks']) ? "y" : "n")
         $result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('a', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')")
         add_to_title($locale['global_200'].$locale['500'])
         opentable($locale['500'])
         echo "<div style='text-align:center'><br />\n".$locale['510']."<br /><br />\n";
         echo "<a href='submit.php?stype=a'>".$locale['511']."</a><br /><br />\n";
         echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
         closetable()
      }
   } else {
      if (isset($_POST['preview_article'])) {
         $article_cat = isnum($_POST['article_cat']) ? $_POST['article_cat']: "0";
         $article_subject = stripinput($_POST['article_subject'])
         $article_snippet = phpentities(descript(stripslash($_POST['article_snippet'])))
         $article_body = phpentities(descript(stripslash($_POST['article_body'])))
         $breaks = (isset($_POST['line_breaks']) ? " checked='checked'" : "")
         opentable($article_subject)
         echo (isset($_POST['line_breaks']) ? nl2br($article_body) : $article_body)
         closetable()
         tablebreak()
      }
      if (!isset($_POST['preview_article'])) {
         $article_cat = "0";
         $article_subject = "";
         $article_snippet = "";
         $article_body = "";
         $breaks = " checked='checked'";
      }
      $cat_list = ""; $sel = "";
      add_to_title($locale['global_200'].$locale['500'])
      opentable($locale['500'])
      $result = dbquery("SELECT * FROM ".DB_ARTICLE_CATS." WHERE ".groupaccess("article_cat_access")." ORDER BY article_cat_name")
      if (dbrows($result)) {
         while ($data = dbarray($result)) {
            if (isset($_POST['preview_article'])) { $sel = $article_cat == $data['article_cat_id']? " selected" : ""; }
            $cat_list .= "<option value='".$data['article_cat_id']."'".$sel.">".$data['article_cat_name']."</option>\n";
         }
         echo $locale['520']."<br /><br />\n";
         echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=a' onsubmit='return validateArticle(this)'>\n";
         echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
         echo "<td width='100' class='tbl'>".$locale['521']."</td>\n";
         echo "<td class='tbl'><select name='article_cat' class='textbox'>\n$cat_list</select></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['522']."</td>\n";
         echo "<td class='tbl'><input type='text' name='article_subject' value='$article_subject' maxlength='64' class='textbox' style='width:300px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['523']."</td>\n";
         echo "<td class='tbl'><textarea name='article_snippet' cols='60' rows='3' class='textbox' style='width:300px;'>$article_snippet</textarea></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['524']."</td>\n";
         echo "<td class='tbl'><textarea name='article_body' cols='60' rows='8' class='textbox' style='width:300px;'>$article_body</textarea></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td align='center' colspan='2' class='tbl'><br />\n";
         echo "<input type='checkbox' name='line_breaks' value='yes'".$breaks." />".$locale['525']."<br /><br />\n";
         echo "<input type='submit' name='preview_article' value='".$locale['526']."' class='button' />\n";
         echo "<input type='submit' name='submit_article' value='".$locale['527']."' class='button' />\n</td>\n";
         echo "</tr>\n</table>\n</form>\n";
      } else {
         echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
      }
      closetable()
   }
} elseif ($_GET['stype']== "p") {
   if (isset($_POST['submit_photo'])) {
      require_once INCLUDES."photo_functions_include.php";
      $error = "";
      $submit_info['photo_title']= stripinput($_POST['photo_title'])
      $submit_info['photo_description']= stripinput($_POST['photo_description'])
      $submit_info['album_id']= isnum($_POST['album_id']) ? $_POST['album_id']: "0";
      if (is_uploaded_file($_FILES['photo_pic_file']['tmp_name'])) {
         $photo_types = array(".gif",".jpg",".jpeg",".png")
         $photo_pic = $_FILES['photo_pic_file'];
         $photo_name = strtolower(substr($photo_pic['name'], 0, strrpos($photo_pic['name'], ".")))
         $photo_ext = strtolower(strrchr($photo_pic['name'],"."))
         $photo_dest = PHOTOS."submissions/";
         if (!preg_match("/^[-0-9A-Z_\[\]]+$/i", $photo_name)) {
            $error = 1;
         } elseif ($photo_pic['size']> $settings['photo_max_b']){
            $error = 2;
         } elseif (!in_array($photo_ext, $photo_types)) {
            $error = 3;
         } else {
            $photo_file = image_exists($photo_dest, $photo_name.$photo_ext)
            move_uploaded_file($photo_pic['tmp_name'], $photo_dest.$photo_file)
            chmod($photo_dest.$photo_file, 0644)
            $imagefile = @getimagesize($photo_dest.$photo_file)
            if (!verify_image($photo_dest.$photo_file)) {
               $error = 3;
               unlink($photo_dest.$photo_file)
            } elseif ($imagefile[0]> $settings['photo_max_w']|| $imagefile[1]> $settings['photo_max_h']) {
               $error = 4;
               unlink($photo_dest.$photo_file)
            } else {
               $submit_info['photo_file']= $photo_file;
            }
         }
      }
      add_to_title($locale['global_200'].$locale['570'])
      opentable($locale['570'])
      if (!$error) {
         $result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('p', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')")
         echo "<div style='text-align:center'><br />\n".$locale['580']."<br /><br />\n";
         echo "<a href='submit.php?stype=p'>".$locale['581']."</a><br /><br />\n";
         echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
      } else {
         echo "<div style='text-align:center'><br />\n".$locale['600']."<br /><br />\n";
         if ($error == 1) { echo $locale['601']; }
         elseif ($error == 2) { echo sprintf($locale['602'], $settings['photo_max_b']) }
         elseif ($error == 3) { echo $locale['603']; }
         elseif ($error == 4) { echo sprintf($locale['604'], $settings['photo_max_w'], $settings['photo_max_h']) }
         echo "<br /><br />\n<a href='submit.php?stype=p'>".$locale['581']."</a><br /><br />\n</div>\n";
      }
      closetable()
   } else {
      $opts = "";
      add_to_title($locale['global_200'].$locale['570'])
      opentable($locale['570'])
      $result = dbquery("SELECT * FROM ".DB_PHOTO_ALBUMS." WHERE ".groupaccess("album_access")." ORDER BY album_title")
      if (dbrows($result)) {
         while ($data = dbarray($result)) $opts .= "<option value='".$data['album_id']."'>".$data['album_title']."</option>\n";
         echo $locale['620']."<br /><br />\n";
         echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=p' enctype='multipart/form-data' onsubmit='return validatePhoto(this)'>\n";
         echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
         echo "<td class='tbl'>".$locale['621']."</td>\n";
         echo "<td class='tbl'><input type='text' name='photo_title' maxlength='100' class='textbox' style='width:250px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['622']."</td>\n";
         echo "<td class='tbl'><textarea name='photo_description' cols='60' rows='5' class='textbox' style='width:300px;'></textarea></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['623']."</td>\n";
         echo "<td class='tbl'><input type='file' name='photo_pic_file' class='textbox' style='width:250px;' /><br />\n";
         echo "<span class='small2'>".sprintf($locale['624'], parsebytesize($settings['photo_max_b']), $settings['photo_max_w'], $settings['photo_max_h'])."</span></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['625']."</td>\n";
         echo "<td class='tbl'><select name='album_id' class='textbox'>\n$opts</select></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td align='center' colspan='2' class='tbl'><br />\n";
         echo "<input type='submit' name='submit_photo' value='".$locale['626']."' class='button' />\n</td>\n";
         echo "</tr>\n</table>\n</form>\n";
      } else {
         echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
      }
      closetable()
   }
} else {
   redirect("index.php")
}
echo "<script type='text/javascript'>
function validateLink(frm) {
   if (frm.link_name.value==\"\" || frm.link_name.value==\"\" || frm.link_description.value==\"\") {
      alert(\"".$locale['550']."\") return false;
   }
}
function validateNews(frm) {
   if (frm.news_subject.value==\"\" || frm.news_body.value==\"\") {
      alert(\"".$locale['550']."\") return false;
   }
}
function validateArticle(frm) {
   if (frm.article_subject.value==\"\" || frm.article_snippet.value==\"\" || frm.article_body.value==\"\") {
      alert(\"".$locale['550']."\")
      return false;
   }
}
function validatePhoto(frm) {
   if (frm.photo_title.value==\"\" || frm.photo_description.value==\"\" || frm.photo_pic_file.value==\"\") {
      alert(\"".$locale['550']."\")
      return false;
   }
}
</script>\n";

require_once THEMES."templates/footer.php";
?>




tiny.php (neu erstellt):

Download Code  Code
<?php

if ($settings['tinymce_enabled']== 1) {
   echo "<script language='javascript' type='text/javascript' src='".INCLUDES."jscripts/tiny_mce/tiny_mce.js'></script>
<script type='text/javascript'>
function advanced() {
   tinyMCE.init({
      mode:'exact',
            elements : 'ajaxfilemanager',
            elements : 'article_body',
            file_browser_callback : 'ajaxfilemanager',
      theme:'advanced',
      width:'100%',
      height:'250',
      language:'".$locale['tinymce']."',
      entities:'60,lt,62,gt',
      document_base_url:'".$settings['siteurl']."',
      relative_urls:'false',
      convert_newlines_to_brs: false,
      forced_root_block: false,
      force_br_newlines: true,
      force_p_newlines: false,
      plugins:'table,advhr,advimage,advlink,insertdatetime,searchreplace,contextmenu,ibrowser,fullscreen,pagebreak,spellchecker,paste,media,emotions',
      pagebreak_separator : '<--PAGEBREAK-->',
      theme_advanced_buttons1_add_before:'pagebreak,separator',
      theme_advanced_buttons1_add:'fontsizeselect,separator,forecolor,backcolor,separator,fullscreen',
      theme_advanced_buttons2_add_before:'cut,copy,paste,pastetext,pasteword,selectall,separator,search,replace,separator,',
      theme_advanced_buttons2_add:'separator,insertdate,inserttime',
      theme_advanced_buttons3_add_before:'ibrowser,tablecontrols,separator',
      theme_advanced_buttons3_add:'advhr,emotions,media,separator,spellchecker',
      theme_advanced_toolbar_location:'bottom',
      theme_advanced_toolbar_align:'center',
      theme_advanced_toolbar_location:'top',
      theme_advanced_statusbar_location : 'bottom',
          spellchecker_languages : 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,+German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv',
         paste_create_paragraphs : false,
         paste_create_linebreaks : false,
         paste_use_dialog : true,
         paste_auto_cleanup_on_paste : true,
         paste_convert_middot_lists : false,
         paste_unindented_list_class : 'unindentedList',
         paste_convert_headers_to_strong : true,
         paste_insert_word_content_callback : 'convertWord',
      content_css:'".str_replace("../", "", THEME)."styles.css',
      external_image_list_url:'".str_replace("../", "", IMAGES)."imagelist.js',   
      plugin_insertdate_dateFormat:'%d-%m-%Y',
      plugin_insertdate_timeFormat:'%H:%M:%S',
      invalid_elements:'script,object,applet,iframe',
      theme_advanced_resize_horizontal : true,
      theme_advanced_resizing : true,
      apply_source_formatting : true,
      convert_urls : false,
          cleanup : true,
      extended_valid_elements:'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]'
   })   
}

      function ajaxfilemanager(field_name, url, type, win) {
         var ajaxfilemanagerurl = '../../../tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php';
         switch (type) {
            case 'image':
               break;
            case 'media':
               break;
            case 'flash':
               break;
            case 'file':
               break;
            default:
               return false;
         }
            tinyMCE.activeEditor.windowManager.open({
                url: '../../../tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php',
                width: 782,
                height: 440,
                inline : 'yes',
                close_previous : 'no'
            },{
                window : win,
                input : field_name
            })
      }

function convertWord(type, content) {
   switch (type) {
      // Gets executed before the built in logic performes it's cleanups
      case 'before':
         //content = content.toLowerCase()
         break;

      // Gets executed after the built in logic performes it's cleanups
      case 'after':
         //content = content.toLowerCase()
         break;
   }

   return content;
}

function simple() {
   tinyMCE.init({
   mode : 'exact',
          elements : 'article_snippet',
   theme:'simple',
   language:'en',
   convert_newlines_to_brs:'true',
   force_br_newlines:'true',
   force_p_newlines:'false'
   })
}

function showtiny(EditorID) {
   tinyMCE.removeMCEControl(tinyMCE.getEditorId(EditorID))
   tinyMCE.addMCEControl(document.getElementById(EditorID),EditorID)
}

function hidetiny(EditorID) {
   tinyMCE.removeMCEControl(tinyMCE.getEditorId(EditorID))
}

</script>\n";
}

?>



Bearbeitet von Inc0gnit0 am 14. Januar 2010 22:45

 
www.garkeine.deWeb
derRobert
schön die vielen smileys Grin
 
www.garkeine.deWeb
derRobert
ach ja noch ne zweite sache mit den panels seh ich auch noch nicht klar wie muss die syntax lauten wenn ich folgendes darstellen will

Download Code  Code
openside("name")
  echo "<object width="400" height="300"> <param name="flashvars" value="offsite=true&lang=de-de&page_show_url=%2Fphotos%2Frobert-buss%2Fshow%2F&page_show_back_url=%2Fphotos%2Frobert-buss%2F&user_id=40906929@N04&jump_to="></param> <param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=71649"></param> <param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=71649" allowFullScreen="true" flashvars="offsite=true&lang=de-de&page_show_url=%2Fphotos%2Frobert-buss%2Fshow%2F&page_show_back_url=%2Fphotos%2Frobert-buss%2F&user_id=40906929@N04&jump_to=" width="400" height="300"></embed></object>";
closeside()



Bearbeitet von Inc0gnit0 am 14. Januar 2010 22:46

 
www.garkeine.deWeb
Inc0gnit0
solche grossen Dateien bitte anhängen... und wenn es kürzere sind, im Code oder Geshi posten und Smilies deaktivieren...Danke

Gruss Lars

Bearbeitet von Inc0gnit0 am 14. Januar 2010 22:29

 
http://inc0gnit0.deWeb
eRaZoR2k
binde die php mal bitte mit den code tag´s ein ..

also *code] hier der code rein und */code]

ersetze die sternchen durch [
 
keineWeb
derRobert
sorry werd ich sofort tun


EDIT
-------------

lässt sich nicht mehr ändern ;( der letzte post lies sich nur noch ändern evtl. kann das ein Admin ja ändern Wink

Aber für die Zukunft werd i mirs Merken

Bearbeitet von derRobert am 14. Januar 2010 22:36

 
www.garkeine.deWeb
Inc0gnit0
hab beide Posts abgeändert Smile
 
http://inc0gnit0.deWeb
derRobert
So ich bin jetzt so weit das es Funktioniert wenn man vorher auf vorschau klickt IST DAS NORMAL????? und wenn ja wo kann ich den Vorschauzwang ausschalten
 
www.garkeine.deWeb
eRaZoR2k
also die artikeleinsendung sind ja von anfang an in php fusion drin und funktionieren ja auch .. so also kann es nur daran liegen was du da in den dateien geändert hat...

und was hast du geändert?
 
keineWeb
derRobert
in der submit.php hab ich nur die zwei zeilen geändert bzw hinzugefügt

require_once "tiny.php";

...

if ($settings['tinymce_enabled'] == 1) echo "<script language='javascript' type='text/javascript'>advanced();</script>\n";

(hab ich mal in nem forum gefunden) und hab dann die tiny.php im gleichen verzeichniss angelegt (mit oben stehendem inhalt)

Bearbeitet von derRobert am 15. Januar 2010 23:12

 
www.garkeine.deWeb
eRaZoR2k
nehm die mal wieder raus und versuch es mal so wie es im urzustand war geht es dann ohne erst vorher auf vorschau zu klicken?
 
keineWeb
derRobert
mit der original submit.php geht es ohne vorheriger vorschau es scheint also an der tiny.php zu liegen
 
www.garkeine.deWeb
eRaZoR2k
hm dann lass die doch weg oder was bringt dir das ding so recht?
 
keineWeb
derRobert
ausser den �rger bringt mir die Zusätzliche Zeile zusammen mit der tiny.php ein Einsendeformular für Tutorials(Artikel) mit Umfangreichem tiny mce Editor den auch die User nutzen können wenn ich das original nehme können nutzer nur beschränkt formatieren und keine bilder uploaden. mit der jetzigen version kann der nutzer bilder uploaden und diese direkt in sein tutorial (Artikel) einfügen

also wenn ich das mit der zwangsvorschau nicht weg bekomme musses bleiben denn das ist ein wichtiger punkt für mich. habe den vorschaubutton schon so verändert das der nutzer sofort sieht das er erst darauf klickern muss Wink würd mich aber freuen wenn da jemand abhilfe schaffen kann
 
www.garkeine.deWeb
eRaZoR2k
ich wei� es jetzt gerade erstmak nicht aber werd mir das mal bei gelegenheit zu gemüte führen ob ich da etwas finde
 
keineWeb
derRobert
das währe ganz toll denn mit meinen Kenntnissen sto�e ich hier mal wieder an meine Grenzen
 
www.garkeine.deWeb
eRaZoR2k
Teste mal die hier... aber denk daran backup vorher ... den java is auch so mein ding und davon is viel drin ^^

Download Code  Code

<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2008 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: submit.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licen... Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
require_once THEMES."templates/admin_header_mce.php";
require_once "tiny.php";
include LOCALE.LOCALESET."admin/articles.php";

include LOCALE.LOCALESET."submit.php";


if (!iMEMBER) { redirect("index.php") }

if (!isset($_GET['stype']) || !preg_check("/^[a-z]$/", $_GET['stype'])) { redirect("index.php") }

$submit_info = array()

 if ($settings['tinymce_enabled']== 1) echo "<script language='javascript' type='text/javascript'>advanced()</script>\n";
if ($settings['tinymce_enabled']== 1) echo "<script language='javascript' type='text/javascript'>simple()</script>\n";
if ($_GET['stype']== "l") {
   if (isset($_POST['submit_link'])) {
      if ($_POST['link_name']!= "" && $_POST['link_url']!= "" && $_POST['link_description']!= "") {
         $submit_info['link_category']= stripinput($_POST['link_category'])
         $submit_info['link_name']= stripinput($_POST['link_name'])
         $submit_info['link_url']= stripinput($_POST['link_url'])
         $submit_info['link_description']= stripinput($_POST['link_description'])
         $result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('l', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')")
         add_to_title($locale['global_200'].$locale['400'])
         opentable($locale['400'])
         echo "<div style='text-align:center'><br />\n".$locale['410']."<br /><br />\n";
         echo "<a href='submit.php?stype=l'>".$locale['411']."</a><br /><br />\n";
         echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
         closetable()
      }
   } else {
      $opts = "";
      add_to_title($locale['global_200'].$locale['400'])
      opentable($locale['400'])
      $result = dbquery("SELECT * FROM ".DB_WEBLINK_CATS." WHERE ".groupaccess("weblink_cat_access")." ORDER BY weblink_cat_name")
      if (dbrows($result)) {
         while ($data = dbarray($result)) {
            $opts .= "<option value='".$data['weblink_cat_id']."'>".$data['weblink_cat_name']."</option>\n";
         }
         echo $locale['420']."<br /><br />\n";
         echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=l' onsubmit='return validateLink(this)'>\n";
         echo "<table cellpadding='0' cellspacing='0' class='center'>\n";
         echo "<tr>\n<td class='tbl'>".$locale['421']."</td>\n";
         echo "<td class='tbl'><select name='link_category' class='textbox'>\n$opts</select></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['422']."</td>\n";
         echo "<td class='tbl'><input type='text' name='link_name' maxlength='100' class='textbox' style='width:300px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['423']."</td>\n";
         echo "<td class='tbl'><input type='text' name='link_url' value='http://' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['424']."</td>\n";
         echo "<td class='tbl'><input type='text' name='link_description' maxlength='200' class='textbox' style='width:300px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td align='center' colspan='2' class='tbl'><br />\n";
         echo "<input type='submit' name='submit_link' value='".$locale['425']."' class='button' />\n</td>\n";
         echo "</tr>\n</table>\n</form>\n";
      } else {
         echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
      }
      closetable()
   }
} elseif ($_GET['stype']== "n") {
   if (isset($_POST['submit_news'])) {
      if ($_POST['news_subject']!= "" && $_POST['news_body']!= "") {
         $submit_info['news_subject']= stripinput($_POST['news_subject'])
         $submit_info['news_cat']= isnum($_POST['news_cat']) ? $_POST['news_cat']: "0";
         $submit_info['news_body']= descript($_POST['news_body'])
         $submit_info['news_breaks']= (isset($_POST['line_breaks']) ? "y" : "n")
         $result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES('n', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')")
         add_to_title($locale['global_200'].$locale['450'])
         opentable($locale['450'])
         echo "<div style='text-align:center'><br />\n".$locale['460']."<br /><br />\n";
         echo "<a href='submit.php?stype=n'>".$locale['461']."</a><br /><br />\n";
         echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
         closetable()
      }
   } else {
      if (isset($_POST['preview_news'])) {
         $news_subject = stripinput($_POST['news_subject'])
         $news_cat = isnum($_POST['news_cat']) ? $_POST['news_cat']: "0";
         $news_body = phpentities(descript(stripslash($_POST['news_body'])))
         $breaks = (isset($_POST['line_breaks']) ? " checked='checked'" : "")
         opentable($news_subject)
         echo (isset($_POST['line_breaks']) ? nl2br($news_body) : $news_body)
         closetable()
         tablebreak()
      }
      if (!isset($_POST['preview_news'])) {
         $news_subject = "";
         $news_cat = "0";
         $news_body = "";
         $breaks = " checked='checked'";
      }
      $cat_list = ""; $sel = "";
      $result2 = dbquery("SELECT * FROM ".DB_NEWS_CATS." ORDER BY news_cat_name")
      if (dbrows($result2)) {
         while ($data2 = dbarray($result2)) {
            if (isset($_POST['preview_news'])) { $sel = ($news_cat == $data2['news_cat_id']? " selected" : "") }
            $cat_list .= "<option value='".$data2['news_cat_id']."'".$sel.">".$data2['news_cat_name']."</option>\n";
         }
      }
      add_to_title($locale['global_200'].$locale['450'])
      opentable($locale['450'])
      echo $locale['470']."<br /><br />\n";
      echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=n' onsubmit='return validateNews(this)'>\n";
      echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
      echo "<td class='tbl'>".$locale['471']."</td>\n";
      echo "<td class='tbl'><input type='text' name='news_subject' value='$news_subject' maxlength='64' class='textbox' style='width:300px;' /></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td width='100' class='tbl'>".$locale['476']."</td>\n";
      echo "<td width='80%' class='tbl'><select name='news_cat' class='textbox'>\n<option value='0'>".$locale['477']."</option>\n".$cat_list."</select></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td valign='top' class='tbl'>".$locale['472']."</td>\n";
      echo "<td class='tbl'><textarea name='news_body' cols='60' rows='8' class='textbox' style='width:300px;'>$news_body</textarea></td>\n";
      echo "</tr>\n<tr>\n";
      echo "<td align='center' colspan='2' class='tbl'><br />\n";
      echo "<input type='checkbox' name='line_breaks' value='yes'".$breaks." />".$locale['473']."<br /><br />\n";
      echo "<input type='submit' name='preview_news' value='".$locale['474']."' class='button' />\n";
      echo "<input type='submit' name='submit_news' value='".$locale['475']."' class='button' />\n</td>\n";
      echo "</tr>\n</table>\n</form>\n";
      closetable()
   }
} elseif ($_GET['stype']== "a") {
   if (isset($_POST['submit_article'])) {
      if ($_POST['article_subject']!= "" && $_POST['article_body']!= "") {
         $submit_info['article_cat']= isnum($_POST['article_cat']) ? $_POST['article_cat']: "0";
         $submit_info['article_subject']= stripinput($_POST['article_subject'])
         $submit_info['article_snippet']= descript($_POST['article_snippet'])
         $submit_info['article_body']= descript($_POST['article_body'])
         $submit_info['article_breaks']= (isset($_POST['line_breaks']) ? "y" : "n")
         $result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('a', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')")
         add_to_title($locale['global_200'].$locale['500'])
         opentable($locale['500'])
         echo "<div style='text-align:center'><br />\n".$locale['510']."<br /><br />\n";
         echo "<a href='submit.php?stype=a'>".$locale['511']."</a><br /><br />\n";
         echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
         closetable()
      }
   } else {
      if (isset($_POST['preview_article'])) {
         $article_cat = isnum($_POST['article_cat']) ? $_POST['article_cat']: "0";
         $article_subject = stripinput($_POST['article_subject'])
         $article_snippet = phpentities(descript(stripslash($_POST['article_snippet'])))
         $article_body = phpentities(descript(stripslash($_POST['article_body'])))
         $breaks = (isset($_POST['line_breaks']) ? " checked='checked'" : "")
         opentable($article_subject)
         echo (isset($_POST['line_breaks']) ? nl2br($article_body) : $article_body)
         closetable()
         tablebreak()
      }
      if (!isset($_POST['preview_article'])) {
         $article_cat = "0";
         $article_subject = "";
         $article_snippet = "";
         $article_body = "";
         $breaks = " checked='checked'";
      }
      $cat_list = ""; $sel = "";
      add_to_title($locale['global_200'].$locale['500'])
      opentable($locale['500'])
      $result = dbquery("SELECT * FROM ".DB_ARTICLE_CATS." WHERE ".groupaccess("article_cat_access")." ORDER BY article_cat_name")
      if (dbrows($result)) {
         while ($data = dbarray($result)) {
            if (isset($_POST['preview_article'])) { $sel = $article_cat == $data['article_cat_id']? " selected" : ""; }
            $cat_list .= "<option value='".$data['article_cat_id']."'".$sel.">".$data['article_cat_name']."</option>\n";
         }
         echo $locale['520']."<br /><br />\n";
         echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=a' onsubmit='return validateArticle(this)'>\n";
         echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
         echo "<td width='100' class='tbl'>".$locale['521']."</td>\n";
         echo "<td class='tbl'><select name='article_cat' class='textbox'>\n$cat_list</select></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['522']."</td>\n";
         echo "<td class='tbl'><input type='text' name='article_subject' value='$article_subject' maxlength='64' class='textbox' style='width:300px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['523']."</td>\n";
         echo "<td class='tbl'><textarea name='article_snippet' cols='60' rows='3' class='textbox' style='width:300px;'>$article_snippet</textarea></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['524']."</td>\n";
         echo "<td class='tbl'><textarea name='article_body' cols='60' rows='8' class='textbox' style='width:300px;'>$article_body</textarea></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td align='center' colspan='2' class='tbl'><br />\n";
         echo "<input type='checkbox' name='line_breaks' value='yes'".$breaks." />".$locale['525']."<br /><br />\n";
         echo "<input type='submit' name='preview_article' value='".$locale['526']."' class='button' />\n";
         echo "<input type='submit' name='submit_article' value='".$locale['527']."' class='button' />\n</td>\n";
         echo "</tr>\n</table>\n</form>\n";
      } else {
         echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
      }
      closetable()
   }
} elseif ($_GET['stype']== "p") {
   if (isset($_POST['submit_photo'])) {
      require_once INCLUDES."photo_functions_include.php";
      $error = "";
      $submit_info['photo_title']= stripinput($_POST['photo_title'])
      $submit_info['photo_description']= stripinput($_POST['photo_description'])
      $submit_info['album_id']= isnum($_POST['album_id']) ? $_POST['album_id']: "0";
      if (is_uploaded_file($_FILES['photo_pic_file']['tmp_name'])) {
         $photo_types = array(".gif",".jpg",".jpeg",".png")
         $photo_pic = $_FILES['photo_pic_file'];
         $photo_name = strtolower(substr($photo_pic['name'], 0, strrpos($photo_pic['name'], ".")))
         $photo_ext = strtolower(strrchr($photo_pic['name'],"."))
         $photo_dest = PHOTOS."submissions/";
         if (!preg_match("/^[-0-9A-Z_\[\]]+$/i", $photo_name)) {
            $error = 1;
         } elseif ($photo_pic['size']> $settings['photo_max_b']){
            $error = 2;
         } elseif (!in_array($photo_ext, $photo_types)) {
            $error = 3;
         } else {
            $photo_file = image_exists($photo_dest, $photo_name.$photo_ext)
            move_uploaded_file($photo_pic['tmp_name'], $photo_dest.$photo_file)
            chmod($photo_dest.$photo_file, 0644)
            $imagefile = @getimagesize($photo_dest.$photo_file)
            if (!verify_image($photo_dest.$photo_file)) {
               $error = 3;
               unlink($photo_dest.$photo_file)
            } elseif ($imagefile[0]> $settings['photo_max_w']|| $imagefile[1]> $settings['photo_max_h']) {
               $error = 4;
               unlink($photo_dest.$photo_file)
            } else {
               $submit_info['photo_file']= $photo_file;
            }
         }
      }
      add_to_title($locale['global_200'].$locale['570'])
      opentable($locale['570'])
      if (!$error) {
         $result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('p', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')")
         echo "<div style='text-align:center'><br />\n".$locale['580']."<br /><br />\n";
         echo "<a href='submit.php?stype=p'>".$locale['581']."</a><br /><br />\n";
         echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
      } else {
         echo "<div style='text-align:center'><br />\n".$locale['600']."<br /><br />\n";
         if ($error == 1) { echo $locale['601']; }
         elseif ($error == 2) { echo sprintf($locale['602'], $settings['photo_max_b']) }
         elseif ($error == 3) { echo $locale['603']; }
         elseif ($error == 4) { echo sprintf($locale['604'], $settings['photo_max_w'], $settings['photo_max_h']) }
         echo "<br /><br />\n<a href='submit.php?stype=p'>".$locale['581']."</a><br /><br />\n</div>\n";
      }
      closetable()
   } else {
      $opts = "";
      add_to_title($locale['global_200'].$locale['570'])
      opentable($locale['570'])
      $result = dbquery("SELECT * FROM ".DB_PHOTO_ALBUMS." WHERE ".groupaccess("album_access")." ORDER BY album_title")
      if (dbrows($result)) {
         while ($data = dbarray($result)) $opts .= "<option value='".$data['album_id']."'>".$data['album_title']."</option>\n";
         echo $locale['620']."<br /><br />\n";
         echo "<form name='submit_form' method='post' action='".FUSION_SELF."?stype=p' enctype='multipart/form-data' onsubmit='return validatePhoto(this)'>\n";
         echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
         echo "<td class='tbl'>".$locale['621']."</td>\n";
         echo "<td class='tbl'><input type='text' name='photo_title' maxlength='100' class='textbox' style='width:250px;' /></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['622']."</td>\n";
         echo "<td class='tbl'><textarea name='photo_description' cols='60' rows='5' class='textbox' style='width:300px;'></textarea></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td valign='top' class='tbl'>".$locale['623']."</td>\n";
         echo "<td class='tbl'><input type='file' name='photo_pic_file' class='textbox' style='width:250px;' /><br />\n";
         echo "<span class='small2'>".sprintf($locale['624'], parsebytesize($settings['photo_max_b']), $settings['photo_max_w'], $settings['photo_max_h'])."</span></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td class='tbl'>".$locale['625']."</td>\n";
         echo "<td class='tbl'><select name='album_id' class='textbox'>\n$opts</select></td>\n";
         echo "</tr>\n<tr>\n";
         echo "<td align='center' colspan='2' class='tbl'><br />\n";
         echo "<input type='submit' name='submit_photo' value='".$locale['626']."' class='button' />\n</td>\n";
         echo "</tr>\n</table>\n</form>\n";
      } else {
         echo "<div style='text-align:center'><br />\n".$locale['551']."<br /><br />\n</div>\n";
      }
      closetable()
   }
} else {
   redirect("index.php")
}


require_once THEMES."templates/footer.php";
?>



 
keineWeb
derRobert
leider führ diese version dazu das ich zwar eine einsendung erstellen kann und bei einem klick auf einsenden wird nix eingesendet und ich werde auch nicht weiter geleitet im mittleren fenster erscheint nur der hintergrund
 
www.garkeine.deWeb

Thema verlinken
Soziale Netzwerke: Facebook Google Windows-Live Twitter Yahoo
URL:
BBcode:
HTML:
Facebook Like:


Springe ins Forum: