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

Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham

Quick fix for the title param bug:

Add:

if(isset($tag_params['title']) === TRUE)
{
  $url = str_replace(LD.'title'.RD, rawurlencode($tag_params['title']), $url);
}

to line 701 of the extension file.

New version coming soon.

       
wecreateyou's avatar
wecreateyou
86 posts
16 years ago
wecreateyou's avatar wecreateyou

Thanks Leevi, That title thingy did it! :cheese: (Also I did an update to PHP5 and now a couple more LG Extensions are working for me as well.

Thanks again.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham

Glad I could get it sorted… I’ll have an official release available soon.

       
Ryan Blaind's avatar
Ryan Blaind
168 posts
16 years ago
Ryan Blaind's avatar Ryan Blaind

Hey Leevi, quick question for you. When using the “email link” social bookmark feature, it is adding some weird “\n\n{summary}” after the link once it jumps to the email client.

I assume that {summary} is supposed to be the summary field associated with the entry that is being linked, however I don’t think it is working properly.

I could just edit the “lib.lg_social_bookmark_sites.php” file and change it to my liking, but I was just curious why this wasn’t working properly?

Any hints would be greatly appreciated, thanks

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Hey Leevi, I just downloaded to try out your new version and after enabling the extension I get the following error (repeated a number of times - I assume the # is directly related to how many possible bookmarks are available).

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/…/extensions/ext.lg_social_bookmarks_ext.php on line 262

I took a peak at your extension to see if something would jump out at me and around line #259 you have

// Generate sites menu items
foreach ($social_bookmarking_sites as $key => $value)
{
     $check = (in_array($key, $settings['active_sites'])) ? 1 : 0;
     $active = ($check) ? ' class="active"' : '';
     $DSP->body .= "<li". $active ."><label>";
     $DSP->body .= $DSP->input_checkbox('active_sites[]', $key, $check);
     $DSP->body .= "".PATH_CP_IMG. " . $key;
     $DSP->body .= "</label></li>";
}

Not too sure how the error and this function relate to one another, if at all.

Any idea what I’ve done wrong?

       
pcmeissner's avatar
pcmeissner
48 posts
16 years ago
pcmeissner's avatar pcmeissner

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
       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham
Hey Leevi, quick question for you. When using the “email link” social bookmark feature, it is adding some weird “\n\n{summary}” after the link once it jumps to the email client. I assume that {summary} is supposed to be the summary field associated with the entry that is being linked, however I don’t think it is working properly. I could just edit the “lib.lg_social_bookmark_sites.php” file and change it to my liking, but I was just curious why this wasn’t working properly? Any hints would be greatly appreciated, thanks

It’s probably just best to remove the /n/n{summary} from the lib file for now.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham
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);
       
Saratoga UK's avatar
Saratoga UK
7 posts
16 years ago
Saratoga UK's avatar Saratoga UK

Hi Leevi,

Thanks for developing a very useful extension.

I thought I’d let you know about a strange quirk that I’m experiencing.

In the extension’s settings screen (in the control panel), when I click to enable a social site nothing happens. Then when I click another one, the one I previously clicked switches on.

i.e. Click ‘Facebook’ - nothing happens. Click ‘Digg’ - ‘Facebook’ comes on. Click ‘Reddit’ - ‘Digg’ comes on, and so on….

In other words, each click is one behind what it should be.

This only happens in IE (I’m using version 7). It seems to work fine in Firefox.

Any ideas?

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham
Hi Leevi, Thanks for developing a very useful extension. I thought I’d let you know about a strange quirk that I’m experiencing. In the extension’s settings screen (in the control panel), when I click to enable a social site nothing happens. Then when I click another one, the one I previously clicked switches on. i.e. Click ‘Facebook’ - nothing happens. Click ‘Digg’ - ‘Facebook’ comes on. Click ‘Reddit’ - ‘Digg’ comes on, and so on…. In other words, each click is one behind what it should be. This only happens in IE (I’m using version 7). It seems to work fine in Firefox. Any ideas?

Hmm nope, no idea!

I’ll take a look when I release an updated version.

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Leevi, thanks for the update.

Any idea why I’d be getting this error in the CP repeated for the same number of options that are available to select:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/…/extensions/ext.lg_social_bookmarks_ext.php on line 262

Using: LG Social Bookmarks 2.0.2 On 1.6.4 - Build: 20080829

Edit, weird - after selecting several “bookmarks” the errors no longer appear.

       
hothousegraphix's avatar
hothousegraphix
851 posts
16 years ago
hothousegraphix's avatar hothousegraphix

Not too sure why I was receiving the initial error I posted above, but after selecting bookmark options the extension seems to be functioning as intended.

I did notice though, after selecting the “Email” bookmark option, it’s output seems to be

<a href="mailto:?subject=Test Article 5&body=http://www.mysite.org/template_group/comments/\\n\\n{summary}" title="Bookmark on: Email">

The actual URL is that should be referenced is

http://www.mysite.org/articles/entry/test_article_5/

It doesn’t seem that the “template_group” and “template” variables are being passed. Do I need to set something to make this connection? Also, does the {summary} referenced refer to a “summary” custom field? What if we’re not using that field name?

Thanks

Edit - OK, I feel like an idiot. I’ve adjusted the “permalink” parameter to and re-read this entire thread finding this post and made adjustments according to the advice. Thanks.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
16 years ago
Ryan M.'s avatar Ryan M.

I haven’t installed this yet, but I’m about to for the first time. Two questions:

1) Can you custom sort the links? (eg. drag and drop re-ordering in the CP to determine what order they show up on output). Is it just a matter of using the “sites” tag?

2) If something is missing from the current list of included sites, what is the easiest way to add it? (client wants Yahoo! Buzz)

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
16 years ago
Leevi Graham's avatar Leevi Graham

Hey Ryan,

Best way to reorder the sites is to either change them in the lib file or use the sites parameter. You can also add your own sites by adding them to the lib file as well.

Cheers

       
Steven Grant's avatar
Steven Grant
894 posts
16 years ago
Steven Grant's avatar Steven Grant
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.

       
1 2 3 4 5 Last

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.