Hello, I was wondering if there's a way to make the icon display before the link, not after. I want it to appear more like a bullet. I tried messing with the css file and it didn't work :/

LOVE THIS MODULE, tia

Files: 
CommentFileSizeAuthor
#3 extlink-icon_placement-1672650-3.patch2.39 KBDrColossos
PASSED: [[SimpleTest]]: [MySQL] 29 pass(es).
[ View ]

Comments

Just change in extlink.js $(this).after by $(this).before everywhere

Something nicer would be to include the option in extlink_admin_settings, like:

  $form['extlink_place'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add icon next to external links'),
    '#return_value' => 'next',
    '#default_value' => variable_get('extlink_place', 'next'),
    '#description' => t('If checked the icon will placed next to external links.'),
  );

Then add line 24 after drupal_add_js(array('extlink' => array( :

    'extPlace'     => variable_get('extlink_place', 0),

And in your extlink.js file, change the line:

  if (Drupal.settings.extlink.extClass) {
    // Apply the "ext" class to all links not containing images.
    if (parseFloat($().jquery) < 1.2) {
      $(external_links).not('[img]').addClass(Drupal.settings.extlink.extClass).each(function() { if ($(this).css('display') == 'inline') $(this).after('<span class=' + Drupal.settings.extlink.extClass + '></span>'); });
    }
    else {
      $(external_links).not($(external_links).find('img').parents('a')).addClass(Drupal.settings.extlink.extClass).each(function() { if ($(this).css('display') == 'inline') $(this).after('<span class=' + Drupal.settings.extlink.extClass + '></span>'); });
    }
  }
  if (Drupal.settings.extlink.mailtoClass) {
    // Apply the "mailto" class to all mailto links not containing images.
    if (parseFloat($().jquery) < 1.2) {
      $(mailto_links).not('[img]').addClass(Drupal.settings.extlink.mailtoClass).each(function() { if ($(this).css('display') == 'inline') $(this).after('<span class=' + Drupal.settings.extlink.mailtoClass + '></span>'); });
    }
    else {
      $(mailto_links).not($(mailto_links).find('img').parents('a')).addClass(Drupal.settings.extlink.mailtoClass).each(function() { if ($(this).css('display') == 'inline') $(this).after('<span class=' + Drupal.settings.extlink.mailtoClass + '></span>'); });
    }
  }

by:

  if (Drupal.settings.extlink.extClass) {
    // Apply the "ext" class to all links not containing images.
    if (parseFloat($().jquery) < 1.2) {
      $(external_links).not('[img]').addClass(Drupal.settings.extlink.extClass).each(function() { if ($(this).css('display') == 'inline') {
          if (Drupal.settings.extlink.extPlace) {
            $(this).after('<span class=' + Drupal.settings.extlink.extClass + '></span>');
          } else {
            $(this).before('<span class=' + Drupal.settings.extlink.extClass + '></span>');
          }
        }
      });
    }
    else {
      $(external_links).not($(external_links).find('img').parents('a')).addClass(Drupal.settings.extlink.extClass).each(function() { if ($(this).css('display') == 'inline') {
          if (Drupal.settings.extlink.extPlace) {
            $(this).after('<span class=' + Drupal.settings.extlink.extClass + '></span>');
          } else {
            $(this).before('<span class=' + Drupal.settings.extlink.extClass + '></span>');
          }
        }
      });
    }
  }
  if (Drupal.settings.extlink.mailtoClass) {
    // Apply the "mailto" class to all mailto links not containing images.
    if (parseFloat($().jquery) < 1.2) {
      $(mailto_links).not('[img]').addClass(Drupal.settings.extlink.mailtoClass).each(function() { if ($(this).css('display') == 'inline') {
          if (Drupal.settings.extlink.extPlace) {
            $(this).after('<span class=' + Drupal.settings.extlink.mailtoClass + '></span>');
          } else {
            $(this).before('<span class=' + Drupal.settings.extlink.mailtoClass + '></span>');
          }
        }
      });
    }
    else {
      $(mailto_links).not($(mailto_links).find('img').parents('a')).addClass(Drupal.settings.extlink.mailtoClass).each(function() { if ($(this).css('display') == 'inline') {
          if (Drupal.settings.extlink.extPlace) {
            $(this).after('<span class=' + Drupal.settings.extlink.mailtoClass + '></span>');
          } else {
            $(this).before('<span class=' + Drupal.settings.extlink.mailtoClass + '></span>');
          }
        }
      });
    }
  }

Cheers

Category:support» feature
Status:Active» Postponed

Could be a possible inclusion. Submit a patch and we will see about including it.

Version:7.x-1.12» 7.x-1.x-dev
Status:Postponed» Needs review
StatusFileSize
new2.39 KB
PASSED: [[SimpleTest]]: [MySQL] 29 pass(es).
[ View ]

Since we needed this functionallity, I created a patch from the above. I slightly changed some of the wordings and changed the way the JavaScript is handled. Created against the latest dev