This topic is locked

exporting

7/14/2006 10:32:33 AM
PHPRunner General questions
A
amirgulamali author

Hi all,

I have a table with email addresses appearing as Email Hyperlinks. Thats great, however when I export the table in any format (CSV, XML, XLS, DOC), the emails appear as
<a href="mailto:blablabla@blablaa.com">abedinma@mcmaster.ca</a>
Is there anyway I could export only the emails in any file format without the mailto code?

like this: blablabla@blablaa.com (only)

A
amirgulamali author 7/16/2006

Guess its impossible...

anyone from the admin side?

kujox 7/16/2006

I would guess that you have to write some code in the export routine to strip out the code for the email field, I cant see anywhere in the events to put it.
This should work if you can find out where it needs to go.
$email = "<a href="mailto:blablabla@blablaa.com">abedinma@mcmaster.ca</a>";

$temp = html_entity_decode($email);

$new = strip_tags($temp);

Alexey admin 7/17/2006

Amir,
I see what you saying.
Open your ..._export.php file with a text editor and replace all occurencies of Email Hyperlink with nothing.

I.e. change this:

$format="Email Hyperlink";

to:

$format="";


We'll fix this issue in the next version of PHPRunner.

A
amirgulamali author 7/17/2006

Thanx,
I have many tables and many ..._export pages

Is there any other way i could do this so that all my generated pages dont have the hyperlink..

Anywhere in \Program Files\PHPRunner\sourcefolder?

Alexey admin 7/18/2006

Amir,
sure.

Find all occurencies of this line in source\export.php file:

if($format==FORMAT_CHECKBOX)

and replace them with:

if($format==FORMAT_CHECKBOX || $format==FORMAT_HYPERLINK || $format==FORMAT_EMAILHYPERLINK)


Then rebuild your pages.

A
amirgulamali author 7/18/2006

thanx alexey.. that works!!!