MyBB Community Forums

Full Version: message Editor Problem!?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
The Problem has been solved i just installed the editor you gave me...Do you still need my headerinclude?
It would be nice, I am trying to fix it for someone else now. Toungue

Also, a suggestion, you may want to increase the width of the editor.

Go to these templates: newreply, newthread, editpost

And search for:
<textarea name="message" id="message" rows="20" cols="70"

And change cols="70" to around 90. It will fit the width of the forum better.
Should look something liek this:
<textarea name="message" id="message" rows="20" cols="90" tabindex="3">{$message}</textarea>

You may have to play with it.
This is my Headerinclude

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
</script>
<link rel="shortcut icon" href="inc/favicon.ico">
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
{$stylesheets}{$css_button}
<script type="text/javascript">
<!--
	var cookieDomain = "{$mybb->settings['cookiedomain']}";
	var cookiePath = "{$mybb->settings['cookiepath']}";
	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var deleteevent_confirm = "{$lang->deleteevent_confirm}";
	var removeattach_confirm = "{$lang->removeattach_confirm}";
	var loading_text = '{$lang->ajax_loading}';
	var saving_changes = '{$lang->saving_changes}';
	var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
	var my_post_key = "{$mybb->post_code}";
	var imagepath = "{$theme['imgdir']}";
// -->
</script>
<script type="text/javascript">
function dismissANN(id)
{
	if(!$("Ann_"+id))
	{
		return false;
	}
	
	if(use_xmlhttprequest != 1)
	{
		return true;
	}

	new Ajax.Request("index.php?action=ann_dismiss", {method: "post", postBody: "ajax=1&my_post_key="+my_post_key+"&id="+id});
	Element.remove("Ann_"+id);
	return false;
}
</script>
{$newpmmsg}

<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/tabcontent.js">
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/tinybox.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($) {
    $(".tab_content").hide(); 
    $("ul.tabs li:first").addClass("active").show();
    $(".tab_content:first").show(); 
    $("ul.tabs li").click(function() {
        $("ul.tabs li").removeClass("active"); 
        $(this).addClass("active"); 
        $(".tab_content").hide(); 
        var activeTab = $(this).find("a").attr("href"); 
        $(activeTab).fadeIn();
        return false;
    });
});
</script>
Here, I modified your headerinclude a little. Jquery was the absolute first thing to load, which is not good. Only use jquery if you have to.
<link rel="shortcut icon" href="inc/favicon.ico">
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
{$stylesheets}{$css_button}
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/prototype.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/popup_menu.js?ver=1600"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">jQuery.noConflict();</script>


<script type="text/javascript">
<!--
    var cookieDomain = "{$mybb->settings['cookiedomain']}";
    var cookiePath = "{$mybb->settings['cookiepath']}";
    var cookiePrefix = "{$mybb->settings['cookieprefix']}";
    var deleteevent_confirm = "{$lang->deleteevent_confirm}";
    var removeattach_confirm = "{$lang->removeattach_confirm}";
    var loading_text = '{$lang->ajax_loading}';
    var saving_changes = '{$lang->saving_changes}';
    var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
    var my_post_key = "{$mybb->post_code}";
    var imagepath = "{$theme['imgdir']}";
// -->
</script>


<script type="text/javascript">
function dismissANN(id)
{
    if(!$("Ann_"+id))
    {
        return false;
    }
    
    if(use_xmlhttprequest != 1)
    {
        return true;
    }

    new Ajax.Request("index.php?action=ann_dismiss", {method: "post", postBody: "ajax=1&my_post_key="+my_post_key+"&id="+id});
    Element.remove("Ann_"+id);
    return false;
}
</script>
{$newpmmsg}

<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/tabcontent.js">
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/tinybox.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($) {
    $(".tab_content").hide();
    $("ul.tabs li:first").addClass("active").show();
    $(".tab_content:first").show();
    $("ul.tabs li").click(function() {
        $("ul.tabs li").removeClass("active");
        $(this).addClass("active");
        $(".tab_content").hide();
        var activeTab = $(this).find("a").attr("href");
        $(activeTab).fadeIn();
        return false;
    });
});
</script>
will it change anything? and Thank you Smile also i was wondering how do it make the sides join up with the background on my menu?

[Image: d204924722660db5312f8e9b893b1add.png]
It will not change a thing other then make your site load faster.

And to remove the gap, its kind of a hack way (negative margin) since you have a 20px border around everything, but it works.

Add the below to .menu ul in your stylesheet.
margin-left: -20px;
margin-right: -20px;
Thanks for the Header it runs so much faster now Smile & that "margin-left: -20px;
margin-right: -20px;" didn't work Sad

Sorry it did work Smile
@ thexshadow - why is using jquery a "good idea"?

If you mean lots of easy to include scripts - then I agree it makes it easier - but as the MyBB 1.6 core files require Prototype you are advocating loading two javascript libraries as a good idea - and that isn't a good idea at all as it slows page load.
(2014-03-29, 11:43 PM)Leefish Wrote: [ -> ]@ thexshadow - why is using jquery a "good idea"?

If you mean lots of easy to include scripts - then I agree it makes it easier - but as the MyBB 1.6 core files require Prototype you are advocating loading two javascript libraries as a good idea - and that isn't a good idea at all as it slows page load.

Sorry, I should rephrase what I said. Only use jquery if you absolutely you have to. But in his case he had to, since one of his plugins requires it.
Agreed Big Grin

Your reset of the headerinclude will indeed improve his pageloading - repped.
Pages: 1 2