Closed (outdated)
Project:
ShareThis
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Aug 2011 at 01:35 UTC
Updated:
30 Sep 2019 at 13:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dboulet commentedHere’s a patch against 7.x-1.x. It includes a basic update function to migrate from 6.x-1.8.
Comment #2
mhedstrom commentedThis sounds great! I tried to get it to patch, but it failed on me (it kept asking what file to patch). Is there a different way I should be applying this?
Comment #3
dboulet commentedHi mhedstrom, make sure that you are patching against 7.x-1.x. Try the following command in the module’s root directory:
Comment #4
mhedstrom commentedI see the problem. The 7.x-1.x version you patched against was from the end of May. The current dev version is from June. I patched it against the released 7.x-1.x version which I guessed was the same one, and I was right. It seems to work! Thanks! Now I just need a patch that has Google+ in it. :)
Comment #5
dboulet commentedThe patch applies to the latest 7.x-1.x from git. Not sure what is needed to implement integration with Google+, that should probably be a filed as a separate issue.
Comment #6
mhedstrom commentedI found a thread about it, so I'm all good to go! Works great, thanks!
Comment #7
dboulet commentedFixed a small update bug.
Comment #8
pirog commentedpatch worked for me.
i needed more functionality for a project i am working on so i added in a theme function and very basic views integration. looks like we aren't really putting a lot of focus into this issue but thought i would post my patch just in case someone else was looking for this.
also, you need to apply patch from 7 first
Comment #9
pirog commentedwould second making #7/#8 the basis of a 6.x-3.x branch and would also help maintain/develop if desired.
Comment #10
Media Crumb commentedis there a full release without a patch. I'm really not sure how to go about patching. :\
Comment #11
pirog commentedI've added the 6.x-3.x branch to the below repo for now so that people can download it. Make sure you extract the contents of the download into a folder called "sharethis"
https://github.com/gotham-city-drupal/ShareThis
Comment #12
kbell commented++1 making #7/#8 the basis of a 6.x-3.x branch.
Comment #13
Media Crumb commentedI got this after trying to install:
Comment #14
pirog commentedcan you provide more details on how i can go about recreating this error?
Comment #15
lessurluck commentedI think he is having the same issue as me. I am guessing that this is not creating a new table in the database.
my error=
user warning: Table 'mydatabasename_drupal.st_table' doesn't exist query: SELECT st.st_option, st.st_value FROM st_table st in ...sites/all/modules/sharethis/sharethis.module on line 324.
Not sure what to do so I am going to try adding in the code to tpl. I hope you guys can fix this, it would be so much better to have this available then the other social media modules.
Comment #16
lessurluck commentedI should probably add:
downloaded 3x from your link
installed like any other module
deleted 6x sharethis
renamed 3x to sharethis
hope that helps
Comment #17
lessurluck commentedspoke to soon... I went to admin/reports/status and under update database run that and it works great. thanks for making this available!
Comment #18
dmendo11 commentedHi,
I am installed this from the link and it did work. But is not working on the node-product.tpl.php page. Do I need to add a code to make sure it works?
Great module, I was looking for something like this for a while.
David
Comment #19
pirog commentedif you are upgrading from 6.x-2.x you will have to run update.php to make sure the database is set up properly. If you are installing a fresh copy it should install all of that stuff when you enable it but please speak up if that is not the case.
#18, are you selecting the product content type in the sharethis config page? Where is the product type coming from? custom? ubercart? commerce?
If there is a custom theme template file for that content type its possible that it is not including the $links variable which is the default location for the sharethis icons.
Comment #20
dmendo11 commentedHi Pirog,
I am currently using Ubercart and it is a custom template. So what I did is copy the code from the ShareThis both Javascript and code and place it in my node-product.tpl.php file. This made the logos appeared into the product page. I guess it is a long way to doing so, but it worked. I will have to check the node page to see if I can look the $links variable and make the adjustments correctly to the template and see if this is faster.
Thank you guys for this module and thank you for doing a backport to D6.
David
Comment #21
pirog commentedthanks @dmendo11!
while im not officially part of the sharethis team im sure they would also appreciate your words! i really only provided some additional functionality and a downloadable package of the back port work done by @dboulet. would love your support in trying to make this an official 6.x-3.x branch!
if you are interested in my thoughts on your solution please read further. a basic function of the module is to provide the code that you pasted into your template file so while your solution "works" it is actually just replicating what the module already does. this is generally not considered best practices nor is pasting that kind of code directly into a template file but you can certainly do it. id be i liar if i said i never hacked something before :)
if you want you can paste the template file you are using into this issue queue and i can try to help you figure out what is happening.
Comment #22
Media Crumb commentedTried again and I'm still getting an error
User warning: Table 'doodi_v32old2play.st_table' doesn't exist query: SELECT st.st_option, st.st_value FROM st_table st in _db_query() (line 148 of /home/public_html/includes/database.mysql.inc).Is it an issue with MySQL version?
Comment #23
dboulet commentedMedia Crumb, are you installing from scratch, or did you update from another version of ShareThis?
Comment #24
dmendo11 commentedThat is the code I am using. I am not using the $links on the template, but I did put it on and it didn't work at all.
It is working on the nodes perfectly, but not working on the products. I haven't touched the node.tpl.php file so there might be something there that the products file is missing.
Thanks,
David
Comment #25
pirog commentedHey David,
just looked back through the code and it isn't $links where the chicklets go but $node->content['sharethis']. I think $links was used in the 6.x-2.x branch and that is where i was getting confused.
To confirm that this is the case add something like
print $node->content['sharethis']['#value'];to the node product template.
If that is indeed the reason why this doesn't work i can help you create a custom template, if you aren't already doing that, for ubercart so that you aren't "hacking" ubercart.
Comment #26
dmendo11 commentedHi Pirog,
Yes, Yes it did work with that code. Just in case I just added that code with the code I had hacked the template. So if it work I was going to see 2 codes instead of just one. So it did! Then I just removed the code created by the sharethis.com and replaced with this:
That is the correct code. Then it worked, it finally worked.
Thank you for all your help. This should be really added to the Drupal 6 version as it looks much better to have the more settings like in the admin section.
Great contribution Everyone.
David
Comment #27
pirog commented@dmendo11,
im glad it worked!
do you know if you are using a custom template file for the product content type or the template that comes with ubercart? if you are using the ubercart one all the changes you made to get it to work would be wiped out if you ever upgraded ubercart.
in these scenarios it is best practice to put a "custom" template in your theme folder (or in a module in some cases) so that you can preserve this tweak upon upgrade. If you are interested in learning how to do this just let me know and i can either write or direct you to an article explaining the procedure.
Comment #28
Media Crumb commentedI'm installing from scratch. Do i need to install another version first?
User warning: Table 'doodi_v32old2play.st_table' doesn't exist query: SELECT st.st_option, st.st_value FROM st_table st in _db_query() (line 148 of /home/public_html/includes/database.mysql.inc).Comment #30
pirog commented@dboulet's original patch includes an upgrade path from 6.x-1.8... and i provided an additional update on top of that to bring it in line with the st_table architecture that was being used in the 7.x-2.x version. That architecture has since been removed in favor of the variables table... which is probably a good call and something we should match here at some point as well.
I would try to the upgrade method from 6.x-1.8 if a fresh install is not working. I am actually going to be doing a fresh install sometime in the next week so if you want to wait for that i can probably help you more.
Comment #31
dboulet commentedThe original patch probably needs a reroll now that there have been modifications to the D7 version.
Comment #32
Media Crumb commentedHas anyone installed from scratch without an update? I just want to know if im the only one with this DB errors.
Comment #33
dmendo11 commentedMedia,
I installed from scratch, no problems on the db. You should uninstall the module to clear any db information . Then start all over. To be safe, delete directory on ftp server and reupload. Then enable the module. It should work. I had no issues other than the ones I listed above.
David
Comment #34
chrisjames911 commentedI am new to Drupal from Joomla and I have been trying to get the Share This module working on a Drupal 6.20 install with no luck. I don't get any errors the app just dont show up. Can someone shed some light on the issue for me.
Comment #35
borfast commentedI'm experiencing the same as chrisjames911: no errors but no ST buttons either. All I manage to get is a small "ShareThis" link at the bottom of my posts, which links to the same post I'm already at.
Any idea on how to track this problem to its source?
Comment #36
rastarr commentedJust installed the backport from post http://drupal.org/node/1253794#comment-5138760
Great start and certainly the better interface.
Is there a way to add FB likes as well as Google+?
Any way to reorder the layout of the services?
It also seems to appear that the counters are not pulling the correct count info for each listed service either i.e. from my current buttons, I can see that counts for tweets, FB Shares/Likes etc aren't correct and the ShareThis buttons are typically showing '0'
Should this be a listed alternate download than hidden away in this thread?
Comment #37
dboulet commentedYes, that is the goal here, it’s up to the project maintainers to decide whether or not to create a new branch using this code.
Once the backport is added, all feature requests can be added to 7.x first and then backported to 6.x. For now we are only concentrating on getting the backport committed.
Comment #38
rastarr commentedI noticed a lot of the issues I just posted about have already been committed to the v7.x port, in the last week.
Is there any possibility of getting another backport done to v6.x from the currently committed v7.x?
Comment #39
pirog commentedid be willing to help dboulet on backporting the 7.x branch's new features to D6 but it would be great to get this listed as an official 6.x branch first. although ive forked sharethis, added the new 6.x-3.x branch and placed it on github that was mainly for people who arent used to patching to easily download what we've done. id much rather maintain that code in a drupal.org repo instead of on github... we don't want the fork to get too far apart from the mainline.
Comment #40
rastarr commentedThanks heaps for doing that too, pirog.
totally agree it would be far better for it to be official. Hopefully something will come of that soon.
Have you, by chance, updated your 6.x-3.x branch to include the latest commits by Rob Loach? I'd love to finally find a workable sharing module that also allows displaying within content - it's been a real chore thus far and ShareThis is the best I've come across, to date.
Comment #41
rastarr commentedAny update on an official D6 backport into a repo?
Comment #42
gsaha commentedi was able to install and get the github package posted by pirog.
however there is no block called sharethis.
Any way to have a block called sharethis?
Comment #43
afox commentedI created a new port of the 7.x-2.x branch because there was so many changes in the branch after the initial port by @dboulet and @pirog. Only the 7.x-2.x branch had the ability to add ShareThis -buttons on a custom URL, which I needed. Also, I removed the requirement of needing to have node types selected.
I think this is a good starting point to keep the 6.x version at least relatively current. If @pirog wants, the github version can also be updated.
Comments and suggestions from the maintainers?
Comment #44
pirog commented@afox, what is your github username? i can give you access to the github repo and you can update it if you wish.
it would be really great to get some access to the 6.x branch here so we don't stray too far!
Comment #45
roadie_jay commentedHi,
I've installed the backport, but when I try to configure it, the "choose your services" feature doesn't seem to work. Clicking on the service and then on the arrow doesn't seem to do anything. Once you mouse off the service title it loses the highlight as well. Is there some underlying module required in Drupal 6 to make this selection feature work?
Comment #46
roadie_jay commentedAs a follow up, in the Firebug console, I'm getting this error
_all_services[pickerDefaults[i]] is undefined
[Break On This Error]
...c='http://w.sharethis.com/images/"+pickerDefaults[i]+"_32.png'>
Comment #47
roadie_jay commentedrunning update.php resolved the issue
Comment #48
diego.pasc commentedIt works for me (running update.php as roadie_jay).
Thanks a lot!
ps: the attachment in comment #43 seems to be broken, I downloaded the files directly on https://github.com/gotham-city-drupal/ShareThis/downloads
btw, what about the ShareThis block (to show the share buttons anywhere in the site and not only in nodes)? It was useful in 6.x 1.18 but now there is no hook_block implemented anymore.
Comment #49
afox commented@diego.pasc I didn't have any problems with the attachment. The versions don't differ THAT much, except the one in Github doesn't support custom paths.
@pirog my Github is a-fox . Get me access and I'll update it. Hopefully we'll get the maintainers attention so we can get a new release. I asked Rob Loach to take a look,hopefully we'll have some progress.
Comment #50
pirog commented@afox
should have access now: https://github.com/pirog/ShareThis
let me know if you ned anything else
Comment #51
afox commented@pirog thanks, I updated Github with what we're currently using on our site. There were more changes than what I initially remembered from the 7.x-2.x branch. Can you check the code/module in a vanilla D6, since I have to check on other issues for couple days.
Comment #52
pirog commentedim pretty swamped for the next few as well but ill see what i can do! let me know if you have time to get to it first so we dont duplicate efforts.
Comment #53
paskainos commented#43 worked for me here. Super awesome - thanks guys! So where are we at now since there are a few different reference points:
github.com/gotham-city-drupal/ShareThis(no longer exists)Comment #54
pirog commentedthe gotham_city_drupal repo is an ancestor of the pirog repo.
afox, correct me if i am wrong but i think the package in #43 is just built from the pirog repo on github?
Comment #55
Dubber Dan commentedThanks folks, I downloaded the module in #43 and it works fine for me at http://www.elementsforlife.co.uk
A shame that the previous 6.x version seems to have been ignored and abandoned, but it's given this one life so all good in the end.
Will this get a proper listing on the module page to make it easy to download for others?
Also, will there be further development to allow the other styles of buttons, such as floating on the side of the page in a column?
Comment #56
afox commentedI contacted Rob Loach on the issue in May i think, but he's a bit swamped. The pirog Github repo should be the main point of reference atm. The #43 package is based on the pirog repo with my mods.
Everybody interested, please contact the maintainers to check this out. We need more voice to get this committed.
Comment #57
minneapolisdan commentedDo any of these versions work with Views, so I can add ShareThis as a field with each node?
Comment #58
diego.pasc commented@minneapolisdan: yes, ShareThis is integrated with Views: so you can add a field with ShareThis buttons.
Comment #59
minneapolisdan commenteddiego.pasc, thanks for the reply. I'm not seeing any fields available in Views. I wonder what version of ShareThis you are using? I tried the 2 versions from post #50 and #43 and haven't seen anything. I may either go back to the version offered here on drupal.org, or end up embedding these manually. But if I can place them via Views, then great.
Comment #60
diego.pasc commented@minneapolisdan: see attachment (Note that ShareThis field is under "Node" category)
Hope helps.
I use Views 2.16 and ShateThis patch in comment #43.
Comment #61
lhugg commentedJust a helpful hint if you have downloaded the tarball from #43. The extraction from the .gz file actually gives you a tarball ending in 'tar_' (emphasis on the underscore). My software would not recognize this as a .tar file and therefore would not extract it. I didn't catch it for a while, so bringing it to your attention to save you some time.
Just rename the file to .tar and you're on the way.
Comment #62
watsomic commentedFor our site maintenance, we required a forward patch from version 6.x-1.8 to the updated version in comment #43. Thought it might also be easier for site maintainers to update the 6.x-1.8 version with this, as well. I have attached the patch.
Note: the images in the settings page for this module don't work with this patch.
Comment #63
dpalmer commentedi installed the targz from #43 on my site. It works great, except for the most important part, the share button in the modal dialog. When I click the share icon and it pulls up the window , I can fill out the form, but no matter what when I click share nothing happens. I've tried this with various roles & browsers with no luck.
I do notice this js log in the console
FB.getLoginStatus() called before calling FB.init().
I don't know if it is related.
Comment #64
subu.purohit commentedHi minneapolisdan,
I am too getting the same problem, I am using views 2.16. Did you get any work around for this?
Comment #65
sansui commentedsubu - it appears that the views hook has been removed, and if you look a little closer, that's probably because there is no longer a theme function in this version and the views handler is looking for that function. I'm not sure what version diego is actually using, because this one definitely does not function with views
Comment #66
subu.purohit commentedThanks Sansui,
Can you please assist me about this theme function. I have been tried to make it according to 6.x-1.8 hook functions but could not get success.
Thanks
Comment #68
avpadernoI am closing this issue, since Drupal 6 isn't supported.