node with multiple images attached (drupal 6.x) - drupal

I'm creating a site where user can create a node with multiple images attached. For that matter, I have installed image attach module. I also have view and view slideshow module installed so that user can see the uploaded images attached to this particular node in slideshow style.
The problem I'm facing right now is that view does not show all the images attached to this particular node. It shows one image only and that's it.
The way I set up the view is - I create it as a block, select "image attach" for Fields and choose node id for argument. Under the node id, I choose "node id from url" for default argument. The result is just only one image being shown.
I've been trying to figure out what I'm missing and, so far I found out that image_attach
table stores images attached to the same node with same nid. And the view query is returning only one. I appreciate much if anyone of you can point me to right direction.
Thanks in advance

Your approach seems okay except one major thing -- the use of Image Attach ! Consider using Imagefield ( http://drupal.org/project/imagefield ) with Imagecache modules ( http://drupal.org/project/imagecache ). They work really well with Views and Views Slideshow in particular. Imagefield+Imagecache is really the standard way images are now done in Drupal. Its also the default approach for images in Drupal 7.
There is plenty of documentation available about this approach.

Related

Using image styles with Scald dnd (Drupal 7)

I have been using the Scald module for few months now, with great experience. But there is one thing I haven't quite figured out yet.
When I have Drag'n'Drop enabled for a textarea (with CKEditor) I can drag images into the textarea and it displays in it's original size. If i Right-click the image I get the image properties for the image, but only at CSS level.
I'm trying to figure out how to add an Image Style to the image, so that my 4000x3000 image that I drag into the editor will be scaled down to a nicer 300x200 image where wanted, and therefor save some valuable bandwidth.
I found the answer after a pile of googling and reading through few articles. First and foremost it was the one about installing and configuring Scald. (Please Google, I can't post that many links :( )
I installed the CKEditor module, disabled the Wysiwyg module, downloaded the library into sites/all/libraries/, and finally read this article about contexts with Scald: https://drupal.org/node/2104651.
Bottom line, this is possible, but not easy (as sometimes Scald is), but when you get the hang of it, it's much better than the Media module.
I just struggled with this so thought I'd document how to set up contexts.
This is how you add new contexts which can use an image style formatter as a transcoder using the UI:
Go to /admin/structure/scald and click add context. Choose any name and details, but do check "Make parseable"
On the top of the original page for scald settings click "Contexts" in the upper right for "Image" under "Scald Unified Atom Types"
In the page that loads (/admin/structure/scald/image/contexts) you'll see your new context named. Open the fieldset and change the "Transcoder" from "Passthrough" to one of your image styles, e.g. "Large (image style)"
Now when you right-click on a image atom in a textarea wysiwyg and choose "Edit Atom Properties" you'll get a dialog with a new context to choose from. You can also go the default contexts provided by Scald and change them from "Passthrough" to one of your image styles.
Also, at the moment you also have to apply this change https://drupal.org/node/2046545 to scald.pages.inc or you'll lose your legend as you switch contexts or use the dev version. When 7.x-1.2 is released this will no longer be necessary.
I just ran across this same issue, using WYSIWYG 2.x-dev with CKEditor library 4.3, Scald 1.2. What fixed it was one of these things (sorry can't remember exactly which one):
Both "Scald DnD Integration" and "Scald SAS conversion" enabled in the relevant WYSIWYG profiles
The display settings for your image (at admin/structure/scald/image/display) have atom field set to enabled but image field set to hidden
You want to use the insert image module
https://drupal.org/project/insert
The easiest way to assign image styles to images going into a wysiwyg area

plonetruegallery: Download link or button, so users can download a viewed image?

I use collective.plonetruegallery for image galleries within Plone and I like it. However, what I miss is a "download" button or a simple "link" in order to let users actually download a image. The "Galleria" display view of plonetruegallery does seem to offer such a link/button -- does any of the other display views? Or any other solution whithout having to hack the plonetruegallery addon myself?
I know that you can right click and then choose "download image" among several other options within your preferred browser -- however, for a dumb user to cumbersome ;)
I have added an option to collective.ptg.contactsheet (1.1.2) that let you choose between going to the content or downloading it.
Espen
There's not a built-in "feature" to do this. You can see which of the gallery views might have this; looks like you've already found one. I'm sure you could easily customize another one to include such a link, simply by following the example in Galleria.
This is quite easy to make. The url to download the image would probably be:
/path/to/image/download
One option could be to just add an action.
If you want to have this for a specific gallery, I can probably fix it.
(go to https://github.com/collective/collective.ptg.contactsheet or whatever gallerytype you want it for and add an "Issue"
Espen

How to set report page size?

Maybe it is a newbie question, but I don't know how and where to set page size?
What is the difference between Generated Design and AutoDesignSpecs?
Why do I find the same object (label, text box etc) under either sections?
To set your page size right-click the design node of your report, then choose "printer setup" to select the printer and "page setup" to choose paper and orientation.
By googling around:
With the AutoDesignSpecs you give AX metadata of what you want to put
in the report, and AX renders this a runtime to get the layout. This
is a very flexible way to declare a report and should be used for most
regular reports.
With the GeneratedDesign you create the layout and control where to
put everything. This is something you'd need for documents like an
invoice or a packing slip.
You find the same object names in both because the generated design was initially created from the auto design yielding the same node names.
Also see Best Practices.

Showing Editors on click of a node in Xtratreelist

I am using the latest version of DevExpress XtratreeList and have a requirement of showing editors on click of each node on the tree. Please see this screenshot http://community.devexpress.com/forums/p/89574/310095.aspx
I am wondering how i can dynamically save and render a specific editor(rather a form) per node on the treelist. Clicking on "Friends" in the screenshot should bring up a different editor as compared to clicking on "Parties". Also, if a user tries to add more objects on the editor for Parties/Friends like say a Textbox/Listbox, it should be saved and come up fine when i click the nodes. Does anyone have ideas regarding how do i dynamically bring up different editors on click of a random node on the lefT?
This can be done by handling the TreeList's FocusedNodeChanged event. All you need to do is to determine the current FocusedNode and its values and show the required editor.

Drupal: CCK/Views problem

The problem is the next: I have a recipe with images, and I have a video with node reference to the recipe (so I can hav a one to many). (see here)
When there is a video, it should not show an image, when there is no video, it should show the image.
I created a block for displaysuite, and attached the video to it.(see here), in 2 displays.
Now all i want is a theming function where all the image and video's are in so I can do some logic and format everything, but the video's and images are processed sepperately.
Can anyone help me out please ?
Not totally sure what I am missing, but assuming your view works and you have a display that shows all of the proper fields, it should just be a matter of creating an instance of views-view-fields.tpl.php for your particular view and/or display, and putting your logic there. If you click on the Theme link on the view, it will show the view template suggestions.
At the moment, I did it this way:
I get all the video's and images from a Node. Because the images and videos are different displays (video's is an attachement) they are rendered by different template functions. So in the functions a create an object in the $GLOBALS variables, that stores all the videos and images.
Then I create a template that renders the entire node, and I check the images and video's in the $GLOBALS with some if else's.
Looks like a dirty method (it probabely is) but it works

Resources