Welcome, Guest

Changing delimiter
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Changing delimiter

Changing delimiter 2 years, 2 months ago #10175

The form data I'm exporting contains semicolons. Is there a way to alter the delimiter? How is this done?
  • usagi
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
"I don't bear a grudge. I have no surviving enemies."

Re: Changing delimiter 2 years, 2 months ago #10181

Hi,

you can try to hack the file adminitrator/components/com_facileforms/admin/records.class.php.

There is this code quite in the beginning of that file:

for($r = 0; $r < count($recs); $r++) {
			$rec = $recs[$r];
			$csv .= $rec->id.'; '.
					$rec->submitted.'; '.
					htmlspecialchars($rec->title).'; '.
					$rec->ip.'; '.
					htmlspecialchars($rec->browser).'; '.
					htmlspecialchars($rec->opsys).'; '.
					htmlspecialchars(BFText::_('PayPal Transaction ID: ') . ' ' . $rec->paypal_tx_id).'; '.
					htmlspecialchars(BFText::_('PayPal Transaction date: ') . ' ' . $rec->paypal_payment_date).'; '.
					htmlspecialchars($rec->paypal_testaccount ? BFText::_('PayPal testaccount') : BFText::_('PayPal live account') ).'; '.
					htmlspecialchars(BFText::_('PayPal download tries: ') . ' ' . $rec->paypal_download_tries).'; '
					;
			$database->setQuery(
				"select * from #__facileforms_subrecords where record = $rec->id order by id"
			);
			$subs = $database->loadObjectList();
			for($s = 0; $s < count($subs); $s++) {
				$sub = $subs[$s];
				$csv .= htmlspecialchars($sub->value).'; ';
			} // for
			$csv .= nl();
		} // for


Change it to this


for($r = 0; $r < count($recs); $r++) {
			$rec = $recs[$r];
			$csv .= $rec->id.', '.
					$rec->submitted.', '.
					htmlspecialchars($rec->title).', '.
					$rec->ip.', '.
					htmlspecialchars($rec->browser).', '.
					htmlspecialchars($rec->opsys).', '.
					htmlspecialchars(BFText::_('PayPal Transaction ID: ') . ' ' . $rec->paypal_tx_id).', '.
					htmlspecialchars(BFText::_('PayPal Transaction date: ') . ' ' . $rec->paypal_payment_date).', '.
					htmlspecialchars($rec->paypal_testaccount ? BFText::_('PayPal testaccount') : BFText::_('PayPal live account') ).', '.
					htmlspecialchars(BFText::_('PayPal download tries: ') . ' ' . $rec->paypal_download_tries).', '
					;
			$database->setQuery(
				"select * from #__facileforms_subrecords where record = $rec->id order by id"
			);
			$subs = $database->loadObjectList();
			for($s = 0; $s < count($subs); $s++) {
				$sub = $subs[$s];
				$csv .= htmlspecialchars($sub->value).', ';
			} // for
			$csv .= nl();
		} // for
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.48 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany