WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Sociable] Pdf icon and function (3 posts)

  1. lore82lolli
    Member
    Posted 5 years ago #

    Hello all,

    I added to this Sociable great plug in an icon for pdf printing,
    in the configuration file I need to add the url, how?

    I actually use the working post2pdf and the string is

    http://www.conerobynight.it/wo/wp-content/plugins/post2pdf/generate.php?post=##GLOBALID##\;Title=TITLE

    but it come back with a blank pdf.. there is something wrong with ##GLOBALID## ???

    thank you..

    do you know some better plugin or other suggestion?

  2. Joost de Valk
    Member
    Posted 5 years ago #

    Hmm I could probably make this work, right now though, there's no way to insert the ID, I'll add that with the next release.

  3. dhvrm
    Member
    Posted 5 years ago #

    1. Locate in sociable.php this line, somewhere around like 655: $post = $wp_query->post;

    2. After that line, add this line: $postid = $post->ID;

    3. Find this line, somewhere around line 692: $url = $site['url'];

    4. After that line, add this line: $url = str_replace('POSTID', $postid, $url);

    5. When making your link, change your URL from this:
    http://www.conerobynight.it/wo/wp-content/plugins/post2pdf/generate.php?post=##GLOBALID##\;Title=TITLE

    to this:

    http://www.conerobynight.it/wo/wp-content/plugins/post2pdf/generate.php?post=POSTID\;Title=TITLE

    It should work, if my assumptions are correct.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags