Hey,
I'm planning on setting up a news site. I'm known with the Drupal terminology and this isn't my first Drupal website, but I am not sure how to get certain things done. So I hope I can get some pointers here where to look into so I can choose the right modules.
When you add a news article with for example FCKeditor it should automatically resize all pictures included in the article in 2 format, one for article page and one for the front page, where the one on the article page is a little bit bigger then the one on the front page.
The author of the article should be able to place the pictures in the articles wherever he wants, he doesn't have to start with a picture, he could write a small intro first, or whatever he wants. But for the frontpage, we search for the first picture used, use a small version of that picture and display the first X characters around it. And when there is no picture used in the article, we could use a default picture with for example a logo of the website.
Anyone knows a way to do such a thing?
Thanks a lot.
Comments
Hi, Personally i'd ditch
Hi,
Personally i'd ditch FCKeditor and use the imagefield module along with imagecache, that way you just upload an image via an upload field and then imagecache can resize that one image.
You can place this image in your node.tpl.php file and use an IF statement to decide wheather or not the default image needs to be shown instead:
Use the following to see what variables are available in your node template (the ones above are just made up):
So the main benefits are:
* You can do all you want
* Only need to upload one image
* You can have different image sizes for node lists and node view
* you can control placement of the image in node lists and node view via node.tpl.php
Thats probably how i'd do it anyway
Hope that helps
Tom
______________________________________________
What to get a Drupaler for Xmas - http://drupalsn.com/node/2659
______________________________________________
https://tomswebstuff.com
Agreed, that is a nice way
Agreed, that is a nice way to work, but you limit the possibilities, because you predefine how many images someone is allowed to upload, plus the author of the article can't place the image wherever he wants.
If you have 'Image' 'Upload'
If you have 'Image' 'Upload' and 'Inline' module ( along with proper user permissions, that is, registered users are enabled to use these via Admin > Access or Admin > Permissions ) this can be very easily done. Users or contributors need to add or type/copy paste the words [image:1] or [image:2] etc wherever they want the attached images to appear inside their text.
How the teasers look like can be set by Imagecache module. Its actually very easy and simple, once you start 'playing' with these modules.
This is a more robust way to
This is a more robust way to work, it isn't very user friendly, and where some reporters are absolute computer newbies, this will not be an easy way to work. It should be a very user friendly way of working where the author of the article always has a good feeling of what he's doing.
consistency vs freedom
I'm not sure where your 'feel-good' threshold gets crossed, but most reporters should be able to get their head around the idea of writing "image 1 goes here" and "image 2 goes there". No?
The thing is that if you want strict layout-controlled sizes and positions, then 'feel-good' drag and drop WYSIWYG tools mess that all up, as editors drag, position, warp and resize images into horrible results. Using the tool to say "tell me where it goes - and I'll position it and resize it" will give you less fiddling around, better consistency and less rendering surprises.
It's a trade off between a "good feeling" about the editing activity and a good feeling about the results. Which is more important?
.dan.
if you are asking a question you think should be documented, please provide a link to the handbook where you think the answer should be found.
| http://www.coders.co.nz/ |
.dan. is the New Zealand Drupal Developer working on Government Web Standards