Перейти к содержимому


Партнерская программа Kredov

Вопрос по Joomla VirtueMart

#1 Tori

Tori
  • Пользователь
  • 35 сообщений
  • Репутация: 0
0

Отправлено 22 Июль 2012 - 14:28

Подскажите пожалуйста как в Joomla VirtueMart уменьшить расстояние между названием категории и текстом? Весь код облазила, не могу найти где менять нужно(

Прикрепленные изображения

  • 1.jpg

 

 

  • 0

robot

robot
  • Пользователь PRO
  • 2 652 сообщений
  • Репутация: 85
Советую обратить внимание на следующее:
  1. Нужна помощь по Joomla virtuemart
  2. Несколько вопросов по AlphaUserPoints, Joomla 1.5
  3. Вопросы по структуре движка Joomla

#2 astappev

astappev
  • Пользователь
  • 209 сообщений
  • Репутация: 38

Отправлено 22 Июль 2012 - 14:42

Ссылку в студию
  • 0

#3 Tori

Tori
    Topic Starter
  • Пользователь
  • 35 сообщений
  • Репутация: 0

Отправлено 22 Июль 2012 - 14:43

http://tapco-ufa.ru/..._id=17&Itemid=2

Нужно чтобы было как здесь http://www.stanok02....-listogiby.html
  • 0

#4 Symphony

Symphony
  • Пользователь
  • 636 сообщений
  • Репутация: 54

Отправлено 22 Июль 2012 - 22:20

Проблема в картинках, дайте обтекаемость что ли.
  • 0


#5 Tori

Tori
    Topic Starter
  • Пользователь
  • 35 сообщений
  • Репутация: 0

Отправлено 23 Июль 2012 - 16:55

все равно не получается. В css вставляю float: left; ничего не меняется(
  • 0

#6 Symphony

Symphony
  • Пользователь
  • 636 сообщений
  • Репутация: 54

Отправлено 23 Июль 2012 - 17:41

код в студию


  • 0


#7 Tori

Tori
    Topic Starter
  • Пользователь
  • 35 сообщений
  • Репутация: 0

Отправлено 24 Июль 2012 - 16:40

Когда делаю "Проинспектировать элемент в Опере" показывает что нужно вроде как исправлять в файле fetchscript.php, но в нем прописан код, а не стили. (скриншот внизу).

tamplate.css
html {
  height: 100%;
  margin-bottom: 0px;
}
form {
  margin: 0;
  padding: 0;
}
img,table {
border:none;
}
body {
font-family: Helvetica,Arial,sans-serif;
line-height: 1.3em;
margin: 0px 0px 0px 0px;
font-size: 12px;
color: #333;
}
a:link, a:visited {
text-decoration: none;
font-weight: normal;
}
a:hover {
text-decoration: underline;
font-weight: normal;
}
.button {
cursor: pointer;
color:#fff;
border:none;
font-size:12px;
height:22px;
}
p {
  margin-top: 20;
  margin-bottom: 5px;
  text-align:justify;
}
/*****************************************/
/*** Template specific layout elements ***/
/*****************************************/
#page_bg {
padding: 0;
background: #fff url(../images/bg.jpg) top left repeat;
margin:0;
}
#frame_bg {
margin:0;
paddign:0;
background: transparent url(../images/page_bg.jpg) top left repeat-x;
}
div#wrapper {
margin-left: auto;
margin-right: auto;
width:980px;

}
div#extras {
background: transparent url(../images/extras_bg.jpg) top left repeat-x;
width:980px;
margin:0 auto;
height:31px;
padding:0 10px;
}

#logo {
padding:0px 10px;
margin:2px 0 0 1px;
text-align: left;
float:left;
background: transparent url(../images/logo_bg.jpg) top left no-repeat;
}
#logo a.logo, #logo a.logo:link, #logo a.logo:hover, #logo a.logo:visited {
font-weight: bold;
font-family: Helvetica,Arial,sans-serif;
font-size: 3em;
padding:0;
margin:0;
line-height:1.4em;
color:#577596;
text-decoration:none;
}
div#newsflash {
width: auto;
margin-left: 350px;
margin-right: 30px;
border: 1px solid #00f;
}
div#footer {
width:980px;
margin:0 auto;
}
div#footer_r {
height: 30px;
overflow: hidden;
}
div#footer_r div {
text-align: center;
font-size: .90em;
color: #aaa;
}
div#footer_r a:link, div#footer_r a:visited  {
color: #fff;
}
#pathway {
float:left;
padding: 0px;
width: auto;
text-align: left;
}
#search {
float:left;
width:200px;
height:26px;
text-align:left;
padding:5px 0px 0 10px;
}
#area {
padding: 0;
width:100%;
background: url(../images/whitebox_bg.jpg) top left repeat-y;

}
#topnews {
margin:40px 0 0 0 ;
width:490px;
height:120px;
color:#666;
}
#whitebox {
margin: 0 auto;
width: 978px;
background: transparent url(../images/top_menu_bg.jpg) top left repeat;
height:24px;
text-align:left;
}
#whitebox div {
text-align: left;
}
#whitebox_m {
width: 980px;
padding: 0;
margin:0 auto;
}
#shodow {
width:980px;
height: 10px;
margin:0 auto;
background: url(../images/shodow_bg.jpg) top left no-repeat;
font-size:8px;
}

#whitebox_br {
height: 13px;
background: url(../images/mw_content_b_r.png) 100% 100% no-repeat;
}
/* horizontal pill menu */
table.pill {
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  text-align:left;
}
td.pill_m {
  padding: 0;
  margin: 0;
  width: 980px;
  text-align:left;
}

#pillmenu {
  white-space: nowrap;
  float: left;
}
#pillmenu ul {
  margin: 0;
  padding: 0;
  list-style:none;
}
#pillmenu li {
float: left;
margin: 0;
padding: 0;
}
#pillmenu a {
  font-family: Tahoma, Helvetica, sans-serif;
  font-size: 19px;
  font-weight: normal;
  float:left;
  display:block;
  line-height: 24px;
  padding: 0px 15px;
  color: #fefefe;
  text-decoration: none;
}
#pillmenu a:hover {
  color: #fff;

  text-decoration: underline;
}
#pillmenu a#active_menu-nav {
}
#leftcolumn ,#rightcolumn {
margin: 0;
width: 190px;
padding:10px;
float:left;
}
div#maincolumn {
padding:10px 0 10px 10px;
float:left;
width: 550px;
}
div#maincolumn_full {
padding:10px 0 10px 10px;
width: 734px;
float:left;
}
div.nopad {
padding: 0;
}
td.middle_pad {
width: 20px;
}
/*****************************************/
/*** Joomla! specific content elements ***/
/*****************************************/

div.offline {
background: #fffebb;
width: 100%;
position: absolute;
top: 0;
left: 0;
font-size: 1.2em;
padding: 5px;
}
span.pathway {
  display: block;
  margin: 0 10px;
  height: 23px;
  font-size:12px;
  overflow: hidden;
  padding:8px 0 0 0;
  color:#fff;
}
span.pathway a, span.pathway a:link, span.pathway a:hover,span.pathway a:visited {
color:#fff;
}
/* headers */
div.componentheading {
  padding-left: 0px;
}
h1 {
padding: 0;
font-family:Helvetica ,Arial,sans-serif;
font-size: 1.3em;
font-weight: bold;
vertical-align: bottom;
color: #666;
text-align: left;
width: 100%;
}
h2, .contentheading {
padding: 20;
font-family: Tahoma, Helvetica,sans-serif;
font-size: 20px;
font-weight: bold;
vertical-align: bottom;
color: #5076b6;
text-align: left;
width: 100%;
}
table.contentpaneopen h3 {
margin-top: 25px;
}
h4 {
font-family: Arial, Helvetica, sans-serif;
color: #333;
}
h3, .componentheading, table.moduletable th, legend {
  margin: 0;
  font-weight: bold;
  font-family: Tahoma,Helvetica,Arial,sans-serif;
  color:#5076b6;
  font-size: 1.4em;
  padding-left: 0px;
margin-bottom: 10px;
text-align: left;
}
/* small text */
.small {
font-size: .90em;
color: #999;
font-weight: normal;
text-align: left;
}
.modifydate {
  height: 20px;
  vertical-align: bottom;
font-size: .90em;
color: #999;
font-weight: normal;
text-align: left;
}
.createdate {
height: 20px;
vertical-align: top;
font-size: .90em;
color: #999;
font-weight: normal;
vertical-align: top;
padding-bottom: 5px;
padding-top: 0px;
}
a.readon {
margin-top: 10px;
display: block;
float: left;
background: url(../images/mw_readon.png) top right no-repeat;
padding-right: 20px;
line-height: 14px;
height: 16px;
}
/* form validation */
.invalid { border-color: #ff0000; }
label.invalid { color: #ff0000; }

/** overlib **/
.ol-foreground {
background-color: #f6f6f6;
}
.ol-background {
background-color: #666;
}
.ol-textfont {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
}
.ol-captionfont {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #f6f6f6;
font-weight: bold;
}
.ol-captionfont a {
color: #0B55C4;
text-decoration: none;
font-size: 12px;
}
.ol-closefont {}
/* menu links */
a.mainlevel:link, a.mainlevel:visited {
padding-left: 15px;
}
a.mainlevel:hover {
}
/* spacers */
span.article_separator {
display: block;
height: 20px;
}
.article_column {
padding-right: 5px;
}
.column_separator {
border-left: 1px dashed #e0e0e0;
padding-left: 10px;
}
td.buttonheading {
}
.clr {
clear: both;
}

div#maindivider {
  border-top: 1px solid #ddd;
  margin-bottom: 10px;
  overflow: hidden;
  height: 1px;
}
table.blog span.article_separator {
display: block;
height: 20px;
}
/* table of contents */
table.contenttoc {
  margin: 5px;
  border: 1px solid #ccc;
  padding: 5px;
}
table.contenttoc td {
  padding: 0 5px;
}

/* content tables */
td.sectiontableheader {
  background: #efefef;
  color: #333;
  font-weight: bold;
  padding: 4px;
  border-right: 1px solid #fff;
}
tr.sectiontableentry0 td,
tr.sectiontableentry1 td,
tr.sectiontableentry2 td {
  padding: 4px;
}
td.sectiontableentry0,
td.sectiontableentry1,
td.sectiontableentry2 {
  padding: 3px;
}

/* content styles */
table.contentpaneopen, table.contentpane {
margin: 0;
padding: 0;
width: auto;
}
table.contentpaneopen li {
margin-bottom: 5px;
}
table.contentpaneopen fieldset {
border: 0;
border-top: 1px solid #ddd;
}
table.contentpaneopen h3 {
margin-top: 25px;
}
table.contentpaneopen h4 {
font-family: Arial, Helvetica, sans-serif;
color: #333;
}
.highlight {
background-color: #fffebb;
}
/* module control elements */
table.user1user2 div.moduletable {
margin-bottom: 0px;
}
div.moduletable, div.module {
  margin-bottom: 25px;
}
div.module_menu {
margin: 0;
padding: 0;
margin-bottom: 15px;
}
div.module_menu div div div {
padding: 0px;
padding-top: 30px;
padding-bottom: 10px;
width: auto;
}
div.module_menu div div div div {
background: none;
padding: 0;
}
div.module_menu ul {
margin: 10px 0;
padding-left: 10px;
list-style:none;
}
div.module_menu ul li {
margin: 0;
padding: 0;
}
div.module_menu ul li a:link, div.module_menu ul li a:visited {
font-weight: bold;
background:transparent url(../images/blue/bullet2.jpg) top left no-repeat;
padding:2px 0 2px 25px;
line-height:24px;

}
#leftcolumn div.module table ,#rightcolumn div.module table {
width: auto;
}
#leftcolumn h3, #rightcolumn h3 {
margin: 0;
color:#fefefe;
font-weight: bold;
font-family: Helvetica,Arial,sans-serif;
font-size: 1.1em;
background:#eeeeee;
padding:2px 0 2px 10px;
line-height:20px;
text-align: left;
background:transparent url(../images/menu_t.jpg) top left repeat-x;

}

#leftcolumn .moduletable_menu, #leftcolumn .moduletable, #leftcolumn .moduletable_text, #leftcolumn .c,
#rightcolumn .moduletable_menu, #rightcolumn .moduletable, #rightcolumn .moduletable_text, #rightcolumn .c {
margin:0 0 20px 0;
padding: 3px;
border:1px solid #ccc;
background:#fefefe;
}
#leftcolumn ul.menu, #rightcolumn ul.menu {
margin:0;
padding:0;
list-style:none;
border:1px solid #ccc;
border-top:none;
}
#leftcolumn ul.menu li, #rightcolumn ul.menu li {
margin:0;
padding:0;
background: #f5f5f5;
}
#leftcolumn ul.menu li a, #leftcolumn ul.menu li a:link,
#rightcolumn ul.menu li a, #rightcolumn ul.menu li a:link {
display:block;
line-height:20px;
background:#f5f5f5 url(../images/menu_link_bg.gif) left no-repeat;
padding:2px 20px;
border-top:1px solid #dddddd;
text-decoration:none;
color:#5076b6;
}
#leftcolumn ul.menu li a:hover, #rightcolumn ul.menu li a:hover {
background:#eeeeee url(../images/menu_link_bg.gif) left no-repeat;
color:#666666;
}
/* ****** left col current menu ****** */
#leftcolumn ul.menu li#current a, #leftcolumn ul.menu li#current a:link,
#rightcolumn ul.menu li#current a, #rightcolumn ul.menu li#current a:link {
display:block;
line-height:20px;
background:#f5f5f5 url(../images/menu_curren_link_bg.gif) left no-repeat;
padding:2px 20px;
border-top:1px solid #dddddd;
text-decoration:none;
color:#ff8800;
}
#leftcolumn ul.menu li#current a:hover, #rightcolumn ul.menu li#current a:hover {
background:#eeeeee url(../images/menu_curren_link_bg.gif) left no-repeat;
color:#666666;
}
/* ****** left col sub menu ****** */
#leftcolumn ul.menu li ul, #rightcolumn ul.menu li ul {
margin:0;
padding:0 0 0 0px;
list-style:none;
}
#leftcolumn ul.menu li#current ul li a, #leftcolumn ul.menu li#current ul li a:link,
#rightcolumn ul.menu li#current ul li a, #rightcolumn ul.menu li#current ul li a:link {
background:#f5f5f5 url(../images/menu_sub_link_bg.gif) left no-repeat;
text-decoration:none;
color:#5076b6;
padding:2px 25px;
}
#leftcolumn ul.menu li#current ul li a:hover, #rightcolumn ul.menu li#current ul li a:hover {
background:#f5f5f5 url(../images/menu_sub_link_bg.gif) left no-repeat;
color:#666666;
}
/* forms */
#leftcolumn .moduletable ul, #rightcolumn .moduletable ul {
margin:6px 0;
padding:0;
list-style:none;
}
#leftcolumn .moduletable ul li, #rightcolumn .moduletable ul li {
margin:0;
padding:0 2px;
}
table.adminform textarea {
  width: 540px;
  height: 400px;
  font-size: 1em;
  color: #000099;
}
div.search input {
margin:0 2px 0 0;
}
.search #mod_search_searchword {
width:122px;
background:#f5f5f5 url(../images/search_bg.jpg) left no-repeat;
border:none;
color:#fff;
padding:2px 4px 0 4px;
height:18px;
}
form#form-login fieldset { border: 0 none; margin: 0em; padding: 0.2em;}
form#form-login ul { padding-left: 20px; }
/* thumbnails */
div.mosimage		 {  margin: 5px; }
div.mosimage_caption {  font-size: .90em; color: #666; }
div.caption	   { padding: 0 10px 0 10px; }
div.caption img   { border: 1px solid #CCC; }
div.caption p	 { font-size: .90em; color: #666; text-align: center; }
/* Parameter Table */
table.paramlist {
margin-top: 5px;
}
table.paramlist td.paramlist_key {
width: 128px;
text-align: left;
height: 30px;
}
table.paramlist td.paramlist_value {
}
div.message {
font-family : "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: bold;
font-size : 14px;
color : #c30;
text-align: center;
width: auto;
background-color: #f9f9f9;
border: solid 1px #d5d5d5;
margin: 3px 0px 10px;
padding: 3px 20px;
}
/* Banners module */
/* Default skyscraper style */
.bannergroup {
}
.banneritem {
}
/* Text advert style */
.banneritem_text {
padding: 4px;
font-size: 11px;
}
.bannerfooter_text {
padding: 4px;
font-size: 11px;
background-color: #F7F7F7;
text-align: right;
}
/* System Messages */
/* see system general.css */
.pagination span { padding: 2px; }
.pagination a	{ padding: 2px; }
/* Polls */
.pollstableborder td {
text-align: left;
}
/* Frontend Editing*/
fieldset {
border: 1px solid #ccc;
margin-top: 15px;
padding: 15px;
}
legend {
margin: 0;
padding: 0 10px;
}
td.key {
border-bottom:1px solid #eee;
color: #666;
}
/* Tooltips */
.tool-tip {
float: left;
background: #ffc;
border: 1px solid #D4D5AA;
padding: 5px;
max-width: 200px;
}
.tool-title {
padding: 0;
margin: 0;
font-size: 100%;
font-weight: bold;
margin-top: -15px;
padding-top: 15px;
padding-bottom: 5px;
background: url(../../system/images/selector-arrow.png) no-repeat;
}
.tool-text {
font-size: 100%;
margin: 0;
}
/* System Standard Messages */
#system-message dd.message ul { background: #C3D2E5 url(../../images/notice-info.png) 4px center no-repeat;}
/* System Error Messages */
#system-message dd.error ul { color: #c00; background: #E6C0C0 url(../../system/images/notice-alert.png) 4px center no-repeat; border-top: 3px solid #DE7A7B; border-bottom: 3px solid #DE7A7B;}
/* System Notice Messages */
#system-message dd.notice ul { color: #c00; background: #EFE7B8 url(../../system/images/notice-note.png) 4px center no-repeat; border-top: 3px solid #F0DC7E; border-bottom: 3px solid #F0DC7E;}
/* ****************************************************************************** */
/* blue */
input,button {
border:1px solid #dcdcdc;
background:transparent;
}

/* blue */
a:link, a:visited {
color: #007C90;
}
a:hover {
color: #0b3768;
}
#pillmenu a#active_menu-nav {
  color: #fff;
  background: transparent url(../images/top_menu_arrow.jpg) top center no-repeat;
}
#pillmenu a#active_menu-nav:hover {
  color: #fff;
  background: transparent url(../images/top_menu_arrow.gif) top center no-repeat;
}
h3, .componentheading, table.moduletable th {
  color: #5076b6;
}
div.module_menu {
background: url(../images/blue/module_mright_bg.jpg) 100% 100% no-repeat;
}
div.module_menu div {
background: url(../images/blue/module_mleft_bg.jpg) 0 100% no-repeat;
}
div.module_menu div div {
background: url(../images/blue/module_right_bg.jpg) 100% 0 no-repeat;
}
div.module_menu div div div {
background: url(../images/blue/module_left_bg.jpg) 0 0 no-repeat;
}
/* ********************************************************************************* */
/* blue */
div#header {
background: transparent url(../images/header_top_middle_shadow_bg.jpg) top left repeat-x;
height:242px;
}
div#header_l {
background: transparent url(../images/header_line_bg.jpg) top left no-repeat;
height:242px;
}
div#logo_bg {
background: transparent url(../images/logo.gif) top right no-repeat;
height:242px;
}
div#logo_bg div {
text-align: left;
}
div#footer {
background: url(../images/footer_m_bg.jpg) 0 100% repeat-x;
}
div#footer_l {
background: url(../images/footer_l_bg.jpg) 0 0 no-repeat;
}
div#footer_r {
background: url(../images/footer_r_bg.jpg) 100% 0 no-repeat;
}
/* ********************************************************************** */
input[type="checkbox"], input[type="radio"]{
   background: transparent;
   border: none;
}
/* -------------------------- */
a.sgfooter:link, a.sgfooter:visited {
color   : #2861a4;
font-family: Arial,sans-serif;
text-decoration:none;
}
a.sgfooter:hover {
color: #2861a4;
font-family: Arial,sans-serif;
text-decoration:none;
}
#sgf {
font-size: 11px;
text-align:center;
width:100%;
margin:0px auto;
color: #2861a4;
font-family: Arial,sans-serif;
}
.sgf {
text-align:right;
font-size: 11px;
font-family: Arial,sans-serif;
color: #2861a4;
text-decoration:none;
}
.sgf1 {
font-size: 11px;
font-family: Arial,sans-serif;
color: #2861a4;
text-align:left;
}
a.sglink:link, a.sglink:visited {
color   : #2861a4;
font-size  : 11px;
font-family: Arial,sans-serif;
text-decoration:none;
}
a.sglink:hover {
color   : #2861a4;
font-family: Arial,sans-serif;
text-decoration:none;
}

tapco-ufa.ru/components/com_virtuemart/fetchscript.php
<!--?php
/**
* This file is used to send gzipped Javascripts and Stylesheets to the browser
*
* It expects three parameters:
*
* gzip (can be 1 or 0, for yes or no; default: 0)
* subdir[INDEX] (relative directory from /components/com_virtuemart/js)
* file[INDEX] (filename only)
* where INDEX is the actual number of the file to be included, so you can include multiple scripts at a time
*
* @version $Id: fetchscript.php 1367 2008-04-10 19:30:20Z soeren_nb $
* @package VirtueMart
* @subpackage core
* @copyright Copyright (C) 2006-2007 soeren - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
/**
* Initialise GZIP
* @author Mambo / Joomla Project
*/
function initGzip() {
global $do_gzip_compress;

$gzip = isset( $_GET['gzip'] ) ? (boolean)$_GET['gzip'] : false;

$do_gzip_compress = FALSE;
if ($gzip) {
  $phpver  = phpversion();
  $useragent  = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '';
  $canZip  = isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ? $_SERVER['HTTP_ACCEPT_ENCODING'] : '';

  $gzip_check  = 0;
  $zlib_check  = 0;
  $gz_check  = 0;
  $zlibO_check = 0;
  $sid_check  = 0;
  if ( strpos( $canZip, 'gzip' ) !== false) {
   $gzip_check = 1;
  }
  if ( extension_loaded( 'zlib' ) ) {
   $zlib_check = 1;
  }
  if ( function_exists('ob_gzhandler') ) {
   $gz_check = 1;
  }
  if ( ini_get('zlib.output_compression') ) {
   $zlibO_check = 1;
  }
  if ( $phpver -->= '4.0.4pl1' && ( strpos($useragent,'compatible') !== false || strpos($useragent,'Gecko') !== false ) ) {
   // Check for gzip header or norton internet securities
   if ( ( $gzip_check || isset( $_SERVER['---------------']) ) && $zlib_check && $gz_check && !$zlibO_check ) {
	// You cannot specify additional output handlers if
	// zlib.output_compression is activated here
	ob_start( 'ob_gzhandler' );

	return;
   }
  } else if ( $phpver > '4.0' ) {
   if ( $gzip_check ) {

	if ( $zlib_check ) {
	 $do_gzip_compress = TRUE;
	 ob_start();
	 ob_implicit_flush(0);
	
	 header( 'Content-Encoding: gzip' );
	 return;
	}
   }
  }
}
ob_start();
}
/**
* Perform GZIP
* @author Mambo / Joomla! project
*/
function doGzip() {
global $do_gzip_compress;
if ( $do_gzip_compress ) {
  /**
  *Borrowed from php.net!
  */
  $gzip_contents = ob_get_contents();
  ob_end_clean();
  $gzip_size = strlen($gzip_contents);
  $gzip_crc = crc32($gzip_contents);
  $gzip_contents = gzcompress($gzip_contents, 9);
  $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
  echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
  echo $gzip_contents;
  echo pack('V', $gzip_crc);
  echo pack('V', $gzip_size);
} else {
  ob_end_flush();
}
}
function cssUrl( $ref, $subdir ) {
$ref = str_replace( "'", '', stripslashes( trim($ref) ));
$ref = str_replace( '"', '', $ref);
if( $subdir[0] == '/' ) {
  $subdir = substr( $subdir, 1 );
}
return 'url( "'. $subdir.'/'.$ref.'" )';
}
/**
* Checks and sets HTTP headers for conditional HTTP requests
* Borrowed from DokuWiki (/lib/exe/fetch.php)
* @author Simon Willison <swillison@gmail.com>
* @link   http://simon.incutio.com/archive/2003/04/23/conditionalGet
*/
function http_conditionalRequest($timestamp){
	// A PHP implementation of conditional get, see
	//   http://fishbowl.pastiche.org/archives/001132.html
	$last_modified = gmdate( 'D, d M Y H:i:s', $timestamp ) . ' GMT';
	$etag = '"'.md5($last_modified).'"';
	// Send the headers
	header("Last-Modified: $last_modified");
	header("ETag: $etag");
	// See if the client has provided the required headers
	$if_modified_since = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ?
		stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']) :
		false;
	$if_none_match = isset($_SERVER['HTTP_IF_NONE_MATCH']) ?
		stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) :
		false;
	if (!$if_modified_since && !$if_none_match) {
		return;
	}
	// At least one of the headers is there - check them
	if ($if_none_match && $if_none_match != $etag) {
		return; // etag is there but doesn't match
	}
	if ($if_modified_since && $if_modified_since != $last_modified) {
		return; // if-modified-since is there but doesn't match
	}
	// Nothing has changed since their last request - serve a 304 and exit
	header('HTTP/1.0 304 Not Modified');
	exit;
}

initGzip();
$base_dir = dirname( __FILE__ );
$subdirs = @$_GET['subdir'];
if( !is_array( $subdirs ) && !empty( $subdirs )) {
$subdirs = array( $subdirs );
}
$files = @$_GET['file'];
if( !is_array( $files ) && !empty( $files )) {
$files = array( $files );
}
if( empty( $files ) || sizeof($files) != sizeof( $subdirs )) {
header("HTTP/1.0 400 Bad Request");
   echo 'Bad request';
   exit;
}
$countFiles = sizeof($files);
$newest_mdate = 0;
for( $i = 0; $i < $countFiles; $i++ ) {
$file = $files[$i];
$subdir = $subdirs[$i];

$dir = realpath( $base_dir . '/' .  $subdir );
$file = $dir . '/' . basename( $file );

if( !file_exists( $file ) || !stristr( $dir, $base_dir )) {
  if( $countFiles == 1 ) {
	  header("HTTP/1.0 404 Not Found");
	  echo 'Not Found';
	  exit;
  }
  continue;
}
$newest_mdate = max( filemtime( $file ), $newest_mdate );
}
// This function quits the page load if the browser has a cached version of the requested script.
// It then returns a 304 Not Modified header
http_conditionalRequest( $newest_mdate );
// here we need to send the script or stylesheet
$processed_files = 0;
for( $i = 0; $i < $countFiles; $i++ ) {
$file = $files[$i];
$subdir = $subdirs[$i];

$dir = realpath( $base_dir . '/' .  $subdir );
$file = $dir . '/' . basename( $file );
if( !file_exists( $file ) || !stristr( $dir, $base_dir ) || !is_readable( $file )) {
  continue;
}
$processed_files++;
$fileinfo = pathinfo( $file );
switch ( $fileinfo['extension']) {
  case 'css':
   $mime_type = 'text/css';
   header( 'Content-Type: '.$mime_type.';');
   $css = implode( '', file( $file ));

   $str_css =   preg_replace("/url\((.+?)\)/ie","cssUrl('\\1', '$subdir')", $css);
   echo $str_css;

   break;

  case 'js':
   $mime_type = 'text/javascript';
   header( 'Content-Type: '.$mime_type.';');

   readfile( $file );

   break;

  default:
   continue;

}
}
if( $processed_files == 0 ) {
if( !file_exists( $file ) ) {
	 header("HTTP/1.0 404 Not Found");
	 echo 'Not Found';
	 exit;
}
if( !is_readable( $file ) ) {
	 header("HTTP/1.0 500 Internal Server Error");
	 echo "Could not read ".basename($file)." - bad permissions?";
	exit;
}
}
// Tell the user agent to cache this script/stylesheet for a week
$age = 604800;
header( 'Expires: '.gmdate( 'D, d M Y H:i:s', time()+ $age ) . ' GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', @filemtime( $file ) ) . ' GMT' );
header( 'Cache-Control: public, max-age='.$age.', must-revalidate, post-check=0, pre-check=0' );
header( 'Pragma: public' );
doGzip();
exit;
?>

Прикрепленные изображения

  • 1.jpg

  • 0

#8 astappev

astappev
  • Пользователь
  • 209 сообщений
  • Репутация: 38

Отправлено 26 Август 2012 - 14:12

Я так понимаю шаблон был изменен, проблемы нет. Сейчас если нужно еще меньше, уберите <br>.
  • 0

robot

robot
  • Пользователь PRO
  • 2 652 сообщений
  • Репутация: 85


Оформление форума – IPBSkins.ru