WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • add constant -> PAGE_LINK
  • Print
Pages: [1]   Go Down

Author Topic: add constant -> PAGE_LINK  (Read 10468 times)

Uthred

  • Guest
add constant -> PAGE_LINK
« on: April 01, 2009, 07:10:16 AM »
Hi,

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

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: add constant -> PAGE_LINK
« Reply #1 on: November 29, 2009, 11:24:35 PM »
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_CURR, SM2_CRUMB, &#39;[url]&#39;, &#39;&#39;, &#39;&#39;, &#39;&#39;, &#39;&#39;, false, false) ;       
    
$PAGE_LINK = ob_get_contents();          
    
ob_end_clean();  
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: add constant -> PAGE_LINK
« Reply #2 on: November 30, 2009, 01:21:36 AM »
Code: [Select]
$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` )
« Last Edit: November 30, 2009, 01:24:56 AM by DarkViper »
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: add constant -> PAGE_LINK
« Reply #3 on: November 30, 2009, 03:25:50 AM »
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
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: add constant -> PAGE_LINK
« Reply #4 on: November 30, 2009, 04:36:45 AM »
Thanks to DarkViper I defined a Constant in the index.php of my template like this:



define
("PAGE_LINK", WB_URL . PAGES_DIRECTORY . $GLOBALS[&#39;wb&#39;]->page[&#39;link&#39;] . PAGE_EXTENSION);



... and works.

Regards,
Stefek
Logged
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: add constant -> PAGE_LINK
« Reply #5 on: November 30, 2009, 12:47:17 PM »
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
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • add constant -> PAGE_LINK
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2