posted on March 29th, 2008 ·
I had installed Joom!Fish on my Joomla! site to support Mandarin Chinese. When Extended Menu module is installed, I got an error like “Deprecated use of Mambelfish …”
After some search, I fixed the problem by:
“comment line that is line $GLOBALS[ ‘mosConfig_mbf_content’ ] = ‘1′; .
This is inside mambots/system/jfdatabase.systembot.php.”
Detailed discussion can be found at: http://www.joomfish.net/forum/viewtopic.php?f=6&t=91
Tags: General
posted on December 31st, 2007 ·
function get_short_text ( $t_str, $n = 100 ) {
// this function strips out all html tags, then take the first n chars of the string, but always stops
// at whole words
// strip out html tags
$search_tags = array (”‘<script[^>]*?>.*?</script>’si”, // Strip out javascript
“‘<[/!]*?[^<>]*?>’si”); // Strip out HTML tags
$replace_tags = array (”", “”);
$t_str = preg_replace($search_tags, $replace_tags, $t_str);
if ( strlen( $t_str ) > $n ) {
$t_str = substr( $t_str, 0, $n );
// trim off partial word at the end
$pos = strrpos( $t_str, ‘ ‘ );
$t_str = substr ( $t_str, 0, $pos + 1 );
}
return $t_str;
}
Tags: General
posted on December 26th, 2007 ·
I had been trying to edit the hosts file on vista but always receives a message saying no privilege. I didn’t even recall setting up an admin user during vista installation.
Finally found a solution on the Internet:
http://www.maximumpcguides.com/edit-the-windows-vista-hosts-file/
- Open Notepad with Administrative privileges by clicking Start, All Programs, Accessories, and then right-click Notepad and select to open as Administrator.
- Now that Notepad is open with Administrative privileges browse to (C:\Windows\System32\drivers\etc) in Notepad and open the hosts file.
Thanks Brent!
Tags: General
posted on December 3rd, 2007 ·
I prepared a list of customers to send holiday card to then needed to print them out. Spent some time figure out things since this is the first time I used Mail Merge. Here are the steps that worked for me:
- Exported customer’s list from Quickbooks into an Excel file
- Cleaned up Excel file to removed duplicates, etc.
- [important] set up data for Mail Merge - refer to: http://office.microsoft.com/en-us/excel/HP052037601033.aspx for detailed instructions
- Create a new Word doc, and follow the instructions on http://office.microsoft.com/en-us/excel/HP052037601033.aspx
- TIP: in step #9 of the above Microsoft help page, on “Arrange Your Labels” screen, you will need to click on “Address Block” on the top right section to bring up a dialog box, then click on the button “Match Fields …” to open up the dialog box to match your fields to Mail Merge. But if you had named your columns intelligently, use names like “first name”, “last name”, etc. then the “Matching” is not necessary
Tags: General
posted on November 29th, 2007 ·
Please consult the original documentation for examples and more information.
Usage Example:
$format = "'l M j, y \a\t g:iA'";
date($format, strtotime($date_str)
Result: “Thursday Nov 29, 07 at 2:09PM”
| Format Character |
Description |
Example returned values |
| Hour |
| H |
24-hour format of an hour with leading zeros |
00 through 23 |
| G |
24-hour format of an hour without leading zeros |
0 through 23 |
| h |
12-hour format of an hour with leading zeros |
01 through 12 |
| g |
12-hour format of an hour without leading zeros |
1 through 12 |
| a |
Lowercase Ante meridiem and Post meridiem |
am or pm |
| A |
Uppercase Ante meridiem and Post meridiem |
AM or PM |
| Minutes and seconds |
| i |
Minutes with leading zeros |
00 to 59 |
| s |
Seconds, with leading zeros |
00 through 59 |
| Timezone |
| O |
Difference to Greenwich time (GMT) in hours |
Example: +0200 |
| Z |
Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive. |
-43200 through 43200 |
| T |
Timezone setting of this machine |
Examples: EST, MDT … |
| I (capital i) |
Whether or not the date is in daylights savings time |
1 if Daylight Savings Time, 0 otherwise. |
| Day of week |
| l (lowercase ‘L’) |
A full textual representation of the day of the week |
Sunday through Saturday |
| D |
A textual representation of a day, three letters |
Mon through Sun |
| w |
Numeric representation of the day of the week |
0 (for Sunday) through 6 (for Saturday) |
| Day of month |
| d |
Day of the month, 2 digits with leading zeros |
01 to 31 |
| j |
Day of the month without leading zeros |
1 to 31 |
| S |
English ordinal suffix for the day of the month, 2 characters |
st, nd, rd or th. Works well with j |
| t |
Number of days in the given month |
28 through 31 |
| Month |
| F |
A full textual representation of a month, such as January or March |
January through December |
| M |
A short textual representation of a month, three letters |
Jan through Dec |
| m |
Numeric representation of a month, with leading zeros |
01 through 12 |
| n |
Numeric representation of a month, without leading zeros |
1 through 12 |
| Year |
| Y |
A full numeric representation of a year, 4 digits |
Examples: 1999 or 2003 |
| y |
A two digit representation of a year |
Examples: 99 or 03 |
| L |
Whether it’s a leap year |
1 if it is a leap year, 0 otherwise. |
| W |
ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0) |
Example: 42 (the 42nd week in the year) |
| z |
The day of the year (starting from 0) |
0 through 365 |
| Preformatted |
| r |
RFC 2822 formatted date. Equivalent to ‘D, j M Y H:i:s O’. |
Example: Thu, 21 Dec 2000 16:01:07 +0200 |
| U |
Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) |
See also time() |
| B |
Swatch Internet time |
000 through 999 |
Tags: General
posted on November 8th, 2007 ·
Last week, I spent some time customizing a Pligg installation. After reading many pages of code to familiarize myself with the process, I decided to share my findings in hopes that it will be helpful to some others who also need to customize the look of a Pligg site. Click here to read the whole article.
Tags: General
posted on November 3rd, 2007 ·
I was working on a project today and found that the content in a table I created all squeezed together, even though that I had set “cellspacing=10″.
After some investigation I found that in the CSS code, padding and margin of all elements was removed:
body * {
margin: 0;
padding: 0;
}
I could, in theory, define a table with padding. But setting margin and padding to 0 for all elements is not a great idea in general. Unless you DO want to define style of ALL element by hand.
A better approach is to be specific only to specific elements.
Similarly, I noticed that on many website, just because ul is used for navigation items, the “list-style” is changed in general:
ul li {
list-style:none;
….
}
Doing this will cause all unordered-list to lose the bullets unless you define another style.
A better approach is to be specific:
#nav ul li {
list-style:none;
….
}
Tags: General
posted on February 12th, 2007 ·
DotNetNuke is suitable for a small, local community with defined
feature needs like, for example, a reading club:
* The site can be created within a few minutes
* The site can be customized with an uploaded logo
* The admin can add pages to the site
* The admin can easily add an event calendar
* The color of the headers, fonts, and background can be changed
* The site offers high-end access control, so the admin can control,
down to the page level, what public sees, what admin sees, and
what registered/logged-in user sees
But without spending a good deal of time, it’s difficult to:
* Add or modify even a small feature that was not already there
* Re-skin the page to look exactly like a PhotoShop design provided
by a designer
Tags: CMS
posted on December 26th, 2006 ·
Continuation to my post on Nov 27th about Salesforcs vs. Appshore .. during my one month trial period with both applications:
Salesforce:
- sent me account activation email
- sent me several emails asking for feedback
- account manager called and left a message, asking me to call and talk about my experience with sales force, offer to help
- account manager followed up her call w/email, asking me to call or email back. I emailed back saying that I would contact her if I needs to.
- 1 week before the end of my 1-month free trial, I received an email about participating a 90-min usability testing for $50 amazon gift certificate
- 2 days before the end of my free trial, received email about subscribe to the service (pay) or convert to free lifetime personal account
Appshore:
- account activation email is the only email they send out proactively
- good support by phone, when you call them
Tags: Web Apps
posted on November 27th, 2006 ·
Seeing business cards filling shoeboxes and me spending more time searching for a phone number of a contact … .I decided it’s time for a serious CRM (Customer Relationship Management) application.
Once again, BCM for Outlook crashed my poor WIN XP, so I uninstalled it totally. ACT! is tedious to integrate with Outlook and also only locally sits on my computer. I narrowed down my options to Salesforce and Appshore.
Signed up for trial accounts with both and used them for a number of days … here is what I experienced.
Overall, salesforce is a BETTER app than appshore:
- user interface is more polished (while appshore looks more home-grown)
- more features and more flexible
But more features means more complex user interface.
Appshore is a simpler app, and has bugs here and there. They didn’t do their homework too well. However, user Interface is simpler than salesforce, and more intuitive in some cases.
I didn’t use salesforce that much yet. So the fact that I didn’t encounter any bugs might not mean it’s bug free but just from the polished look, I tend to think it has less bugs than appshore.
For now, I would probably stay with appshore simply because it cost much less and the features are sufficient for me.
Tags: Web Apps