We use the CSV export file for an ACCESS database. Now some German characters are exported differently in this CSV-File. In the column “EventDescription” and “EventName” there is a HTML code for the german “Ü” (Ü!).
In the Event-Location column, the “Ü” is exported without HTML as “Ü”.
How can i unify that?
Mar 15,2017 AT 8:18AM - 4 years ago -Thank you for your messages, I am going to assign this ticket to Ashan and he will be able to take it from here and find you a solution. Please allow some time for him to get back to you, we greatly appreciate your patience and thank you for being a eventon customer!
In the eventon/includes/admin/class-admin-ajax.php file line around 160 there are htmlentities() function that converts to html so you can remove those there are multiple of those in there and u can remove those if that is what you want. We will add an option in the future version for this to be optinal.
ok. Remove is no problem. But how can i add some new fields?
I have tried it so for the Event Location, but it does not work:
// event location
$eventLocation = get_the_title();
$eventLocation = htmlentities($eventLocation);
//$output = iconv(“utf-8”, “ascii//TRANSLIT//IGNORE”, $eventLocation);
//$output = preg_replace(“/^’|[^A-Za-z0-9s-]|’$/”, ”, $output);
$csvRow.= ‘”‘.$eventLocation.'”,’;
What? add new fields??? earlier you just wanted to fix character issue. And thats what I gave my solution for. At the moment it doesnt suppose adding new fields to export CSV file.
Hi, i don want to add ne fields. i need the HTML-Code for the german signs in the entire CSV file.
At the moment there is the HTML-Code only in the Event Name and in the Event Description, but not in the Event Location. Event Location is a standard-field in the Export-CSV-File.
Oh i see what you need my apologies.
I have pointed to the places where I have added the htmlconversion function. please copy this to your file as well. Let me know if this work
cheers.
Hi, thank you. It works now.
Only the columns cmd_1 to cmd_4 still have german signs. Can you change that?
please try the same thing in the code. I will make those updates in the next eventon version.
Cheers!
I’m sorry. The script for Custom Meta is different and it does not work. I am not a programmer and am not sure which line I should use “$ value = htmlentities”:
}
// for event custom meta data
for($z=1; $z<=$cmd_count; $z++){
$cmd_name = ‘_evcal_ec_f’.$z.’a1_cus’;
$csvRow.= (!empty($pmv[$cmd_name])?
‘”‘.str_replace(‘”‘, “‘”,$pmv[$cmd_name][0]).'”‘
:”);
$csvRow.= “,”;
}
No worries, if you would like to send us FTP access to your site myself or one of our admins will be able to login and make that change for you. Thanks
I can make the change. Send me only the adapted script
Fine. So you basically have to add htmlentities($pmv[$cmd_name][0]) where is says just $pmv[$cmd_name][0], make sense?