i am using the image assist module to insert images into my stories. i would like to know if it is possible to "strip" the images from the printer friendly page, perhaps by eliminating the "span" tags with some css code or other method.
Thanks,
Colin
Comments
Comment #1
jcnventuraIt's always possible to do that. You can either use your own CSS file and hide all the images that way, or you can modify the print.tpl.php to preg_replace those span tags inside the print['content'] variable with an empty string.
Since I am not a user of the 'image assist' module, I don't understand why you want to remove images from the node. Can you explain how the image assist module places those images in the node?
João
Comment #2
thechraveler commentedimage assist is used to insert images from the image module into the body or teaser of a node. the end result is code such as the following:
<span class="inline inline-center"><img src="http://www.chraveler.net/livingcity/sites/all/files/images/nationalStadiumPano.preview.jpg" alt="" title="" class="image image-preview" width="600" height="331" /></span>However, with the default printer friendly page layout, it spaces the images as so to create an unnecessary amount of white space on the page. see this link and click the print link at the bottom for an example:
http://www.chraveler.net/livingcity/content/2008/07/pope-and-american-ch...
Really all I would like to know how to do is strip the span tags out of the page so no images are printed. Do you have the CSS code to do so available? If so , I would greatly appreciate it!
- Colin
Comment #3
jcnventuraCan I ask you to try yesterday's 5.x-3.7 release?
I made a change so that the CSS of loaded modules is now being included also in the printer-friendly pages. It might be that that also solves your problem.
Other than that, the solution would be to add float styles to the print.css, but I really think that the new feature will include the image assist CSS files and solve this.
João
Comment #4
jcnventuraNo further comments received in two weeks.
Closing the issue.
Comment #5
thechraveler commentedsorry reopening
i upgraded to the 4.0 version which now displays the image assist - inserted images nicely. However my client still wants no images in the printable page. I put "#img {display: none;}" in the main print.css file and it strips out the images (which is what i want) but the span tags (as mentioned a few posts above) remain and so do the captions. I'd like to strip out the span tags as well. Anyone know how to do this?
Thanks,
Colin
Comment #6
drupalfan81 commentedI would like to remove photos and Google ads from my printer friendly pages, anyone know how to do this? I tried:
#img {display: none;} but it didn't work for some reason.
Josh
Comment #7
quwat commentedI am also struggling to remove the google ads from the content of print version and I am using adsense inject module to dispay the ads. I am using imagefiled for images. Any help?