How do you change the bookmarks in the aheadWorks Blog extension for Magneto Community?

Sep 18, 2012 -

This is how you change the bookmarks in the aheadWorks Blog extension for Magneto Community.

Previously I made a post about adding a Blog extension to Magento Community. There is an option to add bookmark buttons to the bottom of the blog post. But, the default bookmarks provided include social media sites that are largely outdated. For example, I believe they included Digg and Delicious. While these are still available to use, most users don't use these any longer.

Here is the end result after my changes.



There also isn't a user friendly option to easily change the bookmark links out for Google+, Pintrest, Twitter, or LinkedIn. To do you you have to dive a bit deeper into the code.

Here is how you can do it.

In your hosting site, you can manage bookmarks within this file -

\app\design\frontend\default\default\template\aw_blog\bookmark.phtml

Find this code:

<div class="postBookmarks"><h4>Bookmark with:</h4>

After the above code add the below: 

For Facebook add: 

    <a target="_blank" href="http://www.facebook.com/sharer.php?u=<?php echo $post->getAddress(); ?>&t=<?php echo $post->getTitle(); ?>" class="bm">
        <img src="<?php echo Mage::getDesign()->getSkinUrl('aw_blog/images/communityIcons'); ?>/http-www-facebook-com-.gif" width="16" height="16" alt = "" /> <?php echo $this->__(''); ?></a>

For Twitter add:

    <a target="_blank" href="http://twitter.com/home?status=<?php echo $this->getPost()->getTitle();?>%20<?php echo $this->getPost()->getAddress();?>" class="bm">
<img src="<?php echo Mage::getDesign()->getSkinUrl('aw_blog/images/communityIcons'); ?>/http-twitter-com.gif" width="16" border="0" height="16"> </a>

For Google+ add:

<a target="_blank" href="https://plus.google.com/share?url=<?php echo $this->getPost()->getAddress();?>&title=<?php echo $this->getPost()->getTitle();?>&annotation=<?php echo $this->getPost()->getTitle();?>&cd=bm&btnA=Add" class="bm">
<img src="<?php echo Mage::getDesign()->getSkinUrl('aw_blog/images/communityIcons'); ?>/http-google-com-bookmarks.gif" width="16" border="0" height="16"> </a>&nbsp

For LinkedIn add:

<a target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $this->getPost()->getTitle();?>&title=<?php echo $this->getPost()->getTitle();?>" class="bm">
<img src="<?php echo Mage::getDesign()->getSkinUrl('aw_blog/images/communityIcons'); ?>/http-linkedin-com.gif" width="16" border="0" height="16"> </a>
</div>

The Blog package includes many different icons which you can find within the below directory. 

\skin\frontend\default\default\aw_blog\images\communityIcons

These can be changed by replacing/renaming the logos. In the above code, if you search for .gif that is the 'icon' name that will show up on your webpage and is stored in the above directory trail.
 
Copyright © 2007- StockKevin. Disclaimer. All Rights Reserved.