I have a link shortener system (Yourls) set up so you can go to the short url with ?url=[xyz]
(where [xyz]
is the url you wan to shorten) added to the end will shorten the URL. I want to add a link to a separate page (on my MediaWiki wiki) that shortens the permalink of the page that it is on. I need to add the button to my template in a way that will add the URL of the current page to the link. MediaWiki is a PHP platform, so that is preferred (but JavaScript is fine too). How can I do this?
(I apologize if this is confusing)
UPDATE: I am terrible with PHP, so sorry. I just put
<?php echo'<a href="http://sumov.co.cc/?url=".$_SERVER["REQUEST_URI"]; class="buttonlink ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Support →</a>'; ?>
and that just went to http://sumov.co.cc/?url=
(sumov.co.cc is my short link).