Page 1 of 2

socialbookmarking

Posted: Thu May 07, 2009 8:03 pm
by cubitus
Hi,

Thank you, thank you very much for having created the socialbookmarking tag  :)

I'm just thinking why there is so a huge bug in socialbookmarking tag.

Well, at line 117 you have a return command (just after having computed the url) ???

Should'nt be the following ?

if($page_content_id) {
   $curnode =& $hm->getNodeById($page_content_id);
   $curcontent =& $curnode->GetContent();
   $url = urlencode($curcontent->GetURL()); // url of current page
}
else {
   return;
}

Maybe I'm wrong  ::)

otherwise, the following generated link are not working :

yahoo
magniolia

cheers  ;)

Re: socialbookmarking

Posted: Fri May 08, 2009 1:34 pm
by rhysdavies
Brilliant!  Just what I was looking for!

Re: socialbookmarking

Posted: Tue Jul 14, 2009 6:50 pm
by hexdj
hi cubitus:

Thanks for the note, this is actually not my module, I just forked it
from someone else and updated it to have new social networks
but I will take a look at the code again and make sure it all works correctly.

Re: socialbookmarking

Posted: Sun Aug 16, 2009 9:26 am
by WebGirl
Hi there,

In one of my websites CMSMS V.1.6 (yes I will upgrade this week :)) I have just installed the SocialBookmarking tag but haven't got it ot work yet.

I'd like to have a go at fixing the php (as provided above) but I'm afraid I don't know what needs to be replaced :(

Can anyone help me out?

Many thanks in advance!

Re: socialbookmarking

Posted: Wed Aug 19, 2009 7:58 am
by jonaskhn
Hi magniolia
cubitus wrote:
Should'nt be the following ?
Would you be kind to provide the entire function.SocialBookmarking.php with this fix embedded? It would be a great help

Regards, Jonas

Re: socialbookmarking

Posted: Thu Aug 20, 2009 9:57 am
by manuel
I was just testing this fix for myself so i've attached the corrected file to this post.
You need to rename the .txt file to .php (can't upload php files in a forum post)

ps: I've indicated where the code has been replaced with the following lines:

//ORIGINAL CODE BELOW
//BEGIN OF MODIFIED CODE
//END OF MODIFIED CODE

ps2: If you post to facebook (example) The title is the page title (correct), the url is the current page url (correct) and the content (when using the default layout) is the content of the news item (not correct)

I was hoping it would be possible to specify to the script to take the first paragraph from the content area, not the first piece of content it encounters in the complete page... but this is beyond my skills... anybody has some advise on this?  ;D

Greetings,
Manuel

Re: socialbookmarking

Posted: Thu Aug 20, 2009 11:10 am
by jonaskhn
Thank you manuel, I really appreicate it !  :) :)

Regards, Jonas

Re: socialbookmarking

Posted: Fri Sep 11, 2009 5:49 pm
by wizzard81
Well i fixed this problem by adding the code below at the bottom of the page before the php ending tag =>

function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}

i changed on line 116 $url = urlencode($curcontent->GetURL()); // url of current page to
$url = curPageURL();

this worked for me :)

Re: socialbookmarking

Posted: Fri Sep 25, 2009 7:49 am
by hexdj
I received an updated file from plger that has a couple of fixes. Many thanks to him!

http://dev.cmsmadesimple.org/project/files/633

Re: socialbookmarking

Posted: Sat Sep 26, 2009 2:33 am
by mel
Hi,
I tried it. Does the .svn folder was supposed to be packaged on the release?

Also, for users, don't forget to change {SocialBookmarking} to {[glow=red,2,300]s[/glow]ocialBookmarking}!  ;)

thanks!

Re: socialbookmarking

Posted: Thu Jan 14, 2010 8:35 pm
by liudaz
Hi,

Thanks fot this great plugin!

If somebody is having troubel while passing current page URL to the social engine (f.e. if you are using some modiefied module without mod_rewrite), this modification might help. At line 115 of this plugin simply modify the ELSE part of the conditional sentence:

Code: Select all

}else{	
	$url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];	
	}
Worked for me, maybe it will help you too. :)

Liudas

Re: socialbookmarking

Posted: Thu Jan 14, 2010 8:50 pm
by hexdj
@liudaz:

Thanks for this, I will add it to the plugins code right away

Re: socialbookmarking

Posted: Wed Mar 10, 2010 4:20 pm
by zorrax
Thk for this plugins it is really usefull

I installed this plugins last day but I had a problem (cms1.6.6 mle)

Code: Select all

string(173) "Smarty error: [in module_db_tpl:News;summaryconference line 28]: syntax error: unrecognized tag: {socialbookmarking submitto="facebook" (Smarty_Compiler.class.php, line 446)" string(136) "Smarty error: [in module_db_tpl:News;summaryconference line 28]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" 
I use the last version 1.2

Re: socialbookmarking

Posted: Thu Mar 11, 2010 5:13 am
by hexdj
@zorrax:

tags are case sensitive, from the code you posted I see you have the socialBookmarking call all in lower case, that's most likely the problem.

Re: socialbookmarking

Posted: Thu Mar 11, 2010 1:45 pm
by zorrax
hexdj wrote: @zorrax:

tags are case sensitive, from the code you posted I see you have the socialBookmarking call all in lower case, that's most likely the problem.
I think it is not a problem of case sensitive because
When I change the template of my page is completely disable and the page appeat with simple template
all accent in my page appear in another coding
like this : Université Paris Diderot est installée

I use cms 1.6.6 and mle so I think may be it came from the mle version