Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-19-2012, 05:14 AM
Relientk Relientk is offline
 
Join Date: Jan 2008
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 08-19-2012, 11:13 AM
Black Snow Black Snow is offline
 
Join Date: Jul 2012
Location: Scotland
Posts: 471
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
?>
Reply With Quote
  #3  
Old 08-19-2012, 04:21 PM
Relientk Relientk is offline
 
Join Date: Jan 2008
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the help! I'll give it a try and see if it works!
Reply With Quote
  #4  
Old 08-21-2012, 05:24 AM
Relientk Relientk is offline
 
Join Date: Jan 2008
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 08-22-2012, 10:26 PM
Stefan118 Stefan118 is offline
 
Join Date: Dec 2010
Location: Vaassen (Netherlands)
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Relientk View Post
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.
Reply With Quote
Reply


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 05:54 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.03704 seconds
  • Memory Usage 2,198KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete