Bullet Menu via Include for external Sites?

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
chris_e

Bullet Menu via Include for external Sites?

Post by chris_e »

Hello everybody!!

I have a little problem regarding the use of the menu in external Sites on our Webpage.

Due to certain organisational reasons we have to use some external (means not in the CMS, but still in the site - graphical and organizational) Sites our our Webpage. Obviously we can't use the {bulletmenu} tag in there, so it would be great to include it via PHP. I have tried but have to admit my PHP knowledge isn't very good. If possible, which file do I have to include?

Thanks,
Chris

P.S.: We got our CMS up and running today and the User feedback is overall pretty good - So I'll forward it to the developers of the system - You rock :D
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Bullet Menu via Include for external Sites?

Post by Ted »

Intersting.  Using CMS outside of CMS.  Never though of that one...

The way that I could see getting around that would be to make a new script.  In that script, I would cut out all of the code from the main function in plugins/function.bulletmenu.php and then include include.php at the top of it.  In theory, it should work, but I'm not positive if there are other hangups somewhere.

Let me know if that helps.  Thanks!
chris_e

Re: Bullet Menu via Include for external Sites?

Post by chris_e »

Thanks for your answer and sorry for getting back so late... I will try that on monday.

Have a nice weekend.
Chris
wishy wrote: Intersting.  Using CMS outside of CMS.  Never though of that one...

The way that I could see getting around that would be to make a new script.  In that script, I would cut out all of the code from the main function in plugins/function.bulletmenu.php and then include include.php at the top of it.  In theory, it should work, but I'm not positive if there are other hangups somewhere.

Let me know if that helps.  Thanks!
chris_e

Re: Bullet Menu via Include for external Sites?

Post by chris_e »

Sorry again for coming back so late ... but hey, I've got a lot to work...
I tried to do what you proposed. I understand what you mean with 'main function' is called 'smarty_cms_function_bulletmenu($params, &$smarty)' because this seems to be the main function in 'plugins/function.bulletmenu.php'.
Copying the code of this function won't work, because the function makes use of the two parameters declared: $params and &$smarty, am I right? So I extended your proposal like this for a first test (this is my test.php):






That is:
- I include include.php
- I include plugins/function.bulletmenu.php
- I call the 'main function'

The problem is, I don't know the two parameters that need to be supplied for the function and I don't want to dig into hundreds of pages of php code to understand the whole cms.

Would you please tell me what the two parameters are for or where I can find what to supply? Can I find it in the mysql db?
BTW, is there a similar way to include the page header via php?

Your help is very much appreciated.

Thanks,
Chris
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Bullet Menu via Include for external Sites?

Post by Ted »

I would do: smarty_cms_function_bulletmenu(array(), $gCms->smarty)

The smarty obj is never used, but it can't hurt.  If you want to pass some parameters into the bulletmenu as you would in your {bulletmenu}, you could do something like: smarty_cms_function_bulletmenu(array('start_element'=>'1.1'), $gCms->smarty)
chris_e

Re: Bullet Menu via Include for external Sites?

Post by chris_e »

Sorry to say it doesn't work. I tried your first version and even tried with all 4 parameters to the bulletmenu. All I get is an empty page with opening and closing html, head and body tags. And yes - it gets php parsed. If I don't supply any smarty_cms_function_bulletmenu parameters then I get a php error saying parameters required.
So, maybe I've got to find a different way to retrieve all that stuff that surrounds the content. I'm thinking of reading all index.php output until the string '' occurs...

Anyway, thank you very much for trying to help.

Chris
Locked

Return to “CMSMS Core”