b2customfields are next on my list. Mystis created a nice hack that I’m integrating right now!
Tag Archives: b2
b2++ updates
Several updates should be mentioned:
- When I introduce new templates (say for the blogroll, or the new archives format) I’ll make sure that template exists in the user’s template directory. If it doesn’t I copy it in from the default template
- Redirection is now more like a normal site. Instead of redirecting to blog/index.php you can load “blog/” or if you access “blog” then it’ll redirect you to “blog/” like a normal webserver would. Try /xeer to see for yourself.
- Mike Little has a new version of b2links coming out so I’ll try an integrate that when I can.
- Tim and I are wracking our brains trying to come up with a new name for b2++, one that isn’t quite so awkward. He thought of “Diolog” (Dio is Greek for 2, as in b2..), I thought of “BioDio” (Biography 2..), or Biolog. Suggestions welcome please! Leave a comment here if you have any ideas!
I want to put this code on sourceforge and make the development of it more accessible. I’d like to have a new name before I put it online though.
I need help with this project, there’s plenty to do. Writing docs, designing new templates/importing existing ones, writing plugins, rewriting b2 basically. Please leave a comment if you can help..
b2++ blurb
I added some “What is b2++?” blurb to the front page. Is there anything missing? What should I change to make it better? I’m targetting users and developers here (eh? yeah, that’s hard!), but I fear I’ve probably gone and confused any potential user!
Referers in b2++
I’ve integrated part of the Nathan’s referer code into b2++. It’s in the form of a prefunction as it creates a global referers tag you can put into your site templates.
Currently it creates a different tag if you’re viewing a single post or a whole blog/category. This allows the template designer to use the postreferers
tag when listing referers to a single post, or use refererlinks
to list the site referers list. Add this code to your index.tpl to enable it:
{if $refererlinks != “”}
<blockquote>
Referers:
<ol>
{foreach from=$refererlinks item=link}
<li> <a href=”{$link.referingURL}”>{$link.baseDomain}</a> ({$link.visitTimes})
{/foreach}
</ol>
</blockquote>
{/if}
Flavour it to suit your own blog design. Substitute $postreferers for $refererlinks and put the same code into post.tpl to see single post refererers. The final b2++ 0.6 will have this in place, and all you’ll need to do is update your templates from the Template Chooser.
Update!
Because of the caching on this site many referers were lost, I changed the referer plugin into a Smarty insert plugin.
Insert functions are executed every time a page is loaded and because of the way they operate, I’ve had to hard-code the html it outputs for the time being.
Anyway, ignore the instructions above. If you want to record and display referers on your blog on this site, then add the following code to index.tpl (anywhere will do, but make sure there’s enough space for it!)
{insert name=”getreferer” mode=”index”}
Add the following to post.tpl if you want to show referers to individual posts too:
{insert name=”getreferer” mode=”post”}
There’s some problem with it as is though, sometimes the insert function doesn’t execute. I’ll have a look at why tomorrow.
Update 2
I still don’t know why insert functions didn’t work, that’s something I’ll have to bring up on the Smarty mailing list tomorrow. I reverted to recording every referer on each request, but the list of referers for any page is only updated when the page cache is updated.
b2 updates
I’ve updated this site to the latest release of b2++, you can take advantage of the new features by choosing another blog template from the “Template chooser”. Then go into b2options and enter your blo.gs ID. Your favourite blogs will then be listed, sorted by update time!
Even if you’ve no interest in blo.gs, the new release has a number of other updates you might like!
New b2++ snapshot
b2 and Blogrolling
Spitfire asked about blogrolling support in b2. I found Phil Ringnalda’s work on building a blo.gs parser and integrated it into b2++!
It’s not available here yet, but when it is, all you have to do to enable support for it is add the following to your blog template:
{blogroll blogID=”999″ blogteststring=”Somestring”}
I have the following in my template:
{blogroll blogID=”1927″ blogteststring=”Keith”}
Read Phil’s page above for a more detailed explanation of those parameters!
Lag when submitting with weblogs.com ping enabled.
A number of users have told me that posting to b2 is sometimes really slow. I suspected it was because b2 pings weblogs.com and blo.gs, and this post shows that it is a problem with weblogs.com
PHP Traveller documented a way for PHP to execute commands after a browser session/request is completed. It looks like a feature that isn’t very portable across PHP versions so probably not a reasonable solution for a publicly distributed application.
The ultimate Weblogging system, outlined
Mathew outlines his requirements for a weblog. Certainly worth reading, and contains lots of good ideas. Sam Ruby questions “the need for a database”, but I think it’s practically impossible to create a decent weblog or information storage/retrieval system without one. You’ll only end up implementing those functions of the database anyway, even if by hand, ftping files up to a server and changing links, etc.
b2++ – snapshot release
A new snapshot is available for download now. This release will hopefully catch when you don’t have mod_rewrite enabled sooner in the install process.
If b2++ works fine for you, you may want to download the data package as it adds the templatehelp.tpl file, missing from previous releases. (Thanks Jim for finding that one!)