Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2004, 10:20 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 02-26-2004, 02:48 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 02-26-2004, 08:18 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 02-26-2004, 08:37 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 02-26-2004, 10:12 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #6  
Old 02-27-2004, 02:53 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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';

Reply With Quote
  #7  
Old 02-27-2004, 03:00 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 02-27-2004, 05:06 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cheers m8 i will give that a try.

and try and get it working with the styles lol

thanks again
Reply With Quote
  #9  
Old 02-27-2004, 05:18 PM
Mickie D Mickie D is offline
 
Join Date: Jun 2002
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #10  
Old 02-27-2004, 06:32 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If its not a full URL, ie its /images/misc and not http://mydomain.com/images/misc then it will automaticlly use HTTPS.
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 07:45 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.04479 seconds
  • Memory Usage 2,260KB
  • 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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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