Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-30-2008, 11:34 PM
vbfan4life vbfan4life is offline
 
Join Date: Aug 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Version number

I'm having a bit of a difficult time figuring this problem out, and I'm sorry if it's been asked and answered before.

What I'm trying to do is remove this from the header, when people access the source:

<!-- CSS Stylesheet -->
<style type="text/css" id="vbulletin_css">
/**
* vBulletin 3.7.3 CSS
* Style: 'DarkVB'; Style ID: 2

Ideally, I'd like to remove the whole CSS code, as it's really not neccessary to kick that out in the header. But my main goal is to suppress the version number. Now, I tried to modify this code in the adminfunctions_template.php file in the includes folder:

$fullcsstext = "<style type=\"text/css\" id=\"vbulletin_css\">\r\n" .
"/**\r\n* vBulletin " . $vbulletin->options['(C) Copyright, 2000-2008 JelSoft Software'] . " CSS\r\n* Style: 'Available Upon Request'" .
"$css\r\n</style>\r\n" .
"<link rel=\"stylesheet\" type=\"text/css\" href=\"clientscript/vbulletin_important.css?v=" . $vbulletin->options['simpleversion'] . "\" />"

But it appears to have made absolutely no impact at all.

Plus, I'd like to remove this from the header, as it's a potential security risk:

<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_important.css?v=373" />

<!-- / CSS Stylesheet -->

<!--
var SESSIONURL = "";
var SECURITYTOKEN = "REMOVED";
var IMGDIR_MISC = "images/dark_vb/misc";
var vb_disable_ajax = parseInt("0", 10);
// -->
</script>
<script type="text/javascript" src="clientscript/vbulletin_global.js?v=373"></script>
<script type="text/javascript" src="clientscript/vbulletin_menu.js?v=373"></script>

Any suggestions? Thanks in advance.
Reply With Quote
  #2  
Old 08-31-2008, 02:40 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm the person who mentioned the file to look in for the fullcsstext. Did you remember to go and save a style after you changed it?

I really have no clue about changing the other lines. I'm also wondering if it will really make a difference securitywise if you do remove those lines.
Reply With Quote
  #3  
Old 08-31-2008, 03:03 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

security by obscurity never works if thats the goal.

If your looking to remove that code, check the regular function.php files and not the ones prefixed with adminfunctions
Reply With Quote
  #4  
Old 08-31-2008, 03:27 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The adminfunctions script I was referencing for him was (I thought) the one to actually write the css to a file in your admin cp (when you edit the Main CSS for the style and then hit Save). He wanted to remove those couple of lines at the top of the css file that says the version number. I did a search through the files for "Style:" and came up with those lines in that file. I don't really know if changing the lines there will work since I didn't try it.
Reply With Quote
  #5  
Old 08-31-2008, 12:34 PM
vbfan4life vbfan4life is offline
 
Join Date: Aug 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Lynne:

Yeah, what's really surprising is that I found the exact text for the output in the adminfunctions file, and it made absolutely no difference. vB even appears to run if I delete the entire file.

Here's what I've changed that code to, uploading it to the includes folder:

Code:
$fullcsstext = "<style type=\"text/css\" id=\"vbulletin_css\">\r\n" .
				"/**\r\n* vBulletin " . $vbulletin->options['Copyright 2000-2008 JelSoft Software'] . " CSS\r\n* Style: 'Available Upon Request'" .
				"$css\r\n</style>\r\n" .
				"<link rel=\"stylesheet\" type=\"text/css\" href=\"clientscript/vbulletin_important.css?v=" . $vbulletin->options['Copyright 2000-2008 JelSoft Software'] . "\" />"
it makes absolutely no difference, because it continues to run on as if I made no change.

I know that obscurity doesn't prevent anything; after all, all one needs to do is scroll down, and they'll learn what theme I use, and what version I use when they see what stylesheet is called up, but I just don't want it to be obvious. As soon as you open the source, there it is. I guess I'm just paranoid is all.

I'll look into the functions.php file, but again, ideally I want to eliminate these two things:

Code:
<style type="text/css" id="vbulletin_css">
/**
* vBulletin 3.7.3 CSS
* Style: 'DarkVB'; Style ID: 2
*/
and, if possible, this, which is right before the title:

Code:
<link rel="stylesheet" type="text/css" href="clientscript/vbulletin_important.css?v=373" />
Does anyone know what needs to be edited in the functions.php? All I can find for the version is the code for the footer, and I obviously don't want to modify that, since I've already set it to show the copyright minus the actual version number.
Reply With Quote
  #6  
Old 08-31-2008, 03:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure why changing that file had no effect for you. I just made a small change in that line (added an "x" in there), uploaded that file, saved the Main CSS in my style, refresh my vb page, looked at the source code and it showed up for me. I then tried deleting the file and I could not save my css. I'm not sure at all why it is having no effect for you.
Reply With Quote
  #7  
Old 08-31-2008, 05:05 PM
vbfan4life vbfan4life is offline
 
Join Date: Aug 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
I'm not sure why changing that file had no effect for you. I just made a small change in that line (added an "x" in there), uploaded that file, saved the Main CSS in my style, refresh my vb page, looked at the source code and it showed up for me. I then tried deleting the file and I could not save my css. I'm not sure at all why it is having no effect for you.
It's puzzling, to say the least. I've tried clearing my cache, and refreshing, yet it doesn't "take" the changes in the adminfunctions file. I guess I just have to live with it; it seems to be a lost cause.

EDIT: I got it!! I had to go back and resave the CSS file. D'oh.
Reply With Quote
  #8  
Old 09-01-2008, 05:35 AM
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Set $vbulletin->options['simpleversion'] to nothing in global_start or another plugin around then should take a away the 373.
Reply With Quote
  #9  
Old 10-05-2013, 04:10 AM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you still want to delete it remove the line in adminfunctions_template.php and after that rebuild the styles
Reply With Quote
  #10  
Old 10-05-2013, 04:31 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doh! 2008.
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:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04224 seconds
  • Memory Usage 2,257KB
  • 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
  • (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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete