WordPress.org

Ready to get started?Download WordPress

Forums

Digg Digg
var dd_offset_from_content showing in excerpt (4 posts)

  1. slny311
    Member
    Posted 1 year ago #

    I have var dd_offset_from_content.... showing where i am pulling the excerpt into the page...

    I tried the - remove_filter('the_excerpt', 'dd_hook_wp_content');

    But no change

    Here is the code how im pulling in the excerpt... im using The Events Calendar as well.

    <?php echo has_excerpt() ? TribeEvents::truncate($post->post_excerpt) : TribeEvents::truncate(get_the_content(), 30); ?>

    http://wordpress.org/extend/plugins/digg-digg/

  2. mezzofanti
    Member
    Posted 1 year ago #

    Did you find a solution to this?

  3. slny311
    Member
    Posted 1 year ago #

    no I switched plugins...

  4. Nick Powers
    Member
    Posted 1 year ago #

    I fixed this...

    In the digg-digg.php file I added

    $flag = 0;

    just below

    define( 'DD_PLUGIN_URL', plugins_url( '/', __FILE__ ) );

    I added:

    global $flag;

    at the top of function integrateFloatingButtonsIntoWpContent

    I changed:

    $floatingJSOptions = '<script type="text/javascript">var dd_offset_from_content = '.(!empty($ddFloatDisplay[DD_FLOAT_OPTION][DD_FLOAT_OPTION_LEFT])?($ddFloatDisplay[DD_FLOAT_OPTION][DD_FLOAT_OPTION_LEFT]):DD_FLOAT_OPTION_LEFT_VALUE).'; var dd_top_offset_from_content = '.(!empty($ddFloatDisplay[DD_FLOAT_OPTION][DD_FLOAT_OPTION_TOP])?($ddFloatDisplay[DD_FLOAT_OPTION][DD_FLOAT_OPTION_TOP]):DD_FLOAT_OPTION_TOP_VALUE).';</script>';

    to:

    if( $flag > 0 ) {
    $floatingJSOptions = '<script type="text/javascript">var dd_offset_from_content = '.(!empty($ddFloatDisplay[DD_FLOAT_OPTION][DD_FLOAT_OPTION_LEFT])?($ddFloatDisplay[DD_FLOAT_OPTION][DD_FLOAT_OPTION_LEFT]):DD_FLOAT_OPTION_LEFT_VALUE).'; var dd_top_offset_from_content = '.(!empty($ddFloatDisplay[DD_FLOAT_OPTION][DD_FLOAT_OPTION_TOP])?($ddFloatDisplay[DD_FLOAT_OPTION][DD_FLOAT_OPTION_TOP]):DD_FLOAT_OPTION_TOP_VALUE).';</script>';
    }
    $flag++;

    I am not affiliated with this plugin other than being a user and wanting to fix this issue. This may not be the best fix but it works. Hopefully people more knowledgeable about this code will take a look at this hack and put a real fix in place.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.