Hi Lads !
Thanks for previous help with F2C article 'Export'.
For the record, all went well until I had a couple of import fails. It took me a while to figure out the problem - it was the encoding "UTF-8" - XML decoder spat the dummy during import!
The editor I use in Joomla (JCE) is setup to force "UTF-8" but it let through some curly inverted comma's, which came it to the offending article via a 'Cut & Paste'. After removing those curly inverted commas, re-saving, re-exporting, article imported OK.
As a result i'm now using 'Notepad++' in MS Windows with 'Encoding' set to 'UTF-8' to force encoding during article prep, saving, closing, then reopening, then cutting & pasting result into F2C. Long winded, but clean.
Ok, As we all know F2C is the best tool ever for Joomla AND I know you guy's like a challenge !! So here's a good one for you to chew on:
I need to select articles for export from the front end.
I plan to use 'ChronoConnectivity' to pull articles from DB into a form. In preparation for this exercise I have added a new column to '_f2c_form' called 'exported' with default value of '0'.
Next I will use SQL to populate the 'ChronoConnectivity' form with SQL something like this:
$ database = JFactory::getDBO();
$ database-> setQuery("SELECT title,ID FROM #_f2c_form WHERE CreatedDate >= DATEADD(day,-2, GETDATE()) AND exported = 0"
$ exportablearticles = $database->loadResult();
OK - If SQL is correct I will have a list of exportable articles created in the last 2 days. Next, I need to access the function 'public function export($cid)' in '/administrator/components/com_form2content/models/form.php' to process the export.
* Doesn't seem to reference any other functions - looks self-contained to me.
In 'public function export($cid)' is 'foreach($cid as $id)'. I am assuming here that '$cid' is an array created by the form from listings selected by check box which contains title, ID etc. of each article selected for export.
So, not sure which is the best approach from here on: I could copy all of '/administrator/components/com_form2content/models/form.php' into a 'ChronoConnect' 'Action', and execute 'public function export' there ... OR .... what would you advise?
All help and guidance much appreciated - Happy Xmas to all,
Questions and answers for Form2Content, a Joomla CCK.