<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>Modify Views CSV Export</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hello, I need to modify this function to allow it to export imagefield as a full path, not full <img src=…> tag.</FONT>
<BR><FONT SIZE=2 FACE="Arial">How can I filter the imagefield fields to do something like</FONT>
<BR><FONT SIZE=2 FACE="Arial">If (fieldtype=imagefield){</FONT>
<BR> <FONT SIZE=2 FACE="Arial">$value = $field ['filepath']</FONT>
<BR><FONT SIZE=2 FACE="Arial">}else{</FONT>
<BR> <FONT SIZE=2 FACE="Arial">...</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thank's!!!</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">////////////////////////////////////</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New"> foreach ($nodes as $node) {</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> $values = array();</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> foreach ($view->field as $field) {</FONT>
<BR> <FONT SIZE=2 FACE="Courier New">if ($fields[$field['id']]['visible'] !== false) {</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> $value = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view); </FONT>
<BR> <FONT SIZE=2 FACE="Courier New"> $value = preg_replace('/<\/?(a|span|li|ul|div) ?.*?>/', '', $value); // strip 'a' and 'span' tags </FONT></P>
<P><FONT SIZE=2 FACE="Courier New"> $value = str_replace(array("\r", "\n", ','), ' ', $value); // strip line breaks and commas</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> $value = str_replace('"', '""', $value); // escape " characters</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> $value = decode_entities($value);</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> $values[] = '"' . $value . '"';</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New"> } </FONT>
<BR><FONT SIZE=2 FACE="Courier New"> }</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> $output .= implode(',', $values) . "\r\n";</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> }</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Pol Maresma / </FONT><A HREF="mailto:pol@polnetwork.com"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">pol@polnetwork.com</FONT></U></A><FONT SIZE=2 FACE="Arial"> </FONT>
<BR><FONT SIZE=2 FACE="Arial">PolNetwork.com / Serveis d'Internet</FONT>
<BR><FONT SIZE=2 FACE="Arial">msn: marolijo</FONT>
</P>
</BODY>
</HTML>