2013-01-10, 08:09 AM
2013-01-10, 09:09 AM
The general method is:
Add the following code to a page:
You can now get the current page URL using the line:
Add the following code to a page:
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>
You can now get the current page URL using the line:
<?php
echo curPageURL();
?>
2013-01-10, 09:23 AM
it will work on postbit templet ?
using {$mybb->settings['bburl']}/{$post['postlink']}
return url http://www.visionarysoft.com/Thread-I-m-...on?pid=946
want to remove last ?pid=946 from url
using {$mybb->settings['bburl']}/{$post['postlink']}
return url http://www.visionarysoft.com/Thread-I-m-...on?pid=946
want to remove last ?pid=946 from url