Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Editor skins?
Avatar
Halo Diehards
Member
Free Members
sp_UserOfflineSmall Offline
Sep 26, 2014 - 5:55 pm

I've been spending quite a few hours designing a dark-themed skin for my site, and the glaringly bright editor isn't fitting in well. Is there a how-to somewhere that shows me how to change the css on the editor? Anything I try to do doesn't want to take.

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Sep 26, 2014 - 6:04 pm

It's going to be a hell of a job to style the editor. However, I know that on http://www.tinymce.com there are some plugins that might enable you to style it relatively easily. Not tried them out though so can't guarantee they work OK, and not sure how they work..

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 26, 2014 - 6:11 pm

actually, you can create your own skin fairly easily...  just copy the one from our plugin... adjust the skin.min.css file as needed (you might want to explode it first)...

then tell us to use your skin instead with the filter 'sph_tm_init' where  you would edit the skin_url and skin elements of the passed array...  if desired, you could also change fonts and images there too...

Avatar
Halo Diehards
Member
Free Members
sp_UserOfflineSmall Offline
Sep 27, 2014 - 1:48 am

Mr Papa said
actually, you can create your own skin fairly easily...  just copy the one from our plugin... adjust the skin.min.css file as needed (you might want to explode it first)...

then tell us to use your skin instead with the filter 'sph_tm_init' where  you would edit the skin_url and skin elements of the passed array...  if desired, you could also change fonts and images there too...

 

"copy the one from our plugin"

1. Can you tell me where I find that or what it's called? I see two sp-text-editor.php files, is it one of those or do I copy the entire "editor" folder, or...?

2. And once I copy it, then where does it go? In my child theme's root folder?

"adjust the skin.min.css file as needed (you might want to explode it first)..."

3. What is 'explode it'?

4. I did a file search for skin.min.css and didn't find it in simple-press.

then tell us to use your skin instead with the filter 'sph_tm_init' where  you would edit the skin_url and skin elements of the passed array...  if desired, you could also change fonts and images there too...

5. This 'sph_tm_init' is a filter I add somewhere in the editor? Where would I put it?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 27, 2014 - 2:59 am

in our tinymce plugin...  so by default, wp-content/sp-resources/forum-plugins/tinymce-richtext/resources/skins

there you will see our SPlightgray skin...  I was suggesting to copy it to your own writable location (but not within the plugin) such as wp-content/sp-resources...  rename it...

and then edit the skin.min.css file...  by explode, I mean its a minified file and will be hard to read... explode something like:

http://mrcoles.com/blog/css-unminify/
http://cssunpacker.com/

but that is the file you need to edit... 

then use the filters I mentioned to tell us to use your own theme vice ours...  happy to walk you through it more if needed...

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Sep 27, 2014 - 5:03 am

Mr Papa said
actually, you can create your own skin fairly easily...  just copy the one from our plugin... adjust the skin.min.css file as needed (you might want to explode it first)...

then tell us to use your skin instead with the filter 'sph_tm_init' where  you would edit the skin_url and skin elements of the passed array...  if desired, you could also change fonts and images there too...

Well how about that.. learning something new everyday!

Avatar
Halo Diehards
Member
Free Members
sp_UserOfflineSmall Offline
Sep 28, 2014 - 2:15 pm

Ok, great instructions, by the way, very easy to follow :D

I've created a new folder in sp-resources called "forum-editor-skins" and copied the SPlightgray folder into it, renaming it neonnights, so:

sp-resources/forum-editor-skins/neonnights <<akaSPlightgray

And just to verify: Do ALL of SPlightgray's files go in there, or only skin.min.css?

Speaking of skin.min.css, I'm still not positive what minify is (is that where the code is all squounched up with no paragraphs instead of in nice, tidy lines?), but when I opened skin.min.css from SPlightgray in NotePad++ it looked just like any other css...?

So now I'm at the filter part.

Mr Papa said

then use the filters I mentioned to tell us to use your own theme vice ours...  happy to walk you through it more if needed...

 

When you say "us" do you mean "Simple Press" or are you referring to something else? And yes, please on the walking me through it part. I have no idea where to put sph_tm_init or how to edit the skin_url with it. I don't need to change the font or images, just get a dark theme to match my site (I won't need help with the css). 

I played with that editor theme creator Ike suggested, and came up with a really cool design for it! So it won't just be dark and match, it will be awesome ^^

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 28, 2014 - 4:56 pm

yes, copy all the files...

yes, minify means to make the file size as small as possible, ie remove spaces, comments, etc that dont actually have any real function except readability...

Its possible our skin file is not actually minified, but tinymce expects it...  have not checked... but if its readable and editable, go with it - no need to unminify...

tell us means use the filter and change the values to what  you want...

how wp filters work:  http://codex.wordpress.org/Plugin_API

so something like:

add_filter('sph_tm_init', 'my_tinymce_init');
    function my_tinymce_init($tiny) {
    $tiny['skin_url'] = 'xxxxx';
    $tiny['skin'] = 'yyyyy';
    $tiny['content_css'] = 'zzzzz';
}

just replace xxxxx, yyyyy and zzzzz with your values...  skin url points to your skin dir...  skin is name of your skin (ie the dir name in the skin url)...  and content_css points to the content.css file of you skin...  in ours, that is sp-content.css (its full path and name)...

Avatar
Halo Diehards
Member
Free Members
sp_UserOfflineSmall Offline
Sep 29, 2014 - 6:44 pm

Ok, so you're saying we're basically writing a plugin, but it's a plugin for a plugin, so where do I put that php code? In my child theme's function.php? The Simple Press "Creating a Plugin" page in the Codex is blank.

https://simple-press.com/docum.....-a-plugin/

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 29, 2014 - 8:50 pm

you could just put it in your spFunctions.php of your sp theme...  no need for a plugin...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625