boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

b2-smarty - new snapshot release, name change!

 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
donncha



Joined: 18 Feb 2003
Posts: 43
Location: Cork, Ireland

PostPosted: Thu Apr 17, 2003 10:28 am    Post subject: b2-smarty - new snapshot release, name change! Reply with quote

For the impatient, go to http://cork.linux.ie/filemgmt/singlefile.php?lid=5 to download it.

I've decided to rename my b2-smarty mod, and call it b2++ now. The Smarty modification is just one of a number of enhancements I made so I think this name fits the bill a bit better.

This release is a snapshot of what will become release 0.4 of b2++. It works, it's stable and I've fixed a number of bugs: (copied from the download page above)

New in 0.4
==========
1. Major modifications to the install process.
* The installer will now check for incomplete installations, it'll stop if you haven't copied the data directory in properly.
* It will check the database configuration.
* It won't reconfigure b2++ unless you delete the previous configuration files.
* I removed the b2InstallUser, this may be replaced by a hash value for security in the future.
* Database/table creation will silently fail instead of printing errors.
* A user with the same name as the weblog ID will be created.
* If you have register_globals off the installer will stop.
2. Comment posting has been fixed.
3. Problem with other users only seeing the root archives fixed.
4. Added bluedash theme.
5. Fixed some url errors in the templates.

If you can't post comments to your blog entries, and you don't want to overwrite your templates, take a look at http://blogs.linux.ie/archives/p/11/more/1/c/1 where I've described a simple fix for this.
Back to top
View user's profile Send private message Visit poster's website
Candle



Joined: 23 Dec 2002
Posts: 547

PostPosted: Thu Apr 17, 2003 7:47 pm    Post subject: few things Reply with quote

After install is done it sends email to admin with link and password , email has link http://root/b2login.php
Index.php gives error on line 10 .
b2login.php gives error "can't find b2functions.php " and thats as far as I can get .
_________________
My Game Forum
Back to top
View user's profile Send private message
albert



Joined: 11 Oct 2002
Posts: 52

PostPosted: Fri Apr 18, 2003 10:28 pm    Post subject: Reply with quote

Wait, so what kind of stuff does your "b2++" have that reg b2 doesnt?
_________________
"so fresh so clean"
Back to top
View user's profile Send private message AIM Address
jedi



Joined: 13 Mar 2003
Posts: 3

PostPosted: Sat Apr 19, 2003 8:09 am    Post subject: Reply with quote

b2++ has great features to offer

I am currently testing it out and Donncha is also assisting me for that.

some of the great features that i like is...

1. the option to install your own b2 or to offer others to signup on your b2 and they can have their own blog instantly
2. all signups will be automatically included on your main blog page directory
3. templates are already available on your admin panel and you can back up any excisting template for future use upto 5 times/template
4. Customizing template has never been easier with the use of smarty of course

check out www.blogs.linux.ie and sign up there, i have mine there also www.blogs.linux.ie/blogph

if you will install it on your server, your friends/visitors can signup to you and they can have their own blog like this www.yourdomain.com/yourfriendsblog

There are some minor bugs i've encountered so far, but donncha is very helpfull
_________________
This is my first attempt using B2!!!
http://www.blogph.com
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
eadz



Joined: 06 Apr 2003
Posts: 28
Location: Auckland, New Zealand

PostPosted: Sun Apr 20, 2003 6:58 am    Post subject: Reply with quote

I installed it and have a few comments..

First, the install was a bit confusing with the data directory not in the html directory, and it wasn't that clear which directory it was supposed to be in.

It seems that the directories in data are supposed to be in "html"
. If this is the case then please put them in the html folder to begin with!

Other than that the install went well.

b2-smarty seems to be a bit slower than plain b2, and I havn't had a chance to fully look through the code, but looking at post.tpl it seems that this would be displayed for every post.

so when you loop through the blog entries, you $Smarty->display("post.tpl") ?

This means that a file is included() for every entry - a lot of unneccery disk accesses.

A better approach would be to have {section name=entries loop=$i} at the top of post.tpl, and {/section} at the bottom. Then in the loop that displays post.tpl assign all the posts to an array. This way it will just loop through the entries in the template, saving x num of include()'s.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
donncha



Joined: 18 Feb 2003
Posts: 43
Location: Cork, Ireland

PostPosted: Tue Apr 22, 2003 10:10 am    Post subject: b2++ install, include vs section Reply with quote

eadz wrote:
I installed it and have a few comments..

First, the install was a bit confusing with the data directory not in the html directory, and it wasn't that clear which directory it was supposed to be in.

It seems that the directories in data are supposed to be in "html"
. If this is the case then please put them in the html folder to begin with!

Other than that the install went well.


The reason I seperated out the src and data directories was to make upgrading easier. It's much easier to simply copy over src/*.* to the b2 directory because code there shouldn't have to be modified at all. The files in data/ are supposed to be modified (ie. you change the default template to your own design)
I went to a lot of trouble in the last release to document where things go. I might need install scripts like install.sh or install.bat (what does the Mac use? Can someone help me there?)

eadz wrote:

b2-smarty seems to be a bit slower than plain b2, and I havn't had a chance to fully look through the code, but looking at post.tpl it seems that this would be displayed for every post.

so when you loop through the blog entries, you $Smarty->display("post.tpl") ?

This means that a file is included() for every entry - a lot of unneccery disk accesses.

A better approach would be to have {section name=entries loop=$i} at the top of post.tpl, and {/section} at the bottom. Then in the loop that displays post.tpl assign all the posts to an array. This way it will just loop through the entries in the template, saving x num of include()'s.


It could be slower yes, but only when they content isn't cached. 99% of the time, unless you update your blog every couple of seconds, and/or comments are posted *all* the time it should work significantly faster as the cached output is the equivalent of printing out a flat html file.
I don't think there's much of an overhead including files either. The OS filesystem will cache the file in memory. What I do know is that allocating large chunks of memory in PHP is *very* slow, and on a multi-blog system it could bring down a small server.

The Smarty guys recommend running a PHP Accelerator. I've used http://www.php-acclerator.co.uk extensively and it rocks. Smile

I gave some thought to a rewrite of b2 yesterday. It will hopefully feature chains of plugins. There's be an input chain (ie. search, category, month/day view), an output chain (ie. css, unicode, wap, language translation), and a misc chain (metadata - google search on post title, pingbacks, trackbacks..)
I'll also use PHP objects to encapsulate the weblog and posts. Not 100% sure how yet though. I left my notes at home too so I'm writing this from memory!

I looked at the Smarty register* functions yesterday, looks perfect for implementing plugins that provide tags. More info:
http://smarty.php.net/manual/en/
http://smarty.php.net/manual/en/api.register.function.php
http://smarty.php.net/manual/en/api.register.modifier.php

Donncha.
Back to top
View user's profile Send private message Visit poster's website
donncha



Joined: 18 Feb 2003
Posts: 43
Location: Cork, Ireland

PostPosted: Fri Apr 25, 2003 12:43 pm    Post subject: New b2++ snapshot Reply with quote

Andreas Banze discovered a major bug in b2options which I've fixed in a new snapshot. If you edit your options on that page they'll be erased and you'll have to reconstruct your users/$username/b2config.php again.
This snapshot also has 2 other minor changes.

Read about it on http://cork.linux.ie/admin/story.php?mode=edit&sid=20030425123133709

I've also started using the Smarty plugin facility on http://blogs.linux.ie/ - I added a "googleit" plugin which you can find more info on here: http://blogs.linux.ie/xeer/archives/p/89490268/more/1/c/1

It also links to the actual template used on my blog showing usage, basically just add
{googleit search=$the_title}
to your template to add Google searches of your blog entries Smile
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group