Skip to content

Instantly share code, notes, and snippets.

View design-innovations's full-sized avatar

Jonathan Shroyer design-innovations

View GitHub Profile
<?php echo $this->item->jcfields[0]->value; ?>
## The number is the ID of the field NOT the number in the array
<?php echo $item->jcfields[JText::_('JCFIELDS_FIELDNAME')]->value; ?>
## FIELDNAME is the NAME of the field as you have saved it
## or turn core fields into names
<?
$tweet = data('https://publish.twitter.com/oembed?url=https://twitter.com/twitter/status/'.$tweet_id);
//var_dump($tweet);exit;
$name = $tweet->author_name;
$url = $tweet->author_url;
$handle = '@'. preg_filter('#https://twitter.com/#siU', '', $url);
$html = preg_filter('#<script(.*)>(.*)<\/script>#siU', '', $tweet->html);
?>
<div class="w-96 m-auto bg-white rounded-xl border border-gray-300 pt-4 pb-2 px-4">
<div class="flex">