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 headerThis is the code in the template within weblog tagsline to load jquery-1.3.2.min.js
When I look a page view I see this where the social bookmarks should go{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}
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.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>
Having the same problem here. Did you manage to locate the problem?
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’m getting the error message:Try update the line in question to: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
$r .= str_replace('{PATH}', $PREFS->ini('theme_folder_url', 1) . "cp_themes/".$PREFS->ini('cp_theme')."/lg_social_bookmarks/", $css);
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?
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.
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.