Alex King’s Share-This
-
I’ve tried installing the plugin, but I can’t seem to get past a javascript error:
Error: akst_share is not defined
Source File: javascript:void(akst_share(’22’));
Line: 1Prototype is where it should be…however, I don’t think the plugin is injecting the proper head statements to make the plugin work.
-
I bet if you switch to the Default theme, you’ll see it working as desired. Unfortunately I can’t predict or avoid the CSS from every theme out there.
I have a totally different error “Fatal error: Call to undefined function: wp_get_current_commenter() in /home/.freedom/hbowers/tikitalk.astropad.com/wp-content/plugins/share-this/share-this.php on line 636”
I’m using WordPress 1.5.2. The plug-in is deactivated on my site right now since it doesn’t work.
I guess it won’t work in 1.5.x.
relaxedguy: change the line of css with the padding to:
padding: 1px 0 3px 22px !important;
That fixed it for me.
Thanks bmonster, it’s always the simple stuff, almost too simple. !important is one of those CSS features I never paid much attention to.
I had a problem where the popup box works when you have the plugin set to automatically install, but doesn’t work when you manually install it.
*Finally* figured out why :). When installing manually, do this in the .php file:
@define('AKST_ADDTOCONTENT', false);
@define('AKST_ADDTOFOOTER', true);That worked for me, so hopefully it works for you!
That is explained in the README:
https://alexking.org/projects/wordpress/readme?project=share-this
Hey there, I installed this plug-in, made the template modification to have it show only per post page, added to and rearranged the social bookmarking sites links, editing the .css to match my layout (saved a copy-always), no javascript problems here and everything works great, except….. I’ve replaced the .gifs with .png and the .png files aren’t showing up. This isn’t covered in the READ ME or this thread so I thought it safe to ask since it’s probably a new one. I reallly want the .pngs so I can control the transparency better. I’ve already scoured the .php several times and only found where to modify the “share-icon-16×16”. Please, where and how do I modify for this plugin to show the .png files? This is what it looks like right now: https://sands.absinthyium.net/blog/2007/04/27/absinthyiumnetbasiclayout/
Install on 1.4 went swell, but the pop-up box background is white instead of what’s on the style.css and the links, which are the right color, are hard to read. Any suggestions on how to get the pop-up box background the right color?
In my case this popup share-this window was not working. I followed the authors debug tips and found it conflicting with Thick Box Plugin. Disabling it fixed everything.
Hi Alex,
I’m puzzled by the URL construction at line 428 of share-this.php 1.4, which seems to rely on a non-prettified URL structure. If I kill the non-prettified URL structure by replacing ?p=postID structure with a get_permalink and ?akst_action=share-this appended, this exceedingly cool plugin still seems to work fine, at least under the limited circumstances where I’ve tried it.
Is it OK to do that, or am I inadvertently going to break something and not realize it til it’s too late?
Thank you Alex!
All the best,
GregI’m guessing Alex is a busy guy just now, so I’ll reply to my own question in case anyone else is interested…
Yes, it works fine to replace that ?p=postID structure with the permalink — just strip off the trailing slash if your permalink setup uses one. For example:
$posturl = rtrim(get_permalink($post->ID),"/")
Then in the relevant link line I mentioned in the previous post, replace that call to the blog URL with:
<?php print($posturl); ?>
IMHO, this should be done by anybody who doesn’t want to risk bots crawling a whole bunch of duplicate content accessed via the ?p= parameter rather than via the permalink. Yes, Alex has included a ‘nofollow’, and if every bot paid attention to that, there would be no problem with using the original URL structure, but not all bots do. (Having had my share of bad bot problems, I’d rather not take the risk…)
All the best,
GregHey everyone,
Thanks Alex for a cool plugin.
It is working fine, I just want to make one little tweak. The Share-This link is showing up at the end of my Posts and Pages. How can I remove it from all my Pages?
Thanks.
My blog.
wsperuzzi: If you check the Readme, you’ll find instructions for manually inserting the Share This link in your template, rather than having Share This do it for you automatically. If you do that, and only put the link code in your template where you woud like it to appear (e.g., single.php) and not where you don’t want it (e.g., page.php), you’ll be all set.
And to anyone interested in eliminating the 55K of javascript library overhead caused by Alex’s otherwise excellent plugin…
It’s actually pretty straightforward to do, because the plugin relies on just one substantive capability provided by the prototype.js library: Position.cumulativeOffset, which allows the plugin to position the expanded form in the correct place over the top of your page content. If you nuke that line in share-this.php, set the form.style.left and form.style.top each to 0, change the CSS for akst_form to position:relative from position:absolute, and remove the pesky lines that load the prototype.js library in the first place, you’re almost there. The final 2 steps are just to replace all instances of the $() function with document.getElementById() instead and make sure you’ve manually inserted the form contents right below your form link in your theme (rather than, say, putting the form contents in the footer).
What’s the outcome of all that?
First, the form now appears and disappears from within your page content when you open and close it, rather than appearing over the top of your page content. Second, your visitors don’t have to wait for a 55K library to load in addition to your page content just on the outside chance they might click on the Share This link.
You can see it in action in the blog section of my mental health information site.
I wonder whether Alex would consider adding a simple user-configurable boolean at the start of the code so that those who want the extra 55K overhead can choose to do so, while those who would rather avoid it can switch it off without manually editing the code?
All the best,
GregGregM — After some tweaking I got it. Thanks.
- The topic ‘Alex King’s Share-This’ is closed to new replies.