Support » Plugin: Music Affiliate Pro » [Plugin: Music Affiliate Pro] classing links

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brady Vercher


    The link that’s inserted into the editor is created in js/search.js. If you do make changes, I’d recommend backing them up since they’ll be overwritten by any updates.

    Ideally, the classes would probably be added to a search result via a filter (one doesn’t currently exist) and the javascript would pick them up when it creates the link.

    I change line 80s function to the below code to get a link with an image, the track/album name, and artist name and somewhere to place a network logo…. This suits my needs perfectly Brady’s code utilises the taget option on the link, mine forces it.

    I hope this helps someone else 🙂

    $(settings.resultsContainer).delegate('.ma-result', 'click', function(e) {
    				var defaultText = $('.title strong', this).text();
    				var defaultText2 = $(this).find('.artist').text();
    				var afftype ="";
    				var afftype = $('#ma-query-service').val();
    				var attrs = {
    					href : $(this).find('a').attr('href'),
    					target: '_blank',
    					class: 'affiliate affiliate-' +afftype
    				var tuneimage = $(this).find('img').attr('src');
    				if ($('#ma-link-target-blank').attr('checked') == 'checked') { = '_blank';
    				var linkHtml = $('<a><span class="aff-icon"></span><img src="'+tuneimage+'"/><span class="title">' + defaultText+'<span class="artist">'+defaultText2+'</span></a>').attr( attrs ).wrap('<div></div>').parent('div');
    				tuneEditor.sendLinkToEditor( linkHtml.html(), attrs, defaultText );

    Again, Thanks for the great plugin guys.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Music Affiliate Pro] classing links’ is closed to new replies.