Files
Component-Builder/admin/layouts/mastodon.php
Robot f8b0a5df54 Release of v3.2.5
Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument  above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed.
2025-02-14 22:59:16 +02:00

72 lines
2.1 KiB
PHP

<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('JPATH_BASE') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
// Extract all keys from $displayData as individual variables.
extract($displayData ?? []);
// The 'id' parameter, defaulting to mastodon-feed.
$id ??= 'mastodon-feed';
// The button 'id' parameter, defaulting to refresh-feed.
$button_id ??= 'refresh-feed';
// The mastodon instance URL
$instance ??= 'https://joomla.social';
// The user account ID
$account ??= '112766899254600077';
// The number of post to load
$posts ??= 5;
// The 'invite_url' parameter, defaulting to https://joomla.social/invite/gzAvC48K.
$invite_url ??= 'https://joomla.social/invite/gzAvC48K';
// The 'invite_heading' parameter.
$invite_heading ??= Text::_("COM_COMPONENTBUILDER_LLEWELLYNS_JOOMLA_SOCIAL_FEED");
// The 'invite_title' parameter.
$invite_title ??= Text::_("COM_COMPONENTBUILDER_JOIN_JCBS_LEAD_DEVELOPER_ON_JOOMLA_SOCIAL_A_MASTODON_INSTANCE");
?>
<div class="well well-small mastadon-display-block">
<h2>
<a
href="<?php echo $invite_url; ?>"
title="<?php echo $invite_title; ?>">
<?php echo $invite_heading; ?>
</a>&nbsp;&nbsp;
<a
type="button"
id="<?php echo $button_id; ?>"
href="#"
title="<?php echo Text::_('COM_COMPONENTBUILDER_REFRESH_FEED'); ?>">
<i class="icon-loop"></i>
</a>
</h2>
<div id="<?php echo $id; ?>"
data-instance="<?php echo $instance; ?>"
data-account-id="<?php echo $account; ?>"
data-post-count="<?php echo $posts; ?>">
</div>
<script>
new MastodonFeed("<?php echo $id; ?>", "<?php echo $button_id; ?>");
</script>
</div>