Recent Topics

1 Dec 05, 2006 22:36    

I like to use b2evolution part ordinary way ie. as blogs in there own directory, but also a news engine in already existing pages in my site. Why? Because blog engine is very useful tool for producing cronologinal news texts.

We have some places all around web site which needs some kind news page eg. with some newest entries. There is notified, that b2evo do not working well, if the application files are outside the blogs directory. I have tested that, without caring about warning. It is as it have been documented, the plugins (especially rendering plugins) start behave strangely.

My first idea was to creat suitable stub or no-skin file, which do not have any kind HTML header or such, only the posts with needed markup code. Those I like to embedded into existing HTML files with SSI (Server Side Includes) technic of Apache web servers. The idea is rather simple and should work.

In theory it works, but the behaviour is the same as you trying run blogs outside blog directory. The parent HTML page is the referrer of blog engine. The biggest problem is the renderer plugins, which do not work after using files outside blog directory.

Next idea was to use static files, because their have not any connection to dynamical parts of b2evo. Yes, that is working. You only need to make a suitable skin for SSI embedded files.

Next problem was: when creating static pages the default skin (or stub/noskin file forced skin) is used. I still want to use both SSI embedded files and also dynamical blog pages, eg. for archives, category views and so. How to use different skin for static and dynamical content? My solution was to edit a stub file following way:


if ($generating_static) 
  { $skin = 'ssi_1'; }
else 
  { $skin = 'tornit'; }

That way I can get different skin for both SSI embedded file and dynamical blog page (via stub file). The only limitation is that I cannot use static file with normal blog pages with standard skin. But that is, for moment, not needed.

My question is: Is there easier or more elegant or clever way the solve this idea?

2 Dec 06, 2006 01:13

Why not just pull the info from the database itself if you don't need the skinning and what not?


Form is loading...