• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

iTrader - Automatically add "Deal URL" to rating page

Admin

Well-Known Member
Staff member
Administrator
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:
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">&nbsp;</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.

tuoitrevnbiz18022013.png
 

Facebook Comments

Similar threads
Thread starter Title Forum Replies Date
Admin Yilmaz - Remember me box automatically ticked (Compatible 5.6.x) Add-ons 0
Admin FUZZY SEO Booster - increase long tail search traffic AUTOMATICALLY! Add-ons 0
Admin [Xen-Soluce] Add-on Archive Improvements Xenforo 0
Admin TUOITREIT Add Alt Images Resource Xenforo 2 Xenforo 2.x Premium 0
Admin TUOITREIT Add Alt Text To Images Xenforo 2 Xenforo 2.x Premium 0
Admin [EAE Add-ons] Thread preview widget Xenforo 0
Admin [VNXF 2x] Google Trans - Add auto Google translate bar into your forum Xenforo 0
Admin [EAE Add-ons] Cupid's Arrow Xenforo 0
Admin XenForo & Add-ons 2.2.0 Release Candidate 2 Released (Unsupported) Xenforo 0
Admin [OzzModz] Add Pagination To Top Of Members List In ACP Xenforo 0
Admin [OzzModz] Add Pagination To Top Of Phrase List Xenforo 0
Admin [OzzModz] Add Pagination To Top Of Templates List Xenforo 0
Admin tuoitreit.vn add Facebook Comments Xenforo 2 Xenforo 2.x Premium 0
Admin Kinh nghiệm add thuế cho Ad Breaks tránh on hold Tut, tool, mmo 0
Admin [Jazzaaf] Move Installable Add-ons Xenforo 0
Admin How to add amp adsense code to xenforo 2 simple Xenforo 0
Admin Hướng dẫn bật kiếm tiền Ad Breaks từ đầu cho đến bước add bank và khai thuế W-9 Tut, tool, mmo 0
Admin Add Safari smart banners Add-ons 0
Admin Hướng dẫn thêm đuôi .html cho xenforo không dùng add-ons Xenforo 0
Admin Hướng dẫn xóa bản quyền add-ons Advertisement Manager cho xenforo Xenforo 0
Admin Share add-ons bộ gõ tiếng việt cho xenforo Xenforo 0
Admin Share add-ons tự động nhận diện tiêu đề link cho xenforo Xenforo 0
Admin [OzzModz] Add As Friend In Postbit Add-ons 0
T Hỏi Ai biết dùng add-ons stop spam here ko? Xenforo 0
Admin Share add-ons chặn like facebook cho firefox Sử dụng, chia sẻ, hỏi đáp 0
T Xin add-on sitemap for xenforo 1.2.2 Xenforo 1
T Help Cần giúp đỡ về add-ons Xenforo Xenforo 8
khanhsak3r Hỏi add domain vào openshift Thảo luận wap việt 4
Admin Add the time the page was generated at back! Vbb tutorial 0
bunvocam9x Share Hướng dẩn add title vào tag Johncms 0
Admin Hướng dẫn nâng cấp IOS 7 cho các thiệt bị mà không cần add UDID Sử dụng, chia sẻ, hỏi đáp 0
Admin Force members add tag for vbb Vbb tutorial 0
blog4me Thảo luận Pro add Mod JohnCms vào Johncms 17
WapNCTY Thảo luận Đổi domain lấy wap ***tgem park được domain,chưa add mail. Wap builder, wapego, xtgem, wen.ru, wapka, wap4 4
Admin Add the time the page was generated at back! Vbb tutorial 0
Admin Nhận download add-ons từ xenforo.com cho thành viên tuoitreit.vn Xenforo 15
Admin Hướng dẫn thêm trả lời vào phần tin nhắn của khách - Add reply to visitor message Vbb tutorial 1
Myshare Share Tut hướng dẫn add site(tên miền) lên google Hosting / Domain 0
Admin Add-Ons XF Forum List Tabs by Waindigo 1.0.1 Xenforo 0
Admin Hướng dẫn add style mobile cho vbb4 bằng hình ảnh Vbb tutorial 1
Admin Hướng dẫn add thêm domain vào vps azure VPS & Dedicated Server 0
R Thảo luận nên add những mod gì cho xenforo Xenforo 0
Admin Đóng dấu bản quyền ảnh - WaterMark Add-on 1.2 Xenforo 0
Admin Easiest way to add Facebook Comments on thread Add-ons 0
Cuongkoj00 Share Add-on Bot online xenforo Xenforo 1
Cuongkoj00 Hỏi Về sitemap và add wap lên google Thảo luận wap việt 6
Cuongkoj00 ∞Art Of War(Đế chế tank)Đã vh,Çrack, Hack Tiề∩ MAX để xây nhà, tool.Đã Add ThêM 83 Map(füll)‼ S40 0
H xin hd add icon mem và admin mod cho vbb Vbulletin 1
tubotocdo Youtube Hướng dẫn add logo và text vao film Video, clip 2
Admin Add Icons to the Navigation Bar Tabs Add-ons 0

Similar threads

New posts New threads New resources

Back
Top