Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5

Author Topic: [MOD/ADDON] Social bookmarking feature (sNews 1.5)  (Read 48386 times)

haelen

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 62
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #30 on: November 18, 2006, 09:03:13 AM »

Quote from: iatbm
hi I feel your pain :D .... it seems that /icons/ folder is used by default server icons so you just make new folder icons1 or whatever and put icons there ;)
Well, you learn something every day! Thanks for the info.

Tim
Logged

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #31 on: November 18, 2006, 01:46:49 PM »

It's probably a good idea to change icon folder to something else ;)
I also have that folder but not in my public_html section  :rolleyes:
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

haelen

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 62
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #32 on: November 18, 2006, 02:08:24 PM »

Thanks Mika, I've changed the name - but not the location.
Logged

ketut

  • Full Member
  • ***
  • Karma: 0
  • Posts: 115
    • Book Bali Hotels
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #33 on: December 19, 2006, 06:15:20 AM »

I use this code to display bookmark only in single page, please correct me if I made a mistake!

under
Quote
file_include(str_replace('[break]', '', $text), $shorten);
$commentable = $r['commentable'];
i use this code :
Quote
if (strlen($text) < $shorten) {   
//bookmark
echo '

';
soc_bookmark(db('website').$category.'/'.$r['seftitle'].'/', $r['title'], 'Y');
echo '

';
}
working demo at www.nusainfo.com

thanks

gis

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 77
    • Wort|ge|fecht, das
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #34 on: March 06, 2007, 12:51:32 AM »

I really like this mod. Unfortunately, I am no expert in PHP, so how do I add more social bookmarking sites? I'd especially like to add these two:

http://www.mister-wong.de/
http://www.yigg.de/

These are German del.icio.us rspectively Digg clones, since my content is German.
Logged
Nah, we anarchists don't believe in coercive orthography.

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #35 on: March 06, 2007, 07:32:46 AM »

Image for Yigg: http://www.yigg.de/images/yiggit.png
More buttons: http://www.yigg.de/hilfe?show=yiggitbuttons
[Suggestion: rename and convert image to yigg.jpg]

Image for Mister Wong: http://www.mister-wong.de/img/buttons/wong18.gif
More buttons: http://www.mister-wong.de/stuff/buttons/
[Suggestion: rename and convert image to misterwong.jpg]

Quote
# add the blue part to the array
'spurl'=>'http://www.spurl.net/spurl.php?url='.$link.'&title='.$title,
'technorati'=>'http://technorati.com/faves?add='.$link.'&title='.$title,
'wists'=>'http://wists.com/r.php?c=&r='.$link.'&title='.$title,
'yigg'=>'http://yigg.de/neu?exturl='.$link.'&exttitle='.$title,
'misterwong'=>'http://www.mister-wong.de/index.php?action=addurl&bm_url='.$link.' &bm_description='.title,

);
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

gis

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 77
    • Wort|ge|fecht, das
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #36 on: March 06, 2007, 12:05:26 PM »

Gee, that was fast  :P  Thanks!
Logged
Nah, we anarchists don't believe in coercive orthography.

gis

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 77
    • Wort|ge|fecht, das
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #37 on: March 06, 2007, 05:20:16 PM »

OK, I tried it myself for this site: http://www.webnews.de with this code:

Code: [Select]
'webnews'=>'http://www.webnews.de/einstellen?url='.$link.'&title='.$title,and it works...

Here is the icon:
http://www.webnews.de/pics/webnews_icon.gif
Logged
Nah, we anarchists don't believe in coercive orthography.

gis

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 77
    • Wort|ge|fecht, das
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #38 on: March 12, 2007, 10:04:29 AM »

I've got two more:

http://www.folkd.com/
Code: [Select]
'folkd'=>'http://www.folkd.com/submit/news/'.$link,Icon: http://www.folkd.com/images/folkd-39x20.gif

http://linkarena.com/
Code: [Select]
'linkarena'=>'http://linkarena.com/bookmarks/addlink/?url='.$link.'&title='.$title,Icon: http://linkarena.com/linkarena.ico

Don't forget to convert the icons.
Logged
Nah, we anarchists don't believe in coercive orthography.

BuLe Bali

  • Full Member
  • ***
  • Karma: 2
  • Posts: 100
    • A World Full of Doubts
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #39 on: March 29, 2007, 09:47:19 AM »

Whoa, i do not know what's wrong with the my Website
I just can't get it right.
Changing all to the lower case letter. Not working
Clean up XHTML. Not working
Changing the icon folder name. Not working

Ohya, i put the code
Code: [Select]
// MOD - SOCIAL BOOKMARKING
function soc_bookmark($link, $title, $icon = 'Y') {
    $link = rawurlencode($link);
    $title = rawurlencode($title);
    $icon_folder = 'icons/';
    $bookmark = array(
        'BlinkBits'=>'http://www.blinkbits.com/bookmarklets/save.php?v=1&source_url='.$link.'&title='.$title,
        'BlogMarks'=>'http://blogmarks.net/my/new.php?mini=1&simple=1&url='.$link.'&title='.$title,
        'Del.icio.us'=>'http://del.icio.us/post?v=2&url='.$link.'&title='.$title,
        'Digg'=>'http://digg.com/submit?phase=2&url='.$link.'&title='.$title,
        'Fark'=>'http://cgi.fark.com/cgi/fark/edit.pl?new_url='.$link.'&title='.$title,
        'Furl'=>'http://www.furl.net/storeIt.jsp?t='.$title.'&u='.$link,
        'Google'=>'http://www.google.com/bookmarks/mark?op=add&bkmk='.$link.'&title='.$title,
        'Ma.gnolia'=>'http://ma.gnolia.com/bookmarklet/add?url='.$link.'&title='.$title,
        'MyWeb'=>'http://myweb2.search.yahoo.com/myresults/bookmarklet?t='.$title.'&u='.$link,
        'Netscape'=>'http://www.netscape.com/submit/?U='.$link.'&T='.$title,
        'NetVouz'=>'http://netvouz.com/action/submitBookmark?url='.$link.'&title='.$title,
        'Newsvine'=>'http://www.newsvine.com/_tools/seed&save?u='.$link.'&h='.$title,
        'RawSugar'=>'http://www.rawsugar.com/pages/tagger.faces?turl='.$link.'&tttl='.$title,
        'Reddit'=>'http://reddit.com/submit?url='.$link.'&title='.$title,
        'Scuttle'=>'http://www.scuttle.org/bookmarks.php/maxpower?action=add&address='.$link.'&description='.$title,
        'Shadows'=>'http://www.shadows.com/features/tcr.htm?url='.$link.'&title='.$title,
        'Simpy'=>'http://simpy.com/simpy/LinkAdd.do?title='.$title.'&href='.$link,
        'Slashdot'=>'http://slashdot.org/bookmark.pl?url='.$link.'&title='.$title,
        'Spurl'=>'http://www.spurl.net/spurl.php?url='.$link.'&title='.$title,
        'Technorati'=>'http://technorati.com/faves?add='.$link.'&title='.$title,
        'Wists'=>'http://wists.com/r.php?c=&r='.$link.'&title='.$title,
    );
    foreach($bookmark as $key=>$value) {
        $link_text = $icon == 'Y' ? ''.l('soc_bookmark').' '.$key.'' : $key;
        echo ''.$link_text.' ';
    }
}
?>
just under my /*** CONFIGURATION VARIABLES ***/ without the and ?> sign
Did i make any mistake?

Please help.
Logged
This world are full of doubts! No systems is secure. No systems!
@yohanesbule

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #40 on: March 29, 2007, 02:25:59 PM »

If you have added this PHP function into the snews.php file, there is no need for the opening and closing php-tags... because the snews.php file is all active PHP already (except for a few places within functions where it closes and re-opens to accommodate some small chunks of straight HTML script). So, try removing them if you've left them in place.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

BuLe Bali

  • Full Member
  • ***
  • Karma: 2
  • Posts: 100
    • A World Full of Doubts
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #41 on: April 02, 2007, 09:20:03 AM »

Quote from: keyrocks
If you have added this PHP function into the snews.php file, there is no need for the opening and closing php-tags... because the snews.php file is all active PHP already (except for a few places within functions where it closes and re-opens to accommodate some small chunks of straight HTML script). So, try removing them if you've left them in place.
Done them. Didn't worked out as well.
Here is my snews file

Could somebody explain this to me? Cheers.
Logged
This world are full of doubts! No systems is secure. No systems!
@yohanesbule

BuLe Bali

  • Full Member
  • ***
  • Karma: 2
  • Posts: 100
    • A World Full of Doubts
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #42 on: April 09, 2007, 07:41:41 AM »

The one problem is the socliaze bookmarks still can't be found in there. But it is shown in my protected area, and it shows on TEXT only.
Logged
This world are full of doubts! No systems is secure. No systems!
@yohanesbule

Vinoth

  • Newbie
  • *
  • Karma: 1
  • Posts: 33
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #43 on: May 15, 2007, 01:22:43 AM »

works like a charm and it is really a great mod. Mika you are really wonderful.

And if you do not want the social bookmark below the short news on the index page and instead need it on the full news section above the comment. just add the code below :

Quote from: find this code
if ($infoline == true) {
                  $tag = explode(',', tags('infoline'));
                  foreach ($tag as $tag ) {
                     switch ($tag) {
                        case 'date': echo $a_date_format; break;
                        case 'readmore':
                        case 'comments': ; break;
                        case 'edit': if ($_SESSION[db('website').'Logged_In'] == token()) {echo '  '.$edit_link;} break;
                        default: echo $tag;
                                    }
   }
Add this code at the last.
Quote from: Add this code
echo '

'.l('soc_bookmark').': ';
soc_bookmark(db('website').$category.'/'.$r['seftitle'].'/', $title, 'Y');
echo '

';
Might be known to many.
Logged

disenando

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
    • http://www.aproxima.es
[MOD/ADDON] Social bookmarking feature (sNews 1.5)
« Reply #44 on: July 05, 2007, 04:22:32 PM »

Complete modified instructions (Spanish/español included)

Quote from: Vinoth
works like a charm and it is really a great mod. Mika you are really wonderful.

And if you do not want the social bookmark below the short news on the index page and instead need it on the full news section above the comment. just add the code below :

Quote from: find this code
if ($infoline == true) {
                  $tag = explode(',', tags('infoline'));
                  foreach ($tag as $tag ) {
                     switch ($tag) {
                        case 'date': echo $a_date_format; break;
                        case 'readmore':
                        case 'comments': ; break;
                        case 'edit': if ($_SESSION[db('website').'Logged_In'] == token()) {echo '  '.$edit_link;} break;
                        default: echo $tag;
                                    }
   }
Add this code at the last.
Quote from: Add this code
echo '

'.l('soc_bookmark').': ';
soc_bookmark(db('website').$category.'/'.$r['seftitle'].'/', $title, 'Y');
echo '

';
Might be known to many.
The firs part from Vinoth is fine and the second quote works like this for me:
Code: [Select]
echo '

'.l('soc_bookmark').': ';
soc_bookmark(db('website').$category.'/'.$r['seftitle'].'/', $r['title'], 'Y');
echo '

';
Right before
Code: [Select]
// CENTER
function center() {
enter the following (Since our website is in Spanish, I removed some social bookmarks and added others):

Code: [Select]
// MOD - SOCIAL BOOKMARKING
function soc_bookmark($link, $title, $icon = 'Y') {
    $link = rawurlencode($link);
    $title = rawurlencode($title);
    $icon_folder = 'icons_ap/';
    $bookmark = array(
        //'BlinkBits'=>'http://www.blinkbits.com/bookmarklets/save.php?v=1&source_url='.$link.'&title='.$title,
        //'BlogMarks'=>'http://blogmarks.net/my/new.php?mini=1&simple=1&url='.$link.'&title='.$title,
        'Del.icio.us'=>'http://del.icio.us/post?v=2&url='.$link.'&title='.$title,
        'Digg'=>'http://digg.com/submit?phase=2&url='.$link.'&title='.$title,
        //'Fark'=>'http://cgi.fark.com/cgi/fark/edit.pl?new_url='.$link.'&title='.$title,
        //'Furl'=>'http://www.furl.net/storeIt.jsp?t='.$title.'&u='.$link,
        'Google'=>'http://www.google.com/bookmarks/mark?op=add&bkmk='.$link.'&title='.$title,
        //'Ma.gnolia'=>'http://ma.gnolia.com/bookmarklet/add?url='.$link.'&title='.$title,
'Meneame'=>'http://meneame.net/submit.php?url='.$link.'&title='.$title,
        'Yahoo'=>'http://myweb2.search.yahoo.com/myresults/bookmarklet?t='.$title.'&u='.$link,
        'Netscape'=>'http://www.netscape.com/submit/?U='.$link.'&T='.$title,
        //'NetVouz'=>'http://netvouz.com/action/submitBookmark?url='.$link.'&title='.$title,
        //'Newsvine'=>'http://www.newsvine.com/_tools/seed&save?u='.$link.'&h='.$title,
        //'RawSugar'=>'http://www.rawsugar.com/pages/tagger.faces?turl='.$link.'&tttl='.$title,
        //'Reddit'=>'http://reddit.com/submit?url='.$link.'&title='.$title,
        //'Scuttle'=>'http://www.scuttle.org/bookmarks.php/maxpower?action=add&address='.$link.'&description='.$title,
        //'Shadows'=>'http://www.shadows.com/features/tcr.htm?url='.$link.'&title='.$title,
        //'Simpy'=>'http://simpy.com/simpy/LinkAdd.do?title='.$title.'&href='.$link,
'Barrapunto'=> 'http://barrapunto.com/submit.pl?story=He+leido+en+' .'Tu+Sitio+Web' .'+el+articulo+' .$title .'&subj='.$title,
        //'Slashdot'=>'http://slashdot.org/bookmark.pl?url='.$link.'&title='.$title,
        //'Spurl'=>'http://www.spurl.net/spurl.php?url='.$link.'&title='.$title,
        'Technorati'=>'http://technorati.com/faves?add='.$link.'&title='.$title,
        //'Wists'=>'http://wists.com/r.php?c=&r='.$link.'&title='.$title,
    );
    foreach($bookmark as $key=>$value) {
        $link_text = $icon == 'Y' ? ''.l('soc_bookmark').' '.$key.'' : $key;
        echo ''.$link_text.' ';
    }
}
Notice 3 things:

- The folder was renamed from icons to icons_ap or whatever you wish to make the website compatible with Apache servers
- I changed the extension from jpg to png files and used the images from a file containing png icons  at Vida Artificial
- strtolower($key) ensures you have all image names in lowercase inside the icons folder


Inside
Code: [Select]
function l($variable) {at the end, before the closing bracket add:
Code: [Select]
//Social bookmarking
$l['soc_bookmark'] = 'Guardar como favorito en';
:cool:
Pages: 1 2 [3] 4 5