Skip to content

drupal

jQuery corner plugin = rounded corners solution?

So I just checked the jQuery Corner plugin, which I've seen used in the Acquia/TNT/Fusion themes, and its a plugin that adds rounded corners to blocks without using images.

I've just been playing around with it and now I'm thinking where were you when I started putting 28 rounded corners images in a css sprite image and control them with dozens of lines of CSS selectors.

The reason why this type of plugin is so nice with Drupal is that it works perfectly even under these common situations:

Does spam thrive during economic decline?

Are laid off IT workers discovering that sending spam is easier than getting a job these days? It sure seems that way, even with mollom running on all forms around a hundred spam comments get through every week, and they seem to get more clever every time.

I just found the following comment below my review of the Drupal 6 Javascript and jQuery book:

Submitted by san diego real estate (not verified) on Wed, 10/21/2009 - 18:55.
The only reason why I like this book is that this book developers deep into the usage of jQuery in themes and modules and there is interesting stuff in there for developers of any experience.

I can understand mollom didn't get that message because even I thought it was a real comment. I was much surprised to

Releasing a new basetheme!



Sooperthemes.com Basetheme v2 Display

Thanks:

  • Paul O’B from Sitepoint Forums for helping with researching for my holy grail of flexible Drupal CSS layouts.
  • John Albin from the Zen theme, for being a leader in Drupal theming innovation, and particularly for the awesome body/node/block/node classes code and the block edit/configure links.
  • Stephanie and Chris from TopNotchThemes for thinking up some awesome theme settings
  • Al Steffen from Studio theme, for pushing the limits at turning a Drupal theme into a nice organized collection of files.
  • Jacine Rodriguez from Sky theme, for laying the groundwork for Typographical theme settings, and more cool code.
  • All the rest of the Drupal community for working together on a free software project!

Features:

  • Color module integration (CSS only)
  • Live-preview mode for tuning colors. Any action by the color picker is immediately visible on the layout
  • Complete layout control! Supports flexible width, fixed width, percentage based columns and blocks, and it all works in internet explorer too!
  • Layout automatically adapts to no-sidebar one sidebar or 2 sidebar pages (retaining the set sidebar width and resizing the content column)
  • CSS file caching for enforcement of the theme settings.
  • Dynamic regions (horizontally) scale any number of blocks to fit next to each other
  • Full typography control with Cufon engine for selecting/adding custom fonts
  • Comes with 18 free fonts!
  • Animated dropdown menus with jQuery Superfish integration
  • Dropdown menu is configurable through the theme settings form
  • Various jQuery scripts to help make your website look sharp
  • Nodetype specific theme settings for node links and taxonomy links (adapted from acquia_marina)
  • Well organized and valid CSS 2 stylesheet, just approx. 1.000 lines.
  • Accessible and semantic HTML code. (and Search Engine friendly, of course)

Download it on the Drupal.org project page: http://drupal.org/project/sooper_basetheme

Rationale:

This theme is the result of the work I've been doing, developing my drupal themes product line for sooperthemes.com, and it also includes many functions and classes that I have needed in the past 3 years, working as a freelance Drupal themer. I think the coolest part of the theme is the advancements I've made in recoloring themes, though this theme only uses the most basic parts of the color module, I've included some functions in the color/color-utility-functions.inc file that I currently use for my premium themes. It would be really cool if we could get a Color API in Drupal 7 to replace the color module, so that all the Color enthusiasts can collaborate to replace the old color.module.

The Cufon engine is also really cool, it's my first attempt to integrate Cufon with a Drupal theme. It was actually really easy, because you can just call upon Cufon with jQuery selectors. Cufon is a new competitor for sIFR, that uses VML and Canvas to replace browser text with embedded-font text.

The dynamic regions part is a simple solution to a complex problem, having a region that needs to have different CSS for every page that has a different number of blocks in this region. Basically it's just this:

// Widths of blocks in Dynamic regions
$precount = substr_count($vars['preblocks'], 'class="block ');
$postcount = substr_count($vars['postblocks'], 'class="block ');
$vars['postcount'] = $postcount;
$vars['precount'] = $precount;
if ($precount > 0) {
$prewidth = round(100/$precount,3);
}
if ($postcount > 0) {
$postwidth = round(100/$postcount,3);
}
$vars['blockwidths'] = <<

But then when you check it out in Internet Explorer you will find your blocks collapsing and stacking on top of eachother, but there is a very cool fix for this, a virtual buffer:

div.sooperblocks {
margin-right:-100px!important; /* Create an invisible space (buffer) to allow overflow without collapsing */
padding-right:100px!important;
}

I will explain further in another blog post!

Magento looking to "team up" with Drupal

Magento, the awesome ecommerce software that recently released their 1.0 stable, is interested in integration with Drupal.

I think Magento is great and it should be possible to integrate with Drupal, but to make this work well would be a very complex project.

6 steps to a fancy custom taxonomy menu with term images

This tutorial will outline the steps to create and
awesome looking taxonomy menu, using Imagecache, Taxonomy Image, Views, and
some SQL. I will make this blog post the first one to be labeled ‘expert' in my
skill level taxonomy, but that's really just there to look cool ;). I will
explain the code step by step, and if afterwards, all 11 (!) lines of code make
no sense at all, you can copy and paste the code.

Prerequisites:

Drupal Howto: Adding a nifty metadata box to your nodes

In this tutorial, we will be adding a container with
metadata about your node to our node template. To see what I mean, look at the
bottom of this node page. Code snippet is plug-and-play, so you can plug it
right into your custom theme, or one of my own Drupal themes.

The box in question can contain any node information
we want, such as link information, to ensure the blogosphere can link to us
effortlessly, or statistical data about our node (hits etc.).

For starters, we're going to add a simple container to
our node that contains a html link, a BBcode link, and the trackback url of our node. Open
up your node.tpl.php file, and add a new div element at the end:

Drupal Adsense Trick #2: adblocks between teasers

This article is the sequel to my first drupal
adsense article
. This time we're going to put adsense blocks in between
teasers, on for example our frontpage. Same as last time, this does not require
any modules, nor does it depend on adsense, it works with any phptemplate-based
theme and with all sorts of ad code.

For starters, we're going to create a new block
region. If there is not a template.php file in your theme folder, create one
and open it up. See if there is a block
regions function, if there is, add a new
block to it: 'betwteasers' =>
t('between teasers')

If you didn't find a block region function copy this
code into your template.php file (this code should be in between <?php and
?> tags):

function yourtheme_regions() {
return array(
'right' => t('right sidebar'),
'left' => t('left sidebar'),
'content' => t('content'),
'header' => t('header'),
'footer' => t('footer'),
'subnav' => t('subnav'),
'betwteasers' => t('between teasers'),
);
}

Theming Drupal Comments, Exemplifying with Garland

Part 1 - enhancing the
comment layout

When browsing the drupal showcase forum I notice that few people
take the effort the theme the comments, which is strange because comments are
not only a very popular feature, but also exceedingly easy to theme!. For this
comment theming tutorial we're going to spice up the comment template of the
default Garland theme with some additional styling and a date widget just like the one in my latest free drupal theme Delicious Fruit.

Announcing All Drupal Themes: Drupals ally in providing free professional themes

With this blog post I'm launching my new website, sooperthemes.com . I made this site firstly, because I've heard many complaints about Drupal having comparatively very few goodlooking themes. The second reason for making this site is that I have used drupal and it's modules so much without being able to give much in return, as my php skills are not (yet) sufficient to write good standards-compliant modules.

Whats on sooperthemes.com now:

Whats coming up the coming 2-3 weeks:

  • plenty more tutorials, some more advanced theming topics probably
  • 2 more themes, a port of Delicious Fruit by Dieter Schneider, which is an excellent example of a Drupal site that doesn't look like a cookie-cutter CMS site! and a port of Judgement, a free theme that will demonstrate that with some advanced theming, drupals frontend and backend output can be displayed in a slick looking envelope-size brochure website design.
  • Request-a-theme form

Please keep in mind that this site and the themes are brand new and not tested by anyone but me. If you find any bugs in the site, or in the themes, please use the contact form. Any feedback is much appreciated! I will also submit these themes to project/Themes (once I figure out how that works).

Some more background info in the readmore>>