b2evo: maintenance mode
Categories: b2evo
Tags: b2, maintenance
i’ve been looking all over back office for this option but couldn’t find it. turns out you need to physically edit source files.
edit ‘conf/_basic_config.php’. locate $maintenance_mode and set it to 1. remember to set it back to 0 once it’s done.
2008-08-12 12:49:22 • Link • Comments • Trackbacks
wow: item tool tips
Categories: javascript, b2evo
Tags: b2, itemstat, javascript, wow, wowhead
i’ve been wanting to add item tool tips to my wow blog. you know, the cool popup text displayed when you move your mouse over an item link. like how it looks in-game.
the first came to mind was itemstats, which i’ve used to setup websites for my previous guilds. however it does not support b2.
since there will be no further developments on itemstats, i thought about doing a plugin. but i need to learn how to write a plugin and it seems complicated. the project was put aside.
then i discovered wowhead tooltips (via reading posts from blog azeroth). it’s even simpler to implement, but requires additional steps to use.
i did some minor modifications to instruction.
add this anywhere on the page:
Code:
<script type="text/javascript" src="http://www.wowhead.com/widgets/power.js"></script> |
note: i put this in the skin’s index.main.php. this is perhaps not the best way. if you change your skin, it will not work. but if you’re sure you will never change to another skin, then it shouldn’t be a problem.
where you want to place the link:
Code:
<a class="qx" href="http://www.wowhead.com/?item=number">name</a> |
go to wowhead to look up the item / spell you want. copy and paste name and url.
for class qx, replace x with numbers 0 to 5 to indicate color of the link / item:
- 0 - gray - poor
- 1 - white - common
- 2 - green- uncommon
- 3 - blue - rare
- 4 - purple - epic
- 5 - orange - legendary
no need to define these colors in your own css. it’s all done for you.
if background of your site is white, you will have problem displaying the white item.
2008-08-03 00:24:13 • Link • Comments • Trackbacks
b2evo: edit and delete links in comments
Categories: b2evo
if you’re the owner of the blog, you will see links to ‘edit’ or ‘delete’ a particular comment. by default it’s shown with image and a text.
to removed the image the links, copy ‘_item_comment.inc.php’ to the skin directory. locate text $Comment->edit_link and $Comment->delete_link. replace the 3rd parameter to the text you want.
2008-07-08 12:13:52 • Link • Comments • Trackbacks
b2evo: multiple installations and subdomains
Categories: b2evo
i installed another b2 site. after installation, i could not login. this was the error:
Either you have not enabled cookies or this login window has expired.
i’ve installed a few b2 sites. this is the first time it happened. cookies were definitely enabled.
after installation, b2 assigned an initial admin password. copy and paste didn’t work. typed in the letters one by one didn’t work. i even tried to reset the password. nothing worked.
this is my first install from scratch from the first official stable version. i thought this could be the problem.
then it turns out it’s the cookies. thanks to cookie viewer from firefox addon – web developer. i could see 2 identical cookies for this site and the new site.
perhaps a bit of explanation. the new site uses subdomain of this site. so it looks like the new site tried to retrieve the wrong cookie information. hence login didn’t work.
the fix? edit ‘conf/_advanced.php’, change $instance_name.
btw, i got the answer by posting my problem at b2’s forum. excellent response time – it’s easter and i didn’t expect such quick response!
2008-03-23 17:23:53 • Link • 1 comment » • Trackbacks
upgrading b2evo
Categories: b2evo
this site has been successfully upgraded from a pre-beta version to V2.3.0. the upgrade is really easy and painless. there’s an official upgrade guideline. this is my modified version.
most important of all, backup all files and database!
to make sure this site is still unaffected while being upgraded, i installed the site from a different internal domain. i’m hosting the site with my own server, so this is not a problem.
upload the files from new version to an upgrade directory. refer this as the upgrade site. copy conf/_basic_config.php from production to the conf/ in upgrade directory. also copy the site’s skin to skins/ subdirectory. if you have any plugins and medias, copy those subdirectories as well.
now access the upgrade site via browser. follow the instruction and choose upgrade option. once the process is done, rename the production directory to a backup name and copy all files from blogs/ to the production directory.
voila! the site runs as if nothing happened!
for sites with high traffic
where there may be more database updates, such as comments, you might want to turn on maintenance mode at the original site. just so the upgrade process will not affect your data and vice versa.
before the upgrade, edit ‘_conf/_basic_config.php’ at the production site, locate and update $maintenance_mode to 1. visitors will see maintenance message.
once the upgrade site is renamed to the production directory, the site will run as normal.
2007-12-30 21:55:24 • Link • Comments • Trackbacks
