Thursday, May 26, 2011

Adding & Managing News Articles

Note to everyone:
This guide is for a specific drupal site I've built & so will most probably be different to your own admin setup


Once logged in as admin, you will see the administration menu at the top of the screen:

1. Adding a New News Article



In the Menu, hover over - content management > create content then Click News:



You will be taken to the form for adding a news article.
Input a Title,
Select 'Compulsion 28/05/11' from the category drop down menu
Select an Image to upload which will be included with the article. This will be used on the article page itself & resized as a thumbnail on the homepage:


Next in the form is a box titled 'body'.
This where you add your content for the article.
At the moment it will just be a basic blank box, but if you want to use a wysiwyg/word style editor in it then scroll below this box and click on where it says 'input format'
then click 'full html' and the box will be transformed into a full text editor :) grrreat!


Nothing else on the form needs to be touched.
When you've written the article just scroll to the bottom & click Save.

2. Editing News Articles

In the Admin Menu at the top, hover over 'content management', 'content', & then click 'list'
You will then see a list of content created on the site, you can edit & delete any of them from here.
News articles will have the type of 'news' in the list:



You also use the filter at the top to only display the kind of content you want which is handy when content on the site builds up.

That's about it :)

Thursday, September 9, 2010

Show Imagecache Images in Views (also using cck imagefield)

while trying to create a list of articles using views
today I ran into a problem. I was trying to add images from a cck imagefield which was simple enough. However, I then tried to switch this to use the image cache images instead of the oversized images I had originally uploaded and it broke.

After a spot of Firebug Analysis it emerged to me the problem seemed to be that views was trying to get the cached images from the wrong folder and I was totally stuck... for a while.

As I was trawling the drupal forums looking for answers I found differentarticles mentioning adding imagecache images to views including a video tutorial from the guys at 'Learn by the drop' who seemed to get the ImageCache Images showing with no problem.

So I was still stuck until I remembered a comment I read along the way by somebody who mentioned changing the file system from public to private (admin/settings/file-system), now I've never touched this in the years that I have been building sites with drupal but gave it ago anyway and lo and behold pow! the resized imagecache images started working in views. At the time I also flushed my imagecache before checking so this may need to be done first.

It seems that once this is working you can switch the file donwload system type back to public (note to self: don't forget to give annoymous users permission to view the cck image field or it will just be blank!).

One problem i have noticed though, if you have more than 1 image selected for the cck imagefield then the default image wont display for nodes with no images. It will only display the default image when the imagefield is set to 1 image only.
This may just be for unlimited images per node, I still need to check the other values to see if the default image will display in those circumstances.

Monday, October 20, 2008

How to install Drupal in 4 Nice and Easy steps

Installing and configuring, when it doesn't work straight away I've been known to proceed to throw items across the room within just a few short minutes so here is a simple guide to help you get Drupal installed on your own Computer and begin developing before the frustration sets in on you.

1. First of all you will need a Host.

Drupal uses PHP and MySQL to deliver dynamic content to your pages and unfortunately your computer can't run these in the same way it can with HTML so if you don't already have one you will need to install a 'local host' on your computer.
I use xampp to Host my sites and this tutorial will assume that you are using it too.
Here is a quick guide on how to install xampp which covers both Windows and Mac methods. Be sure to make a note of any username/passwords you create.

2. Download a version of Drupal

Hopefully that went smoothly for you, so on to Drupal now. Go to www.drupal.org and select a Drupal version to download. I'm sticking with 5.11 for a couple more months until all of my favourite modules have been upgraded to 6.
Select 'save file' and then ok. Once downloaded, you will need to extract its contents into your htdocs folder inside xampp. On my system htdocs is located in c:\program files\xampp\htdocs.

3.Create a Database

Xampp will have also installed 'phpmyadmin' on your desktop which is used to manage your databases so open this and login. In the column entitled 'localhost' enter the name of your new Database in the text box labelled 'create new database'. The name can be anything you like, we will use 'drupal' as an example. Click 'create' and thats that for the database side of things.




4. the Drupal Install Page


Now look in your htdocs folder again to find the name of the folder that your Drupal files are saved in. It will most likely be the Name and Version you have chosen i.e. drupal-5.11. Go to http://localhost/drupal-5.11 where you should now see the Drupal installation page.
Leave the Database type as mysql.
Add the name of the Database you created in step 3.
Enter your Database username and password.
Ignore the advanced options.
Click 'save configuration'.
If everything went to plan you will now see a confirmation message which reads 'Drupal
Installation Complete', if so click on the link to view your new site.
If not then warn everyone in the room to duck! :op

Sunday, October 19, 2008

What is a Content Management System and Drupal?

What on earth is a Content Management System?

So you’ve heard the term ‘Content Management System’ or CMS banded about by various people or on a number of websites but are wondering what it is exactly. To put it in its simplest terms, a CMS is used by a Website Administrator to easily add Content to their Website without the need to know how to edit the actual Code. It is similar to using a program like Microsoft Word but when you save a document it will display as a new article or page on your website.


ok, so what is Drupal?

Drupal is one of the many Content Management Systems out there and believe me there are a lot!
It is an Open Source CMS which means that you can download and use it for free.


Why would I use Drupal?

The sheer power of it makes Drupal a CMS worth of note. It gives a Developer working alone the ability to create huge Websites with pretty much any feature you can find on any website. You can create My Space style Social Networking Sites with ease or a fully fledged ecommerce Store to rival any of the biggest names around, anything is possible.
This power does come at a price however, and that price is a Learning curve which at times can feel as steep as a Brick Wall. Fear not though, there is a very active community at hand on drupal.org and hundreds of modules already available which you can use to build your new Website Empire!


What do I need to know to be able to build a Website with it?

If you are happy to use Drupal 'out of the box' and aren't Concerned about creating your own Design for your Website then you can use it without the need to know any scripting languages. If you do want to delve abit deeper then you will need to be at least a bit familiar with PHP and MySQL as well as HTML and CSS. I'm currently doing abit of work on www.playstationnation.co.uk