Welcome Guest, Not a member yet? Register   Sign In
Importing Codeigniter created menu into Vbulletin forum display.
#1

[eluser]endOfTheDay[/eluser]
Hi

i there anyone who could shed some light on what I am trying to do.

I have a vbulletin forum and the main website is made with codeigniter. I would like to import a menu header into the forum.

I have made a seperate page to call up, that forces the page toshow the menu with '$SERVER_PATH'. This works.

I have then tried to set up a plugin to show this page. This doesn't work. Although I know that in principle it should work as if I replace this page with a simple.
<?php echo 'HelloWorld'; ?> page. I can see this.

Has anyone else done this or anything similar who can point me in the right direction.

Thanks
#2

[eluser]Shadab[/eluser]
Make sure you aren't include()'ing your files directly in the plugin.

See this vBulletin Manual page on how to include external files into vBulletin :
vBulletin Manual - Including External Files
#3

[eluser]endOfTheDay[/eluser]
you mean that I need to wrap in ob_flush etc

Here's the code I have in plugins - hook = global_start

Code:
ob_start();
  include('/root/www/forums/forumheader.php');
  $banner = ob_get_contents();
  ob_end_clean();
#4

[eluser]Shadab[/eluser]
Do you output anything to the browser in your forumheader.php file ?
Or are you only setting a variable in forumheader.php that contains your HTML code in it ?

If it's the latter case, then you can include() or require() the file in the plugin directly;
and use the variable set in that file in your skin template wherever you want to place that menu (eg. in 'header' or 'navbar' template).
#5

[eluser]endOfTheDay[/eluser]
it must be a case of outputting more than HTML. I will check this and see if I can get a better result.
#6

[eluser]endOfTheDay[/eluser]
I still have not had any success with this. I have created and index page copy that just gives me the minimum output that I want, but when calling this page I get a 404 error. I have checked that the output I am recieving is fine by placing the source in another file and calling that from plugin.

I have also checked I am calling the right page by replacing the code with 'hello world' and that works.

Has anyone else got a controller to load inside a vbulletin plugin?
#7

[eluser]endOfTheDay[/eluser]
Am thinking that this must be something to do with a permission setting somewhere in codeigniter that isn't allowing me to access from an external folder. Is there anything in config.php that I'll need to set up, have looked but can't see anything obvious.




Theme © iAndrew 2016 - Forum software by © MyBB