add constant -> PAGE_LINK

DarkViper

Unfortunately the core of WB2.8.x should be backward compatible to PHP4.x.x.
So it's not possible to make classes and objects save for public use yet.
From the moment when we stop suporting PHP4.x.x., we can start to create save, well documented interfaces. But it needs time..time..time

Werner
[url=http://www.youtube.com/watch?v=tmzDAz6ZvFQ]Der blaue Planet[/url] - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen[br]
[i]"You have to take the men as they are... but you can not leave them like that !" :-P [/i]
[i]Das tägliche Stoßgebet: [b]Oh Herr, wirf Hirn vom Himmel ![/b][/i]

Stefek

Thanks to DarkViper I defined a Constant in the index.php of my template like this:



define
("PAGE_LINK"WB_URL PAGES_DIRECTORY $GLOBALS['wb']->page['link'] . PAGE_EXTENSION);



... and works.

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

BerndJM

Ok,

here I see it again:
there are a lot of functions/globals/arrays that are not (good) documented.

Anybody out there, that would do a documentation for this part which belongs to the "Dvelopers Guide" of the Help-Project ?!?!?

Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

DarkViper

#3

$current_page_link = WB_URL . $GLOBALS['wb']->page['link'] . PAGE_EXTENSION;

that's all....

( wb->page  is an array witch holds the complete record of the current page from table `xxx_pages` )
[url=http://www.youtube.com/watch?v=tmzDAz6ZvFQ]Der blaue Planet[/url] - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen[br]
[i]"You have to take the men as they are... but you can not leave them like that !" :-P [/i]
[i]Das tägliche Stoßgebet: [b]Oh Herr, wirf Hirn vom Himmel ![/b][/i]

Stefek

This is a good idea.

Could anybody tell me, how to get the URL of the current page easily?

I am using SM2/CRUMB in order to get it, but I think there should be a more easy way to get it?

Any hints welcome.

Regards,
Stefek

Code (SM2/CRUMB) Select

<?php
//create VARiable for current page url
    
ob_start();
    
show_menu2(0,SM2_CURR,SM2_CURRSM2_CRUMB'[url]'''''''''falsefalse) ;       
    
$PAGE_LINK ob_get_contents();          
    
ob_end_clean();  
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Uthred

Hi,

it would be great if someone can add the define for a PAGE_LINK constant in class.frontend.php for future WB versions.
define('PAGE_LINK', $this->page['link']);

thanks