• Hi there,

    I am redesigning my elderly WP site and want to drop SexyBookmarks in the header.

    Out of the box, SexyBookmarks is always tied to a post.

    My goal is to let SexyBookmarks work for any URL of my site.

    Here are my changes:

    In sexy_get_fetch_url(), set `$perms = ‘https://’ . $_SERVER[‘SERVER_NAME’] . $_SERVER[‘REQUEST_URI’] . $_SERVER[‘QUERY_STRING’];
    `

    In get_sexy(), set $title = urlencode(get_bloginfo('name') . wp_title('-', false));

    In get_sexy(), set $perms = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING'];

    In get_sexy(), set $mail_subject = urlencode(get_bloginfo('name') . wp_title('-', false));

    This solution has one caveat in respect to anchors. Since URL anchors do not get send to the server, PHP cannot possibly know about it. URLs like https://localhost/wordpress/856-pong/comment-page-1#comment-1022 cannot be shared by SexyBookmarks. They will look like https://localhost/wordpress/856-pong/comment-page-1 instead, without the anchor.

    I can live with that ??

    Summing it up, I call selfserv_sexy() twice: once in header and footer of every page served by WordPress. On each page users can share this very page.

    Comments & ideas greatly welcome ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • We are looking into adding this type of functionality to the plugin. Please email your information to josh[at]eight7teen[dot]com if you would like credit for the idea when we do implement it into the plugin.

    Thread Starter itst

    (@itst)

    Hey Josh,

    thank you! I mailed you my details the other day.

    Do you already know when the new version will be released?

    Regards
    Sascha

    I’m working on implementing it now, but I doubt I will get it finished before I have to leave for work this afternoon.

    It won’t take that long to implement your idea, but I have a whole list of things which I am adding before the next release as well…

    Things such as:

    1. Being able to host your own short URLs via the Twitter Friendly Links plugin

    2. A server-side check of permalink structure to ensure that the subscribe to comments link works everytime no matter how permalinks are set up

    3. Some minor CSS fixes

    4. A few encoding problems which are being a royal pain and are pretty hard to find…

    5. and your idea.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: SexyBookmarks] How-To: Using one SexyBookmark instance for your whole site’ is closed to new replies.