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 »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • ob_start()' conflicts with [SHORTCODES] in template
  • Print
Pages: [1]   Go Down

Author Topic: ob_start()' conflicts with [SHORTCODES] in template  (Read 7194 times)

Offline Tez Oner

  • Posts: 257
  • "...it's possible..."
    • VA-MDS / MMO | communications
ob_start()' conflicts with [SHORTCODES] in template
« on: March 25, 2015, 08:32:53 PM »
Eeey,

for a page cache feature I need to add a 'ob_start();' to the template-index (first-line)
and an 'ob_end_flush();' on the last line, but there seems some conflict with another
ov_start that been called by the 'index wrapper' of WB to render [SHORTCODES] and
droplets.

Any workaround for this?

Cheerz,

Tez Oner
Logged
Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / http://va-mds.com

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: ob_start()' conflicts with [SHORTCODES] in template
« Reply #1 on: March 25, 2015, 10:22:30 PM »
WB will not function correctly if the buffers in the index.php are disabled.
Nesting multiple outputbuffers should be no problem though. I use them all the time.

Can you give more details on the "some conflict"?
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline Tez Oner

  • Posts: 257
  • "...it's possible..."
    • VA-MDS / MMO | communications
Re: ob_start()' conflicts with [SHORTCODES] in template
« Reply #2 on: March 26, 2015, 04:48:32 PM »
Hey Ruud,

Quote from: Ruud on March 25, 2015, 10:22:30 PM
WB will not function correctly if the buffers in the index.php are disabled.
Nesting multiple outputbuffers should be no problem though. I use them all the time.

Can you give more details on the "some conflict"?

Solved most of it, the main issue / conflict was that calling an ob_start
in the the template file was 'to late' for what I wanted to implement.

I found a workaround for the 'page cache' (as thats what I needed it for),
not that 'clean', as I need to modify the WB index-file (to make a ob_start
with the WB page-output in it).

But so far it runs smooth and servers static html-files when a page is in the
cache - very - very fast ;) A pity WB doesn't have a 'hook' / blocks architecture
to implement code at certain positions. (and a cache would be nice feature and
easy to implement feature for upcoming WB).

The new thingy is how to define unique-pages (as news-pages / posts) have
the same id / title, which is i.m.o. pretty inconsistent.

Cheerz,

Tez Oner
Logged
Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / http://va-mds.com

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: ob_start()' conflicts with [SHORTCODES] in template
« Reply #3 on: March 26, 2015, 05:03:26 PM »
Quote from: Tez Oner on March 26, 2015, 04:48:32 PM
The new thingy is how to define unique-pages (as news-pages / posts) have
the same id / title, which is i.m.o. pretty inconsistent.

For News you can check for the existance of a $post_id variable.
Bakery has an $item_id (if I am correct)

Unfortunatly there are more modules that will do their own page creation, all with their own methods of identifying the page loaded. It will be hard to detect them all..
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline Tez Oner

  • Posts: 257
  • "...it's possible..."
    • VA-MDS / MMO | communications
Re: ob_start()' conflicts with [SHORTCODES] in template
« Reply #4 on: April 03, 2015, 03:03:45 PM »
Quote from: Ruud on March 26, 2015, 05:03:26 PM
Quote from: Tez Oner on March 26, 2015, 04:48:32 PM
The new thingy is how to define unique-pages (as news-pages / posts) have
the same id / title, which is i.m.o. pretty inconsistent.

For News you can check for the existance of a $post_id variable.
Bakery has an $item_id (if I am correct)

Unfortunatly there are more modules that will do their own page creation, all with their own methods of identifying the page loaded. It will be hard to detect them all..

Thanks! The new thingy is this Page Cache feature, but I resolved it by adding a 'page_id'
works fine for now:

http://forum.WebsiteBaker.org/index.php/topic,28202.0.html

Cheerz,

Tez Oner
Logged
Tez | VA-MDS / MMO | communications
--------------------------------------------
info@va-mds.com / http://va-mds.com

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • ob_start()' conflicts with [SHORTCODES] in template
 

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