vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Secure or not Secure thats my question (https://vborg.vbsupport.ru/showthread.php?t=61925)

Mickie D 02-25-2004 10:20 PM

Secure or not Secure thats my question
 
is it possible to have a forum both HTTPS and HTTP

i know you can have it but can you have it without the privacy reports when you switch from one to the other ?

i get alot of privacy reports when i am not using https and that shows up all the images as being https

cheers i would like to have the option of either if possible

Regards
Mickie

NTLDR 02-26-2004 02:48 PM

Any item included via HTML on a HTTPS page that is on a HTTP URL will generate a warning if the user has selected for there browser to warn them.

Mickie D 02-26-2004 08:18 PM

ok then i was thinking this

making 2 sections of the forums like this

forum

forums

and editing the php file that calls the settings db and the style db calls

so it hard calls maybe settings and settings1 and style and style1
(settings1 and style1 are copies of settings and style from the DB)

now they are complete copies of each other apart from the fact that one has https and the other has http URLS

basicly i dont like all the privacy reports stopping my https and vice versa

anyway thats what i am after doing and if i had the time i would probably do it myself but i dont know if its a problem with vbulletin to run to copies even though they are the same forum ? and also i dont know which files and i am sure it will be lots of them aswell

Andreas 02-26-2004 08:37 PM

Hmm ...

What about replacing all hard-coded http:// in the PHP-Files & Templates with $protocol and then set $portocol at the beginning of global.php to either http:// or https:// depending on the value of getenv('SERVER_PORT')?
(And for the URLs in array vboptions too)
This way you would not have to duplicate anything but it should still have http or https only.

Mickie D 02-26-2004 10:12 PM

see i knew there was an easier way lol i can code a small amount of php and in my spare time i teach myself :)

i have seen a hack b4 that used the same server_port code

so help me out with this then please m8
PHP Code:

if getenv('SERVER_PORT' 80)
{
$secure http;
}
elseif 
getenv('SERVER_PORT' 443)
{
$secure https;


i done that off the top of me head will it be ok ?

Mickie D 02-27-2004 02:53 PM

ok after more attempts i came up with this (with help from another source aswell)

but i cant get it to work anyone have any ideas why i am getting parse errors ?

PHP Code:


// Mickies secure non secure hack
if getenv($_SERVER['SERVER_PORT'] = 80)
{
$secure 'http';
}
elseif 
getenv($_SERVER['SERVER_PORT'] = 443)
{
$secure 'https';



NTLDR 02-27-2004 03:00 PM

PHP Code:

if ($_SERVER['SERVER_PORT'] == 80) {
    
$secure 'http';
} elseif (
$_SERVER['SERVER_PORT'] == 443) {
    
$secure 'https';


Should do the trick. However there are probably very few, if any references to http://..... in the source and templates so a better option IMO would be to just change the value of the boards URL:

PHP Code:

if ($_SERVER['SERVER_PORT'] == 443) {
    
$vboptions['bburl'] = 'https://mydomain.com/forums';


Of course you'll still get errors for inline images in [IMG] code if there are on HTTP but thats unavoidable unless you disable it.

Mickie D 02-27-2004 05:06 PM

cheers m8 i will give that a try.

and try and get it working with the styles lol

thanks again

Mickie D 02-27-2004 05:18 PM

i was just thinking does the style take the vboptions if there is no hard coded http in the style settings ??

i.e it normally would look like

/images/misc/

if you get my drift ?

NTLDR 02-27-2004 06:32 PM

If its not a full URL, ie its /images/misc and not http://mydomain.com/images/misc then it will automaticlly use HTTPS.


All times are GMT. The time now is 08:40 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.01295 seconds
  • Memory Usage 1,746KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete