b2evo: change default text for read more and follow up

by prettyscripts on 2010-03-10 14:37:27 • Leave a comment »

phpb2evolution

based on the source code (this is V2.4, but it's similar in V3), you need to set correct parameters for $Item->more_link(). the parameters are link_text (defaults to 'Read more') and anchor_text (defaults to 'Follow up'). for most skins this functio… more »

Tags: b2evo, more, skin

b2evo: author links to website instead of user page

by prettyscripts on 2010-03-09 11:47:53 • Leave a comment »

phpb2evolution

in the skin, the function call to show author of a post is $Item->author(). by default it links to user page. i wanted to link to user's website. there aren't much information on how to use this function and the doc is outdated. source code is alway… more »

Tags: author, b2evo, link, skin

php: date difference in days

by prettyscripts on 2010-02-19 11:19:00 • Leave a comment »

php

there are a few ways to calculate how many days between 2 given dates. the following examples calculates how many days to x'mas from today (19/2/10).method 1 using gregoriantojd($month, $day, $year) function to find out the julian day count. withou… more »

Tags: date, day, php

css and ie: clear

by prettyscripts on 2010-02-16 11:12:26 • Leave a comment »

css

i always have a clear class in my css to clear any floating elements:.clear { clear: both; } and commonly used in html code such as follows:<div id="floating_1">something</div><div class="clear"></div><div id="float… more »

Tags: clear, css, ie

php: undefined offset and undefined index

by prettyscripts on 2010-02-11 10:36:45 • Leave a comment »

php

sometimes the following notice is displayed when accessing array:PHP Notice: Undefined offset [number] in /path/to/your/file.php on line [number] or this:PHP Notice: Undefined index [number] in /path/to/your/file.php on line [number] this means t… more »

Tags: notice, php, undefined