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
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?
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.
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);
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?
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.
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.
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.
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)
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);
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.