2016-08-24 4 views
0

Ich benutze einen Blog in unserem Magento Ich muss eine Social-Sharing-Option in unserem Blog erstellen, aber derzeit nur Tittle sind in zeigen, nachdem ich mit Facebook seine Verwendung Logo und Kopf Inhalte statt Blog-Inhalt mein Code unterSocial Share-Inhalt wird nach dem Teilen nicht angezeigt?

<?php 
/** 
* aheadWorks Co. 
* 
* NOTICE OF LICENSE 
* 
* This source file is subject to the EULA 
* that is bundled with this package in the file LICENSE.txt. 
* It is also available through the world-wide-web at this URL: 
* http://ecommerce.aheadworks.com/AW-LICENSE.txt 
* 
* ================================================================= 
*     MAGENTO EDITION USAGE NOTICE 
* ================================================================= 
* This software is designed to work with Magento community edition and 
* its use on an edition other than specified is prohibited. aheadWorks does not 
* provide extension support in case of incorrect edition use. 
* ================================================================= 
* 
* @category AW 
* @package AW_Blog 
* @version 1.3.17 
* @copyright Copyright (c) 2010-2012 aheadWorks Co. (http://www.aheadworks.com) 
* @license http://ecommerce.aheadworks.com/AW-LICENSE.txt 
*/ 


?><?php $posts = $this->getPosts(); ?> 
<div id="messages_product_view"> 
    <?php Mage::app()->getLayout()->getMessagesBlock()->setMessages(Mage::getSingleton('customer/session')->getMessages(true)); ?> 
    <?php echo Mage::app()->getLayout()->getMessagesBlock()->getGroupedHtml(); ?> 
</div> 

<?php echo $this->getChildHtml('aw_blog_comments_toolbar'); ?> 
<div class="post-lists"> 
<?php foreach ($posts as $post): ?> 
    <div class="postWrapper"> 
     <!-- <div class="postTitle"> 
      <h2><a href="<?php echo $post->getAddress(); ?>" ><?php echo $post->getTitle(); ?></a></h2> 
      <?php 
       $postMonth = date("M", strtotime($post->getCreatedTime())); 
       $postDate = date("d", strtotime($post->getCreatedTime())); 
       $postYear = date("Y", strtotime($post->getCreatedTime())); 
       $dateMonthFormat = $postDate.' '.$postMonth.' '.$postYear; 
      ?> 
      <h3><?php echo $dateMonthFormat; ?></h3> 
     </div> --> 


     <?php 
     $html_content = $post->getPostContent(); 

     $html_content = substr_replace($html_content,'<div class="postTitle"><h2>'.$post->getTitle().'</h2><h3>'.$dateMonthFormat.'</h3></div>',stripos($html_content,'<p class="blog-content">'),0); 

     ?> 

     <div class="postContent std"><?php echo $html_content; //$post->getPostContent(); ?></div> 
      <!-- AddToAny BEGIN --> 
<<div> 
<p class="share"><span>Share</span></p> 
       <ul class="sharing-links-cus"> 

<li><a href="javascript:popWin('https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($post->getAddress()); ?>&t=<?php echo urlencode(post->getPostContent()); ?>', 'facebook', 'width=640,height=480,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes');" title="<?php echo $this->__('Share on Facebook') ?>"><img src="<?php echo $this->getSkinUrl();?>/images/f.png"></a></li> 


<li><a href="" title="<?php echo $this->__('Share on Instagram') ?>"><img src="<?php echo $this->getSkinUrl();?>/images/i.png"></a></li> 


<li><a href="javascript:popWin('https://www.linkedin.com/shareArticle?url=<?php echo urlencode($productUrl); ?>&title=<?php echo urlencode($productName); ?>', 'linked in', 'width=640,height=480,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes');" title="<?php echo $this->__('Share on Linked In') ?>"><img src="<?php echo $this->getSkinUrl();?>/images/l.png"></a></li> 

        <li><a href="javascript:popWin('http://twitter.com/home/?status=<?php echo urlencode($productName . ' (' . $productUrl . ')'); ?>', 'twitter', 'width=640,height=480,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes');" title="<?php echo $this->__('Tweet') ?>"><img src="<?php echo $this->getSkinUrl();?>/images/t.png"></a></li> 
</ul> 
</div> 
<!-- Comment Section --> 

     <?php echo $this->getBookmarkHtml($post) ?> 
     <!-- <div class="tags"><?php echo $this->getTagsHtml($post) ?></div> --> 
     <div class="postDetails"> 
      <?php if ($this->getCommentsEnabled()): ?> 
       <?php echo $post->getCommentCount(); ?> <a href="<?php echo $post->getAddress(); ?>#commentBox" > <?php echo Mage::helper('blog')->__('Comments'); ?></a> <!-- | --> 
      <?php endif; ?> 
      <!-- <?php $postCats = $post->getCats(); ?> 
      <?php if (!empty($postCats)): ?> 
       <?php echo Mage::helper('blog')->__('Posted in'); ?> 
       <?php foreach ($postCats as $data): ?> 
        <a href="<?php echo $data['url']; ?>"><?php echo $data['title']; ?></a> 
       <?php endforeach; ?> 
      <?php else: ?> 
       <?php echo Mage::helper('blog')->__('Posted'); ?> 
      <?php endif; ?><?php echo $this->__("By"); ?> <?php echo $post->getUser(); ?> --> 
     </div> 
    </div> 
<?php endforeach; ?> 
</div> 
<?php echo $this->getChildHtml('aw_blog_comments_toolbar'); ?> 

URl gegeben macht richtig, aber Inhalt mit Facebook seinen Anteil nur logo und Blog-Pünktchen bitte Vielen dank vorab helfen Sie mir nicht mit anderen geteilt ...

Antwort

0

Bitte versuchen diese.

<?php 
/** 
* aheadWorks Co. 
* 
* NOTICE OF LICENSE 
* 
* This source file is subject to the EULA 
* that is bundled with this package in the file LICENSE.txt. 
* It is also available through the world-wide-web at this URL: 
* http://ecommerce.aheadworks.com/AW-LICENSE.txt 
* 
* ================================================================= 
*     MAGENTO EDITION USAGE NOTICE 
* ================================================================= 
* This software is designed to work with Magento community edition and 
* its use on an edition other than specified is prohibited. aheadWorks does not 
* provide extension support in case of incorrect edition use. 
* ================================================================= 
* 
* @category AW 
* @package AW_Blog 
* @version 1.3.17 
* @copyright Copyright (c) 2010-2012 aheadWorks Co. (http://www.aheadworks.com) 
* @license http://ecommerce.aheadworks.com/AW-LICENSE.txt 
*/ 


?><?php $posts = $this->getPosts(); ?> 
<div id="messages_product_view"> 
    <?php Mage::app()->getLayout()->getMessagesBlock()->setMessages(Mage::getSingleton('customer/session')->getMessages(true)); ?> 
    <?php echo Mage::app()->getLayout()->getMessagesBlock()->getGroupedHtml(); ?> 
</div> 

<?php echo $this->getChildHtml('aw_blog_comments_toolbar'); ?> 
<div class="post-lists"> 
<?php foreach ($posts as $post): ?> 
    <div class="postWrapper"> 
     <!-- <div class="postTitle"> 
      <h2><a href="<?php echo $post->getAddress(); ?>" ><?php echo $post->getTitle(); ?></a></h2> 
      <?php 
       $postMonth = date("M", strtotime($post->getCreatedTime())); 
       $postDate = date("d", strtotime($post->getCreatedTime())); 
       $postYear = date("Y", strtotime($post->getCreatedTime())); 
       $dateMonthFormat = $postDate.' '.$postMonth.' '.$postYear; 
      ?> 
      <h3><?php echo $dateMonthFormat; ?></h3> 
     </div> --> 


     <?php 
     $html_content = $post->getPostContent(); 
     $html_content = substr_replace($html_content,'<div class="postTitle"><h2>'.$post->getTitle().'</h2><h3>'.$dateMonthFormat.'</h3></div>',stripos($html_content,'<p class="blog-content">'),0);   
     ?> 

     <div class="postContent std"><?php echo $html_content; //$post->getPostContent(); ?></div> 
      <!-- AddToAny BEGIN --> 
    <div> 
    <p class="share"><span>Share</span></p> 
        <ul class="sharing-links-cus"> 

    <li><a href="javascript:popWin('https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($post->getAddress()); ?>&t=<?php echo urlencode($post->getPostContent()); ?>', 'facebook', 'width=640,height=480,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes');" title="<?php echo $this->__('Share on Facebook') ?>"><img src="<?php echo $this->getSkinUrl();?>/images/f.png"></a></li> 


    <li><a href="" title="<?php echo $this->__('Share on Instagram') ?>"><img src="<?php echo $this->getSkinUrl();?>/images/i.png"></a></li> 


    <li><a href="javascript:popWin('https://www.linkedin.com/shareArticle?url=<?php echo urlencode($productUrl); ?>&title=<?php echo urlencode($productName); ?>', 'linked in', 'width=640,height=480,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes');" title="<?php echo $this->__('Share on Linked In') ?>"><img src="<?php echo $this->getSkinUrl();?>/images/l.png"></a></li> 

         <li><a href="javascript:popWin('http://twitter.com/home/?status=<?php echo urlencode($productName . ' (' . $productUrl . ')'); ?>', 'twitter', 'width=640,height=480,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes');" title="<?php echo $this->__('Tweet') ?>"><img src="<?php echo $this->getSkinUrl();?>/images/t.png"></a></li> 
    </ul> 
    </div> 
    <!-- Comment Section --> 

    <?php echo $this->getBookmarkHtml($post) ?> 
    <!-- <div class="tags"><?php echo $this->getTagsHtml($post) ?></div> --> 
    <div class="postDetails"> 
     <?php if ($this->getCommentsEnabled()): ?> 
      <?php echo $post->getCommentCount(); ?> <a href="<?php echo $post->getAddress(); ?>#commentBox" > <?php echo Mage::helper('blog')->__('Comments'); ?></a> <!-- | --> 
     <?php endif; ?> 
     <!-- <?php $postCats = $post->getCats(); ?> 
     <?php if (!empty($postCats)): ?> 
      <?php echo Mage::helper('blog')->__('Posted in'); ?> 
      <?php foreach ($postCats as $data): ?> 
       <a href="<?php echo $data['url']; ?>"><?php echo $data['title']; ?></a> 
      <?php endforeach; ?> 
     <?php else: ?> 
      <?php echo Mage::helper('blog')->__('Posted'); ?> 
     <?php endif; ?><?php echo $this->__("By"); ?> <?php echo $post->getUser(); ?> --> 
    </div> 
</div> 
<?php endforeach; ?> 
</div> 
<?php echo $this->getChildHtml('aw_blog_comments_toolbar'); ?> 
Verwandte Themen