vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to Use Your Dynamic Joomla Header in vBulletin (https://vborg.vbsupport.ru/showthread.php?t=177822)

nicholas.alipaz 05-01-2008 10:00 PM

How to Use Your Dynamic Joomla Header in vBulletin
 
The goal of this article is to help you use your Joomla header within vBulletin.

I have done this successfully with vBulletin (for my work).

what I did was...
  1. create a new section in joomla called Forum.
  2. create a new category called forum in the "Forum section" I made above.
  3. Next I made sure that no content was shown on this forum page. You may need to go to "Module Manager" and go through some of these modules and set them NOT to show on the Forum page you made above.
This next part is the steps I did for vBulletin:
  1. Added a php include for the page that I just made. Go to ACP -> Plugin Manager and double-check that the Plugin System is enabled
  2. Click on Add New Plugin, then:
    1. Product: vBulletin
    2. Hook Location: global_start
    3. Title: whatever you want, I used "Header Include"
    4. Execution Order: 5
    5. Plugin PHP Code:
      Code:

                      ob_start();
                        include('http://www.mysite.com/index.php?option=com_content&view=section&id=5&Itemid=60');
                        $includedphp = ob_get_contents();
                      ob_end_clean();

    6. Plugin is Active: Yes
    7. Save
  3. Go to Style Manager -> Edit Templates -> header and add:
    Code:

              #pathway, #whitebox, #footerspacer, #footer {
              display: none !important;
              }

    and replace anything between </head> & <!-- content table --> with $includedphp
Now my page displays with my dynamic header above my forum content!

mpoorrajab 05-02-2008 01:36 PM

can you attach the final?

nicholas.alipaz 05-03-2008 01:06 AM

Attach the final?

You mean the final file? If so, then it would be different in some situations and would need upgrades from time to time. I won't be keeping up with upgrading it here. It is a hack.

If you mean to post a link then I will give one later, once the site I have put together using this does it's public launch.

CCux 05-16-2008 08:48 AM

Hi!

Anyone tried this? I did everything as mentioned, took the coorect section and category id? s but when activating the plugin i get a T-STRING error on my vbulletin site!

Any help for this?

Quote:

Originally Posted by nicholas.alipaz (Post 1505460)
The goal of this article is to help you use your Joomla header within vBulletin.

I have done this successfully with vBulletin (for my work).

what I did was...
  1. create a new section in joomla called Forum.
  2. create a new category called forum in the "Forum section" I made above.
  3. Next I made sure that no content was shown on this forum page. You may need to go to "Module Manager" and go through some of these modules and set them NOT to show on the Forum page you made above.
This next part is the steps I did for vBulletin:
  1. Added a php include for the page that I just made. Go to ACP -> Plugin Manager and double-check that the Plugin System is enabled
  2. Click on Add New Plugin, then:
    1. Product: vBulletin
    2. Hook Location: global_start
    3. Title: whatever you want, I used "Header Include"
    4. Execution Order: 5
    5. Plugin PHP Code:
      Code:

                      ob_start();
                        include('http://www.mysite.com/index.php?option=com_content&view=section&id=5&Itemid=60');
                        $includedphp = ob_get_contents();
                      ob_end_clean();

    6. Plugin is Active: Yes
    7. Save
  3. Go to Style Manager -> Edit Templates -> header and add:
    Code:

              #pathway, #whitebox, #footerspacer, #footer {
              display: none !important;
              }

    and replace anything between </head> & <!-- content table --> with $includedphp
Now my page displays with my dynamic header above my forum content!


dannykilla 05-23-2008 03:44 PM

Quote:

Next I made sure that no content was shown on this forum page. You may need to go to "Module Manager" and go through some of these modules and set them NOT to show on the Forum page you made above.
How can you make sure that no modules are displayed, when there is (according to your instructions) no page?
You say to create a a new section in joomla called Forum.
then create a new category called forum in the "Forum section".
So how can modules be published on something that cannot have modules published on it?
there is nothing but a section and section category?

AzzX 06-01-2008 12:29 PM

Quote:

How can you make sure that no modules are displayed, when there is (according to your instructions) no page?
You can still view the category page change relevent fields in bold. index.php?option=com_content&view=section&id=5&Itemid=60.


Nearly there: having an issue with the header not playing nicely with the actual forum url:

See my forum test site: http://www.ozsource.org/oz2/forums/index.php - all the forum links now point to http://www.ozsource.org/oz2/ not http://www.ozsource.org/oz2/forums/

Must be something to do with enabling sef urls within Joomla.

reverse1312 06-01-2008 04:01 PM

Nice idea !

following the same way, I suppose it would be possible to integrate in this header any forum specific advertising banner code through a special joomla banner module...

Or other solution it might be possible, if needed, to have in this included joomla page only the joomla mainmenu...

Sounds cool... :-)

AzzX 06-02-2008 09:23 AM

Disabling Search Engine Friendly URLs fixed the issue - I'll have to look into the issue to enable this in the future.

dannykilla 06-02-2008 05:52 PM

Y do I keep getting this error when I have followed the instructions correctly ?

Code:

Warning: include() [function.include]: URL file-access is disabled in the server configuration in [path]/global.php(384) : eval()'d code on line 2

Warning: include(XxxxxxXxxxxxXxxxxxx.co.uk/index.php?option=com_content&view=section&id=5&Itemid=902) [function.include]: failed to open stream: no suitable wrapper could be found in [path]/global.php(384) : eval()'d code on line 2

Warning: include() [function.include]: Failed opening 'XxxxxxxXXxxxxxxxx.co.uk/index.php?option=com_content&view=section&id=5&Itemid=902' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [path]/global.php(384) : eval()'d code on line 2
#pathway, #whitebox, #footerspacer, #footer { display: none !important; }


AzzX 06-02-2008 11:13 PM

Dannykilla, you need to have:

Quote:

allow_url_fopen = True
allow_url_include = True
in you php.ini

dannykilla 06-03-2008 04:13 PM

Thanks AzzX,

but my host wont allow the "allow_url_include = True"

I quote my support ticket below:

"Hi Danny,

Thanks for your ticket.

We already have allow_url_fopen set to ON. However, we cannot set allow_url_include to ON as this would allow an attacker to inject code into a script and potentially cause huge problems.

We can make changes like this for you with a Managed Virtual Server (MVS) or full Managed Server but not with a shared account.

Please let us know if we can be of any further help.

----
Chris Adams
Rochen Limited"


Any suggestions, is there a way around this?

Thanks
Danny

AzzX 06-04-2008 10:07 AM

You can try putting the code in a file named php.ini at your website and forum root. My webhost has phpsuexec enabled which allows the use of a custom php.ini to overide the main config.

dannykilla 06-04-2008 01:20 PM

AzzX thanks for the reply, one thing if this does actually work (touch wood) what Cmod should I set both files?

Danny

AzzX 06-04-2008 01:54 PM

Not sure what you mean in regards to both files. Just create a text file called php.ini with
Code:

allow_url_fopen = True
allow_url_include = True

in it and drop it into your website root and forum home.

dannykilla 06-04-2008 04:38 PM

Ok AzzX,

I asked about that too and I got this on a reply to my ticket:

Technically it will work but this would be circumventing something we don’t allow you to do on the shared servers and thus it would result in account suspension.

You can do a local include without issue and this is the route I suggest you look at.

----

So how do I do a local include and will what I want be possible with it?

Thanks again
Dan

AzzX 06-20-2008 10:41 AM

Had a script kiddie hack attempt using the above method so I highly recommend not doing a dynamic header is this way.

Looking through my logs, vb.org was queried with the search term Joomla highlighted in order to find my site and run an automated exploit.

From another website on the same issue:
Quote:

The hacker is taking advantage of this global variables PHP exploit and inserting the URL of the code they run remotely into the URL so that they can run the program onto your server. How to fix the problem? Make it so the hacker can't pass URLs on your site.


All times are GMT. The time now is 06:44 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01431 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete