I need insert anchor like path. But when i put path "node/1#anchor", output from nivo slider is "node/1%23anchor".
Problem is with Nivo Slider module only.

Excuse my English

Comments

gynekolog’s picture

Status: Closed (fixed) » Fixed

Solution:

nivo_slider_slides.admin.inc
change

  $img_form['image_url'] = array(
    '#type' => 'textfield',
    '#title' => t('Link image to URL'),
    '#default_value' => $image_data['image_url'],
  );

on

  $img_form['image_url'] = array(
    '#type' => 'textfield',
    '#title' => t('Link image to URL'),
    '#default_value' => $image_data['image_url'],
  );
    $img_form['image_anchor'] = array(
    '#type' => 'textfield',
    '#title' => t('Anchor'),
    '#default_value' => $image_data['image_anchor'],
    '#description' => t('If you need anchor. Example: For <i>#anchor</i> put only <i>anchor</i>'),
  );

In banners.inc change

    // Create a variable to hold the settings for each image
    $setting = array(
      'image_path' => $destination,
      'image_thumb' => $image->source,
      'image_title' => '',
      'image_description' => '',
      'image_url' => '',
      'image_weight' => 0,
      'image_published' => TRUE,
      'image_visibility' => '*'
    );

on

    // Create a variable to hold the settings for each image
    $setting = array(
      'image_path' => $destination,
      'image_thumb' => $image->source,
      'image_title' => '',
      'image_description' => '',
      'image_url' => '',
      'image_anchor' => '',
      'image_weight' => 0,
      'image_published' => TRUE,
      'image_visibility' => '*'
    );

and

  $output .= $banner['image_url'] ? l($image, $banner['image_url'], array('html' => TRUE)) : $image;

on

   $output .= $banner['image_url'] ? l($image, $banner['image_url'], array('html' => TRUE, 'fragment' => $banner['image_anchor']))  : $image;
gynekolog’s picture

Status: Active » Fixed

And if you wont slide active on same page as link, in banner.inc change

    // Remove link if is the same page
     $banner['image_url'] = ($banner['image_url'] == current_path()) ? FALSE  : $banner['image_url'];

on

    // Remove link if is the same page
    // $banner['image_url'] = ($banner['image_url'] == current_path()) ? FALSE  : $banner['image_url'];
 
gynekolog’s picture

Status: Fixed » Closed (fixed)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.