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
Bullet Menu via Include for external Sites?
Re: Bullet Menu via Include for external Sites?
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!
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!
Re: Bullet Menu via Include for external Sites?
Thanks for your answer and sorry for getting back so late... I will try that on monday.
Have a nice weekend.
Chris
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!
Re: Bullet Menu via Include for external Sites?
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
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
Re: Bullet Menu via Include for external Sites?
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)
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)
Re: Bullet Menu via Include for external Sites?
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
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