Tuesday, October 20, 2009

Install New Blog Template


How to install a Template?


1. Download a template and unzipp.
2. Go to the Layout section in your blog (Dashboard → Layout → Edit HTML ).
3. Supports your previous template (Download full Template).
4. Find and upload your template.
5. Enjoy your new blog design.

Why I can not install templates blogger? Blogger throws an error.

There are several possible factors that cause an error Bx-xxxx:

  • The code is directly copied, and Blogger did not interpret it.
  • Temporarily not accepting Blogger templates with certain codes or gadgets.

Possible solutions:

  • Remove widgets or gadgets that come with the template downloaded.
  • Clear your browser’s cookies.
  • Trying to upload the template with a different browser (Opera, Firefox, Chrome, etc).
  • No copy and paste the code directly, upload the xml file.
  • Wait 24 hours and try again.

How do I customize my template?

For color and the font size, some Blogger templates offer an option to change it from the Dashboard (Dashboard → Layout → Fonts and Colors).

Major changes in the templates needed to know at least a little CSS and HTML. A quick way to modify a template is change the images in the CSS code. That is the process to change the header of a design, for example.

Additionally, some templates have their own settings instructions and customization, refer to the same download page of your template.


How can I edit the menu of my template?

1. Most templates have a menu that can only be changed from the HTML (Dashboard → Layout → Edit HTML). In many cases the code to look for is:

 

There you can change the expr:href=’…’ with your own links: href=’mylink’. Also see the instructions in your template for more information.

2. Some templates include a gadget to edit the menu directly from the Dashboard (Dashboard → Layout → Page Elements).

Thursday, October 1, 2009

PHP: How to Get the Current Page URL

If you want to get the current page URL that is shown in the browser URL window, Here is how you can do that:

Add the following code to a page:

function curPageURL()
{
$pageURL = 'http';

if ($_SERVER["HTTPS"] == "on")
{
$pageURL .= "s";
}
$pageURL .= "://";

if ($_SERVER["SERVER_PORT"] != "80")
{ $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
}
else
{
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;}
?>

You can now get the current page URL using the line:


echo curPageURL();


Sometimes it is needed to get the page name only. The following example shows how to do it:
{
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}
echo "The current page name is ".curPageName();?>

Reference site
..

Thursday, July 23, 2009

PHP: Past ValueThrough Link

php Syntax (Toggle Plain Text)

1. $prop_id = '$_GET[prop_id]';

2. In a href tags >> =\"submit_docs.php?prop_id=".$prop_id."\"
Then close the a tag.


..

Tuesday, July 14, 2009

Wordpress: Move Site To New Server Issue

Case 1:
We plan to migrate our local www to outside server .. all related files transfered successfully.. and we decide to seperate between files(www) directory and the database(mysql).. all transfered and dump successfully to their own server.

After edit the configuration file(wp-config.php).. the main page can display well.. but all the created menu links does not go to the right url. The WordPress address (URL) not change as is the url setting in vhost.

Problems:

1.Page wp-admin page cannot appear
2. WordPress address (URL) not change as is the url setting in vhost.
3. The home page looked fine but all permalinks returned a ‘404 Not Found’ error.

Solution and action taken:

For problem no.1 and 2; the problems come from the General Setting that store in the database. Because of the admin page cannot be open, we need to edit the url setting through mysql wether using command or phpmyadmin...The url edited in table wp-options.
Make sure the grant permission is right. After settle that, the admin page can be appeared and the created menu links corrected to specify new url.. but the no. 3 problem still not solve.

Solution No. 3:

WordPress 404 Not Found Problem

In my case after a move of my site, I checked and double checked and it was NOT the .htaccess problem instead, the new apache httpd.conf had:

AllowOverride None

I changed it to:

AllowOverride All

and did an apache stop/start. Problem solved, and the .htaccess started applying again.

The problem successfully solve!!.. I'm happy now... :)


..

Thursday, July 9, 2009

Drupal: Multilanguage

Content Translation
http://drupal.org/handbook/modules/translation

Local: Multilanguage Support
http://drupal.org/handbook/modules/locale

Translation for Download
http://drupal.org/project/Translations

Localization Server
http://drupal.org/project/l10n_server

Internationalization
http://drupal.org/project/i18n

Menu Translation
http://drupal.org/project/menutranslation

Active Translation Module
http://ftp.drupal.org/files/projects/active_translation-6.x-1.3.tar.gz

Consistent Language Interface
http://drupal.org/project/languageinterface

Module
:
http://ftp.drupal.org/files/projects/languageinterface-6.x-2.1.tar.gz


This module provides a language switching block that is very similar to that provided by the core locale module, however its behavior differs from the locale block in several ways:

1. The visibility of language links in the block is consistent and independent from the existence of translations for the page that you are viewing. The logic here is that the user should be able to change the language of the interface at all times. This is important because often there are menus and blocks that are language specific and the user should always be able to find the link back to their language.

*** For those who would like to have it so that languages which are not translated also do not have language links you should use the Language Icons module in conjunction with the core Locale module. ***




..

Friday, June 12, 2009

5 Ways to Use Google Docs as a Freelance Web Designer

As a freelance web designer, Google Doc is an excellent tool to operate my day to day business.

  1. Writing Blog Posts

    If I want to write a new article that I'm unlikely to finish in one sitting, I'll create a new document in Google and get to work.
  2. Sharing Quotes With Agencies or Other Designers

    Create a new Google spreadsheet, get all the numbers and line items in there with a total, and then share it via email. They're free to modify it so that I can see the changes, and also to copy and paste the data into their own format. This allows the quoting process to be more collaborative and not so one sided.
  3. Maintaining an Ongoing List of Projects

    I'm current writing a web app to replace this useful task, but a simple spreadsheet nails it pretty well in the meantime. Whenever I create a quote, I'll add that project and it's expected value to a Google spreadsheet that maintains an ongoing history of projects month by month.

    This allows me to see a total of potential income for each month, compare it to previous months, and also to see after every month what percentage of potential jobs and payments actually came into fruition. This is helpful in determining how much I need to sell on a month to month basis to maintain a regular income.

  4. Personal Budgeting

    This is closely related to the last item. I keep a list of my recurring bills in a Google spreadsheet, with totals that need to be paid from each account. For example, I use my Mastercard to pay for things like hosting, telephones, internet, and other automated payments, so my spreadsheet lets me know a minimum balance I need to maintain. I use my bank account to pay my rent, gas, food and other bills and my spreadsheet gives me an idea of how much I need to live on.

    As an added note, I also use Wesabe to maintain a historical record of my spending on everything by tag. So I can add stuff like lattes, or movies to my Google spreadsheet to get an idea of what I'm likely to be spending the next month!

  5. Miscellaneous Spreadsheets

    Whenever I want to add anything and keep track of it, I create a new Google spreadsheet. It's become invaluable to me! For example, this month I've been planning to launch a creative shared space for tech freelancers in my city (Nanaimo), and I've kept a list of potential expenses, who wants to be involved, how much everyone will pay, and how much is left over.

  6. Wrapping Up

    This is how I use Google docs to run much of my freelance business. Let me know if you have any other clever ideas by commenting below.

Tips by: shawn@nerdburn.com

Tuesday, June 2, 2009

Drupal: How to hide/delete/display Page Title

First Case:

I need to hide/delete title Announcement .... in list of announcement page.

Solution:
  1. Go to sites/all/theme/yourtheme/views-view-unformatted.tpl.php
  2. Edit the php script.
  3. Save and refresh the page.
  4. See the changes.
*** To change format for announcement also in this file


Second Case:

I want to remain display page title in any particular page.

Solution:
  1. Go to sites/all/theme/yourtheme/page.tpl.php
  2. Edit the php script.
  3. Save and refresh the page.
  4. See the changes.