Tag Archive for 'Drupal'

Improving Tinymce interface for Drupal

A recent Drupal setup required a WYSIWYG editor, and so the TinyMCE module was called upon yet again. After everything was set up, I was reminded how ugly the TinyMCE toolbar is. It added functionality, but made things look unfinished. Something needed to be done, and I was glad to find, that someone else had already done it.

A fellow designer did some work re-styling the buttons and toolbar to resemble the WordPress editor. You can check out his article here. I found that his stylesheets didn’t work for me (he probably used a different Drupal/TinyMCE version), but a little bit of tweaking led to some fixes, as well as some improvements. The final product should look like this:

The instructions for doing this are pretty simple, and don’t require any changes to core or the module files. You should, however, set up the module before attempting these steps.

  1. Append the contents of the style.css file to the end of your active theme’s stylesheet (copy/paste).
  2. Place the tinymcebutton.png file in your active theme’s directory.
  3. Place the tinymce.css file in your active theme directory.
  4. In Drupal, navigate to Administer > Site Configuration > TinyMCE
  5. Click “edit” next to your profile.
  6. In the CSS section, set “Editor CSS” to “define css”, and “CSS path” to “%ttinymce.css”.

I am using Drupal 5.7, TinyMCE module 5.x-1.9, and TinyMCE 3.1.0.1.

The stylesheets aren’t very large, so with a little bit of CSS knowledge, it should be easy to modify how the buttons look. If you make changes or have suggestions about this, let me know by leaving a comment.

Attachments:

style.css 1.81 KB
tinymce.css 699 bytes
tinymcebutton.png 545 bytes

Drupal RSS Feeds using Feedburner and Views

I recently was given the task of publishing RSS feeds in Drupal to iTunes. My organization does podcasting, and wants the shows to be discoverable using the search feature in iTunes. Using FeedBurner, I was able to manage the feed’s content pretty easily, controlling how it looked in feed readers, including iTunes. One of the shows is published through our Drupal site using the Views module, which gives a lot of options as to how we display it on our website.

The Views module already generates an RSS feed, but I needed that link to get redirected to the show’s FeedBurner page. Using the FeedBurner module for Drupal, this can be done, but I didn’t find very good instructions for doing it when using a feed generated by the Views module. Well, I figured it out, and hope to enlighten someone looking for answers with a quick walkthrough of the process.

Once you’ve set up your View, go into its settings and do the following:

  1. Scroll down to the Arguments section.
  2. Add the following Argument: “Node: Feed Selector”*.
  3. Change the Default dropdown to “Display All Values”.
  4. Save your changes.

Views module settings
The URL of your feed becomes whatever your View’s URL is, with “/feed” tacked on to the end of it.

*A quick note: if you are not redirecting your feed’s URL, use the “RSS: RSS Feed Selector” argument with the same Default value.

Now you can set up FeedBurner using that URL. To redirect it, we will use the FeedBurner module. Go to the module’s settings page (Administer > Site Building > FeedBurner). Click on the “Add feed redirection” link, and fill in the two fields with your local and feedburner URLs.

FeedBurner module settings

I actually had a problem using my local URL at first, because it starts with “?q=”. When I left that part out, the module was able to create the redirection, and it worked fine.

The end. And hopefully you live happily ever after!