- Posts: 60
- Thank you received: 0
Social Goodies in Single Sermon Icons View
- Manuel Kuhs
- Topic Author
- Offline
- Senior Member
I think the big blank space in the bottom right of the beautiful Icon layout for single sermons would be the perfect place for some "social goodies" (i.e. sharing buttons):
Perhaps a very efficient way to implement this is like K2's "Social Button code" setting in the parameters, where you simply paste your, well, social button code (e.g. from ShareThis or AddThis), and the output is placed between K2 item text and title.
Similarly, SermonSpeaker could have a "Social Button code" section in the parameters for Icon view, which places the output in the big blank space I've indicated.
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
I wrote a basic guide on how to create custom module positions in a layout some months ago:
www.sermonspeaker.net/documentation/layo...e-layout-tricks.html
I'm not sure if I should include such module positions by default or if the user should create those as needed. The problem with default module positions would be that every second user would like another position
Please Log in or Create an account to join the conversation.
- Manuel Kuhs
- Topic Author
- Offline
- Senior Member
- Posts: 60
- Thank you received: 0
I copied & renamed the icon.php and icon.xml files and just added in the module code that you referenced like this:
<div class="ss-fields-container">
<?php if (in_array('sermon:date', $this->columns) && ($this->item->sermon_date != '0000-00-00 00:00:00')) : ?>
<div class="ss-field field-calendar" title="<?php echo JText::_('COM_SERMONSPEAKER_FIELD_DATE_LABEL'); ?>">
<?php echo JHTML::Date($this->item->sermon_date, JText::_('DATE_FORMAT_LC1'), true); ?>
</div>
<?php endif;
if (in_array('sermon:length', $this->columns) && ($this->item->sermon_time != '00:00:00')) : ?>
<div class="ss-field field-time" title="<?php echo JText::_('COM_SERMONSPEAKER_FIELD_LENGTH_LABEL'); ?>">
<?php echo SermonspeakerHelperSermonspeaker::insertTime($this->item->sermon_time); ?>
</div>
<?php endif; ?>
<?php jimport('joomla.application.module.helper');
$modules = JModuleHelper::getModules('sermonspeaker');
foreach($modules as $module):
echo JModuleHelper::renderModule($module);
endforeach; ?>
</div>
I then created a Custom HTML module assigned to the sermonspeaker position, and inserted the AddThis HTML code into this.
The result is shown in the picture here - the highlight is using the Chrome code highlight function, showing the position of the AddThis:
I'm sure there's a really simple solution which my coding incompetence is preventing me from seeing! Can you help?
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
This is how it looks for me:
joomla16.hopto.org/sermons/sermon/17-the...oze.html?layout=icon
maybe you messed up the code in your custom HTML module?
Please Log in or Create an account to join the conversation.
- Manuel Kuhs
- Topic Author
- Offline
- Senior Member
- Posts: 60
- Thank you received: 0
The AddThis module definitely works properly now since it looks perfect when displayed in a standard module position.
I think I need to move the module to be displayed BESIDE the date? But I'm not sure how to do that
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
The info is all floated left. So you probably have to add this style to the module as well so it looks good.
Without an URL of the site it's hard to say what you would have to do exactly. That depends a lot on the template and the code you used.
Please Log in or Create an account to join the conversation.