 |

Michael Blake
User
Nov 29, 2007, 1:34 AM
Post #1 of 14
(1391 views)
Shortcut
|
Hi, I'm likely to purchase CMS Builder later today (if i survive Christmas Shopping with my wife ) Just a quick question, looking at the demo it appears that the css styles are inline rather than using a global css, is that the case and if so can I change that to refer to my main site css file? Thanks, Mickey
|
|
|  |
 |

Dave
Staff
/ Moderator

Nov 29, 2007, 1:44 PM
Post #2 of 14
(1338 views)
Shortcut
|
You can use a global CSS. We're in the middle of transitioning our own site to CMS Builder and we use a global CSS. I think what we're doing for our own site is using the default formats (h1, h2, etc) and giving default styles to those. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

steve_e
User
Mar 16, 2008, 11:34 AM
Post #4 of 14
(1008 views)
Shortcut
|
Is it possible that someone will write a tutorial on how to link a global stylesheet into the CMS editor?
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 16, 2008, 8:51 PM
Post #5 of 14
(1003 views)
Shortcut
|
I'm sure we can help you out! Can you give me some more details about what you trying to do and how you want it to work? Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

steve_e
User
Mar 17, 2008, 12:25 AM
Post #6 of 14
(1001 views)
Shortcut
|
Hi Dave - Hmm. Well perhaps it might be possible to have either a second drop down box (as the one that allows you to select Heading 1) but which shows the main styles set up in the external style sheet for a particular site, or alternatively, if there isn't room for two drop down boxes, for you to be able to select and change what styles show up in that drop down box - ie the default styles as you already have it, or the external (global) style sheet as you have set up for your site? That way it would be possible to use standard markup or your own stylesheet as needed if that makes sense?
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 17, 2008, 9:47 AM
Post #7 of 14
(998 views)
Shortcut
|
Ok, which version are you running? v1.10? Try this: Open /lib/menus/default/edit_functions.php and search for "theme_advanced_buttons1". That line specifies the first row of buttons for the tinymce wysiwyg. You can see a list of possible buttons here: http://wiki.moxiecode.com/index.php/TinyMCE:Control_reference Add "styleselect," to the beginning of that value like this:
theme_advanced_buttons1 : "styleselect,formatselect,fontsizeselect,bold... This will add a pulldown for css classes the user can style content with. If you like you can remove formatselect and/or fontsizeselect to remove the wysiwyg pulldowns for format and size. Next, replace /css/wysiwyg.css with the attached wysiwyg.css file. It's from v1.11 (not yet released) is updated to work with the latest TinyMCE version. You'll see at the bottom of that file a place where you can add classes. Just add classes there and they'll show up in the wysiwyg pulldown. You can either link to this file from your website or copy and paste the classes you want from your website css file to this one. Hope that makes sense. Let me know if you have any more questions on that or if you need more detail! :) Dave Edis - Senior Developer interactivetools.com
|
|
Attachments:
|
wysiwyg.css
(1.54 KB)
|
|
|  |
 |

steve_e
User
Mar 18, 2008, 6:35 AM
Post #8 of 14
(986 views)
Shortcut
|
Hi Dave - Brilliant, perfect, many thanks! It works seamlessly and the source code looks great as well. Exactly what I wanted! Regards, Steve.
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 18, 2008, 9:23 AM
Post #9 of 14
(980 views)
Shortcut
|
Great, glad to hear it. Just make sure when you upgrade that you don't overwrite that file with your changes. It might be a good idea to keep a backup copy in the same dir: wysiwyg.css.backup Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

steve_e
User
Mar 22, 2008, 4:43 AM
Post #10 of 14
(899 views)
Shortcut
|
This is just a note that might be of interest to anyone else wanting to install site styles as above. There seems to be something strange about the way Firefox responds to changes to this Wysiwyg file, in that it doesn't immediately show the changes. I guess it must be something to do with the caching of css files but I can't find any way to change it and it puzzled me until I realised it was the browser, not something I was doing wrong. After editing the wysiwyg file to add styles or remove them, the edits aren't shown in the dropdown window - it still shows the old classes or indeed no classes if you've just edited them in for the first time. This isn't altered by refreshing the screen or by exiting FF and starting it up again. It *does* update in its own time, which could be next day. Maybe someone could tell me if there are any obvious options to change in FF, but it made me doubt my sanity for a while. When I realised it was a time delay, I tried doing the same thing in IE7 and found it updated immediately. So I'm having to use IE7 to test out my edits for the moment. Hope this helps!
|
|
|  |
 |

MikeB
Staff
/ Moderator

Mar 24, 2008, 11:16 AM
Post #11 of 14
(782 views)
Shortcut
|
Hi Steve, Thanks for the update! I'm glad to hear you were able to get this up and running and hopefully if anyone runs into this same issue in Firefox, your post will provide some details about this for them. While I'm not sure of any specific setting that can be changed you can also try clearing out your browser cache and then refresh the page to see if you get the results you're looking for. Thanks Steve! Cheers, Mike Briggs - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 25, 2008, 12:07 AM
Post #12 of 14
(766 views)
Shortcut
|
Hi Steve, Yea, you're right it's a CSS caching issue. I've had it happen too, and it is annoying. :( Here's a few ways to deal with it: 1) You can clear your cache in FireFox (Tools > Options > Privacy > Clear Now... > [X] Cache). 2) You can have it add a random number to the end of the wysiwyg.css url in tinyMCE.init to trick the browser into not caching the CSS (see TinyMCE docs on that here). We haven't done this one because most of the time you want it cached because it's faster. 3) Or for development, this is the trick I use. I load the CSS url directly in my browser (or .js file, those stuck in the cache too). The url would be something like this: http://yoursite.com/cmsAdmin/css/wysiwyg.css Usually, even that shows the old code, but reloading _that_ file (the .css file) refreshes it in the cache and shows the latest version on the screen. Then it works. And fortunately you only need to do that in development. I'll give it some thought to see if we can come up with some way make that simpler... Hope that helps! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

steve_e
User
Mar 25, 2008, 12:25 AM
Post #13 of 14
(763 views)
Shortcut
|
Hi both - Thanks for this. It's not a problem really, once you realise what's going on, but after giving up and going to bed, then getting up the next day to find the fairies had apparently fixed what wasn't working the night before made me gibber for a little while until I'd worked it out! :) It's easy enough to keep an IE window open to see the results immediately though. Thanks for the suggestions!
(This post was edited by steve_e on Mar 25, 2008, 12:27 AM)
|
|
|  |
 |

Dave
Staff
/ Moderator

Mar 25, 2008, 12:46 AM
Post #14 of 14
(759 views)
Shortcut
|
Thanks for the update, glad to hear you have a system worked out. :) PS: The magic internet fairies have fixed many a problem for me as well. And yes, when things start "magically" working it can be pretty confusing! heh Take care, :) Dave Edis - Senior Developer interactivetools.com
|
|
|  |
|