A constant moan in the Drupal community is the apparent lack of quality themes for users to download from drupal.org; especially in comparison to Wordpress or Joomla. One explanation for this is that the complexity of the CVS system discourages designers from contributing work to the central Drupal pool.
Here mortendk lets rip in his article CVS Haiku:
If we think that Drupal should look as diverse and fantastic as it is on the inside then we need to do something else that we are doing today. It should be clear to everyone that were not getting asskicking wonderful designed themes into the Drupal repository as long as the designer/themer/frontender have to get an developer involved to hold his hand to get him safely over the road - so big bad cvs dont hurt him.
In a similar vein, the following comments were added to Designing for the wrong target audience and Why Drupal.org lacks good themes:
If you’re new to version control, chances are nobody is going to recommend you learn CVS for your first project. Instead, they’re going to recommend an open source VCS that most companies, organizations, and projects use today…SVN and if SVN doesn’t suit your needs…Bazaar or Git. When my workplace began looking at VCS there was not one person, group, or consultant, or contractor that recommended VCS to us.
As for theming, I think the biggest obstacles right now are the Great Wall of CVS and the Issue Queue. Drupal’s contribution methods include many technologies that are utterly foreign to the design community.
I've uploaded three different themes now and it originally took about a day to satisfactorily learn how to use the CVS system in order to do this. Frustrating sure, but far from impossible.
I was mainly dependent on the guide called Using Windows to contribute themes to CVS which itself was taken from Themebot.
<Although the article was crucial in helping me upload a Drupal theme I felt that there were a couple of points that needed clarifying and would have made the process simpler.
So below is a (slight) rewrite of the above item with added screenshots. These are instructions for version 6 but for version 5 or 7 all you need to do is change the appropriate digit up one or down one.
Firstly, what you need to do is apply for CVS with Drupal.org and then download and install TortoiseCVS here.
Presuming that you have successfully done both of these then closely follow the guide below. The screenshots are from a Drupal theme called Winter Wonderland which I recently uploaded.
In preparation for adding your code to CVS, you should also add a CVS $Id$ tag to all of the files in your project. The Id tag should be at or near the top of each file, and for PHP, CSS, JS, and .info files, it needs to be embedded in a comment. When you check the file into CVS, the CVS system will expand the tag to add information about the check-in and version. Here are the lines to add:
-
// $Id$
inside the <?php ?> in a PHP file, or in a JavaScript file -
/* $Id$ */
in a CSS file -
; $Id$
in a .info file -
$Id
in a plain text file
The first step is to right click on the theme folder and then click on the TortoiseCVS option Make New Module.
From here the following interface will spring up:
In the CVSROOT you need to add the following line of code: :pserver:username@cvs.drupal.org:/cvs/drupal-contrib
As you can see from the screenshot I've added my username in the appropriate space.
Make sure the server and the repository folder are the same as in the image above and then add the path to your theme, which will be contributions/themes/your-theme
After you have clicked okay you should see the following message informing you that your actions have been successful
Now you need to check that a folder has been created in the Drupal CVS depositary by going to here: http://cvs.drupal.org/viewvc.py/drupal/contributions/themes/
As you can see below my folder for Winter Wonderland has been created.
If you can't see your folder then you have done something wrong. You either need to retrace your steps and start the process again or seek help (see the bottom of this article for places your can go for help).
Now go back to your theme folder on your harddrive and right click again. This time click on the TortoiseCVS option Branch. When the box opens input DRUPAL-6--1 and then click okay.
You should get the following confirmation of your successful action:
Now right click on your theme folder again and this time click on the tag option. Type in DRUPAL-6--1-0 and then click okay.
Again, the message "Success, CVS operation completed" should appear:
Now right click on the theme folder and add the contents
You'll see a list of checkboxes like below which list the entire contents of your theme. Click okay.
This is the point where all your individual files are uploaded. However, it is unlikely that they would have all have been transferred so look in the folder and check. If there is a white tick on an orange background then they would have been successfully uploaded to drupal.org but - as below - if there is a white cross on a orange background further action is required. Right click and then click again on CVS Update.
To check that everything is okay go to the drupal theme depository. My Winter Wonderland files look as so:
Now you have your entire theme successfully uploaded to the Drupal.org theme section you now need to make the public page.
The screenshots for this stage were too big to be displayed here but what you need to do is the following
- In your Drupal account go to create content -> create project
- For project type click on the theme checkbox.
- For full project name write whatever it is called but for short project name write the name of the uploaded theme folder which in my case was winter_wonderland with an underscore. It is essential that this is exactly the same.
- In the full description give users as much detail as possible about your theme. Please read Best Practices at drupal.org before you do so
- In project resources -> CVS tree put the URL of your upload theme which for Winter Wonderland is http://cvs.drupal.org/viewvc.py/drupal/contributions/themes/winter_wonderland/
- In CVS integration -> CVS directory put the path of the theme directory which in this case is /themes/winter_wonderland/
- It's also well worth uploading a screenshot for interested users to look at.
Now you have your published page and an uploaded theme you need to create your first release
Click on add release at the bottom of the published theme page
You'll come to the following interface. Enter the information as below:
It may take up to 12 hours for the nightly build to happen but then you'll have your first dev release!
To finish off, we'll look at how to upload new or altered files and then subsequently create a new release afterwards.
Lets say you've added some CSS to your main style file. Right click on the CSS file on your harddrive and then click on CVS update.
Now right click on your main theme folder and then click on tag. Lets say that you want this release to be called beta 1 so in the box you type DRUPAL-6--1-0-BETA1 and click okay.
Now go to the public theme page and underneath click on add new release. You should be presented with only one option. Click okay and the beta 1 release will be available for public download in around five minutes.
If you are having problems with this process where can you find help?
The place where you are most likely to get the quickest and most helpful response isn't the Drupal forums but the IRC channel at #drupal-themes.
Over at Four Kitchens, Todd Ross Nienkerk has kindly put himself forward to personally help themers who are having CVS trouble. His email and other contact details can be found at the bottom of this article
I don't claim to be an expert on CVS but if you have any questions then I will do anything I can to help you out.
---------------
This guide is released under the GNU Free Documentation License
---------------
---------------