Closed (fixed)
Project:
Custom Formatters
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2011 at 02:54 UTC
Updated:
11 Jul 2015 at 12:34 UTC
Jump to comment: Most recent
Comments
Comment #1
deciphered commentedSorry for taking so long, but below is the code you want.
Single value formatter:
Multiple values formatter:
Comment #2
barwonhack commentedYou are a legend!
Comment #4
Jerome F commentedthank you - subscribing to keep it in mind
Comment #5
TimelessDomain commentedThis is my 1st custom written php snippet. If you can improve upon it post.
This takes the image url & converts it into an embedded image with colorbox popup. I didn't know how to mod this so it works for multiple images,. If its possible to only have the first image show embedded & then the rest in colorbox, that would be great! Also - could someone could post how to link this to the node? thanks
Comment #6
Jerome F commented@TimelessDomain you could also just just use the url formatter and take care of the rest in views with fields and rewrite rules. I tried to find a solution for the multiple images, but apparently colorbox needs to have all the actual images on the page to make the popup, and I couldn't find any other workaround, appart from using views slideshow in a colorbox trigger field: http://drupal.org/node/1161274#comment-4485714
Comment #7
deciphered commented@TimelessDomain
Quick coding standards rewrite:
Note: Untested, but should be right.
Comment #8
Lithops commentedHi,
I try this with 7.x-2.0-beta2 :
I have the right path, but without the filename at the end.
a little help?
Sorry for my english... ;)
Comment #9
deciphered commentedThe structure of the $variables object has changes in 7.x-2.x, it would now be: $variables['#items'][0]['uri']
Comment #10
sachbearbeiter commentedsubscribe
Comment #11
julien.reulos commentedI also work with the 7.x-2.x-dev version and a multiple link_field field type.
The code that is working for me (in this particular case, to render image links as thumbnails) is:
Comment #12
barwonhack commented#8 and #9 no longer seem to work in Drupal 7.21
Any suggestions?
Comment #13
summit commentedHi, is #11 still valid? is it to be used with the link module?
EDIT I did a time back this: https://drupal.org/node/1397700#comment-5443478
Greetings, Martijn
Comment #14
deciphered commentedMost likely the reason they stopped working is due to the addition of itok for DDOS protection.
See https://api.drupal.org/comment/49773#comment-49773 for workaround.