News:

Wondering if this will always be free?  See why free is better.

Main Menu

Share This Topic

Started by All Colours Sam, September 06, 2009, 05:09:23 AM

Previous topic - Next topic

mirahalo

@marianolozano    sorry, but the mod now uses a hook that is only available for RC4, unfortunately this new version will not work with RC3 or below.



@Bugo  thanks, I will added your translation as well with a few screen shots of the new version.

marianolozano

Thanks Mr 0.

The thing is that I removed my last version from the server to install the new one. Where can I get the last version to reinstall it again? I don´t want to upgrade to 4.0 yet as I´m using some other plugins that don´t support 4.0.

mirahalo

#962
you mean the 2.6 version?

I will attached here so you can downloaded it, once you got it, I will remove the attachment to avoid confusions alright?

once you have the old 2.6 I can tell you how to upgrade manually so you can use the fixes with this version.

marianolozano


mirahalo

ok,  to manually upgrade do the following, after install the 2.6 version:

Download the latest version (2.7)

copy the languages folder to your /Themes/default/   

next, upload the ShareThis.php file  to your /Sources  folder.

upload the share  folder to your  /Themes/yourtheme/images/   folder

open your  Sources/ManageSettings.php

find:

// You need to be an admin to edit settings!
isAllowedTo('admin_forum');

loadLanguage('Help');
loadLanguage('ManageSettings');



add after:

loadLanguage('ShareThis');


find:

function ModifyShareTopicSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc;


$sites = array('ask', 'blinklist', 'bmarks', 'dzone', 'feedmelinks', 'furl',  'gbuzz',  'live', 'netvouz', 'newsvine',  'oneview', 'slashdot', 'spurl', 'squidoo',  'tipd', 'facebook', 'myspace', 'delicious', 'digg', 'reddit', 'stumbleupon', 'twitter', 'technorati', 'magnolia', 'google', 'yahoo', 'printfriendly', 'meneame', 'friendfeed',);


replace with:

function ModifyShareTopicSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc;

loadLanguage('ShareThis');

$sites = array('ask', 'bebo', 'diigo', 'fark', 'iwiw', 'linkedin', 'mrwong', 'orkut', 'stylehive', 'web2pdf', 'blinklist', 'bmarks', 'dzone', 'feedmelinks', 'furl',  'gbuzz',  'live', 'netvouz', 'newsvine',  'oneview', 'spurl', 'squidoo',  'tipd', 'facebook', 'myspace', 'delicious', 'digg', 'reddit', 'stumbleupon', 'twitter', 'technorati', 'magnolia', 'google', 'yahoo', 'printfriendly', 'meneame', 'friendfeed',);



that will be all the changes

marianolozano

Ok! I´m right away to back up my forum and follow these instructions. I´ll provide you feedback when I´m done.
Thanks again  :)

mirahalo

ok, I added Russian language thanks to bugo and also added a image to show how the mods like when its been used.

marianolozano

Mr 0, I followed all instructions as requested. I reviewed twice and I get this error:

Fatal error: Function name must be a string in /*/*/public_html/foro/Sources/ScheduledTasks.php on line 1202

which is
Quote// Get all the default theme variables.
1202->   $result = $smcFunc['db_query']('', '
      SELECT id_theme, variable, value
      FROM {db_prefix}themes
      WHERE id_member = {int:no_member}
         AND id_theme IN (1, {int:theme_guests})',
      array(
         'no_member' => 0,
         'theme_guests' => $modSettings['theme_guests'],
      )

Makes sense to you?  :-\

Arantor

What's the few lines above that?

Basically there should be a line that begins with the word global not too far above it (no earlier than the nearest line above it that starts with the word 'function' at the start) and that line with 'global' in it needs to have $smcFunc listed in it.
Holder of controversial views, all of which my own.


marianolozano

#969
Yes Arantor, I have it:

Quote73    global $time_start, $modSettings, $smcFunc;

I´ve just followed the steps back to get the 2.6 running properly in order to have the forum working. But I´m more than happy helping you testing this if needed.

Editing: As you said I found other places where global is and it looks like always appears such function. I´ll review again just in case:

Quote// This loads the bare minimum data to allow us to load language files!
function loadEssentialThemeData()
{
   global $settings, $modSettings, $smcFunc, $mbname, $context, $sourcedir;

   // Get all the default theme variables.
1202->   $result = $smcFunc['db_query']('', '
      SELECT id_theme, variable, value
      FROM {db_prefix}themes
      WHERE id_member = {int:no_member}
         AND id_theme IN (1, {int:theme_guests})',
      array(
         'no_member' => 0,
         'theme_guests' => $modSettings['theme_guests'],
      )
   );


but the

864->   global $is_weekly;

mirahalo

well, thats weird since this mod does not modify that file, and I cant find any relation,  if you undo the changes I told you before, the error dissapear?

marianolozano

Yes, Mr 0, that´s funny...

I followed all your steps and I got the error. I posted here the situation and after that I followed back the same steps: I put back the old ManageSettings.php (before changes) , did the same with the sharethis.php; however I didn´t remove the new language files. And so far it works good, the sharing works and the error just disappeared. Weird but I don´t understand the code  :-X

mirahalo

let me make some test in local to see where the problem is and head back to you.

marianolozano


rbeuker

Hi, great mod, thx a lot for making it! :)  I think I have found a little bug:

- At first, I only ticked the Facebook and Tweet option (buttons to be displayed at the top), and my forum error log was filling up with these errors:

8: Undefined index: share_buzzbutton_enable
8: Undefined index: share_diggbutton_enable

Sources/ShareThis.php

After also enabling the Buzz and Digg options, these errors were gone! And also after disabling them, the errors stayed away. So I presume your mod only creates these settings when they're set for the first time?

- Something else: I had to disable the Facebook 'Like this' button, because it's loading very slow (like 10 seconds!). Do you know why this could happen?

Thanks,

Ronald

mirahalo

thanks for the report, I will check on that, yes, the settings are created when you use them for the first time.

the facebook like button depens on external services,  if facebook servers are slow theres a lot of possibilities the like button will delay to show,  also it will turn your forum slow if you have multiple like buttons in the same page,  I wasn't sure about that feature but a lot of people requested it.



Quote from: rbeuker on January 21, 2011, 05:23:05 PM
Hi, great mod, thx a lot for making it! :) 

actually, it was Arantor who created it,  I just put some new features and keep update it when new releases are out ;)

chedie

Hi everyone!

I like this mod but I'm having issues with it. meep!

Installation was successful and I can access it in the admin area.

But when I try to 'Like' or share a topic, this comes out (via Facebook)

~~~~~~~~~~~~~~~~~~~~~~~~

My Name likes An Error Has Occurred! on site.com [nofollow].

~~~~~~~~~~~~~~~~~~~~~~~~

I would presume 'An Error Has Occurred!' should be the topic title. When I click on that it goes to the correct forum thread.

Could somebody help me solve this? Unfortunately, I know almost zero of PHP to fix this on my own :(

Thank you!

Arantor

Is the topic available to guests?
Holder of controversial views, all of which my own.


chedie

Yes... the forum / topic is available for Guest viewing. :)

Arantor

That's the only reason you should ever get 'An Error Has Occurred' is if the topic isn't available to FB to browse - which the most common reason is that.

Can I have a link to a topic you tried to share on Facebook?
Holder of controversial views, all of which my own.


Advertisement: