vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   different header depending on what url website is typed in? (https://vborg.vbsupport.ru/showthread.php?t=286829)

Relientk 08-19-2012 05:14 AM

different header depending on what url website is typed in?
 
I was wondering if any one knows if there is a mod or some way that you can have a different header/logo show up depending on the url that is typed in.

For example-

You are using ONE database the SAME forum. But you have TWO url's that go to this ONE forum. So for example you have siteone.com and sitetwo.com its the same site but when url siteone.com is the url typed in the address bar it will load the graphic/header that says siteone.com and then vise versa if sitetwo.com was typed in.

I seen this mod that will load different banners according to the time- https://vborg.vbsupport.ru/showthread.php?t=236726 basically that's what I'd like to do but for it to change for whatever domain.com/url is typed in.

I appreciate any help! Thank you!

Black Snow 08-19-2012 11:13 AM

You would just grab the current page URL using something like this:
Code:

<?php
$current_page_URL = $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
?>

Here $_SERVER["SERVER_NAME"] will give you the doman name of your site and $_SERVER["REQUEST_URI"] will give you the rest.

Example: https://vborg.vbsupport.ru/showthread.php?t=286829

$_SERVER["SERVER_NAME"] will give you vbulletin.org

$_SERVER["REQUEST_URI"] will give you /forum/showthread.php?t=286829

The do a check.
Code:

<?php
if {$current_page_URL = xxx} Show banner 1
{else}
Show banner 2
?>


Relientk 08-19-2012 04:21 PM

Thank you for the help! I'll give it a try and see if it works!

Relientk 08-21-2012 05:24 AM

is there a way to-

If you go to sitetwo.com it still shows the url domain name sitetwo.com not siteone.com in the address bar on the browser.

--------------- Added [DATE]1345532388[/DATE] at [TIME]1345532388[/TIME] ---------------

Where do I make these changes?

Code:

<?php
$current_page_URL = $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
?>

I'm not sure where to find this to edit. Am I going to do this in the template? in the admin panel? or do I need to edit a file and upload it by ftp? Thank you!

--------------- Added [DATE]1345601758[/DATE] at [TIME]1345601758[/TIME] ---------------

I found what i was looking for thanks! https://vborg.vbsupport.ru/showthrea...e+forum&page=3

Stefan118 08-22-2012 10:26 PM

Quote:

Originally Posted by Relientk (Post 2358642)
is there a way to-

If you go to sitetwo.com it still shows the url domain name sitetwo.com not siteone.com in the address bar on the browser.

This is set in your config of the parked domainname. (cloak)
You have forwarded sitetwo.com to siteone.com, and somewhere in that same option you can check or uncheck the cloak.


All times are GMT. The time now is 12:02 AM.

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.01205 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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