b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Archives
  3. Evoskin and A Template

Evoskin and A Template

The following refers to b2evolution version: 0.8.2-RC2 and is obsolete. See 2.0.

What’s the difference between an evoskin and a template?

  • An evoskin is actually a collection of templates and subtemplates which control the layout of your blog. Skins are the easiest way to customize your blog because they are already packaged for use.
  • A template is the page b2evolution uses to include the various aspects of your weblog (posts, comments, category lists, calendar, etc.). You can add or subtract template elements from your blog as you see fit. See below for further information about the various parts of a template.

Generally speaking, b2evo users don’t refer to templates very often. Most customizations are done on the skin level. Please view the Page#Customize & Extend your blog | "Customize & Extend your blog" section on the Main Page for more information about changing skins and templates.

  • Introducing Templates

Main template

If you are using evoSkins, the main template is the _main.php file of your skin.

If you are not using skins, the main template is your blog template as you have always known it ;-)

Below are some "tags" you can include in your main template. You can copy/paste from this page.

Creating links to archives

<?php include( dirname(__FILE__)."/_archives.php"); ?>

Creating links to categories

Including a form to select specific categories


 <form action="<?php bloginfo('blogurl', 'raw') ?>" method="get">
 <?php include( dirname(__FILE__)."/_categories.php"); ?>
 <br />
 <input type="submit" value="Get selection" />
 </form>

Including another blog to act as a blogroll

<?php include( dirname(__FILE__)."/_blogroll.php"); ?>

Including a skin switcher

<ul>
 <?php
 for( skin_list_start(); skin_list_next(); ) { ?>
 <li><a href="<?php skin_change_url() ?>"><?php skin_list_iteminfo( 'name', 'htmlbody' ) ?></a></li>
 <?php } ?>
 </ul>

Creating links to RSS feeds

<ul>
 <li><a href="<?php bloginfo('rss_url', 'raw'); ?>">RSS 0.92 (Userland)</a></li>
 <li><a href="<?php bloginfo('rdf_url', 'raw'); ?>">RSS 1.0 (RDF)</a></li>
 <li><a href="<?php bloginfo('rss2_url', 'raw'); ?>">RSS 2.0 (Userland)</a></li>
 </ul>

Please add a link to the b2evolution home page

 
 <p class="center">powered by<br />
 <a href="http://b2evolution.net/" title="b2evolution home"><img src="../../img/b2evolution_button.png" alt="b2evolution" width="80" height="15" border="0" class="middle" /></a></p>

If you are not using skins, you may have to adapt the path to the b2evolution button: http://b2evolution.net/img/b2evolution_button.png (/blogs/img/b2evolution_button.png)
Warning: If you have enabled pings to b2evolution.net, and you do not link to http://b2evolution.net in your blog, you will be banned from further pings.

Including a list of available blogs


<?php
 for( $curr_blog_ID=blog_list_start('stub');
 $curr_blog_ID!=false;
 $curr_blog_ID=blog_list_next('stub') )
 { # by uncommenting the following lines you can hide some blogs
 // if( $curr_blog_ID == 1 ) continue; # Hide blog 1...
 // if( $curr_blog_ID == 2 ) continue; # Hide blog 2...
 if( $curr_blog_ID == $blog ) { // This is the blog being displayed on this page ?>
 <a href="<?php blog_list_iteminfo('blogurl', 'raw') ?>" class="BlogButtonCurr"><?php blog_list_iteminfo('shortname',   'htmlbody') ?></a>
 <?php } else { // This is another blog ?>
 <a href="<?php blog_list_iteminfo('blogurl') ?>" class="BlogButton"><?php blog_list_iteminfo('shortname', 'htmlbody')  ?></a>
 <?php } // End of testing which blog is being displayed
 } ?>

Logging A Hit

Add this, near the end (or at the end) of your template:

<?php log_hit();	// log the hit on this page ?>

You will NEED to log a hit to the page for your stats to work.
Most skins include this in the end of the page.
Recent referrers, search referrers and other stats will not work without this.

Created by fatimahnasra • Last edit by fplanque on 2020-06-09 00:24 • •

2 comments

Comment from: davidnewcomb

David Newcomb

Creating links to RSS feeds: http://b2evolution.net/img/xml.gif not found.
Please add a link to the b2evolution home page: snippet is incorrect, image path should be ../../rsc/img/b2evolution_button.png. You could help us all by creating a "Powered By" widget, then we’ll all say whatever you want!

2018-03-11 @ 18:46

Comment from: fplanque

Please note this is an obsolete/archived page.

2019-08-07 @ 23:43

On this page

  • What’s the difference between an evoskin and a template?
  • Main template
  • Creating links to archives
  • Creating links to categories
  • Including another blog to act as a blogroll
  • Including a skin switcher
  • Creating links to RSS feeds
  • Please add a link to the b2evolution home page
  • Including a list of available blogs
  • Logging A Hit

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
    • Documentation Effort
    • How to call a blog from a subdirectory?
    • Converting WordPress Themes
    • Evoskin and A Template
    • Quick Upgrade Procedure
    • International Manuals
    • Known Issues
    • Online Help
    • Pretty URL
    • Pro WordPress Theme Conversion
    • Skin/Plugin XML Descriptions
    • Template Tag: Item Views
    • Version
    • How to Change the Appearance of my Permalinks
    • CVS / SourceForge
Responsive CMS

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque