socialbookmarking

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
User avatar
cubitus
Forum Members
Forum Members
Posts: 32
Joined: Mon Oct 09, 2006 3:42 pm
Location: Lausanne/CH

socialbookmarking

Post 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  ;)
rhysdavies
Forum Members
Forum Members
Posts: 31
Joined: Thu Oct 04, 2007 9:23 am

Re: socialbookmarking

Post by rhysdavies »

Brilliant!  Just what I was looking for!
hexdj
Power Poster
Power Poster
Posts: 415
Joined: Sat Mar 24, 2007 8:28 am

Re: socialbookmarking

Post 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.
WebGirl

Re: socialbookmarking

Post 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!
jonaskhn
Forum Members
Forum Members
Posts: 15
Joined: Sat Aug 15, 2009 2:35 pm

Re: socialbookmarking

Post 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
User avatar
manuel
Power Poster
Power Poster
Posts: 353
Joined: Fri Nov 30, 2007 9:15 am

Re: socialbookmarking

Post 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
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

Do you like your open source cms? Buy from the CMSMS partners || Donate
jonaskhn
Forum Members
Forum Members
Posts: 15
Joined: Sat Aug 15, 2009 2:35 pm

Re: socialbookmarking

Post by jonaskhn »

Thank you manuel, I really appreicate it !  :) :)

Regards, Jonas
wizzard81

Re: socialbookmarking

Post 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 :)
hexdj
Power Poster
Power Poster
Posts: 415
Joined: Sat Mar 24, 2007 8:28 am

Re: socialbookmarking

Post 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
mel
Forum Members
Forum Members
Posts: 147
Joined: Mon Dec 11, 2006 11:53 pm

Re: socialbookmarking

Post 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!
Version 1.6-MLE
liudaz

Re: socialbookmarking

Post 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
hexdj
Power Poster
Power Poster
Posts: 415
Joined: Sat Mar 24, 2007 8:28 am

Re: socialbookmarking

Post by hexdj »

@liudaz:

Thanks for this, I will add it to the plugins code right away
zorrax
Forum Members
Forum Members
Posts: 11
Joined: Mon Feb 01, 2010 9:21 am

Re: socialbookmarking

Post 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
Last edited by zorrax on Wed Mar 10, 2010 4:22 pm, edited 1 time in total.
hexdj
Power Poster
Power Poster
Posts: 415
Joined: Sat Mar 24, 2007 8:28 am

Re: socialbookmarking

Post 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.
zorrax
Forum Members
Forum Members
Posts: 11
Joined: Mon Feb 01, 2010 9:21 am

Re: socialbookmarking

Post 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
Post Reply

Return to “Modules/Add-Ons”