[development] CSV export image path

Marolijo - Pol maresma marolijo at yahoo.es
Wed Feb 20 09:08:52 UTC 2008

Hello, I'm tryin' to change how the views csv exports cck image.
It puts entire <img src="...> tag but I need only the URL of the file.
I think I need to use something like this
if (fieldtype = image){
    $value = $field['id']['filepath'];
into this part of the module, but I don't know how...
I tried also the img parameter on preg_replace() but it strips all the fiel
foreach ($view->field as $field) {
    if ($fields[$field['id']]['visible'] !== false) {
        $value = views_theme_field('views_handle_field',
$field['queryname'], $fields, $field, $node, $view); 
        $value = preg_replace('/<\/?(a|span|li|ul|div) ?.*?>/', '', $value);
// strip 'a' and 'span' tags 
        $value = str_replace(array("\r", "\n", ','), ' ', $value); // strip
line breaks and commas
        $value = str_replace('"', '""', $value); // escape " characters
        $value = decode_entities($value);
        $values[] = '"' . $value . '"';
Thank's for all!
Pol Maresma /
PolNetwork.com / Serveis d'Internet
msn: marolijo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20080220/b340ee5d/attachment-0001.htm 

More information about the development mailing list