Embedding smartybased blog, is it possible?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
daik
Forum Members
Forum Members
Posts: 26
Joined: Mon Feb 06, 2006 3:02 am

Embedding smartybased blog, is it possible?

Post by daik »

Hi, I've just set up CMS MS 0.11.2 on my Linux box running Apache 2.0.53-9, PHP 4.3.10 and Mysql 4.1.11-1.

I have for quite some time run a blog on my site. The blog is bblog, and it is based on Smarty templates. Now that I want to use CMS MS on my site I run into a problem. I wish to have access to my blog from the menus created in CMS MS. I tried using the embed tag, but it does not give me all the control I want (I would prefer to use percentages when giving sizes, rather than specifying a width in pix). So I was hoping I could integrate the blog into CMS MS. If I just try to do that I get "Can not redeclare Smary in blog/bblog/inc/Smarty.class.php. I think this makes perfect sense though, since the blog comes with it's own smarty installation. If I remove the line "include /path/Smarty.class.php" from the blog,  It tells me it can not extend an unknown class. So the question is, is it doable to do what I want. I would like  to telli the blog that these class(es) exist and are already declared, use them.
Is that possible?
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Embedding smartybased blog, is it possible?

Post by kermit »

complex scripts cannot be called directly from cmsms.. you need to use the embed/iframe method you tried in order to embed one in the other.


the 'easy' way out would be to do what is done on the cmsmadesimple.org website for "integrating" the forums, wiki and forge. they don't share common user lists, admin panels, etc, as they are separate applications, but at least they appear to be "one site" :
  • create a layout in each web application with the same 'look'.
  • install each application separately in your web space.
  • use a "page" of content type "link" to create menu items that link to the other applications. (find similar function or use hard-coded navigation for the other applications)
  • you could use your blog's rss syndication and an rss feed aggregator for cmsms to get something like a 'latest posts' integrated into the cmsms pages.

i've done the same thing on other sites. it can be inconvenient having separate templates and administration areas... it is usually possible to be able to pass a user's account information from one to another with a (separately developed) 'bridge' that connects the two apps, but seemless integration is a tough nut to crack.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
daik
Forum Members
Forum Members
Posts: 26
Joined: Mon Feb 06, 2006 3:02 am

Re: Embedding smartybased blog, is it possible?

Post by daik »

I take that as a "no" in reply to "is it possible".
It just feels so wastefull to start up and run smarty twice in the same page, as would be the case with embedding it via the embed tag.
I take it that there is no way to tell the blog that smarty is already included, use that version.
Oh well I guess I have to do what you suggest and create a template that looks the same in the blog and manually hack the menu into it.
thanks for the advice anyway.
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Embedding smartybased blog, is it possible?

Post by kermit »

i am not saying that it's impossible to do.. it would require (significant) modifications to the other code so that it could co-exist with cmsms, in a sense, converting it into a cmsms module.

which is why i gave you the 'easy' way. at least in the case of a blogging app, you do have a way to incorporate some blog content into cmsms generated pages via rss.

please feel free to submit a feature request for the core or a new module idea, though, to add more 'blogging' functionality to cmsms.  a module that enhances the existing news by enabling comments, pings & maybe trackbacks might be sufficient for most (would be enough for me to move off of wp).
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
daik
Forum Members
Forum Members
Posts: 26
Joined: Mon Feb 06, 2006 3:02 am

Re: Embedding smartybased blog, is it possible?

Post by daik »

Okay, pretty much what I though, hacking the blog to fit into CMS MS. I will look into doing this myself, but for now I think I'll go with your "easy" way. I will hae to look into how to create a module, and also dig deeper into the blog code.
If you want to look at a good alternative to wp, to see if it has all the features you want look at www.bblog.com

thanks for your very helpful replies!
regards
Daniel
User avatar
kermit
Power Poster
Power Poster
Posts: 693
Joined: Thu Jan 26, 2006 11:46 am

Re: Embedding smartybased blog, is it possible?

Post by kermit »

daik wrote: Okay, pretty much what I though, hacking the blog to fit into CMS MS. I will look into doing this myself, but for now I think I'll go with your "easy" way. I will hae to look into how to create a module, and also dig deeper into the blog code.
If you want to look at a good alternative to wp, to see if it has all the features you want look at www.bblog.com

thanks for your very helpful replies!
you're welcome and good luck... my blog's on a wp host; not much choice there, but i'm not complaining either. i like wp (and tp), and have even set up 'non blog' sites using them.
eternity (n); 1. infinite time, 2. a seemingly long or endless time, 3. the length of time it takes a frozen pizza to cook when you're starving.
4,930,000,000 (n); 1. a very large number, 2. the approximate world population in 1986 when Microsoft Corp issued its IPO. 3. Microsoft's net profit (USD) for the quarter (3 months) ending 31 March 2007.
CMSMS migration and setup services | Hosting with CMSMS installed and ready to go | PM me for Info
Locked

Return to “CMSMS Core”