Converted remaining hrefs to markdown
This commit is contained in:
parent
ef5c605335
commit
604cf84f9a
|
@ -8,7 +8,7 @@ tags:
|
|||
- Fancy Slide
|
||||
- Slideshow
|
||||
---
|
||||
Whilst updating my About page, I thought about creating a slideshow of several images instead of just the one static image. When I looking on Drupal.org, the only slideshow modules were to create slideshows of images that were attached to different nodes - not multiple images attached to one node. Then, I found the <a href="http://drupal.org/project/fancy_slide">Fancy Slide</a> module. It's a jQuery Slideshow module with features that include integration with the <a href="http://drupal.org/project/cck">CCK</a>, <a href="http://drupal.org/project/imagecache">ImageCache</a> and <a href="http://drupal.org/project/nodequeue">Nodequeue</a> modules.
|
||||
Whilst updating my About page, I thought about creating a slideshow of several images instead of just the one static image. When I looking on Drupal.org, the only slideshow modules were to create slideshows of images that were attached to different nodes - not multiple images attached to one node. Then, I found the [Fancy Slide](http://drupal.org/project/fancy_slide) module. It's a jQuery Slideshow module with features that include integration with the [CCK](http://drupal.org/project/cck), [ImageCache](http://drupal.org/project/imagecache) and [Nodequeue](http://drupal.org/project/nodequeue) modules.
|
||||
|
||||
I added an CCK Image field to my Page content type, and set the number of values to 3, then uploaded my images to the Page.
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@ tags:
|
|||
- CCK
|
||||
- ImageField
|
||||
---
|
||||
<strong>Thanks to Bob at <a href="http://mustardseedmedia.com/">Mustardseed Media</a> for <a href="http://twitter.com/mustardseedinc/status/14713096905">tweeting</a> about this module. It's undoubtedly saved me hours of work today alone!</strong>
|
||||
**Thanks to Bob at [Mustardseed Media](http://mustardseedmedia.com) for [tweeting](http://twitter.com/mustardseedinc/status/14713096905) about this module. It's undoubtedly saved me hours of work today alone!**
|
||||
|
||||
I've recently started a personal project converting a website to Drupal. It's currently a static HTML/CSS site which also uses the <a href="http://coppermine-gallery.net/">Coppermine Photo Gallery</a>. As part of building the new website, I wanted to move all the photos from the existing site onto the new one. However, with 1260 photos in 17 albums, this could have been a lengthy process!
|
||||
I've recently started a personal project converting a website to Drupal. It's currently a static HTML/CSS site which also uses the [Coppermine Photo Gallery](http://coppermine-gallery.net). As part of building the new website, I wanted to move all the photos from the existing site onto the new one. However, with 1260 photos in 17 albums, this could have been a lengthy process!
|
||||
|
||||
I created a new Drupal-powered Gallery as described in <a href="http://lullabot.com/articles/photo-galleries-views-attach">this screencast</a> by <a href="http://twitter.com/eaton">Jeff Eaton</a> - using the CCK and Imagefield modules, and re-created each of my existing Gallery nodes. Using the <a href="http://drupal.org/project/imagefield_import">Imagefield_Import</a> module, I was then able to quickly import the photos into the new Galleries.
|
||||
I created a new Drupal-powered Gallery as described in [this screencast](http://lullabot.com/articles/photo-galleries-views-attach) by [Jeff Eaton](http://twitter.com/eaton) - using the CCK and Imagefield modules, and re-created each of my existing Gallery nodes. Using the [Imagefield_Import](http://drupal.org/project/imagefield_import) module, I was then able to quickly import the photos into the new Galleries.
|
||||
|
||||
I downloaded all the photos from the previous Gallery via FTP, and installed and configured the Imagefield_Import module.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ tags:
|
|||
- Nodequeue
|
||||
- oliverdavies.co.uk
|
||||
---
|
||||
I recently decided that I wanted to have a block displayed in a sidebar on my site containing icons and links to my social media profiles - <a href="http://twitter.com/opdavies">Twitter</a>, <a href="http://facebook.com/opdavies">Facebook</a> etc. I tried the <a href="http://drupal.org/project/follow">Follow</a> module, but it lacked the option to add extra networks such my <a href="http://drupal.org/user/381388">Drupal.org</a> account, and my <a href="http://oliverdavies.co.uk/rss.xml">RSS feed</a>. I started to create my own version, and then found <a href="http://www.hankpalan.com/blog/drupal-themes/add-your-social-connections-drupal-icons">this Blog post</a> by Hank Palan.
|
||||
I recently decided that I wanted to have a block displayed in a sidebar on my site containing icons and links to my social media profiles - [Twitter](http://twitter.com/opdavies), [Facebook](http://facebook.com/opdavies) etc. I tried the [Follow](http://drupal.org/project/follow) module, but it lacked the option to add extra networks such my [Drupal.org](http://drupal.org/user/381388) account, and my [RSS feed](http://oliverdavies.co.uk/rss.xml). I started to create my own version, and then found [this Blog post](http://www.hankpalan.com/blog/drupal-themes/add-your-social-connections-drupal-icons) by Hank Palan.
|
||||
|
||||
I created a 'Social icon' content type with the body field removed, and with fields for a link and image - then downloaded the favicons from the appropriate websites to use.
|
||||
|
||||
|
@ -17,6 +17,6 @@ However, instead of using a custom template (node-custom.tpl.php) file, I used t
|
|||
|
||||
I added fields for the node titles, and the link from the node's content. Both of these are excluded from being displayed on the site. I then re-wrote the output of the Icon field to create the link using the URL, and using the node's title as the image's alternative text and the link's title.
|
||||
|
||||
I also used the <a href="http://drupal.org/project/nodequeue">Nodequeue</a> module to create a nodequeue and arrange the icons in the order that I wanted them to be displayed. Once this was added as a relationship within my View, I was able to use node's position in the nodequeue as the sort criteria.
|
||||
I also used the [Nodequeue](http://drupal.org/project/nodequeue) module to create a nodequeue and arrange the icons in the order that I wanted them to be displayed. Once this was added as a relationship within my View, I was able to use node's position in the nodequeue as the sort criteria.
|
||||
|
||||
To complete the process, I used the <a href="http://drupal.org/project/css_injector">CSS Injector</a> module to add some additional CSS styling to position and space out the icons.
|
||||
To complete the process, I used the [CSS Injector](http://drupal.org/project/css_injector) module to add some additional CSS styling to position and space out the icons.
|
|
@ -11,13 +11,13 @@ Aside from the obvious candidates such as Views, CCK etc, here are a list of 10
|
|||
|
||||
So, in no particular order:
|
||||
|
||||
* **<a href="http://drupal.org/project/admin">Admin</a>:** <br>The admin module provides UI improvements to the standard Drupal admin interface. I've just upgraded to the new <a href="http://drupal.org/node/835870">6.x-2.0-beta4</a> version, and installed the newly-required <a href="http://code.developmentseed.org/rubik">Rubik</a>/<a href="http://code.developmentseed.org/tao">Tao</a> themes. So far, so good!
|
||||
* **<a href="http://drupal.org/project/better_perms">Better Permissions</a>/<a href="http://drupal.org/project/filter_perms">Filter Permissions</a>: <br>**Basic permissions is a basic module which enhances the Drupal Permissions page to support collapsing and expanding permission rows. Filter permissions provides filters at the top of the Permissions page for easier management when your site has a large amount of roles and/or permissions.
|
||||
* **<a href="http://drupal.org/project/better_formats">Better Formats</a>: <br>**Better formats is a module to add more flexibility to Drupal's core input format system.
|
||||
* **<a href="http://drupal.org/project/node_clone">Clone module</a>:**<br>Allows users to make a copy of an existing item of site content (a node) and then edit that copy.
|
||||
* **<a href="http://drupal.org/project/vertical_tabs">Vertical Tabs</a>:<br>**Integrated into Drupal 7 core, this module adds vertical tabs to the node add and edit forms.
|
||||
* **<a href="http://drupal.org/project/context">Context</a>:<br>**Context allows you to manage contextual conditions and reactions for different portions of your site. You can think of each context as representing a "section" of your site. For each context, you can choose the conditions that trigger this context to be active and choose different aspects of Drupal that should react to this active context.
|
||||
* **<a href="http://drupal.org/project/nodepicker">Node Picker</a>:**<br>A rewrite of the module <a rel="nofollow" href="http://drupal.org/project/tinymce_node_picker">TinyMCE Node Picker</a>. Allows you to easily create links to internal nodes.
|
||||
* **<a href="http://drupal.org/project/module_filter">Module Filter</a>:**<br>What this module aims to accomplish is the ability to quickly find the module you are looking for without having to rely on the browsers search feature which more times than not shows you the module name in the 'Required by' or 'Depends on' sections of the various modules or even some other location on the page like a menu item.
|
||||
* **<a href="http://drupal.org/project/zenophile">Zenophile</a>:**<br>Quickly create Zen subthemes.
|
||||
* **<a href="http://drupal.org/project/addanother">Add Another</a>:**<br>Add another displays a message after a user creates a node, and/or displays an "Add another" tab on nodes allowing them to make another node of the same type. You can control what roles and node types see this feature.
|
||||
* **[Admin](http://drupal.org/project/admin):** <br>The admin module provides UI improvements to the standard Drupal admin interface. I've just upgraded to the new [6.x-2.0-beta4](http://drupal.org/node/835870) version, and installed the newly-required [Rubik](http://code.developmentseed.org/rubik)/[Tao](http://code.developmentseed.org/tao) themes. So far, so good!
|
||||
* **[Better Permissions](http://drupal.org/project/better_perms)/[Filter Permissions](http://drupal.org/project/filter_perms): <br>**Basic permissions is a basic module which enhances the Drupal Permissions page to support collapsing and expanding permission rows. Filter permissions provides filters at the top of the Permissions page for easier management when your site has a large amount of roles and/or permissions.
|
||||
* **[Better Formats](http://drupal.org/project/better_formats): <br>**Better formats is a module to add more flexibility to Drupal's core input format system.
|
||||
* **[Clone module](http://drupal.org/project/node_clone):**<br>Allows users to make a copy of an existing item of site content (a node) and then edit that copy.
|
||||
* **[Vertical Tabs](http://drupal.org/project/vertical_tabs):<br>**Integrated into Drupal 7 core, this module adds vertical tabs to the node add and edit forms.
|
||||
* **[Context](http://drupal.org/project/context):<br>**Context allows you to manage contextual conditions and reactions for different portions of your site. You can think of each context as representing a "section" of your site. For each context, you can choose the conditions that trigger this context to be active and choose different aspects of Drupal that should react to this active context.
|
||||
* **[Node Picker](http://drupal.org/project/nodepicker):**<br>A rewrite of the module [TinyMCE Node Picker](http://drupal.org/project/tinymce_node_picker). Allows you to easily create links to internal nodes.
|
||||
* **[Module Filter](http://drupal.org/project/module_filter):**<br>What this module aims to accomplish is the ability to quickly find the module you are looking for without having to rely on the browsers search feature which more times than not shows you the module name in the 'Required by' or 'Depends on' sections of the various modules or even some other location on the page like a menu item.
|
||||
* **[Zenophile](http://drupal.org/project/zenophile):**<br>Quickly create Zen subthemes.
|
||||
* **[Add Another](http://drupal.org/project/addanother):**<br>Add another displays a message after a user creates a node, and/or displays an "Add another" tab on nodes allowing them to make another node of the same type. You can control what roles and node types see this feature.
|
|
@ -14,18 +14,18 @@ tags:
|
|||
- Flickr
|
||||
- ImageField
|
||||
---
|
||||
In this tutorial, I'll show you how to create a photo gallery which uses photos imported from <a title="Flickr" href="http://www.flickr.com/">Flickr</a>.
|
||||
In this tutorial, I'll show you how to create a photo gallery which uses photos imported from [Flickr](http://www.flickr.com).
|
||||
|
||||
The modules that I'll use to create the Gallery are:
|
||||
|
||||
* <a href="http://drupal.org/project/cck">CCK</a>
|
||||
* <a href="http://drupal.org/project/feeds">Feeds</a>
|
||||
* <a href="http://drupal.org/project/feeds_imagegrabber">Feeds Image Grabber</a>
|
||||
* <a href="http://drupal.org/project/filefield">FileField</a>
|
||||
* <a href="http://drupal.org/project/imageapi/">ImageAPI</a>
|
||||
* <a href="http://drupal.org/project/imagecache">ImageCache</a>
|
||||
* <a href="http://drupal.org/project/imagefield">ImageField</a>
|
||||
* <a href="http://drupal.org/project/views">Views</a>
|
||||
* [CCK](http://drupal.org/project/cck)
|
||||
* [Feeds](http://drupal.org/project/feeds)
|
||||
* [Feeds Image Grabber](http://drupal.org/project/feeds_imagegrabber)
|
||||
* [FileField](http://drupal.org/project/filefield)
|
||||
* [ImageAPI](http://drupal.org/project/imageapi)
|
||||
* [ImageCache](http://drupal.org/project/imagecache)
|
||||
* [ImageField](http://drupal.org/project/imagefield)
|
||||
* [Views](http://drupal.org/project/views)
|
||||
|
||||
The first thing that I did was to create a content type to store my imported images. I named it 'Photo', removed the Body field, and added an Image field.
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ In this post, I will be changing values within my Drupal 6 site's database to qu
|
|||
|
||||
To begin with, I created the 'News article' content type, and then used the Devel Generate module to generate some Blog nodes.
|
||||
|
||||
Using <a href="http://www.sequelpro.com/">Sequel Pro</a>, I can query the database to view the Blog posts (you can also do this via the <a href="http://guides.macrumors.com/Terminal">Terminal</a> in a Mac OS X/Linux, <a href="http://www.oracle.com/technology/software/products/sql/index.html">Oracle SQL Developer</a> on Windows, or directly within <a href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a>):
|
||||
Using [Sequel Pro](http://www.sequelpro.com), I can query the database to view the Blog posts (you can also do this via the [Terminal](http://guides.macrumors.com/Terminal) in a Mac OS X/Linux, [Oracle SQL Developer](http://www.oracle.com/technology/software/products/sql/index.html) on Windows, or directly within [phpMyAdmin](http://www.phpmyadmin.net/home_page/index.php)):
|
||||
|
||||
Using an SQL 'Update' command, I can change the type value from 'blog' to 'article'. This will change every occurance of the value 'blog'. If I wanted to only change certain nodes, I could add a 'Where' clause to only affect nodes with a certain nid or title.
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@ tags:
|
|||
- Virtual Hosts
|
||||
- VirtualHostX
|
||||
---
|
||||
This isn't a Drupal related topic per se, but it is a walk-through of one of the applications that I use whilst doing Drupal development work. I assume, like most Mac OS X users, I use <a href="http://www.mamp.info/en/index.html">MAMP</a> to run Apache, MySQL and PHP locally whilst developing. I also use virtual hosts in Apache to create local .dev domains which are as close as possible to the actual live domains. For example, if I was developing a site called mysite.com, my local development version would be mysite.dev.
|
||||
This isn't a Drupal related topic per se, but it is a walk-through of one of the applications that I use whilst doing Drupal development work. I assume, like most Mac OS X users, I use [MAMP](http://www.mamp.info/en/index.html) to run Apache, MySQL and PHP locally whilst developing. I also use virtual hosts in Apache to create local .dev domains which are as close as possible to the actual live domains. For example, if I was developing a site called mysite.com, my local development version would be mysite.dev.
|
||||
|
||||
Normally, I would have to edit the hosts file and Apache's httpd.conf file to create a virtual host. The first to set the domain and it's associated IP address, and the other to configure the domain's directory, default index file etc. However, using <a href="http://clickontyler.com/virtualhostx/">VirtualHostX</a>, I can quickly create a virtual host without having to edt any files. Enter the virtual domain name, the local path and the port, and apply the settings. VirtualHostX automatically restarts Apache, so the domain is ready to work straight away. You can also enter custom directives from within the GUI.
|
||||
Normally, I would have to edit the hosts file and Apache's httpd.conf file to create a virtual host. The first to set the domain and it's associated IP address, and the other to configure the domain's directory, default index file etc. However, using [VirtualHostX](http://clickontyler.com/virtualhostx), I can quickly create a virtual host without having to edt any files. Enter the virtual domain name, the local path and the port, and apply the settings. VirtualHostX automatically restarts Apache, so the domain is ready to work straight away. You can also enter custom directives from within the GUI.
|
||||
|
||||
There's also an option to share the host over the local network. Next, I intend on configuring a virtual Windows PC within VMware Fusion to view these domains so that I can do cross-browser testing before putting a site live.
|
||||
|
||||
|
@ -21,4 +21,4 @@ I ensured that my Apache configuration within MAMP was set to port 80, and that
|
|||
|
||||
After some troubleshooting, I found out that Web Sharing on my Mac had become enabled (I don't know why, I've never enabled it), and that this was causing a conflict with Apache. Once I opened my System Preferences and disabled it, everything worked fine!
|
||||
|
||||
This, along with <a href="http://www.mamp.info/en/index.html">MAMP</a>, <a href="http://www.panic.com/coda/">Coda</a>, <a href="http://www.sequelpro.com/">Sequel Pro</a>, and <a href="http://www.panic.com/transmit/">Transmit</a>, has become an essential tool within my development environment.
|
||||
This, along with [MAMP](http://www.mamp.info/en/index.html), [Coda](http://www.panic.com/coda), [Sequel Pro](http://www.sequelpro.com), and [Transmit](http://www.panic.com/transmit), has become an essential tool within my development environment.
|
|
@ -14,7 +14,7 @@ tags:
|
|||
|
||||
In preparation for my Blog posts being added to [Drupal Planet](http://drupal.org/planet), I needed to create a new Taxonomy term (or, in this case, tag) called 'Drupal Planet', and assign it to new content to imported into their aggregator. After taking a quick look though my previous posts, I decided that 14 of my previous posts were relevant, and thought that it would be useful to also assign these the 'Drupal Planet' tag.
|
||||
|
||||
I didn't want to manually open each post and add the new tag, so I decided to make the changes myself directly into the database using SQL, and as a follow-up to a previous post - <a href="internal:node/32" title="Quickly change the content type of multiple nodes using SQL">Quickly Change the Content Type of Multiple Nodes using SQL</a>.
|
||||
I didn't want to manually open each post and add the new tag, so I decided to make the changes myself directly into the database using SQL, and as a follow-up to a previous post - [Quickly Change the Content Type of Multiple Nodes using SQL](/blog/change-content-type-multiple-nodes-using-sql).
|
||||
|
||||
**Again, before changing any values within the database, ensure that you have an up-to-date backup which you can restore if you encounter a problem!**
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Recently, I converted a client's static HTML website, along with their Coppermin
|
|||
|
||||
Over the next few posts, I'll be replicating the process that I used during the conversion, and how I added some additional features to my Drupal gallery.
|
||||
|
||||
To begin with, I created my photo gallery as described by <a href="http://www.lullabot.com/about/team/jeff-eaton">Jeff Eaton</a> in <a href="http://www.lullabot.com/articles/photo-galleries-views-attach">this screencast</a>, downloaded all my client's previous photos via FTP, and quickly added them into the new gallery using the <a href="http://drupal.org/project/imagefield_import">Imagefield Import</a> module (which I mentioned <a href="internal:/2010/05/29/importing-images-using-the-imagefieldimport-module" title="Importing images using the Imagefield_Import module">previously</a>).
|
||||
To begin with, I created my photo gallery as described by [Jeff Eaton](http://www.lullabot.com/about/team/jeff-eaton) in [this screencast](http://www.lullabot.com/articles/photo-galleries-views-attach), downloaded all my client's previous photos via FTP, and quickly added them into the new gallery using the [Imagefield Import](http://drupal.org/project/imagefield_import) module (which I mentioned [previously](/blog/quickly-import-multiples-images-using-imagefieldimport-module)).
|
||||
|
||||
When I compare this to the previous gallery, I can see several differences which I'd like to include. The first of which is the number of photos in each gallery, and the date that the most recent photo was added.
|
||||
|
||||
|
@ -33,7 +33,7 @@ AND status = 1;
|
|||
|
||||
As the nid value of each gallery corresponds with the 'field_gallery_nid' field within the content_type_photo field, I can now query the database and retrieve information about each specific gallery.
|
||||
|
||||
For example, using <a href="http://www.w3schools.com/sql/sql_alias.asp">aliasing</a> within my SQL statement, I can retrieve a list of all the published photos within the 'British Squad 2008' gallery by using the following code:
|
||||
For example, using [aliasing](http://www.w3schools.com/sql/sql_alias.asp) within my SQL statement, I can retrieve a list of all the published photos within the 'British Squad 2008' gallery by using the following code:
|
||||
|
||||
~~~sql
|
||||
SELECT n.title, n.nid, p.field_gallery_nid
|
||||
|
@ -53,7 +53,7 @@ AND n.status = 1
|
|||
AND n.nid = p.nid;
|
||||
~~~
|
||||
|
||||
As I've used the <a href="http://drupal.org/project/views_attach">Views Attach</a> module, and I'm embedding the photos directly into the Gallery nodes, I easily add this to each gallery by creating a custom node-gallery.tpl.php file within my theme. I can then use the following PHP code to retrieve the node ID for that specific gallery:
|
||||
As I've used the [Views Attach](http://drupal.org/project/views_attach) module, and I'm embedding the photos directly into the Gallery nodes, I easily add this to each gallery by creating a custom node-gallery.tpl.php file within my theme. I can then use the following PHP code to retrieve the node ID for that specific gallery:
|
||||
|
||||
~~~php
|
||||
<?php
|
||||
|
@ -118,6 +118,6 @@ if ($selected_gallery_total != 0) {
|
|||
?>
|
||||
~~~
|
||||
|
||||
The values that I've entered are from <a href="http://php.net/manual/en/function.date.php">this page</a> on <a href="http://php.net">PHP.net</a>, and can be changed according on how you want the date to be displayed.
|
||||
The values that I've entered are from [this page](http://php.net/manual/en/function.date.php) on PHP.net, and can be changed according on how you want the date to be displayed.
|
||||
|
||||
As I've added all of these photos today, then the correct dates are being displayed. However, on the client's original website, the majority of these photos were pubished several months or years ago, and I'd like the new website to still reflect the original created dates. As opposed to modifying each individual photograph, I'll be doing this in bulk in my next post.
|
|
@ -3,7 +3,7 @@ title: Create a Better Photo Gallery in Drupal - Part 2.1
|
|||
nav: blog
|
||||
slug: create-better-photo-gallery-drupal-part-21
|
||||
---
|
||||
Today, I realised that I hadn't published the code that I used to create the total figures of galleries and photos at the top of the gallery (I said at the end of <a title="Create a Better Photo Gallery in Drupal - Part 2" href="internal:node/74">Part 2</a> that I'd include it in <a title="Create a Better Photo Gallery in Drupal - Part 3" href="internal:node/75">Part 3</a>, but I forgot). So, here it is:
|
||||
Today, I realised that I hadn't published the code that I used to create the total figures of galleries and photos at the top of the gallery (I said at the end of [Part 2](/blog/create-better-photo-gallery-drupal-part-2 "Create a Better Photo Gallery in Drupal - Part 2") that I'd include it in [Part 3](/blog/create-better-photo-gallery-drupal-part-3 "Create a Better Photo Gallery in Drupal - Part 3"), but I forgot). So, here it is:
|
||||
|
||||
~~~php
|
||||
<?php
|
||||
|
|
|
@ -10,7 +10,7 @@ tags:
|
|||
- Regular Expression
|
||||
- TextMate
|
||||
---
|
||||
As in <span class="nodepicker-link">the </span><a href="internal:node/35" title="Quickly adding a taxonomy term to multiple nodes using SQL">original post</a>, I'd generated a list of node ID values, and needed to add structure the SQL update statment formatted in a certain way. However, I changed my inital query slightly to out put the same nid value twice.
|
||||
As in [the original post](/blog/add-taxonomy-term-multiple-nodes-using-sql "Quickly adding a taxonomy term to multiple nodes using SQL"), I'd generated a list of node ID values, and needed to add structure the SQL update statment formatted in a certain way. However, I changed my inital query slightly to out put the same nid value twice.
|
||||
|
||||
~~~sql
|
||||
SELECT nid, nid FROM node WHERE TYPE = 'blog' ORDER BY nid ASC;
|
||||
|
|
|
@ -12,7 +12,7 @@ tags:
|
|||
---
|
||||
In this tutorial I'll be showing how to create an [Omega](http://drupal.org/project/omega) subtheme using the [Omega Tools](http://drupal.org/project/omega_tools) module, and have it working with the [LESS CSS preprocessor](http://lesscss.org).
|
||||
|
||||
The first thing that I need to do is download the Omega theme and the Omega Tools and <a title="LESS module on drupal.org" href="http://drupal.org/project/less">LESS</a> modules, and then to enable both modules. I'm doing this using Drush, but you can of course do this via the admin interface at admin/modules.
|
||||
The first thing that I need to do is download the Omega theme and the Omega Tools and [LESS](http://drupal.org/project/less "LESS module on drupal.org") modules, and then to enable both modules. I'm doing this using Drush, but you can of course do this via the admin interface at admin/modules.
|
||||
|
||||
$ drush dl less omega omega_tools;
|
||||
$ drush en -y less omega_tools
|
||||
|
|
|
@ -11,7 +11,7 @@ tags:
|
|||
- Drupal Planet
|
||||
- Drupal
|
||||
---
|
||||
First, I need to download the <a href="http://drupal.org/project/date" title="Date module on Drupal.org">Date</a> module, and make my module dependent on date_popup by adding the following line into my module's .info file.
|
||||
First, I need to download the [Date](http://drupal.org/project/date "Date module on Drupal.org") module, and make my module dependent on date_popup by adding the following line into my module's .info file.
|
||||
|
||||
dependencies[] = date_popup
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ tags:
|
|||
- Theming
|
||||
- Preprocessing
|
||||
---
|
||||
If you use a lot of process and preprocess functions within your Drupal theme, then your template.php can get very long and it can become difficult to find a certain piece of code. Following the example of the <a href="http://drupal.org/project/omega" title="The Omega theme on Drupal.org">Omega theme</a>, I've started separating my process and preprocess functions into their own files. For example, mytheme_preprocess_node can be placed within a preprocess/node.inc file, and mytheme_process_page can be placed within process/page.inc.
|
||||
If you use a lot of process and preprocess functions within your Drupal theme, then your template.php can get very long and it can become difficult to find a certain piece of code. Following the example of the [Omega theme](http://drupal.org/project/omega "The Omega theme on Drupal.org"), I've started separating my process and preprocess functions into their own files. For example, mytheme_preprocess_node can be placed within a preprocess/node.inc file, and mytheme_process_page can be placed within process/page.inc.
|
||||
|
||||
The first step is to use the default mytheme_process() and mytheme_preprocess() functions to utilise my custom function. So within my template.php file:
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ tags:
|
|||
- SASS
|
||||
- SCSS
|
||||
---
|
||||
I've recently started using <a href="http://sass-lang.com" title="SASS">SASS</a> rather than LESS to do my CSS preprocessing - namely due to its integration with <a href="http://compass-style.org" title="Compass">Compass</a> and it's built-in CSS3 mixins. There are three modules that provide the ability to use SASS within Drupal:
|
||||
I've recently started using [SASS](http://sass-lang.com) rather than LESS to do my CSS preprocessing - namely due to its integration with [Compass](http://compass-style.org) and it's built-in CSS3 mixins. There are three modules that provide the ability to use SASS within Drupal:
|
||||
|
||||
* [Sassy](http://drupal.org/project/sassy "Sassy module on drupal.org")
|
||||
* [Prepro](http://drupal.org/project/prepro "Prepro module on drupal.org")
|
||||
|
|
|
@ -10,7 +10,7 @@ tags:
|
|||
---
|
||||
## The Problem
|
||||
|
||||
As an active contributor to the <a href="http://drupal.org">Drupal</a> project, I spend a lot of time working with other peoples’ modules and themes, and occassionally have to fix a bug or add some new functionality.
|
||||
As an active contributor to the [Drupal](http://drupal.org) project, I spend a lot of time working with other peoples’ modules and themes, and occassionally have to fix a bug or add some new functionality.
|
||||
|
||||
In the Drupal community, we use a patch based workflow where any changes that I make get exported to a file detailing the differences. The patch file (*.patch) is attached to an item in an issue queue on Drupal.org, applied by the maintainer to their local copy of the code and reviewed, and hopefully committed.
|
||||
|
||||
|
|
Loading…
Reference in a new issue