Hello there! Welcome to Youjoomla Support Forums

We are Web Development Company specializing in Joomla Templates , Joomla Extensions and WordPress Themes development . You are not able to see some forum threads due to your memberhip level. To unlock all forums and special customer support please take few moments to signup . If you are just searching for free joomla templates , or free joomla extension support simply head to our Free Joomla Support forums and open a new thread. Our moderators will help you as soon as possible. To spead up the response time please take few seconds and go over forum rules

Have fun!

Font-Squirrel in YJSG 1.5 and 1.6

07-21-2011, 06:15 AM
# 1 (permalink)
arefund
Before any changes please BACKUP your current template!!!


1. Choose your squirrel font on fontsquirrel.com and download the @font-face Kit. If you can't find the font you want on fontsquirrel.com you can make it youself.

Go to your root folder/templates/your_template_name/css and add a new folder, rename it to squirrel.

Extraxt the face-font Kit you downloaded in the squirrel folder and rename that folder, example ( Windsong-fontfacekit into wind_song)



2. Go to your root folder/templates/your_template_name/yjsgcore/folder.

Add a new php file, rename it to yjsg_squirel.php and add

this:

PHP Code:

<?php
switch ($squirrel_font_family) {
    case 
1:
        
$sqapi_font_family "'WindsongRegular', Arial, sans-serif;";
        
$sqapi_font_param ="wind_song";
        break;
}
?>


3. Go to your root folder/templates/your_template_name/yjsgcore/yjsg_fontapi.php

Add this above the closing php tag }?>

PHP Code:

   }elseif ($selectors_override_type == 4){ // SQUIRREL
    
require( TEMPLATEPATH.DS."yjsgcore/yjsg_squirel.php");
    
$nice_font   =  $sqapi_font_family;
    
$font_sheet  ='<link rel="stylesheet" href="'.$yj_site.'/css/squirrel/'.$sqapi_font_param.'/stylesheet.css"    type="text/css" charset="utf-8" />'


4. Go to your root folder/templates/your_template_name/yjsgcore/yjsg_custom_params.php

Add this before the closing php tag.

PHP Code:

 $squirrel_font_family          $this->params->get("squirrel_font_family"); 


5. Go to your root folder/templates/your_template_name/yjsgcore/yjsg_core.php


Move the line #284 and #285

PHP Code:

 //INSERT CUSTOM TEMPLATE PARAMS
    
require( TEMPLATEPATH.DS."yjsgcore/yjsg_custom_params.php"); 
under line #27

PHP Code:

    $document             = &JFactory::getDocument(); 


6. Go to your root folder/templates/your_template_name/yjsgcore/yjsg_hconditions.php

At this code at the bottom before the last closing php tag line #233

PHP Code:

  <?php if ($selectors_override_type == 4){ ?>
    <?php echo $font_sheet ?>
            <style type="text/css">
              <?php echo $affected_selectors ?>{
                  font-weight:normal!important;
                 font-family:<?php echo $nice_font ?>}
            </style>
    <?php ?>


7. Folowing instruction is for joomla 1.5 YJSG version ! For 1.6 version please folow instructions from step 10.

Go to your root folder/templates/your_template_name/templateDetails.xml

Find this code between line #193 and #201:

Code:

<param name="selectors_override" type="yjsglist" default="2" label="HTAG_OVR_LABEL" description="HTAG_OVR_DESC">
		<option value="1" enable="paramsselectors_override_type|paramscss_font_family|paramsgoogle_font_family|paramscufon_font_family|paramsaffected_selectors">Yes</option>
		<option value="2" disable="paramsselectors_override_type|paramscss_font_family|paramsgoogle_font_family|paramscufon_font_family|paramsaffected_selectors">No</option>
		</param>
		<param name="selectors_override_type" type="yjsglist" default="1" label="HTAG_OVR_TYPE_LABEL" description="HTAG_OVR_TYPE_DESC">
		<option value="1" enable="paramscss_font_family|" disable="paramsgoogle_font_family|paramscufon_font_family">CSS</option>
		<option value="2" enable="paramsgoogle_font_family" disable="paramscss_font_family|paramscufon_font_family">Google Font</option>
		<option value="3" enable="paramscufon_font_family" disable="paramsgoogle_font_family|paramscss_font_family">Cufon Font</option>
		</param>

add replace with:



Code:

<param name="selectors_override" type="yjsglist" default="2" label="HTAG_OVR_LABEL" description="HTAG_OVR_DESC">
			<option value="1" enable="paramsselectors_override_type|paramscss_font_family|paramsgoogle_font_family|paramscufon_font_family|paramsaffected_selectors">Yes</option>
			<option value="2" disable="paramsselectors_override_type|paramscss_font_family|paramsgoogle_font_family|paramscufon_font_family|paramsaffected_selectors">No</option>
		</param>
		<param name="selectors_override_type" type="yjsglist" default="1" label="HTAG_OVR_TYPE_LABEL" description="HTAG_OVR_TYPE_DESC">
			<option value="1" enable="paramscss_font_family|" disable="paramsgoogle_font_family|paramscufon_font_family|paramssquirrel_font_family">CSS</option>
			<option value="2" enable="paramsgoogle_font_family" disable="paramscss_font_family|paramscufon_font_family|paramssquirrel_font_family">Google Font</option>
			<option value="3" enable="paramscufon_font_family" disable="paramsgoogle_font_family|paramscss_font_family|paramssquirrel_font_family">Cufon Font</option>
			<option value="4" enable="paramssquirrel_font_family" disable="paramsgoogle_font_family|paramscss_font_family|paramscufon_font_family">Squirrel Font</option>
		</param>


8. In templateDetails.xml after line


Code:

		<option value="10">Molengo</option>
		</param>

add:


Code:

   		<param name="squirrel_font_family" type="yjsglist" default="1" label="SQ_FONT_FAM_LABEL" description="SQ_FONT_FAM_DESC">
			<option value="1">YOUR SQUIRREL FONT NAME(Windsong)</option>
		</param>


9. For joomla 1.5 YJSG version :

Go to your root folder/administrator/language/en-GB, open this file en-GB.tpl_YOUR_TEMPLATE_NAME.ini

Add this at the bottom of the document:

Code:

    SQ_FONT_FAM_LABEL =Squirrel Font-Family
    SQ_FONT_FAM_DESC = Please choose default squirrel font family for affected selectors. See below Affected Selector settings to adjust selectors affected
For joomla 1.6 YJSG version :

Go to your root folder/language/en-GB, open this file en-GB.tpl_YOUR_TEMPLATE_NAME.ini

Add this at the bottom of the document:

Code:

    
    SQ_FONT_FAM_LABEL ="Squirrel Font-Family"
    SQ_FONT_FAM_DESC ="Please choose default squirrel font family for affected selectors. See below Affected Selector settings to adjust selectors affected"


10. YJSG template version 1.6

PHP Code:

            <field name="selectors_override" type="yjsglist" default="2" label="HTAG_OVR_LABEL" description="HTAG_OVR_DESC">
                <
option value="1" enable="selectors_override_type|css_font_family|google_font_family|cufon_font_family|affected_selectors">Yes</option>
                <
option value="2" disable="selectors_override_type|css_font_family|google_font_family|cufon_font_family|affected_selectors">No</option>
            </
field>
            <
field name="selectors_override_type" type="yjsglist" default="1" label="HTAG_OVR_TYPE_LABEL" description="HTAG_OVR_TYPE_DESC">
                <
option value="1" enable="css_font_family" disable="google_font_family|cufon_font_family">CSS</option>
                <
option value="2" enable="google_font_family" disable="css_font_family|cufon_font_family">Google Font</option>
                <
option value="3" enable="cufon_font_family" disable="google_font_family|css_font_family">Cufon Font</option>
            </
field

add replace with:

PHP Code:

            <field name="selectors_override" type="yjsglist" default="2" label="HTAG_OVR_LABEL" description="HTAG_OVR_DESC">
            <
option value="1" enable="selectors_override_type|css_font_family|google_font_family|cufon_font_family|affected_selectors">Yes</option>
            <
option value="2" disable="selectors_override_type|css_font_family|google_font_family|cufon_font_family|affected_selectors">No</option>
        </
field>
        <
field name="selectors_override_type" type="yjsglist" default="1" label="HTAG_OVR_TYPE_LABEL" description="HTAG_OVR_TYPE_DESC">
            <
option value="1" enable="css_font_family|" disable="google_font_family|cufon_font_family|squirrel_font_family">CSS</option>
            <
option value="2" enable="google_font_family" disable="css_font_family|cufon_font_family|squirrel_font_family">Google Font</option>
            <
option value="3" enable="cufon_font_family" disable="google_font_family|css_font_family|squirrel_font_family">Cufon Font</option>
            <
option value="4" enable="squirrel_font_family" disable="google_font_family|css_font_family|cufon_font_family">Squirrel Font</option>
        </
field


Then go to your administration-> extensions-> template manager-> your template name first tab Style Settings and choose your squirrel font.

At the bottom you will find a inputbox where you can add your own tags and they will be affected with the new font from your website...
Thread Tools
Display Modes

Powered by vBulletin®
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

Members Login

Username
Password