分享后社交分享内容不显示?

时间:2016-08-24 09:43:27

标签: php jquery html magento

大家好,

我在我们的magento中使用aw博客我需要在我们的博客中创建一个社交分享选项,但目前只有在我与Facebook分享其使用徽标和头部内容而不是博客内容后才显示我的代码在下面给出< / p>

<?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是正确的,但内容不与Facebook共享其共享标识和博客请告诉我,谢谢提前...

0 个答案:

没有答案