| New bbcode to include your site url |
| by mondarse on 2013/8/7 12:42:29 I would like to share a bbcode that I use in my sites and helps me to create direct (full url) links to a file in my site, and avoid relative links not working in my local wamp because I use different "XOOPS_URL" values for hosted site and local test site Value for hosted site: le="color: #000000"><?php define('XOOPS_URL', 'http://www.mysite.com' ); Value for local wamp site: le="color: #000000"><?php define('XOOPS_URL', 'http://mypc/mytestsite1' ); In local wamp server realtive urls pointed to http://mypc so links or even images didn't worked because they should point to http://mypc/mytestsite1 I liked {X_SITEURL} that could only be used in blocks so I created a new bbcode that worked the same way with textsanitizer: in /class/textsanitizer folder added a new folder "xu", and inside it the code in this file xu.php and also added a new value in the extension array in /class/textsanitizer/config.php Hope this hack would be useful. MonDarSE |