MikeDVB Posted January 17, 2009 Share Posted January 17, 2009 I'm not skilled enough with PHP/Smarty myself so I thought I'd ask. I don't want the whole referral URL but just the Affiliate ID number, we've set up short URLs for our affiliates (http://www.ourdomain.com/012) for affiliate number 012 for example and would like to be able to code it into the template page (affiliates.tpl) to display the short URL as an option. Thanks. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted January 17, 2009 Share Posted January 17, 2009 to do something like that you use mod_rewrite to change url/012 to ulr/*?aff=012 0 Quote Link to comment Share on other sites More sharing options...
MikeDVB Posted January 18, 2009 Author Share Posted January 18, 2009 Perhaps I wasn't clear. I already have it set up to do that - already had mod_rewrite in the .htaccess before I posted here. I don't need to know how to do that. I need to know how to *inside a WHMCS template* get the current user's affiliate ID number (not the full URL, just the NUMBER itself) so that I can display the custom URL in the template. 0 Quote Link to comment Share on other sites More sharing options...
MikeDVB Posted January 29, 2009 Author Share Posted January 29, 2009 I guess nobody knows how to do this, guess I gotta do some digging uggh oh well. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted January 29, 2009 Share Posted January 29, 2009 (edited) EDIT: Sorry didn't read the last post. Ignore this post original url http://domain.com/*?aff=012rewritten urlhttp://domain.com/012Put this code in your .htaccess in your whmcs rootRewriteEngine OnRewriteRule ^([^/]*)$ /*?aff=$1 [L] Edited January 29, 2009 by sparky 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted January 29, 2009 Share Posted January 29, 2009 in the affiliate tpl file the smarty variable should be {$affiliateid} 0 Quote Link to comment Share on other sites More sharing options...
MikeDVB Posted January 29, 2009 Author Share Posted January 29, 2009 Ok, I'll give it a shot. Thank you. 0 Quote Link to comment Share on other sites More sharing options...
MikeDVB Posted January 29, 2009 Author Share Posted January 29, 2009 Excellent! Thank you! http://www.screen-shot.net/ss/6497302507153617324.png (screen shot showing it in use) 0 Quote Link to comment Share on other sites More sharing options...
Dedigeeks-Sean Posted May 31, 2009 Share Posted May 31, 2009 Which is the Smarty ID? Sean 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.