Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.8][bug] $theme['editortheme'] is null #662

Closed
ATofighi opened this issue May 31, 2014 · 9 comments
Closed

[1.8][bug] $theme['editortheme'] is null #662

ATofighi opened this issue May 31, 2014 · 9 comments
Assignees
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:bug Type: Bug. An issue causing error / flaw / malfunction
Milestone

Comments

@ATofighi
Copy link
Contributor

Hi,
In admin/inc/class_page.php line 774 ( https://github.com/mybb/mybb/blob/feature/admin/inc/class_page.php#L774 )
$theme['editortheme'] is null, it must be mybb.css


Fixes in #663

@ATofighi ATofighi mentioned this issue May 31, 2014
@martec
Copy link
Contributor

martec commented May 31, 2014

sorry @ ATofighi but this not fix.
Load twice mybb.css...
But need load instead jquery.sceditor.default.min.css to style blockquote etc... (http://i.imgur.com/hZUOtKZ.png)

http://i.imgur.com/bLSHIEk.png
i get image above in www.sceditor.com

you can check that minified/themes/default.min.css and minified/jquery.sceditor.default.min.css not are same file.

And you can check too sceditor plugin to mybb made by samclarke that load two style different.

@ATofighi
Copy link
Contributor Author

ATofighi commented Jun 1, 2014

@martec please see codebuttons template and source of new thread page

<link rel="stylesheet" href="jscripts/sceditor/editor_themes/mybb.css" type="text/css" media="all" />
<script type="text/javascript" src="jscripts/sceditor/jquery.sceditor.bbcode.min.js"></script>
<script type="text/javascript" src="jscripts/bbcodes_sceditor.js"></script>
<script type="text/javascript" src="jscripts/sceditor/editor_languages/en.js"></script>
<script type="text/javascript">
$(function() {
    $("#message").sceditor({
        plugins: "bbcode",
        style: "jscripts/sceditor/editor_themes/mybb.css",
        rtl: 0,
        locale: "en",
        emoticons: {
            // Emoticons to be included in the dropdown
            dropdown: {
                ":s": "images/smilies/confused.png",
                ":-/": "images/smilies/undecided.png",
                ":)": "images/smilies/smile.png",
                ";)": "images/smilies/wink.png",
                ":D": "images/smilies/biggrin.png",
                ":P": "images/smilies/tongue.png",
                ":(": "images/smilies/sad.png",
                ":@": "images/smilies/angry.png",
                ":blush:": "images/smilies/blush.png",
            },
            // Emoticons to be included in the more section
            more: {
                ":angel:": "images/smilies/angel.png",
                ":dodgy:": "images/smilies/dodgy.png",
                ":exclamation:": "images/smilies/exclamation.png",
                ":heart:": "images/smilies/heart.png",
                ":huh:": "images/smilies/huh.png",
                ":idea:": "images/smilies/lightbulb.png",
                ":sleepy:": "images/smilies/sleepy.png",
                ":cool:": "images/smilies/cool.png",
                ":rolleyes:": "images/smilies/rolleyes.png",
                ":shy:": "images/smilies/shy.png",
                ":at:": "images/smilies/at.png"
            }
        },
        toolbar: "bold,italic,underline,strike|left,center,right,justify|font,size,color,removeformat|horizontalrule,image,email,link,unlink|video,emoticon|bulletlist,orderedlist|code,quote|maximize,source",
    });

    MyBBEditor = $("#message").sceditor("instance");
});
</script>

it is mybb.css not jquery.sceditor.default.min.css :)
But jquery.sceditor.default.min.css is missed.

@martec
Copy link
Contributor

martec commented Jun 1, 2014

@ATofighi

what you trying say? not change anything... this above call jscripts/sceditor/editor_themes/mybb.css twice...
plz check what i said in #667, #668 and #420

@ATofighi
Copy link
Contributor Author

ATofighi commented Jun 1, 2014

@martec mybb.css use in link tag and style: , please see codebuttons template.
but jquery.sceditor.bbcode.min.js only use in link tag.

@martec
Copy link
Contributor

martec commented Jun 1, 2014

@ATofighi
don´t correct...
you need check plugin made by @samclarke, author of sceditor.
https://github.com/samclarke/SCEditor-MyBB

link is used to style editor (mybb.css)...
and "style:" used to style codeblock, quoteblock etc (jquery.sceditor.default.min.css)...

@martec
Copy link
Contributor

martec commented Jun 1, 2014

@ATofighi

i will repeat here what i said in #667

Quote tag without jquery.sceditor.default.min.css
http://i.imgur.com/JcFmTjl.png

Quote tag with jquery.sceditor.default.min.css
http://i.imgur.com/hZUOtKZ.png

In http://www.sceditor.com/

link
http://i.imgur.com/tp1rwXO.png minified/themes/default.min.css (is same of mybb.css (customization of default.css))

"style:" into script: http://i.imgur.com/bTyYjf8.png minified/jquery.sceditor.default.min.css (not same file above) (this used to style code, quote blocks)
but better used jquery.sceditor.mybb.css from sceditor mybb plugin (this customization of file jquery.sceditor.default.min.css) has betteer style to codeblock and blockquote. #668 or say to @justinsoltesz to made one better style (customizaton of file jquery.sceditor.default.min.css)

@ATofighi
Copy link
Contributor Author

ATofighi commented Jun 1, 2014

OK. ;)

@DiogoParrinha DiogoParrinha added this to the 1.8 Beta 2 milestone Jun 1, 2014
@DiogoParrinha
Copy link
Contributor

I think there is a bit of confusion here. The issue is simple: $theme is not defined (we're not globalizing it and I'm not sure if it's even defined in the ACP - I doubt) and we simply hardcode the theme as mybb.css - missing stylesheets or minified stylesheets should belong in another issue.

@DiogoParrinha
Copy link
Contributor

Merged yo PR, closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:bug Type: Bug. An issue causing error / flaw / malfunction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants