We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG Social Bookmarks 2.0 - Now and ExpressionEngine Extension!

Development and Programming

Dylan Smith/Context Design's avatar
Dylan Smith/Context Design
346 posts
15 years ago
Dylan Smith/Context Design's avatar Dylan Smith/Context Design
ContextDesign, I like this.

There’s this as well.

       
kenny2's avatar
kenny2
90 posts
15 years ago
kenny2's avatar kenny2
Hi Leevi. A newbi here. I get nothing but the phrase “Enjoy this post? Share it with others.” showing up on the website. I have installed LG Social Bookmarks 2.0.2 and it shows up in extension manager and is enabled. I put the following code in my header
line to load jquery-1.3.2.min.js
This is the code in the template within weblog tags
{lg_social_bookmarks title="{title}" permalink="{path=news/news_item}"}
    Enjoy this post? Share it with others.
    <ul>
      {social_sites}
        <li>
          <a href="http://{social_site_url}" title="Bookmark on: {social_site_name}">_            http://www.cbufa.ca/news/themes/cp_global_images/lg_social_bookmarks/favicons/{social_site_img_url}_            <span>Bookmark on {social_site_name}</span>_          </a>
        </li>
        {/social_sites}
    </ul>
  {/lg_social_bookmarks}
When I look a page view I see this where the social bookmarks should go
Enjoy this post? Share it with others.
    <ul>
      
<!--
** LG Social Bookmarks v2.0.2 ** 
ExpressioneEngine Social Bookmarking Extension
See: http://leevigraham.com/cms-customisation/expressionengine/addon/lg-social-bookmarks/ for more information.
-->
    </ul>
I assume that tells me that the extension was engaged, but where are the icons with links? Any ideas. Thanks for your time and trouble.

Having the same problem here. Did you manage to locate the problem?

       
jtnews's avatar
jtnews
62 posts
15 years ago
jtnews's avatar jtnews
I’m getting the error message:
Notice: Trying to get property of non-object in D:\Inetpub\wwwroot\MediciGlobal.com\system\extensions\ext.lg_social_bookmarks_ext.php on line 636
Try update the line in question to:
$r .= str_replace('{PATH}', $PREFS->ini('theme_folder_url', 1) . "cp_themes/".$PREFS->ini('cp_theme')."/lg_social_bookmarks/", $css);
Leevi - as you know I was getting the same error. Tried what you suggested here and now getting: PHP Notice: Undefined variable: PREFS in C:\domains\domain.co.uk\wwwroot\system\extensions\ext.lg_social_bookmarks_ext.php on line 636 PHP Fatal error: Call to a member function ini() on a non-object in C:\domains\domain.co.uk\wwwroot\system\extensions\ext.lg_social_bookmarks_ext.php on line 636 The extension works but that error appears for some reason.

I gave this a shot as well, but the text that was in my line 636 didn’t really look anything like the replacement text. Here’s what on lines 635-40 now:

// get all the fields for this field type
            if(isset($SESS->cache['lg'][LG_SB_addon_id]['social_sites']) === FALSE)
            {
                $SESS->cache['lg'][LG_SB_addon_id]['social_sites'] = require(PATH_EXT."lg_social_bookmarks_ext/lib.lg_social_bookmark_sites".EXT);
            }

Replacing the line (and just adding the line in above) gave me this:

Notice: Undefined variable: css in /home/1/4/6/19051/19051/public_html/jt_db_system/extensions/ext.lg_social_bookmarks_ext.php on line 636

Plus that removes an if statement that likely should be in there. Any ideas on what I’m doing wrong?

       
aimelise's avatar
aimelise
31 posts
15 years ago
aimelise's avatar aimelise

Hi Leevi. Will LG Social Bookmarks 2.0 work on pages driven by the Structure module?

My snippet is below and shows up fine…but its referencing the wrong page (because of Structure):

{exp:weblog:entries weblog="static-content" dynamic="off" limit="1"} {lg_social_bookmarks title="{title}” permalink=”{path=site/interior}”} Share this page: {social_sites} {social_site_url} {/social_sites}

{/lg_social_bookmarks} {/exp:weblog:entries}


My example page is here: http://gsis.amystoddard.com/services/special-needs/

My {social_site_url} for “Facebook” looks like this: http://www.facebook.com/sharer.php?u=http://gsis.amystoddard.com/site/interior&t=HS Course Guide

But should look like this: http://www.facebook.com/sharer.php?u=http://gsis.amystoddard.com/services/special-needs

Any help you can offer is totally appreciated.

       
aimelise's avatar
aimelise
31 posts
15 years ago
aimelise's avatar aimelise

I actually figured out a solution to using LG Social Booksmarks with my Structure Module powered site. {permalink} doesn’t work as expected inside “Structure.” So I found a Fetch Current URI plugin. I went into “lib.lg_social_bookmark_sites.php” and replaced the {permalink} with:

{exp:fetch_current_uri uri-only="yes"}

So, for example, the Facebook link looks like this: http://www.facebook.com/sharer.php?u={exp:fetch_current_uri uri-only="yes"}&t={title}

Maybe its not an elegant solution, but it seems to be working. I wonder if it would break if I enabled PHP before/after EE parsing on this template.

       
First 4 5 6

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.