• Hi,

    This is a restructured version of a question I asked in the wrong forum (sorry for that):

    After seeing the plugin’s demo, I thought this was a fantastic plugin. So I decided to download it and give it a try.

    After installing it properly, I wanted to add it into the Index.php file. So I inserted the given code:

    <?php echo '<ul class="addtoany_list">'; if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) ADDTOANY_SHARE_SAVE_ICONS( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) ADDTOANY_SHARE_SAVE_BUTTON( array("html_wrap_open" => "<li>", "html_wrap_close" => "</li>") ); echo '</ul>'; ?>

    Sadly, it displayed an error: https://i30.tinypic.com/2qwk5jm.jpg

    It seems that the plugin cannot detect/find some variables.

    So I was wondering if there was any solution or advice the plugin’s creator could give to help me correct this problem.

    I’m with WordPress 2.8, but with a 2.7 (or even less, I’m not sure) theme. But still, I converted 3 of my WordPress theme’s files (index.php, comments.php and sidebar.php) to be compatible with WordPress 2.8. So, I can’t see where the problem is.

    Thank you very much for your time.

    Justin

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Justin,

    For whatever reason (could be your theming) it looks like $post is failing because it’s not a global variable. The next release (today) will hopefully fix this. Please post back when you try it!

    Thanks,
    Pat

    Thread Starter justin01

    (@justin01)

    Hi Pat,

    Thank you for replying.

    I installed the next release, but it still showed some PHP errors. So I went into the “add-to-any.php” file and added this:

    global $output_buffering;

    …on line 48 and 93. Maybe that’s not the best way to do it, but now it works.

    Now I have another problem: even if I insert the PHP code (inserted in my first post) in the entry’s meta data-section (which displays the number of comments, the permalink, and the “Edit” button), the icon still puts itself at the end of the entry. And that really confuses me.

    I’ve tried to tweak it by changing the tags and the CSS, but it still puts itself automatically at the end of the post (not where I want it).

    Like you can see it here: https://www.jeek.ca/linkdumpbeta/ – I’d like it to be after the last ” | “. You can verify it with Firebug.

    Do you think this could be solved?

    Again, thank you very much for your time. I really appreciate it.

    Justin

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Add to Any: Share/Bookmark/Email Button] Error when inserting into “index.php”’ is closed to new replies.