Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.1.5, date_i18n, getDates(), getImageMeta()
- This topic has 5 replies, 2 voices, and was last updated 8 years, 5 months ago by
Steven Zahm.
-
AuthorPosts
-
12/14/2014 at 5:46 pm #312788
Fabrice Locher
ParticipantHi Steven
I need the unformatted values from an entry.
Is it possible to load the unformatted values in different variables (PHP-Code should be in the card.php).For example:
- Website
- Address (ok, the address elements like street 1 and so could be in an array)
- the different dates element (birthday…)
and other elements.
Thanks for your help!
Regards,
12/16/2014 at 10:02 am #312891Steven Zahm
Keymaster@ Fabrice
Yes … all data is available unformated. Use the
get...
methods from the class.entry-data.php file. They are all available thru the$entry
variable in the template.Hope that helps!
12/17/2014 at 3:16 pm #313036Fabrice Locher
ParticipantHi Steven Yeah, i can get the unformatted data! Many thanks!
But can you say me how to get only one type in the output? I don’t know which $atts I can use.Here my function:
$fldates = $entry->getDates(array(), TRUE, TRUE ); foreach ($fldates as $fldate) { $fldateoutput .= $fldate->date; }
But how can I only get the “birthdate”? Thanks!
And: The dates I get with:
$fldates = $entry->getDates(array(), TRUE, TRUE ); foreach ($fldates as $fldate) { $fldateoutput .= $fldate->date; }
Is it possible to format the date to d.m.Y?
Regards,
12/18/2014 at 9:46 am #313102Steven Zahm
Keymaster@ Fabrice
to get just birthdays you would use:
$fldates = $entry->getDates( array( 'type' => 'birthday' ) );
To format the date you would do something like this:
date_i18n( 'd.m.Y', strtotime( $fldate->date ), FALSE )
Hope that helps, have fun!
12/25/2014 at 8:20 am #313380Fabrice Locher
ParticipantHey Steven
Great, thank you so much!
Just one last thing:
At the moment I get the OriginalImagePath with$entry->getOriginalImagePath( 'photo' ))
Can you say me how I can get the thumbnail path? Thanks!
12/26/2014 at 9:58 am #313401Steven Zahm
Keymaster@ Fabrice
$image = $this->getImageMeta( array( 'type' => 'photo', 'size' => 'thumbnail', ) );
This will return an array of image meta which will include its URL.
Hope that helps!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.