Recent Topics

1 Mar 14, 2008 03:18    

My b2evolution Version: 2.4.x

I'm sure someone can tell me where I should put these on the b2e site, but until then...

For 2.4.x users, here are some very simple, Free HTML widget examples you can use with your blog. They're useful if you want to use something simpler than an existing widget but don't want to write your own widget for something simple.

Just enter them through the back office (blog settings, add widget to a section, select "Free HTML" for the widget).

These can be seen in action at www.thewildlifeporch.com. Make sure to replace "mydomain.com" with your domain.

1. Small RSS Feed

A one line link to the RSS feed for your blog.

<a href="http://www.mydomain.com?tempskin=_rss2">
<img src="http://www.mydomain.com/rsc/icons/feed-icon-14x14.gif" alt="" />&nbsp;
RSS Feed</a>

2. Simple Search

Very simple search -- just the edit box for the search terms.

<form method="get" action="http://www.mydomain.com" class="mSearch" ><input name="s" value="To search, type and press Enter" type="text" class='mInput' onfocus="if (this.value == 'To search, type and press Enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'To search, type and press Enter';}"/></form>

In my stylesheet, I have it styled this way:

.mSearch { margin-top: 10px; margin-left: 12px; }
.mInput { padding: 4px 2px 4px 2px; width: 200px; }

3. Title Logo

If your title for your blog is an image instead of text, you can use the following (you'll have to remove the default blog title widget, depending on your skin, and assuming your image is in the blog specific media directory)

<div class="title_logo"><a href="http://www.mydomain.com"><img src="http://www.mydomain.com/media/blogs/mydomain/logo_title.jpg" alt="My Domain"/></a></div>

One additional tip: if you want to add Google Analytics, Amazon Hover, or another script -- just add them via Free HTML widgets to a skin container instead of modifying the skin. You'll have to add the container to your skin, overriding _html_footer_inc.php (copying down the default to your skin, then editing):

		
		// Display container and contents:
		skin_container( NT_('Body End'), array() );

- Cindy Rae

2 Mar 16, 2008 03:25

Cindy

How do you use Free HTML widget with Java scripts?
I have many JS from other apps, but dont know how to load JS.

Tv

3 Mar 17, 2008 16:47

Doesn't Google Analytics need to be in he HEAD tag?

4 Mar 19, 2008 15:30

flaminio -

The Google Analytics site instructs the user to place the Google Analytics script before the closing </body> tag. Mine works fine placed just before the </body> tag.

thanh -

If you have a simple Javascript that probably will never change and that belongs on all your blog pages, it may be easier just to add it -- or the reference to the .js file -- to a _html_header.inc.php you copy down to your skin directory.

If the Javascript may change or be replaced, use the Free HTML widget:

1) You've got to have a widget container in the right place.

For instance, if your Javascript needs to appear inside the html <head> tag, then you'll need to use a skin that already has a widget container defined inside the HTML <head> tag of the skin or, from the skin code, add your own widget container to this skin.

2) From the back-office, find the widget container you identified in step 1. Add a Free HTML widget.

3) In the Free HTML widget, enter the script tag you want to add.

Examples:


<script type="text/javascript" src="http://www.mydomain.com/skins/myskin/myjavascript.js">
</script>


<script type="text/javascript" >
// my javascript here...
</script>

Hope this helps,

Cindy Rae

5 Mar 19, 2008 15:58

There's plugin, in the b2evo plugins page that does the analytics stuff. Just need some update :)

6 Mar 31, 2008 21:06

Hey, thanks for the reminder about the b2e plugin that provides blog stats.

I'm mainly using Google Analytics because they're supposed to incorporate outbound link tracking very soon.

Since no two stat tracking packages seem to offer the exact same capabilities, it's good to know about the b2e plugin in addition to Google Analytics.

Thanks!

- Cindy Rae


Form is loading...