Foren Probleme mit IE - Corleone - 06.02.2010
Guten Abend,
ich habe ein Problem mit dem Internet Explorer und zwar geht es darum,
das in manchen Themen,nur der erste Beiträge bzw auch meistens nur die hälfte
angezeigt wird und sogar die Sofortnachricht nicht erscheint.
Mit dem Browser Firefox geht alles einwandfrei.
#
MFG Corle
RE: Foren Probleme mit IE - Kenny - 06.02.2010
Ebenfalls einen guten Abend.
Entschuldige bitte, aber zu deiner Anfrage fällt mir nur das hier ein: https://www.mybb.de/forum/thread-11940.html
RE: Foren Probleme mit IE - Corleone - 07.02.2010
Sry,bin davon ausgegangen,das fast jeder die neuste Mybb Forensoftware hat.
Also,ich benutze Mybb 1.4.11
Habe jedesmal nur von der alten version geupdatet,also von 1.4.10 auf 1.4.11.
MySQL 5
PHP 5
http://mystical.kilu.de/
Jetzt nochmal zum Problem,hier wird in dem Beitrag.
Das Problem trit auf mit dem Plugin My Youtube (1.1).
Es gibt hiervon ja schon eine neue Version,aber diese Funktioniert garnicht bei mir.
Wie gesagt bei Mozilla Firefox läuft es einwandfrei, nur mal wieder nicht im IE.
MFG Corle
PS:Hier der Code vom Plugin
Code: <?php
/**
* My Youtube - A plugin that provide a custom button on editor toolbar
* and quick reply to embed video from Youtube
*
* License: GNU GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html)
*/
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB")) {
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$plugins->add_hook('newthread_start', 'my_youtube_edit_start');
$plugins->add_hook('newreply_start', 'my_youtube_edit_start');
$plugins->add_hook('editpost_start', 'my_youtube_edit_start');
$plugins->add_hook('showthread_start', 'my_youtube_showthread_start');
$plugins->add_hook('parse_message', 'my_youtube_parse_message');
function my_youtube_showthread_start() {
global $headerinclude;
$headerinclude .= _my_youtube_inject_quickreply();
}
/**
* Function which describe plugin information
*
* @return array
*/
function my_youtube_info() {
return array(
"name" => "My Youtube",
"description" => "A plugin that add custom button on editor toolbar and quick reply to embed youtube video into a post",
"website" => "http://rioastamal.net/mybb/my-youtube/",
"author" => "Rio Astamal",
"authorsite" => "http://rioastamal.net/",
"version" => "1.1",
"guid" => "00ae12ac5a32288a6f791a4b675288d1",
"compatibility" => "14*"
);
}
function my_youtube_activate() {
}
function my_youtube_deactivate() {
}
function my_youtube_parse_message($post_message) {
$replacement = '<object width="$1" height="$2"><param name="movie" value="http://$3/v/$4&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://$3/v/$4&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="$1" height="$2"></embed></object>';
$post_message = preg_replace('@\[my\-youtube\s+width=([0-9]+)?\s+height=([0-9]+)?\]http://([^<>\'"]+)/watch\?v=([^<>\'"]+)\[/my\-youtube\]@i', $replacement, $post_message);
}
function my_youtube_edit_start() {
global $headerinclude;
// print "<pre>";print (htmlentities(print_r($templates->get('headerinclude'), TRUE)));
$headerinclude .= _my_youtube_inject_toolbar();
}
function _my_youtube_inject_quickreply() {
global $mybb;
$youtube_logo = $mybb->settings['bburl'] . '/inc/plugins/my_youtube/youtube-logo.png';
$js = '
<!-- start: My Youtube -->
<style type="text/css">
.my-youtube-toolbar {
padding: 1px;
border:1px solid transparent;
width:40px;height:17px;
margin: 2px 0 2px 0;
float:left;
}
a:hover.my-youtube-toolbar {
border: 1px solid #1e90ff;
background: #c1d2ee;
}
</style>
<script language="javascript">
window.onload = function() {
new Insertion.Before("message", \'<a onclick="my_youtube_add_video()" href="javascript:void(0);" title="Embed Youtube Video" class="my-youtube-toolbar"><img src="' . $youtube_logo . '" alt="Youtube Logo" title="Embed Youtube Video" /></a>\');
}
</script>' .
_my_youtube_js_perform_insert() .
_my_youtube_js_add_video() . '
<!-- end: My Youtube -->
';
return $js;
}
function _my_youtube_css_button() {
global $theme;
// well, i did not find an easy way to adding the button to toolbar so i just positioning it
// works good in Firefox 3 and Opera 9.6
$bg = '#c1d2ee';
if ($theme['editortheme'] == 'Office_2007') {
$bg = 'transparent url(jscripts/editor_themes/Office_2007/images/ui.gif) no-repeat -105px 0px;';
}
$css = '
<style type="text/css">
.my-youtube-toolbar {
position:absolute;
left: 350px; top: 8px;
padding: 1px;
border:1px solid transparent;
width:40px;height:17px;
/*z-index:999;*/
float:left;
}
a:hover.my-youtube-toolbar {
border: 1px solid #1e90ff;
background: ' . $bg . '
}
</style>
';
return $css;
}
function _my_youtube_inject_toolbar() {
global $mybb;
$youtube_logo = $mybb->settings['bburl'] . '/inc/plugins/my_youtube/youtube-logo.png';
$js = '
<!-- start: My Youtube -->
<script language="javascript">
window.onload = function() {
new Insertion.After("editor_toolbar_container_top", \'<a onclick="my_youtube_add_video()" href="javascript:void(0);" title="Embed Youtube Video" class="my-youtube-toolbar"><img src="' . $youtube_logo . '" alt="Youtube Logo" title="Embed Youtube Video" /></a>\');
}
</script>' .
_my_youtube_css_button() .
_my_youtube_js_add_video() . '
<!-- end: My Youtube -->
';
return $js;
}
function _my_youtube_js_add_video() {
$js = '
<script langugae="javascript">
function my_youtube_add_video() {
var ask_video = prompt("Please enter the video URL, i.e: \nhttp://www.youtube.com/watch?v=xxxxxxxxxxx");
if (!ask_video)
return ;
var vid_x = prompt("Please enter the width of the video:", "425");
if (!vid_x || isNaN(vid_x))
vid_x = 425;
var vid_y = prompt("Please enter the height of the video:", "344");
if (!vid_y || isNaN(vid_y))
vid_y = 344;
try {
// clickableEditor should already declared by MyBB
clickableEditor.performInsert("[my-youtube width=" + vid_x + " height=" + vid_y + "]" + ask_video + "[/my-youtube]", "", true, false);
} catch(e) {
// if not then use our function
performInsert("[my-youtube width=" + vid_x + " height=" + vid_y + "]" + ask_video + "[/my-youtube]", "", true, false);
}
}
</script>
';
return $js;
}
function _my_youtube_js_perform_insert() {
// this function I grabbed from jscripts/editor.js part of the MessageEditor Object
$js = '
<script language="javascript">
function performInsert(open_tag, close_tag, is_single, ignore_selection) {
var is_closed = true;
if(!ignore_selection) {
var ignore_selection = false;
}
if(!close_tag) {
var close_tag = "";
}
var textarea = $("message");
textarea.focus();
if(document.selection) {
var selection = document.selection;
var range = selection.createRange();
if(ignore_selection != false) {
selection.collapse;
}
if((selection.type == "Text" || selection.type == "None") && range != null && ignore_selection != true) {
if(close_tag != "" && range.text.length > 0) {
var keep_selected = true;
range.text = open_tag+range.text+close_tag;
} else {
var keep_selected = false;
if(is_single) {
is_closed = false;
}
range.text = open_tag;
}
range.select();
} else {
textarea.value += open_tag;
}
} else if(typeof(textarea.selectionEnd) != \'undefined\') {
var select_start = textarea.selectionStart;
var select_end = textarea.selectionEnd;
var scroll_top = textarea.scrollTop;
var start = textarea.value.substring(0, select_start);
var middle = textarea.value.substring(select_start, select_end);
var end = textarea.value.substring(select_end, textarea.textLength);
if(select_end - select_start > 0 && ignore_selection != true && close_tag != "") {
var keep_selected = true;
middle = open_tag+middle+close_tag;
} else {
var keep_selected = false;
if(is_single) {
is_closed = false;
}
middle = open_tag;
}
textarea.value = start+middle+end;
if(keep_selected == true && ignore_selection != true) {
textarea.selectionStart = select_start;
textarea.selectionEnd = select_start + middle.length;
} else if(ignore_selection != true) {
textarea.selectionStart = select_start + middle.length;
textarea.selectionEnd = textarea.selectionStart;
}
textarea.scrollTop = scroll_top;
} else {
textarea.value += open_tag;
if(is_single) {
is_closed = false;
}
}
}
</script>';
return $js;
}
?>
RE: Foren Probleme mit IE - L4rZ - 07.02.2010
Sicher das es sich um den neusten IE handelt?
RE: Foren Probleme mit IE - Corleone - 07.02.2010
Sicher is das die neuste VERSION,benutze auch Windows 7 .
|