Drupal for Dummies

February 18, 2010

How to create a directory in Drupal with CCK/Views

1. Download CCK (http://drupal.org/project/cck)
2. Download Views (http://drupal.org/project/views)
3. Navigate to Administer > Content Management > Content Types
4. Create one called “directory entry” or whatever you like
5. Go back to Administer > Content Management > Content Types
6. Click the Add field link that corresponds to your new content type
7. Select the options for your new field
8. Repeat for all necessary fields (list of fields: http://drupal.org/node/3478#comment-7858)
9. Clone one of the default views (if you have Organic Groups use the “og” view)
10. Configure the view to use the data from your directory entry content type.

Firefox Add-ons for Dummies

February 16, 2010

Testing
1. Create fsrtoolbar@dannyzhang.wordpress.com text file with no extension
2. Inside the text file, put in folder path of where install.rdf resides
eg. D:\Projects\FirefoxEntensions\SERPRank\dev\branches.3.0\fsrtoolbar\
3. Uninstall any existing version of the add-on
3.1 Close Firefox
3.2 Navigate to C:\Documents and Settings\[currentuser]\Application Data\Mozilla\Firefox\Profiles\ghbqw83s.Developer\extensions\
3.3 delete fsrtoolbar@dannyzhang.wordpress.com from there if one already exists
3.4 Start Firefox app

4. Installing the add-on
4.1 Close firefox app
4.2 Copy the text file to C:\Documents and Settings\[currentuser]\Application Data\Mozilla\Firefox\Profiles\ghbqw83s.Developer\extensions\
4.3 Start Firefox

Releasing

Packaging file as zip but give it .xpi as extention

See this for instructions

http://roachfiend.com/archives/2004/12/08/how-to-create-firefox-extensions/#testing

Installing

to install xpi file to Firefox, drag and drop .xpi file on to FireFox Add-ons manager

source: http://www.browserland.com/how-to/how-to-install-xpi-and-jar-firefox-add-ons-and-themes/

CSS Tricks

July 2, 2009

How to Override Inline CSS Styles

Explaination: Inline styles have the highest priority of all CSS, well, in general.  There is a way to override inline styles from an external stylesheet. This will force the text in the sponsored tag to become width 550px in the example Below. I’ve tried this in IE7, IE8, Firefox 3, Firefox 3.5, Safari 4, Chrome.

Keep in mind to only use this technique when you have no other alternatives.

eg

The “Sponsored Links” text will end up with width 550px, not 500px

<!– external stylesheet –>

<style type=”text/css”>

{

.sponsored { width: 550px !important; }

}

<!– Inline styles are those defined in the HTML –>

<span id=”ctrlTop” style=”width: 500px; display: block;>

<div id=”ctlHeader class=”sponsored>Sponsored Links</div>

</span>

How to create a box that is expandable in height?

<!– HTML –>

<div id=”masthead”>

<div id=”left”>left content goes here</div>

<div id=”right”>right content goes here</div>

<div class=”clear”></div>

</div>

<!– css –>

#masthead
{
position:relative;
min-height:180px;
width:897px;
clear:both;
border-left:solid 1px #CCCCCC;
border-right:solid 1px #CCCCCC;
}

#masthead

{

position:relative;

min-height:180px;

width:897px;

border-left:solid 1px #CCCCCC;

border-right:solid 1px #CCCCCC;

}

div#masthead .clear

{

clear:both;

}

SEO Baidu

June 29, 2009

Baidu

Submit sitemap to Baidu using following 网站登录 link. In the input field, key in the full url of your sitemap index file if you have one, else just key in the full site url.

http://www.baidu.com/search/url_submit.html

Asp.net Resource inline and code behind

June 25, 2009

Local Resource

Inline:

<asp:Localize runat=”server” ID=”locSponsoredResults” meta:resourcekey=”locSponsoredResultsResource” />

SponsoredHeaderText=”<%$ Resources:locSponsoredResultsResource.Text%>”

<asp:Image ID=”imgPhoto” runat=”server” meta:resourcekey=”imgPhotoResource” /> having imgPhotoResource.ImageUrl defined in .resx file

Code behind:

Me.GetLocalResourceObject(“locSponsoredResultsTopResource.Text”).ToString()

Global Resource

Inline:

<%= GetGlobalResourceObject(“resourceset”,”resourcename”) %>

Text=’<%$ Resources:AppInfo, Title, “Company Name” %>’

where AppInfo is the global resource set, Title is the resource name, and “Company Name” is the default value

Code behind:

this.GetGlobalResourceObject(“resourceset”,”resourcename”)

Omniture Test & Target Speeding Up Admin Page Load

June 17, 2009

Problem: Omniture slow Page load in Admin

Explaination

After login into Omniture Test & Target Admin section. Navigating from page to page is very slow. This is because of SSL. One way to improve this is to add all known Omniture SSL sites to the “Trusted sites” list in IE

Fix

IE -> Internet Options -> Security tab -> Trusted sites -> sites -> add the following items

  • https://*.offermatica.com
  • https://*.omniture.com
  • https://*.omtrdc.net

IE Security Settings for Speeding Up Omniture

Annoying IE8 Security Warning Fixed

‘Do you want to view only the webpage content that was delivered securely?’ annoyance?

Going  to Tools->Internet Options->Security
Select the ‘Security’ tab
Click the ‘Custom Level’ button
In the ‘Miscellaneous’ section change “Display mixed content” to Enable
  1. Going  to Tools->Internet Options->Security
  2. Select the ‘Security’ tab
  3. Click the ‘Custom Level’ button
  4. In the ‘Miscellaneous’ section change “Display mixed content” to Enable

Setting Up Virtualbox on Windows XP Host and Windows 7 Guest

May 28, 2009

SATA Disk

To be able to use SATA disk, install “Intel Matrix Storage Manager” by following link below.

http://matt.bottrell.com.au/archives/265-Improving-VirtualBox-performance.html

IntelliMouse “Back” button still not working

Getting “Cannot access the kernel driver” error after upgrading VirtualBox?

Here is a fix that works for me:

Re-install VirtualBox by running the installation .exe, select “Repair”, and then following the Installer instruction to complete the re-install.

Once re-install is completed, you should be able to start your existing virtual machine by running VirtualBox

Port Forward

The following link is bout port forwading instructions

http://www.brainyautomation.com/blog/post/VirtualBox-2b-Windows-2003-Server-2b-LAN-!3d-working3b.aspx

Setting Up Windows Server 2008 for ASP.NET Development

May 20, 2009

IIS 6 Compability
When you are trying to run your website in debug mode, you are prompted with error about IIS 6 Compability Component. Here is you can find the instruction of how to install it.

IIS 6 Compatibility Components Not Installed

SQLExpress 2005 and Enabling FullText Indexed

Windows server 2008 user Account Control (UAC)
Disable it so that you can see full “Options” for VS.NET

Hello world!

May 19, 2009

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!


Follow

Get every new post delivered to your Inbox.