this automatically adds the URL to the iTrader "Submit Feedback" page.
Note: jQuery will need to be loaded.
edit plugin iTrader postbit (postbit_display_complete)
Find:
Replace With:
edit template itrader_feedback
Find:
Replace With:
edit template itrader_rate_trade
Replace All With:
Now, when a user is viewing a thread, and clicks the "Rate Seller" link, when they go to the following page, the Deal thread URL: (Optional) will be populated with the thread URL.
Note: jQuery will need to be loaded.
edit plugin iTrader postbit (postbit_display_complete)
Find:
PHP:
$templater = vB_Template::create('itrader_rate_trade'); $templater->register('itrader', $itrader); $templater->register('post', $post); $template_hook['postbit_controls'] .= $templater->render();
Replace With:
PHP:
$templater = vB_Template::create('itrader_rate_trade'); $templater->register('itrader', $itrader); $templater->register('post', $post); $templater->register('thread', $thread); $template_hook['postbit_controls'] .= $templater->render();
edit template itrader_feedback
Find:
Code:
{vb:raw footer}
Replace With:
Code:
{vb:raw footer}
<script>
$(document).ready(function() {
$.extend({
getUrlVars: function(){
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
},
getUrlVar: function(name){
return $.getUrlVars()[name];
}
});
var ref_url = $.getUrlVar('ref_url');
if (ref_url != '' && ref_url != null) {
$("input[name=dealurl]").val("{vb:raw vboptions.bburl}{vb:if "$vboptions['bburl']", '/', ''}showthread.php?t="+ref_url);
}
});
</script>
edit template itrader_rate_trade
Replace All With:
Code:
<a href="{vb:raw vboptions.bburl}/itrader_feedback.php?{vb:raw session.sessionurl}u={vb:raw post.userid}&ref_url={vb:raw thread.threadid}" style="background: url(images/itrader/icon_positive.png) no-repeat transparent left;padding-left: 20px;">{vb:rawphrase itrader_rate_seller}</a>
<span class="seperator"> </span>
Now, when a user is viewing a thread, and clicks the "Rate Seller" link, when they go to the following page, the Deal thread URL: (Optional) will be populated with the thread URL.