Go Back   Mosets Community > Mosets Announcements and Discussions > Mosets & Joomla

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-12-2013, 06:29 PM
simonrodway simonrodway is offline
Mosets'd
 
Join Date: May 2011
Posts: 83
Default Social bookmarks in Mosets Tree

I have seen a few posts in the forum about social bookmarking, and how to get social sharing icons or buttons onto listing pages in Mosets. My advice: take a look at Fancy Bookmarks, listed in the JED. They are on my site at www.linemine.com if you want to see it working. There were a few problems getting the plugin to work with Mosets 3 initially, and also watch out for the fact that Kinabalu has 8 different layouts, as the code snippet the developers provided only worked with the default, but they sorted all of this out in a few hours. The price seems a bit much for such a simple feature, but if you consider it covers the customisation needed to make the plugin work in Mosets listings, its good value.
Reply With Quote
  #2  
Old 10-03-2013, 03:58 PM
simonrodway simonrodway is offline
Mosets'd
 
Join Date: May 2011
Posts: 83
Default Addition to this post

Re the above post about social bookmarking, its actually not necessary to spend any money at all on extensions, just use ShareThis. Register on their site as a publisher, and use the following code inserted into a sub_listingDetailsStyle.tpl.php file, where there will be a number from 2 to 8 at the end of "Style", so you also have to choose which details layout you want in Kinabalu. Where you put this code is up to you, but I paste it into the very top of the page above the listing details.

<div id="sharethis">
<span class='st_facebook_button' displayText='Facebook'></span>
<span class='st_twitter_button' displayText='Tweet'></span>
<span class='st_linkedin_button' displayText='LinkedIn'></span>
<span class='st_plusone_button' displayText='Google +1'></span>
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "YOUR PUBLISHER ID", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>
</div>

Get your publisher number from your account details in ShareThis and insert into the code where it says YOUR PUBLISHER ID....and voila....
You can add other social bookmarking buttons as well as the ones shown.
Reply With Quote
  #3  
Old 01-20-2014, 09:09 AM
raulgarciacueto raulgarciacueto is offline
Mosets'd
 
Join Date: Jan 2014
Posts: 5
Default

Hello. Where do I can download this plugin social buttons?, Thanks
Reply With Quote
  #4  
Old 01-20-2014, 07:32 PM
simonrodway simonrodway is offline
Mosets'd
 
Join Date: May 2011
Posts: 83
Default

Hi
If you read the post again, you'll see its not a plugin, just a way to display social network buttons on the Mosets listing page, using the free ShareThis service. Just follow the steps I've given.
Reply With Quote
  #5  
Old 01-21-2014, 02:07 AM
raulgarciacueto raulgarciacueto is offline
Mosets'd
 
Join Date: Jan 2014
Posts: 5
Default

Hello.
I try and not work.
Template: sub_listingDetailsStyle5.tpl.php
I have joomla 2.5
could tell me where I can put the code? to look below the image in the template
thanks
<div id="listing">

<h2><?php
$link_name = $this->fields->getFieldById(1);
$this->plugin( 'ahreflisting', $this->link, $link_name->getOutput(1), '', array("delete"=>true,"link"=>false) )
?></h2>

<?php
if ( !empty($this->mambotAfterDisplayTitle) ) {
echo trim( implode( "\n", $this->mambotAfterDisplayTitle ) );
}

if ( !empty($this->mambotBeforeDisplayContent) && $this->mambotBeforeDisplayContent[0] <> '' ) {
echo trim( implode( "\n", $this->mambotBeforeDisplayContent ) );
}
echo '<div class="column first">';

echo '<div class="listing-desc">';

if ($this->config->getTemParam('skipFirstImage','0') == 1) {
array_shift($this->images);
}

if(!is_null($this->fields->getFieldById(2))) {
$link_desc = $this->fields->getFieldById(2);
echo $link_desc->getOutput(1);
}
echo '</div>';
if ( !empty($this->mambotAfterDisplayContent) ) { echo trim( implode( "\n", $this->mambotAfterDisplayContent ) ); }

if( $this->config->get('show_favourite') == 1 || $this->config->get('show_rating') == 1 )
{
echo '<div class="rating-fav">';
if($this->config->get('show_rating')) {
echo '<div class="rating">';
$this->plugin( 'ratableRating', $this->link, $this->link->link_rating, $this->link->link_votes);
echo '<div id="total-votes">';
if( $this->link->link_votes <= 1 ) {
echo $this->link->link_votes . " " . strtolower(JText::_( 'COM_MTREE_VOTE' ));
} elseif ($this->link->link_votes > 1 ) {
echo $this->link->link_votes . " " . strtolower(JText::_( 'COM_MTREE_VOTES' ));
}
echo '</div>';
echo '</div>';
}

if($this->config->get('show_favourite')) {
?>
<div class="favourite">
<span class="fav-caption"><?php echo JText::_( 'COM_MTREE_FAVOURED' ) ?>:</span>
<div id="fav-count"><?php echo number_format($this->total_favourites,0,'.',',') ?></div><?php
if($this->my->id > 0){
if($this->is_user_favourite) {
?><div id="fav-msg"><a href="javascript:fav(<?php echo $this->link->link_id ?>,-1);"><?php echo JText::_( 'COM_MTREE_REMOVE_FAVOURITE' ) ?></a></div><?php
} else {
?><div id="fav-msg"><a href="javascript:fav(<?php echo $this->link->link_id ?>,1);"><?php echo JText::_( 'COM_MTREE_ADD_AS_FAVOURITE' ) ?></a></div><?php
}
} ?>
</div><?php
}
echo '</div>';
}

echo '</div>';

echo '<div class="column second">';

echo '<h3>';
echo MText::_( 'LISTING_DETAILS', $this->tlcat_id );
echo '</h3>';
// Address
$address = '';
if( $this->config->getTemParam('displayAddressInOneRow','1') ) {
$address_parts = array();
$address_displayed = false;
foreach( array( 4,5,6,7,8 ) AS $address_field_id )
{
$field = $this->fields->getFieldById($address_field_id);
if( isset($field) && $output = $field->getOutput(1) )
{
$address_parts[] = $output;
}
}
if( !empty($address_parts) ) { $address = implode(', ',$address_parts); }
}

// Other custom fields
echo '<div class="fields">';
$number_of_columns = $this->config->getTemParam('numOfColumnsInDetailsView','1');
$field_count = 0;
$need_div_closure = false;
$this->fields->resetPointer();
while( $this->fields->hasNext() ) {
$field = $this->fields->getField();
$value = $field->getValue();
$hasValue = $field->hasValue();
if(
(
(
(!$field->hasInputField() && !$field->isCore() && empty($value))
||
(!empty($value) || $value == '0')
)
&&
// This condition ensure that fields listed in array() are skipped
!in_array($field->getName(),array('link_name','link_desc'))
&&
(
(
$this->config->getTemParam('displayAddressInOneRow','1') == 1
&&
!in_array($field->getId(),array(5,6,7,8))
)
||
$this->config->getTemParam('displayAddressInOneRow','1') == 0
)
&&
$hasValue
)
||
// Fields in array() are always displayed regardless of its value.
in_array($field->getName(),array('link_featured'))
) {
if( $field_count % $number_of_columns == 0 ) {
echo '<div class="row0">';
$need_div_closure = true;
}

echo '<div class="fieldRow'.(($field_count % $number_of_columns == ($number_of_columns -1))?' lastFieldRow':'').'" style="width:'.floor(98/intval($number_of_columns)).'%">';

if($this->config->getTemParam('displayAddressInOneRow','1') && in_array($field->getId(),array(4,5,6,7,8)) && $address_field = $this->fields->getFieldById(4)) {
if( $address_displayed == false ) {
echo '<div class="caption">';
if($address_field->hasCaption()) {
echo $address_field->getCaption();
}
echo '</div>';
echo '<div class="output">';
echo $address_field->getDisplayPrefixText();
echo $address;
echo $address_field->getDisplaySuffixText();
echo '</div>';
$address_displayed = true;
}
} else {
echo '<div class="caption">';
// echo $field->getId();
if($field->hasCaption()) {
echo $field->getCaption();
}
echo '</div>';
echo '<div class="output">';
switch($field->getFieldType()) {
case 'mfile':
echo $field->getDisplayPrefixText();
echo '<p class="mbutton">';
echo $field->getOutput(1);
echo '<p>';
echo $field->getDisplaySuffixText();
break;

case ( $field->getFieldType() == 'coreprice' && $field->getValue() == 0 ):
echo $field->getOutput(1);
break;

default:
echo $field->getDisplayPrefixText();
echo $field->getOutput(1);
echo $field->getDisplaySuffixText();
}
echo '</div>';
}
echo '</div>';

if( ($field_count % $number_of_columns) == ($number_of_columns-1) ) {
echo '</div>';
$need_div_closure = false;
}
$field_count++;
}
$this->fields->next();
}
if( $need_div_closure ) {
echo '</div>';
$need_div_closure = false;
}

if (!empty($this->images)) include $this->loadTemplate( 'sub_images.tpl.php' );

echo '</div>';

echo '</div>';

if( $this->show_actions_rating_fav ) {
?>
<div class="actions-rating-fav">
<?php if( $this->show_actions ) { ?>
<div class="actions">
<?php
$this->plugin( 'ahrefreview', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefrecommend', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefprint', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefcontact', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefvisit', $this->link, '', 1, array("rel"=>"nofollow") );
$this->plugin( 'ahrefreport', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefclaim', $this->link, array("rel"=>"nofollow") );
$this->plugin( 'ahrefownerlisting', $this->link );
$this->plugin( 'ahrefmap', $this->link, array("rel"=>"nofollow") );
?></div><?php
}
?></div><?php
}

// Load User Profile
if( $this->config->get('show_user_profile_in_listing_details') )
{
include $this->loadTemplate( 'sub_userProfile.tpl.php' );
}

// Load Contact Owner Form
if( $this->config->get('contact_form_location') == 2 )
{
include $this->loadTemplate( 'sub_contactOwnerForm.tpl.php' );
}

?>
</div>
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mosets Tree 2.2.0 for Joomla 1.6 released dknight Announcements 0 02-24-2011 11:21 AM
Mosets Tree 2.0.6 released dknight Announcements 3 04-01-2008 03:53 PM
Mosets Tree 2.0.4 upgrade available dknight Announcements 0 11-21-2007 01:11 PM
Mosets Tree 2.0 released dknight Announcements 0 08-02-2007 05:32 PM


All times are GMT +8. The time now is 04:49 AM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.