Creating Blog Content With Attached Image Module

In this lesson, we learn to enable the core 'blog' module (so that our user Sam can create content type blog).
We could of course allow Sam to create content with the basic 'page' and 'story' content type. This could be simply done as follows:-

Go to http://www.my_domain.com

Login 'eve' and password.

Select > Administer > User management > Access control > [node module] > [authenticated user] > [create page content] check > [create story content] check > [edit own page content] check > [edit own story content] check > Save permissions

That's it.

Note: we did not follow through the above in our illustrative website.

Back to our 'blog' content, we also like our blog user to be able to upload his own images via our image module. We will however control the folder path and size of the image he uploads and place each image at the beginning of his blog content.




Enable Blog Module And Grant Access

Go to http://www.my_domain.com

Login 'eve' and password.

Select > Administer > Site building > Modules

picture

(continue) > [Blog] > [Enabled] check > Save configuration

Select > Administer > User management > Access control

picture

(continue) > [blog module] > [edit own blog] > [superuser] check > [authenticated user] check > Save permissions




Change Default Image Module Settings To Control Folder And Size Of Images Upload By Blog Users

Select > Administer > Site configuration > Image

picture

(continue) > [Default image path,change] blog_images > [Label] > [Original] > [Width] 300 > [Height] 150 > Save configuration

Note: any original images uploaded by blog users is larger than 300 x 150, it will be resized to this. Hence it may not be very clear.

picture

Note: the folder '/files/blog_images' path created at the /files path.





Edit 'Blog' Content Type For Workflow And Image Attach Setting

Select > Administer > Content management > Content types > [Blog entry] edit

picture

Note: we can set the 'Minimum number of words' for each blog content.
In practise, workflow options - 'Published' and 'Promoted to front page' usually checked. If would not be popular with blog users if permission is required before his content gets published. And blog content is usually newslike in that the latest blog is at the top followed by earlier blog content below.

In our illustration we did not check both. All blog contents requires superuser 'eve' to grant permission or otherwise. And there will be a separate blog path for each blog user to display content.

(continue) > [scroll down] > [Image Attach settings]

picture

(continue) > [Attach Images] Enabled > [Teaser image size,change] Original > [Teaser image weight,change] -10 > [Full node image size,change] Original > [Full node image weight,change] -10 > Save content type

This means all images uploaded by blog users to /files/blog_images/[HERE] will be resized (if larger) to our 'original 300 x 150' size.

Log out.





Blog User 'Sam' Creates Blog Content

Go to http://www.my_domain.com

Login 'sam' and password.

Select > Create content

picture

(continue) > Blog entry

picture

(continue) > [Title] Welcome Product Manager's Blog > [Body] Hi, I am Sam, the Product Manager for My_Domain.com and this is my blog. From time to time I will provide information about new products and marketing promotions. My hobby is also collecting banknotes and here's an old US note no longer used > Attached Images

picture

(continue) > [Upload Image,select from your desktop] > [Image title] Old 50 Dollar No Longer Used > Preview

picture

(continue) > [scroll down] > [note: a thumbnail has automatically been created] > Submit

picture

Log out





Superuser 'Eve' Approve, Create Sam's Blog Path And Publish Sam's Blog

Go to http://www.my_domain.com

Login 'eve' and password

Select > Adminsiter > Content Management > Content

picture

note: there are 2 new content types. Im addition to the 'Blog entry' (status 'not published'), there is also an 'Image' (status 'published') content type created. You can click the node to view but we shall publish a link to this.

(continue) > [Welcome Product Manager's Blog] > edit > [scroll down] > [Publishing options] > [Published] check > Submit > [Author] sam

picture

(continue) > [Sam] > View recent blog entries

picture

Note: the path is http://www.my_domain.com/blog/6. Sam is user number '6'.
We can create a link like this but this may be better:-
http://www.my_domain.com/samtalk

Sam can now tell his friends to go to www.my_domain.com/samtalk to read his blog.

What we do is we create a url alias eg;
node/1 -> /about_us
node/2 -> /management
blog/6 -> /samtalk

Select > Administer > Site building > Url aliases > Add alias

picture

(continue) > [Existing system path] > [http://www.my_domain.com,change from] blog/6 > [http://www.my_domain.com,change to] samtalk > Create new alias

picture

Select > Administer > Site building > Menus > [Secondary links] > Add item

picture

(continue) > [Title] Sam's Blog > [Path] samtalk > [Weight] 10 > Submit

Log out

picture