mischka Posted October 13, 2017 Report Posted October 13, 2017 Hello I was digging around in phpvms today and came across the functions for url, actionurl, adminurl etc. So I started thinking, it'd be really handy to have something similar for the skin url. So instead of href="<?php echo SITE_URL?>/lib/skins/crystal/styles.css" you would go href="<?php echo url('styles.css'); ?>" that's much shorter, and also if for some reason you'd want to change the folder of your skin you don't need to recode everything. so I wrote that little function, here it is: function skinurl($path="") { if($path[0] != '/') $path='/'.$path; return SITE_URL.'/lib/skins/'.CURRENT_SKIN.$path; } all you need to do is paste it into your /core/bootstrap.inc.php and you're done! maybe this can be included in phpvms core? Quote
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.