Full URL to actual site

Lonesome Walker

Well, sometimes you need it this way (just think about mod_rewrite...)  :roll:
opensource company WebsiteBaker Templates Werbeartikel aller Art WebsiteBaker Hosting

diodak

Hello, O dont know for what you need that, I use

<?php echo WB_URL.$_SERVER['REQUEST_URI']; ?>

to print site addres when printing PDF by html2pdf module.
Buchsbaum

Lonesome Walker

Due a very lazy user here, i had to use this function:


<?php

function actual_site() {

    global 
$database$wb;

    
$page_id $wb->page_id;

    if (
PAGE_ID>0) {

        
$query1=$database->query("SELECT value FROM ".TABLE_PREFIX."settings WHERE name=pages_directory");
        
$directory=$query1->fetchRow();

        
$query2=$database->query("SELECT link FROM ".TABLE_PREFIX."pages WHERE page_id=$page_id");
        
$sitelink=$query2->fetchRow();

        
$query3=$database->query("SELECT value FROM ".TABLE_PREFIX."settings WHERE name=page_extension");
        
$extension=$query3->fetchRow();

    }
    echo 
WB_URL;
    echo 
$directory[0];
    echo 
$sitelink[0];
    echo 
$extension[0];
}

?>



Sure, it could be more efficient, but hey, it works and it is for free  :wink:
opensource company WebsiteBaker Templates Werbeartikel aller Art WebsiteBaker Hosting