Skip to main content

Posts

Showing posts with the label Drupal

SEO is officially dead

Yes, I know we're all tired of hearing that some technology is dead. Wired was wrong about the web dying in 1997 and 2010. Truth be told Wired isn't exactly good at identifying mortality. Phone calls aren't dead, the desktop isn't dead, cyberspace isn't dead, drm isn't dead, wifi isn't dead, guitar hero isn't dead and DRM isn't dead, yet (though Zuckerman is trying his best). Well, they were right about the floppy disk. Wait. That wasn't my point. My point was that SEO is *actually* dead. Here's why. Several minutes ago I google "fckeditor background marinelli". I find a solution that works . Using it I figure out a better way. I blog it . I hit the back button to review the search results again. My blog entry (I just typed) is result six. http://lmgtfy.com/?q=fckeditor+background+marinelli SEO is dead. Long live content. Thank you Google Instant.

Theming fckeditor to work with Marinelli Drupal Theme

Marinelli, a nearly flawless Drupal theme has one major flaw. It is not optimized to work with the fckeditor WYSIWYG editor. There are others as well. Some googling located some good tips for configuring modules/fckeditor/fckeditor.config.js to work with Marinelli on http://drupal.fckeditor.net/tricks . This solution is good, but it doesn't work well in multi-site situation or if more than one theme is enabled. Here is a simpler solution: Go to admin/settings/fckeditor and select "edit" next to the profile you want to fix. Make sure under "Style and template files" your Editor CSS is set to "Use theme CSS" Under "Advanced Options", find "Custom javascript configuration" and paste the following: FCKConfig.BodyId = "primary"; FCKConfig.BodyClass = "singlepage"; FCKConfig.EditorAreaStyles = "body{background:#FFFFFF;text-align:left;font-size:0.8em}"; Spank "Save" If you are running...

Using Drupal Feeds Module to Import Content from MS Access

Feeds works brilliantly, but there is a couple weird gotchas when working from MS Access to Drupal that are worth documenting: Seems self-explanatory, but since you are importing as .txt or .csv make sure you remove all carriage returns .  In MS Access this involves writing an update query and doing a replace on all Chr(10) and Chr(13).  e.g. Replace(Replace([myfield],Chr(10),"<br />"),Chr(13),"<br />")   Although CCK Date fields import perfectly as MS Access dates, published dates do not.  This is because the published field in Drupal is a Unix Timestamp which is a quite different than Access dates.  The easiest way I know to fix this is to export your data to Excel and then use the Excel integer date value to convert to a Unix Timestamp. We've all seen this right?  That really long integer you see when you misformat a date?  Anyway, to fix you need to first account for the difference between the start dates of the two time systems and ...

Working with Views Templates in Drupal

Working with Views can be a little confusing for anyone new to Drupal. Don't get me wrong, Views is an absolutely brilliant piece of programming (thanks merlinofchaos!), but there are so many options that finding the correct toggle can be daunting. And no matter how brilliant, eventually you'll discover you've outgrown all available options in rewriting and variable usage and you need to figure out how to modify values via php. The answer? Views templates. And Views helps you out there too! And How For this example we are going to focus on one specific problem: creating a list of image thumbnails. In our hypothetical we have extended a node type via cck to include an image upload called [field_image_value] that we display when viewing the full node.  When each node is created a thumbnail is auto-created via the IMCE Plugin on upload. We've given them a suffix of _thumbnail such that our-image-filename.jpg becomes thumbnail our-image-filename_thumbnail.jpg . ...

Making Code Samples Readable Online

After lazily just pasting code in <pre> blocks for years, this morning I finally got around to researching a code highlighter like you see on almost all the programming websites. Thanks to SyntaxHighlighter adding this feature was embarrassingly easy. It is self-contained javascript that works on a pre or script tag decorated with a html class calling a brush alias, e.g. <pre class="brush: sql"> INSERT INTO MyWebsite (pre, script) VALUES (complete, awesomeness) </pre> Oh, but it's not just SQL, no there's a whole easel of brushes included: Brush name Brush aliases File name ActionScript3 as3, actionscript3 shBrushAS3.js Bash/shell bash, shell shBrushBash.js C# c-sharp, csharp shBrushCSharp.js C++ cpp, c shBrushCpp.js CSS css shBrushCss.js Delphi delphi, pas, pascal shBrushDelphi.js Diff diff, patch shBrushDiff.js Groovy groovy shBrushGroovy.js JavaScript ...

Learning the Hard Way: Installing Drupal on XP

Open Source on Closed Source. Probably a bad idea from the start. Installing Drupal hearkened back to the old days of computing. Way too much jargon and far too little push-a-button-and-it-works. But I'm sold on the Drupal. If I wasn't, I wouldn't have made it through the past two hours trying to install it (I'm tempted to say her here, which suggests a certain love-hate relationship is already evolving). Drupal installations should be straight forward. Lullbot manages the whole install in one five minute video that I would highly recommend. My installation took significantly longer. LESSONS LEARNED GOTCHA #1 MySQL - At least in my instance the directions for setting permissions given in INSTALL.mySQL.txt were not sufficient to allow the database creation scripts to run. Command provided in INSTALL.mysql.txt: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON databasename.* TO 'username'@'localh...