TOPIC:

populate a fieldlist with joomla articles title 2 years 2 months ago #235154

  • greg.o
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 0
Oupss "I have changed in the language substitutions. It does not work." =
"I have changed in the language overrides. It does not work."

I use language overrides for change format date ex: DATE_FORMAT_LC2 value : l j F Y

I thought I could do it with your script too. But no;-)

I'll see your links! Thank you very much!!!!

Please Log in or Create an account to join the conversation.

populate a fieldlist with joomla articles title 2 years 2 months ago #235172

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello again,

I hope that you will manage to do it using examples from the links.

Let me know the result then.

Regards,

Mihaela
The following user(s) said Thank You: greg.o

Please Log in or Create an account to join the conversation.

populate a fieldlist with joomla articles title 2 years 2 months ago #235220

  • greg.o
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 0
Hello Mihaela,

I spent hours trying to find the solution. I don't understand much about scripting. I've done a lot of experiments, but nothing's going to work: -/

If you could help me, if it's not too complicated, of course!

You are a great help!!! Thank you very much for your support!

Please Log in or Create an account to join the conversation.

populate a fieldlist with joomla articles title 2 years 2 months ago #235228

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello again,

Thank you for your kind words.

I will try to help you with this then.

By default, the "created" date collected from the database is in format Y-m-d H:i:s .

In which format would you like it to display?

Regards,

Mihaela
The following user(s) said Thank You: greg.o

Please Log in or Create an account to join the conversation.

populate a fieldlist with joomla articles title 2 years 2 months ago #235231

  • greg.o
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 0
I would like the format "l d F Y" if the result (days and months) is in the default language of the site (deutch, french, another)

If not, just "d.m.Y" simply.

Thank you very much!!!!! You're really very kind!

Please Log in or Create an account to join the conversation.

populate a fieldlist with joomla articles title 2 years 2 months ago #235237

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello again,

The solution for this turns out to be quite simple.

This code to display the date in "l d F Y" format is the following, but I assume it will be displayed in English.
$this->execPieceByName('ff_InitLib');
$db = JFactory::getDBO();
$db->setQuery('Select title, created From #__content Where catid=2 OR catid=3 AND state =1'); 
 
$result = $db->loadAssocList(); //load the result from the query
$test = "";
for ($i = 0; $i < count($result); $i++)
{
    $tmpDate = $result[$i]['created'];
    $newDate = date("l d F Y", strtotime($tmpDate));
    $test .= "0;".$result[$i]['title']. " ".$newDate .";".$result[$i]."\n";
}
 
function ff_setSelectList($name, $value)
{
     global $ff_processor;
     for ($r = 0; $r < $ff_processor->rowcount; $r++)
     {
          $row =& $ff_processor->rows[$r];
          if ($row->name==$name)
          $row->data2 = $value;
          unset($row);
     } // for
} // ff_setSelectList
ff_setSelectList('SELECTLISTNAME', $test);
NOTE: Once again in the code don't forget to replace SELECTLISTNAME with the name of your select list.

To display the date in format "d.m.Y" just replace in the code above this line of code:
$newDate = date("l d F Y", strtotime($tmpDate));
with this one:
$newDate = date("d.m.Y.", strtotime($tmpDate));

I hope that this will work out as you wanted. :)
Let me know whether it does.

Regards,

Mihaela
The following user(s) said Thank You: greg.o

Please Log in or Create an account to join the conversation.

Last edit: Post by mihaela.
Moderators: ForumSupport
Time to create page: 0.052 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!