vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Skin Displayed Based on REFERER (https://vborg.vbsupport.ru/showthread.php?t=47941)

Sketch 01-19-2003 10:00 PM

Skin Displayed Based on REFERER
 
I run a support forum for a company that is now 2 companies merged. In order to provide customer peace of mind and offer a sense of stability and familiarity, we wanted implement a familiar skin for each set of customers. As of version 1 if you visit through remote sites and are redirected then you will not be able to change the style. However if you log straight in you can. This is a bug I need to fix as I want all users to be able to select other skins should they want.


DEMO LINKS:
Default site: http://www.hostingtechs.com
http://forum.hostareus.com
http://forums.barefooting.com

I am not offering support for this, but I am entertaining suggestions, comments and feedback.

This can be used with no credit (I don't believe in tooting my horn), but if you enhance it I'd like to know so that I can consider using an enhanced vesion for myself.

Cheers, people. Now play nice.

Aaron Brazell

Jeremy W. 01-20-2003 08:42 PM

Yeah, we love this hack :)

Da`Nacho 01-20-2003 11:10 PM

This could DEFINATELY be useful! :D

Destee 01-21-2003 01:43 AM

Thank You Sketch ! :)

Clicking Installed!

Destee

nuno 01-21-2003 01:55 AM

What if i fire up my browser and go to http://forum.hostareus.com/forumdisplay.php?&forumid=6 ?
Or this one http://forums.barefooting.com/forumd...php?&forumid=6 ?

Sketch 01-21-2003 02:00 AM

well unfortunately we got some DNS wires crossed right now that we're trying to sort. I'll address that when we get back online with our forum....

Sketch 01-21-2003 01:09 PM

hmmm, yeah, you've got a point. Unless I wanted to do a redirect of all pages or unless mod_rewrite was installed at every redirect location. That's way too many if's.

I guess the next release is going to putt all the detection in global.php like I had originally intended. I was just going to do a:
PHP Code:

if ( stristr $_SERVER['HTTP_REFERER'], 'forums.barefooting.com' ) ) {

    
$bbuserinfo['styleid'] = 3;

}

if ( 
stristr $_SERVER['HTTP_REFERER'], 'forum.hostareus.com' ) ) {

    
$bbuserinfo['styleid'] = 1;



but that didn't seem to work effectivley. (It would not detect the style on the first load, but refresh and it would....)

So anyways, thanks for the tip...

Aaron

Dean C 01-21-2003 05:45 PM

Nice idea buddy :)

- miSt

alkatraz 01-23-2003 01:34 PM

Wow fantastic idea!

Sketch 01-25-2003 04:35 AM

Completely altered code. Now there is only one bit of code to paste into ./global.php

Much easier. Much more reliable.

Cheers.
Aaron

gmarik 11-09-2003 01:52 PM

Is it ok on 2.3.2? Could another feature be added:
Predefined forums (id 13, 45, 2, for example) be shown coming from a referrer page or a hyperlink?!


All times are GMT. The time now is 05:03 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.01075 seconds
  • Memory Usage 1,731KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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