Make a Lasting Impression

Dear Webmaster, Google says "We can't access all your JS and CSS files" - Really!

Google robots messageYesterday, webmasters around the globe were getting emails that looked like they were from Google, which many overlooked or treated with suspicion. I did at first - then, I signed into my Google Webmaster Tools (GWT) account and found they were, indeed, from Google.

The message read-

"Google systems have recently detected an issue with your homepage that affects how well our algorithms render and index your content. Specifically, Googlebot cannot access your JavaScript and/or CSS files because of restrictions in your robots.txt file. These files help Google understand that your website works properly so blocking access to these assets can result in suboptimal rankings."

keep reading ...

1 comments

UI for 2.0 preview: Smarty debug

One of 2.0 release goals is get a more friendly and responsive UI in User and Admin Side. The job is next to the end.
A minor advance shows the point: Smarty debug.
The classic look and feel is really ugly and outdated.


smarty_before


Let´s go with the improvements:

smarty_before


Now it is tabbable (without loading external files); as our Smarty vars are short the columns widht using better the space available. Color changed according the now look and feel, etc.
And look the vars content: now there is more text; before sometimes the info was too short. By default Smarty debug cuts off the longer strings to a max of 40 caracters but passing some values with a modifier you can override this behaviour.

If you like a different value for vars content look the line 211

<td>{$_debug_vals[vars]|@debug_print_var:0:400}</td>

Just change 400 for you own value.

And the good news is you do not need wait for 2.0 final to use these changes: just replace the file for the new in /libraries/smarty/debug.tpl

Download
No comment

icmsBootstrap the basic theme for ImpressCMS 2.0

Bootstrap, or Twitter bootstrap as it was called at the beginning, has taken the design world by storm. This has translated itself into lots of CMSes adopting it as the base CSS framework for their designs, Joomla being one of the most prominent ones.

At the release of ImpressCMS 2.0 final, the default theme will be based on icmsBootstrap. This will allow theme designers to re-use their existing bootstrap experience also on ImpressCMS sites, and will align us with one of the most popular projets on github.

icmsBootstrap will be refined and updated in future releases of the theme, for which I created a new subproject on assembla. I try to give core components separate subprojects, that makes it easier to handle them.

Expect a first introduction to icmsBootstrap in the next alpha release for ImpressCMS 2.0, which is imminent.

4 comments

Different theme styles for different modules

You have a nice theme for your ImpressCMS site, but what of you would like use different styles for each site section, as news, downloads, wiki, etc. There are themes with different colors; why uses only one color if you can use all availables? Here if Smarty tag shows its power. Let´s go!

Imagine the theme have four colors in different CSS files. They are: default.css, blue.css, orange.css, black.css and your start page use news module.



Edit the theme.html file and look for CSS files. Now change the code according this example:


!-- Sheet Css -->


<{if $icms_dirname == "news"}>


<link rel="stylesheet" type="text/css" media="all" href="<{$icms_imageurl}>default.css" />


<{elseif $icms_dirname == "simplywiki"}>


<link rel="stylesheet" type="text/css" media="all" href="


<{$icms_imageurl}>blue.css" />


<{elseif $icms_dirname == "downloads"}>


<link rel="stylesheet" type="text/css" media="all" href="<{$icms_imageurl}>orange.css" />


<{else}>


<link rel="stylesheet" type="text/css" media="all" href="<{$icms_imageurl}>black.css" />


<{/if}>

3 comments

How create a fancy Theme Select Block

A nice ImpressCMS feature is if you like users or visitors can select themes  But the classic Select Theme Block looks old and if you like play with modern select scripts or HTML5 there is a problem: template file (system_blocks_themes.html) has only one smarty var: <{$block.theme_select}>. All HTML code is in a core php file.


Well, let´s go change.


First edit /modules/system/blocks/system_blocks.php file and replace lines 593-600 with

$block = array();<br />&nbsp;&nbsp; &nbsp;$block['imagenes'] = $options[0];<br />&nbsp;&nbsp; &nbsp;if ($options[0] == 1) {<br />&nbsp;&nbsp; &nbsp;$block['imagenesruta'] =&nbsp; "" . ICMS_THEME_URL . "/" . $icmsConfig['theme_set'] . "/shot.gif" alt="screenshot" width="". (int) $options[1] . "";<br />&nbsp;&nbsp; &nbsp;} <br />&nbsp;&nbsp; &nbsp;$block['numero'] =&nbsp;&nbsp; sprintf(_MB_SYSTEM_NUMTHEME, count($icmsConfig['theme_set_allowed'])) ;<br />&nbsp;&nbsp; &nbsp;$block['opciones'] = $theme_options;<br />

We have now new smarty vars and can play with them in the template file.
    
    In /modules/system/templates/blocks/system_blocks_themes.html
    
    replace for
</p>
<p>&nbsp;&nbsp; &nbsp;<div style="text-align: center;"><br />&nbsp;&nbsp; &nbsp;<form action="index.php" method="post"><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<div><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<{if $block.imagenes}><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<img src="<{$block.imagenesruta}>" vspace="2" id="icms_theme_img" /><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<br /><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<select id="theme_select" name="theme_select" onchange="showImgSelected('xoops_theme_img', 'theme_select', 'themes', '/shot.gif',<{$icms_url}>)"><{$block.opciones}></select><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<input type="submit" value="<{$smarty.const._GO}>" /><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<{else}><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<select id="theme_select" name="theme_select" onchange="submit();" size="3"><{$block.opciones}></select><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<{/if}><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<p><{$block.numero}></p><br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div><br />&nbsp;&nbsp; &nbsp;</form><br /></div><br />

Clear cache

Now you can use mousewheel or fancy select scripts.
No comment
Pages:
Subscribe to latest posts