ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 1346


Ignore:
Timestamp:
Dec 23, 2006, 8:22:28 AM (14 years ago)
Author:
miyumiyu
Message:

CSS分離 完成(?)

Location:
OpenPNE/branches/myumyu/prj_customcss/webapp/modules
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/myumyu/prj_customcss/webapp/modules/admin/lib/writecss.php

    r1344 r1346  
    88function writecss()
    99{
    10     $cssdata = fetch_inc_html_header();
     10    $cssdata = writecss_inc_html_header();
    1111    preg_match("/<!--(.+)-->/s",$cssdata,$matches);
    1212    $handle = fopen('./css/custom.css', 'wb');
    13     fwrite($handle, '@charset "UTF-8";' . $matches[1]);
     13    fwrite($handle, '@charset "UTF-8";' . $cssdata);
    1414    fclose($handle);
    1515}
     16function writecss_inc_html_header()
     17{
     18    $inc_smarty = new OpenPNE_Smarty($GLOBALS['SMARTY']);
     19    $inc_smarty->templates_dir = 'pc/templates';
     20
     21    if (SNS_TITLE) {
     22        $inc_smarty->assign('title', SNS_TITLE);
     23    } else {
     24        $inc_smarty->assign('title', SNS_NAME);
     25    }
     26
     27    $inc_smarty->assign('inc_html_head', p_common_c_siteadmin4target_pagename('inc_html_he
     28ad'));
     29    $inc_smarty->assign('inc_custom_css', p_common_c_siteadmin4target_pagename('inc_custom
     30_css'));
     31
     32    $c_sns_config = db_select_c_sns_config();
     33    $inc_smarty->assign('border_00', $c_sns_config['border_00']);
     34    $inc_smarty->assign('border_01', $c_sns_config['border_01']);
     35[root@sns lib]# cat write*
     36<?php
     37/*
     38 *
     39 *  Writer: K. Yamanoi
     40 *  Date: 2006/12/23
     41 *
     42*/
     43function writecss()
     44{
     45    $cssdata = writecss_inc_html_header();
     46    preg_match("/<!--(.+)-->/s",$cssdata,$matches);
     47    $handle = fopen('./css/custom.css', 'wb');
     48    fwrite($handle, '@charset "UTF-8";' . $cssdata);
     49    fclose($handle);
     50}
     51function writecss_inc_html_header()
     52{
     53    $inc_smarty = new OpenPNE_Smarty($GLOBALS['SMARTY']);
     54    $inc_smarty->templates_dir = 'pc/templates';
     55
     56    if (SNS_TITLE) {
     57        $inc_smarty->assign('title', SNS_TITLE);
     58    } else {
     59        $inc_smarty->assign('title', SNS_NAME);
     60    }
     61
     62    $inc_smarty->assign('inc_html_head', p_common_c_siteadmin4target_pagename('inc_html_head'));
     63    $inc_smarty->assign('inc_custom_css', p_common_c_siteadmin4target_pagename('inc_custom_css'));
     64
     65    $c_sns_config = db_select_c_sns_config();
     66    $inc_smarty->assign('border_00', $c_sns_config['border_00']);
     67    $inc_smarty->assign('border_01', $c_sns_config['border_01']);
     68    $inc_smarty->assign('border_02', $c_sns_config['border_02']);
     69    $inc_smarty->assign('border_03', $c_sns_config['border_03']);
     70    $inc_smarty->assign('border_04', $c_sns_config['border_04']);
     71    $inc_smarty->assign('border_05', $c_sns_config['border_05']);
     72    $inc_smarty->assign('border_06', $c_sns_config['border_06']);
     73    $inc_smarty->assign('border_07', $c_sns_config['border_07']);
     74    $inc_smarty->assign('border_08', $c_sns_config['border_08']);
     75    $inc_smarty->assign('border_09', $c_sns_config['border_09']);
     76    $inc_smarty->assign('border_10', $c_sns_config['border_10']);
     77
     78    $inc_smarty->assign('bg_00', $c_sns_config['bg_00']);
     79    $inc_smarty->assign('bg_01', $c_sns_config['bg_01']);
     80    $inc_smarty->assign('bg_02', $c_sns_config['bg_02']);
     81    $inc_smarty->assign('bg_03', $c_sns_config['bg_03']);
     82    $inc_smarty->assign('bg_04', $c_sns_config['bg_04']);
     83    $inc_smarty->assign('bg_05', $c_sns_config['bg_05']);
     84    $inc_smarty->assign('bg_06', $c_sns_config['bg_06']);
     85    $inc_smarty->assign('bg_07', $c_sns_config['bg_07']);
     86    $inc_smarty->assign('bg_08', $c_sns_config['bg_08']);
     87    $inc_smarty->assign('bg_09', $c_sns_config['bg_09']);
     88    $inc_smarty->assign('bg_10', $c_sns_config['bg_10']);
     89    $inc_smarty->assign('bg_11', $c_sns_config['bg_11']);
     90    $inc_smarty->assign('bg_12', $c_sns_config['bg_12']);
     91    $inc_smarty->assign('bg_13', $c_sns_config['bg_13']);
     92
     93    return $inc_smarty->ext_fetch('inc_html_header2.tpl');
     94}
    1695?>
Note: See TracChangeset for help on using the changeset viewer.