We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24518
    • 9 Posts
    Can anyone provide/point to the correct code to add Twitter to the bookmarks chunk? Heres what I have:
    ///////////////*BEGIN Chunk*///////////////
    
    <div id="bookmarks">
       <h2>Bookmark or Share This! <a style="font-size:10px; font-weight:normal; font-style:italic;" href="[~82~]" target="_self">(What are these?)</a>
    </div></h2>
    
    <a style="text-decoration:none;" title="Post this story to Facebook" href="http://www.facebook.com/sharer.php?u=[(site_url)][~[*id*]~]"><img src="assets/images/bookmarks/facebook_48x48.png" border="0" title="Share on Facebook"/></a>
    
    <a target="_blank" href="http://www.twitter.com/sharer.php?u=[(site_url)][~[*id*]~]"><img alt="Twitter" border="0" src="assets/images/bookmarks/twitter_48x48.png" title="Tweet Page"/></a>
    
    <a target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=[(site_url)][~[*id*]~]&title=[*pagetitle*]"><img alt="Google" border="0" src="assets/images/bookmarks/google_48x48.png" title="Save to Google" /></a>
    
    <a target="_blank" href="http://www.stumbleupon.com/submit?url=[(site_url)][~[*id*]~]"><img alt="Stumbleupon" border="0" src="assets/images/bookmarks/stumbleupon_48x48.png" title="Save to Stumbleupon" /></a>
    
    <a target="_blank" href="http://myweb.yahoo.com/myresults/bookmarklet?t=[*pagetitle*]&u=[(site_url)][~[*id*]~]"><img alt="Yahoo!" border="0" src="assets/images/bookmarks/yahoo_48x48.png" title="Save to Yahoo!" /></a>
    
    <a target="_blank" href="mailto:?subject=[*pagetitle*]&body=[(site_url)][~[*id*]~]" title="E-mail this to a friend"><img alt="E-mail this to a friend" border="0" src="assets/images/bookmarks/email_48x48.png" title="E-mail this to a friend" /></a>
    
    
    ///////////////*END Chunk*///////////////
    

    TIA
    -Rat
      • 33337
      • 3,975 Posts
      Change the following:
      http://www.twitter.com/sharer.php?u=
      

      with:
      http://twitter.com/home?status=
      

      I hope it will work.
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 24518
        • 9 Posts
        Quote from: zi at Oct 25, 2009, 11:43 PM

        Change the following:
        http://www.twitter.com/sharer.php?u=
        

        with:
        http://twitter.com/home?status=
        

        I hope it will work.


        SUCCESS!

        I also added [*pagetitle*] after =" and it works perfectly.

        THANK YOU!
        -Rat

        BTW - the site is http://www.flnoi.com (Still under construction)
          • 9674
          • 170 Posts
          I did the following changes to add the support of tweeter in it :

          adding :

          [!TweetThis? &amp;name=`@myaccount` &amp;text=``!]

          at the end of the chunck

          and modifies the twweetthis snippet to include an image as this :

          // ---------------------------------------------------
          // Build link
          // ---------------------------------------------------
          $strTweetThis = ’<a class="tweetthis" href="http://twitter.com/home?status=’ . urlencode($thisDoc[’pagetitle’]);
          if ($name <> ’’) {
          $strTweetThis .= ’%20by%20’ . urlencode($name);
          }
          $strTweetThis .= ’:%20’ . urlencode(getTinyUrl($id)) .’"><img style="border:none;" title="Tweet this !" src="assets/images/bookmarks/twitter.png" alt=" My_Twitter" width="30" height="30" />’ . $text . ’</a>’;

          return $strTweetThis;
          ?>


          I know it’s a bit hard coded to put the adress of the image in it, but I’am not a programmer undecided and i do not want to spend too much time on it.....


          Thanks anyway to all the community and long live to ModX

          Phil