Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles

Reply
 
Thread Tools
How to Use Your Dynamic Joomla Header in vBulletin
nicholas.alipaz
Join Date: Apr 2008
Posts: 7

 

Show Printable Version Email this Page Subscription
nicholas.alipaz nicholas.alipaz is offline 05-01-2008, 10:00 PM

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!
Reply With Quote
  #12  
Old 06-03-2008, 04:13 PM
dannykilla's Avatar
dannykilla dannykilla is offline
 
Join Date: Jun 2007
Location: Manchester, UK
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #13  
Old 06-04-2008, 10:07 AM
AzzX's Avatar
AzzX AzzX is offline
 
Join Date: Sep 2007
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #14  
Old 06-04-2008, 01:20 PM
dannykilla's Avatar
dannykilla dannykilla is offline
 
Join Date: Jun 2007
Location: Manchester, UK
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Danny
Reply With Quote
  #15  
Old 06-04-2008, 01:54 PM
AzzX's Avatar
AzzX AzzX is offline
 
Join Date: Sep 2007
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #16  
Old 06-04-2008, 04:38 PM
dannykilla's Avatar
dannykilla dannykilla is offline
 
Join Date: Jun 2007
Location: Manchester, UK
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #17  
Old 06-20-2008, 10:41 AM
AzzX's Avatar
AzzX AzzX is offline
 
Join Date: Sep 2007
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:48 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.07855 seconds
  • Memory Usage 2,252KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete