Replace column substring SQL Server columns

by Caroline on June 21, 2007

Replace all instances of FINDTHIS with REPLACEWITHTHIS in columns COLUMN1 and COLUMN2 of table TABLE where those substrings are in fact found

update TABLE set
COLUMN1=REPLACE(COLUMN1,’FINDTHIS’,'REPLACEWITHTHIS’),
COLUMN2=REPLACE(COLUMN2,’FINDTHIS’,'REPLACEWITHTHIS’)
from TABLE
where
COLUMN1 like ‘%SUBSTRINGPIECE%’ or COLUMN2 like ‘%SUBSTRINGPIECE%’

{ 0 comments }

Cool Duplicate Joomla Menu Trick

by Caroline on April 27, 2007

Apply the same menu to the home page and the inner pages, but have the appearance change from home to inner:

  1. Create the content
  2. Create the menu (mainmenu)
  3. In modules, assign the menu to the pages it should appear (everything but Home)
  4. Copy the mainmenu module to mainmenu_home
  5. In its module properties assign it to the Home navigation items
  6. Put the 4 letters “home” in Menu Class Suffix and Module Class Suffix
  7. In templates/xyz/template_css.css, modify these items for the inner page menu mainmenu:
  • a.mainlevel
  • a.mainlevel:link
  • a.mainlevel:visited
  • a.mainlevel:hover
  • ul#mainlevel-nav
  • ul#mainlevel-nav li
  • ul#mainlevel-nav li a
  • u#mainlevel-nav lia a:hover

8. copy all of the above items, add the 4 letters “home” after each instance of the string “mainlevel”
9. modify mainlevelhome css elements for the home page menu decoration

You now have one menu, two modules and two css sets.

{ 0 comments }

Zen Cart UPS XML does not work with zones

by Caroline on April 2, 2007

You’re here because you want to run UPS XML for Zen Cart with zones. It configures ok if you have no zones set, but as soon as you add a zone it displays the “unconfigured” yellow icon.

The admin and the catalog both use the same code to determine if a UPS rate exists. The problem is, the admin doesn’t care about where that zone is, but the shipping checkout wants it to match the recipient’s zone. So by definition the admin can never be configured because it never matches an empty “order” zone, there’s no concept of an order on the admin end but the admin will not mark the UPS xml as “configured” until it matches this ghost zone.

It might configure ok in your store, but only if it’s set to “no zone,” which means it’ll show up for any destination whether you want it to or not. As soon as you try to add a zone it refuses to configure.

The fact is that whole paragraph of code was off, I wonder if people are using this module successfully. There’s NO WAY you could ever have configured it to do zones!

Change includes/modules/shipping/upsxml.php (upsxml.php,v 1.1.4 2004/12/19) right after the curl code setup to the following:

if (($this->enabled == true) && ((int)MODULE_SHIPPING_UPSXML_RATES_ZONE > 0)) {
$this->enabled=false;
if (empty($order->delivery['country']['id'])) {
$admin=true; }else{$admin=false;
}
/*
$check = $db->Execute(”select zone_id from ” . TABLE_ZONES_TO_GEO_ZONES . ” where geo_zone_id = ‘” . MODULE_SHIPPING_UPSXML_RATES_ZONE . “‘ and zone_country_id = ‘” . $order->delivery['country']['id'] . “‘ order by zone_id”);
*/
if ($admin) {
$sql = “select zone_id from ” . TABLE_ZONES_TO_GEO_ZONES . ” where geo_zone_id = ‘” . MODULE_SHIPPING_UPSXML_RATES_ZONE.”‘”;
} else {
$sql = “select zone_id from ” . TABLE_ZONES_TO_GEO_ZONES . ” where zone_id=’”. $order->delivery['zone_id'] . “‘ and geo_zone_id = ‘” . MODULE_SHIPPING_UPSXML_RATES_ZONE . “‘”;
}

$check = $db->Execute($sql);
if (!$check->EOF) {
$this->enabled = true;
}
}

{ 0 comments }

Programmatically determine Joomla homepage

by Caroline on March 17, 2007

If both mod_rewrite and 301’s are out in full force the home page is not going to be identifiable by a Server query_string containing “frontpage.” To determine if the current code is on the home page:

$s = filter_var($_REQUEST['QUERY_STRING'], FILTER_SANITIZE_SPECIAL_CHARS);
if (empty($s)) {

//you’re on the home page

}

{ 0 comments }

WAMP PHP 5 curl trick

by Caroline on March 7, 2007

WAMP 5 does not activate curl via the php settings/extensions options. After that menu is checked open php.ini and uncomment extension=php_curl.dll, then restart WAMP services.

{ 0 comments }

VirtueMart Authorize.net Code Changes

by Caroline on February 26, 2007

VirtueMart does not automate Authorize.net test mode. It doesn’t read classes/payment/ps_authorize.cfg.php AN_TEST_REQUEST to see if it should send test mode to Authorize.Net. A quick fix, alter

FILE CHANGE classes/ps_checkout.php lines 24, 159, 484
line 24:
define (TESTMODE,true);

Lines 159, 484, call validate with TESTMODE rather than hard-coded “false.”
159:
if ( !$this->validate_payment_method( $d, TESTMODE )) {
484:
if (!$this->validate_payment_method($d, TESTMODE)) { //Change false to true to Let the user play with the VISA Testnumber

{ 0 comments }

Animal Shelter Marketing Letter

by Caroline on February 19, 2007

More info for animal shelters needing web sites or web marketing……..

… I’ve been building/rebuilding web sites for animal rescue groups. It’s my way of giving as I don’t deal with the shelter that well. I do two basic things: 1) build the site, 2) market the organization on the web.

The web sites I build are usually built on free software called Joomla. Instead of upload stories or changing HTML directly you would login to the administrator and publish your stories from there. If I do help out we don’t have to use that system, but I do recommend it because 1) multiple people can update the site; 2) you can easily grab email addresses from people interested in your org; 3) we can often add new features really fast. For instance I can add an online store in an hour or two; it uses a wysiwyg (what you see is what you get) editor so you don’t need to know any html — really a whole lot more.

Here are all the add ons to the base product:
http://extensions.joomla.org/

The main issue, though, is marketing. I assume that you want your web site to be found when someone types in
nh shelter
dogs for adoption
Or the like.
The business of making that happen is called SEO or search engine optimization. SEO used to be mechanical and very easy to do. Now the mechanical part is just the pre-requisite to the real work of web marketing. It’s very labor intensive (takes a lot of time, though the tasks themselves are not that hard).

Successful SEO is mostly about writing, writing, writing. There are tons of ways to get the word out about your web site, some of them really help you in the search engines, some less so.

I’ll help with either of these, my standing offer is here

A few things you might want to know about me:

I’m a low stress person, I don’t want to be a CARRIER either!

I’m just here to help, if this causes problems in the org don’t ever feel like you owe me anything, it’s your organization

Really good SEO skills are marketable. If you want training to market arnne it’s a great opportunity to learn for the doggies and then use it in your career.

I’m available when you need me, please don’t stress on my account.

Best,
Caroline

{ 0 comments }

Joomla 1.5.0 Beta Installation: Two Tricks

by Caroline on February 19, 2007

Joomla 1.5.0 Beta Installation: Two Tricks

1. Do NOT enter FTP information during the installation. Whatever bad falls out of that will be dealt with later. Or, enter it but if you’re site’s slowed to nothing you’ll have to find the “off” switch

2. During database creation just go and create the database and assign a user to it first, then fill in the info on the database installation settings page. It’ll save you the hassle of finding out that you can’t programmatically create a database.

Did I say two? Here’s a third.

Get the Joomla 1.5 beta here

But then upgrade from the Joomla 1.5 nightly build here

Before debugging anything always get the latest build.

{ 0 comments }

The domain name for local listings

by Caroline on February 13, 2007

Should I Name My domain 111aaaMyBusiness.com? My employer added “a” before the domain name. Is this good for high rankings? 
When your employer added the “a” to the internet name they used the alphabetical rule of phone book directories. One service people will use to find your site is the phone book, and the phone book lists entries alphabetically. By this logic the best name is 1aaaYourNameHere.com.    

Phone Book Directories
If the phone book directories were the only source of qualified site traffic you would do well to compete for aaa- and aardvark- prefixed names. The local online directories do have some of the market. Verizon Super Pages gives customers a choice to sort listings alphabetically. Its default listing, though, is not alphabetical. The initial sort is “Standard,” i.e., the most relevant according to MSN’s algorithm. 

The customer has to scroll to the bottom and choose “A-Z” to see an alphabetical listing. She can also choose “Distance” (from the customer-entered-location), which to me is the most logical sort for a list of kitchen designers.

Yahoo Local sorts by “Top Results,” listing those results that have keywords and other Search Engine Optimization (SEO) web site features closest to the terms the customer input.

Search Engines
Super Pages and Yahoo Local are just a small potential source of your qualified web site traffic. The Big 3 search engines will drive most of the real kitchen buyers to your site. Optimizing – and marketing – your site for the Google, Yahoo and MSN search engines, while keeping the local directories in mind, will cover 99.9% of your web site traffic universe planning. Since the local directories are showing the listing results in the same order as the search engines (most “relevant” first), the first letter of the domain name is not an important factor in getting good results. Neither the local directories nor the search engines display the listing results in alphabetical order by default.

Hyphenating the Domain Name
So now the question is: What is a good domain name? Some evidence exists that hyphenating a domain name yields greater results because there’s no question about the individual words. For instance, new-hampshire-kitchen-design.com might be better than newhampshirekitchendesign.com. The hyphens are harder for humans to remember (we expect the “all one word” type of domain name).

Search engines do examine the domain name and do give it some weight. They also examine the web site’s content, title and headline tags, incoming links from other sites and quite a bit more. The domain name’s keywords can affect search engine ranking, but if those domain name keywords carried a lot of weight sites like IBM.com would be penalized for not mentioning “computer” in the name.

So we can conclude that domain names do not need to be alphabetical or contain keywords of your business in order to achieve a higher ranking. Companies that sell domains often advocate keyword-seo-friendly domain names. Search engine expert Quadszilla (despite the anonymity truly a savvy SEO) advocates using keyword-hyphenated-domain-names for better search engine result pages. Yet his domain – seoblackhat.com – is not hyphenated. SEO guru Rand Fishkin gives the keyword-domain-name (with or without hyphens) a 1/5th of 1/3rd weighting, i.e., keywords in the domain are one of five factors that in total make up 30% importance in Google ranking.

So the keywords in the domain name have some weight, and the value of a hyphenated keyword domain is debatable.

Keywords in Domain Names
One place that domain keywords do make a difference is when the keywords the user enters are an exact match to your domain. Type in a dream kitchen to see what I mean. But I checked Google and Yahoo keyword tools for nh kitchen designer, and they report that no one is searching for exactly that phrase. So the domain nhkitchendesigner.com will not be of much use in obtaining higher search engine results. 

Branding Your Domain Name
Last we have the issue of branding. Do you search for books at books.com or amazon.com? The use of descriptive phrases in your company name or domain becomes irrelevant in the face of good branding. Good branding raises positive awareness of your business in the hearts and minds of your public. When you create an image of your business as the resource for your target market the name of that business is part of the image. Prior to the success of Amazon.com, the word “Amazon” did not create an association to buying books. So if you will use excellent branding techniques for your business and your web site the business name will fuse with your popularity, but it will not create your popularity.

What Works on Google
Fishkin summarizes good Google search engine marketing. Yahoo and MSN are pretty easy by comparison. But Google drives as much traffic as Yahoo and MSN combined, so it can’t be ignored. The Google methods are, in essence, good branding. So if you want good search engine results in Google you will have to make your web site an authority site that has great content and that other, highly qualified sites link to. The name of your company / domain name becomes so small in this mix that the answer boils down to this:
- name your company and your domain according to what works in the offline world
- identify your target market
- write both offline and online magazine articles
- write a very focused blog
- answer very focused questions on forums
- employ the mechanical methods of SEO on your web site

Conclusion
In the end, your name will not drive traffic because of the name. It will drive traffic because your business and your name fuse to represent the logical place to go for the best answers to the problems you solve.

 

{ 0 comments }

QuickBooks Authority Error

by Caroline on January 9, 2007

You already are logged in as Admin or Power User running QuickBooks 2005 when you get: “Windows XP and Windows 2000 users must have power users or administrator group rights in order to run quickbooks.”

Intuit’s Registry Fix:

ftp://ftp.quicken.com/pub/quickbooks/2005/RACLFix/QB2005_RACLFix_Rel.exe

{ 0 comments }

Debug fails in Visual Studio 2005 with “Unable to attach. The binding handle is invalid.”

One fix is: turn on Terminal Services.

{ 0 comments }

 ”the physical file name” “may be incorrect”RESTORE DATABASE DBName
FROM DISK = ‘C:\mypath\backedUpDb.bak’
WITH
MOVE
‘backedUpDb_dat’ TO ‘C:\mypath\DBName.mdf’,
MOVE ‘backedUpDb_log’ TO ‘C:\mypath\DBName.ldf’
GO

Where
DBName is the name the db will have on your local machine
backedUpDb.bak is the backup with the wrong physical path
backedUpDb_dat and backedUpDb_log are described below
mdf and ldf are the names and locations you want DBName to have after restoration

 Get backedUpDb_dat from:
SQL Enterprise or Management Studio
Databases
Restore Database
To Database [DBName]
From Device: [click ...]
Backup Media
File
Add
Browse to backedUpDb.bak
OK
Select Restore checkbox
Options
The Original Filename is you backedUpDb_dat and backedUpDb_log
Options
 

 

{ 0 comments }

#Redirect any bogartcomputing.com request to http://www.bogartcomputing.com
rewritecond %{HTTP_HOST} ^bogartcomputing\.com
rewriterule (.*) http://www.bogartcomputing.com/$1 [R=301,L] 
#Redirect any index.php request to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php /$1 [R=301,L]
#redirect any home/ request to /
RewriteRule ^(.*)home/ /$1 [R=301,L]

{ 0 comments }

The Joomla You Are Not Authorized to View This Resource error has many causes. You will not find this one in any standard Joomla forum.

I added a titletag column to the jos_content table. I used it in components/com_content/content.php to set a custom title tag per content item.

 

$query = “SELECT a.id, a.title, a.title_alias, a.titletag, a.introtext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,” . “n a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.images, a.urls, a.ordering, a.metakey, a.metadesc, a.access, a.hits,” . “n CHAR_LENGTH( a.fulltext ) AS readmore, u.name AS author, u.usertype, s.name AS section, cc.name AS category, g.name AS groups” . $voting['select'] . “n FROM #__content AS a” . “n INNER JOIN #__content_frontpage AS f ON f.content_id = a.id” . “n INNER JOIN #__categories AS cc ON cc.id = a.catid” . “n INNER JOIN #__sections AS s ON s.id = a.sectionid” . “n LEFT JOIN #__users AS u ON u.id = a.created_by” . “n LEFT JOIN #__groups AS g ON a.access = g.id” . $voting['join'] . $where . “n ORDER BY $order_pri $order_sec” ;

$database->setQuery( $query, $limitstart, $limit );

$rows = $database->loadObjectList();

// Dynamic Page Title

// ctb 9/26/06 added meta key words to title

$titletag=$rows[0]->titletag;

if (strlen($titletag)< =0) {$titletag=$rows[0]->metakey;

} $mainframe->SetPageTitle( $menu->name .” ” . $rows[0]->titletag);

Then I copied content.php to a site that did not have the $titletag hack. The result was a home page (com_frontpage) that displayed “You are not authorized to view this item” for each of the home page items.

{ 0 comments }

PositionPilot.com Domain For Sale

by Caroline on December 6, 2006

PositionPilot.com Domain For Sale

$7,850

 

{ 0 comments }

Question: how to use cpanel to host multiple web sites, each of which has multiple domans associated with it.

Example:

Assumptions: Name server setup points all of these domains to the name server where site1domain1.com etc. are hosted; site1domain1.com has content in /home/site1domain1/public_html; site1domain1 is “main” cpanel site, a Mother Site.

site1domain1.com has web content for site1domain1.com
site1domain2.com has pointer to site1domain1.com

site2domain1.com
site2domain2.com has pointer to site2domain1.com

/home/site1domain/public_html:                       site 1 domain 1’s content
/home/site1domain/public_html/site1domain2: site 1 domain 2 is pointer to site 1 domain 1
/home/site1domain/public_html/site2domain1: site 2 domain 1’s content
/home/site1domain/public_html/site2domain2: site 2 domain 2 is pointer to site 2 domain 1

Answer:

site1domain1.com is the host cpanel’s “main” site. It has a public_html directory under which its web code resides. Make sure none of the following directory names exist under public_html:

/home/site1domain1/public_html:
site1domain2
site2domain1
site2domain2

Task #1:
Make site1domain2.com point to site1domain1.com

Go to Addon Domains. Enter
site1domain2.com
site1domain2
a password here
Click Add Domain

This action creates the physical directory /home/site1domain1/public_html/site1domain2

New Domain Name:
Username/directory/subdomain Name:
Password:
 

Point site1domain2.com to site1domain1.com 
Go to Addon Domains.
At Redirect Domain to URL select site1domain2.com
Click Setup Redirect
Enter http://site1domain1.com/
Click Save

In browser go to site1domain1.com, it should show content in public_html
In browser go to site1domain2.com, it should redirect to site1domain1.com

Task #2:
Make site2domain2.com point to site2domain1.com

This is different than task #1 because there we were redirect the main hosting site’s domain. Here we are creating an add-on domain, redirecting it from the main site to the site2domain1 content, and then creating a pointer URL that redirects to site2domain1 as well.

Summary of tasks:
Create site2domain1 add on domain, redirect it so it displays site2domain1 content, create site2domain2 add on domain, redirect it so it lands at site2domain1.com

Create physical directory /home/site1domain1/public_html/site2domain1
Go to Addon Domains. Enter
site2domain1.com
site2domain1
a password here
Click Add Domain

Create physical directory /home/site1domain/public_html/site2domain2
Go to AddOn Domains. Enter
site2domain2.com
site2domain
a password here
Click Add Domain

 

Go to AddOn Domains
At Redirect Domain to URL select site2domain1.com
Click Setup Redirect
Enter http://site1domain1.com/site2domain1.com
Click Save
Go to AddOn Domains
At Redirect Domain to URL select site2domain
Enter http://site1domain1.com/site2domain1.com
Click Save
 

{ 0 comments }

Menu, Module, Menu-Module Connections in VirtueMart

by Caroline on October 17, 2006

How to ensure your module is loaded even if it means creating phantom menu items:

 I debugged a VirtueMart site today in which some of the modules were not loading as expected. The problem turned out to be inaccurate menu items. That problem was not evident because the menu items were never actually used. They existed just to support the modules, not as navigation.

Here is a step by step on how to support modules that don’t have navigation menus.

Given a web site section full of static items, the items might have internal content links among themselves with no outer navigation structure. If a module loads those static content items it must do so through a menu item. But within the context of one static piece pointing to another, the content might just use internal links.

The problem arises because all of the other modules on the page know whether to load or not based on an association with a menu item. Those internal static pages didn’t have menu items associated with them. Therefore when the static pages loaded they landed on a blank pages with no other modules present.

To fix this scenario I created a phantom menu that was marked “published” but which loaded into a non-existent module area. The steps to fix the issue are as follows:

In the menu manager, create a new menu (StaticMenu)

Within that menu, create a new Link to Static Content

Choose the static content and give the menu item a name

After saving that menu item you will get the address of that item in the menu item editor, for example:
 index.php?option=com_content&task=view&id=41&Itemid=

Throughout the static content, whenever you want to refer to that item, use the index.php address just discovered.

Repeat for each static item.

Go to the site modules menu. Ensure that the StaticMenu is published but is assigned to a module area that the template doesn’t use.

{ 0 comments }

VirtueMart Product Details Page SEO Title Tags

by Caroline on September 27, 2006

 In administrator/components/com_virtuemart/html/shop.product_details.php, add the category name to the page title

{ 0 comments }

VirtueMart Category Page SEO Title Tags

by Caroline on September 27, 2006

In order to set keyword-rich title tags on a VirtueMart category listing page:

In administrator/components/com_virtuemart/html/shop.index_sdm.php (your mileage may vary on file name), add and initialize a $title variable in the top:

After setting the category name, append the category to the title:


This presumes your shop.index page calls

{ 0 comments }

Letter to a client about the awful search engine truth

by Caroline on September 27, 2006

Hey [well respected client name] -

I want to show you something interesting. I have to update my web marketing mantra to say links links links before I say content content content. I know incoming links are important. I know that aged, high quality, authoritative links are better than new, low quality, spammy links. But what I think I’ve been in denial about is that, for right now, links are beating content.

Google assigns page rank to everything it indexes. 0-10 where 0 is banned or not yet trusted and 10 is god status. Now check this out. This page has a page rank of 4

http://www.umdum.com/dir/46297.php

Even before Loren (page owner) added the princeton link the page had a PR of 4. I’ve got scores of highly relevant content on my site but I let my marketing go for 1.5 years and fell off the map, I only have a PR 3 and this page with no content has a 4.

So this was all coming on me like a sneeze yesterday when I wrote you the note with some good back linking tasks.

I KNOW google will fix this, the whole point is to index authoritative content, not well-respected white space. So content will be king, but I have to admit after discussing this with the site owner as well as a very well respected internet marketer that this is today’s realty, links trump content.

 

{ 0 comments }

The newer new SEO - Authority Sites

by Caroline on September 19, 2006

Google owns 60% of the search market and they’re the most academically inclined of the big 3 (Yahoo, MSN and Google). Google’s job is to provide spam-free content results. They know they’re not doing that now.

A good book on the subject is Authority Site Guide by Content Desk. I am impressed with this book but can’t yet endorse their product as I haven’t looked at it yet. I am loving the book. Google’s been publishing quality guidelines for years and this book describes how to build a quality (Authority) site.

It’s on target.I feel validated.

Some of Content Desk’s Authority Site comments I really like:

Choose a niche and subdomain the sub-niches:

smalldogmall.com: small dog stuff
Poodle.smalldogmall.com
Boston-Terrier.smalldogmall.com
Chihuahua.smalldogmall.com

Promote Interaction
Foster visitor comments
Give ability email and print the story

Incorporate a Reverse Ratio Advertising Policy
The more generic topics have less advertising surrounding them; the specific areas within that topic have more ads on the same pages. Monetize after you’ve filled a need. Don’t advertise on the home page.

More on this later……….

 

{ 0 comments }

Derivative blog monkey

by Caroline on August 29, 2006

I always say that when writers write about writing it’s time for me to stop reading. This blog about a blogging tool is worthwhile, though, because it involves shiny things.

 Latest addition to Web Programming Answers is the notable plug-in that prints purdy pictures across my fine fine blog template. And when you click one you can save my articles to social networking services and tell the world (or social networking services) what you like about this web site.

And now: shiny things:

Notable bookmarklets

{ 0 comments }

IE bug: form tag has depth

by Caroline on August 28, 2006

IE form tag bug IE doesn't like form tags Like the the div tag, the form tag can push items down on IE. The only reason the “add to my cart” button image is so far below the top of that table is the presence of a form tag. By pushing the form tag higher on the page the button righted itself.

{ 0 comments }

Affiliate Marketing First Month Wrap-Up

by Caroline on August 1, 2006

I built AnimalImages.biz out of animal posters and books from All Posters  and Amazon. The expenses were a few domains and hosting. Cost: $97

 Eventually I’ll pay our writer, too. Cost: $150

Seach engine optimization efforts were minimal and included directory submissions. I bought pay per click on Yahoo, where our ads got 12,632 impressions and 41 clicks averaging the 2nd position on Yahoo’s search page.  The doorm-room.net Yahoo keywords include “college dorm room checklist,” “dorm room picture,” “dorm room” and “dorm room decorating.” These had the most impressions. Cost: $73.86.

Amazon's big adventure The first change I made was to get off the animal images and onto the dorm room marketing angle. I am now marketing dorm-room.net, college-dorm-room.com and dorm-room-decor.com.

All Posters Big Pay Day July intake:
All Posters: $3.82
Amazon: $0.00

{ 0 comments }

Answers the question:
How to redirect domains given tools .htaccess, parked domain redirect and Joomla component 404sef.

If you use Joomla and care at all about search engine rankings you’ll have to use a SEF translation of some kind. I chose 404sef and I’m grateful for what it does. Here’s how to get around something it doesn’t do, which is handling non-primary domains.
It will make Search Enging Friendly links for the current domain, but if you redirect a different domain to the 404Sef’d one the component will cough up a hair ball.

Setup:

  1. Joomla 1.0.10
  2. Siteground.com hosting cpanel with parked domains
  3. Global config: SEF on
  4. SEF404 config: SEF on
  5. secondary domains that need to redirect in a search engine friendly way to http://www.bombshelters.com/:

biologicalprotection.com
biologicalshelter.com
biologicalshelter.us
biologicalshelters.com
biologicalshelters.us
blastshelters.com
blastshelters.us
bombshelter.us
chemicalprotection.us
combatshelter.com
disastershelter.com
falloutshelter.us
governmentprotection.com
nbcshelter.com
nbcshelter.us
nuclearprotection.us
nuclearshelter.us
nuclearshelters.com
radiusdefense.com
radiusengineering.us
radiusengineeringinternational.com
radiusengineeringintl.com
radiusshelters.com
saferoomprotection.us
shelterengineering.com
shelterprotection.us
sheltersystems.us
survivalshelter.us
survivalshelters.us
undergroundshelter.us
undergroundshelterengineering.com
undergroundshelters.com
undergroundshelters.us
wmdprotection.us
Setup secondary domains to resolve to primary domain

These domains are all registered on network solutions. I changed the primary and secondary name servers on all of them to the siteground name server for bombshelters.com. Then on cpanel for bombshelters.com I used the “parked domains” tool to point each of the domains to bombshelters.com.

This worked, and then broken suddenly tonight. It actually probably broke when I installed 404SEF I just didn’t realize it.

Symptoms

I guess I had 404SEF off when I redirected the domains to the bombshelters.com name server because m initial tests worked great. You’d type undergroundshelter.us and the browser would display bombshelters.com content under the undergroundshelter.us address bar. When I tried that tonight I got “this page cannot be displayed.”

The pubic_html errorlog pointed to:

[24-Jul-2006 00:58:57] PHP Warning: strpos() []: Empty delimiter. in /home/bombshel/public_html/components/com_sef/sef404.php on line 83

[23-Jul-2006 23:04:24] PHP Fatal error: Call to undefined function: sefreltoabs() in /home/bombshel/public_html/components/com_content/content.html.php on line 584

Things that don’t fix the problem

  1. Turning off 404SEF: it fixes the problem but creates the old problem of unfriendly URLs
  2. Ensuring the strpos delimiter (and target) are not empty on sef404.php:
  3. [24-Jul-2006 00:58:57] PHP Warning: strpos() [function.strpos]: Empty delimiter. in /home/bombshel/public_html/components/com_sef/sef404.php on line 83

    bold line below is line 83

    if (!empty($pathdata) && (!empty($sefconfig->suffix)))

    {
    if (strpos($pathdata,$sefconfig->suffix) !== false)
    $path_array[$x] = str_replace($sefconfig->suffix,”",$pathdata);
    $x++;
    }

    This is fine as far as it goes, it’s good to test inputs before assuming they have content, but it addresses a symptom, not a problem.

  4. Similar to #2, defining sefRelAbs function against its will

]: Empty delimiter. in /home/bombshel/public_html/components/com_sef/sef404.php on line 83]: Empty delimiter. in /home/bombshel/public_html/components/com_sef/sef404.php on line 83content.html.php:
if (!function_exists(’sefRelToAbs’))
{
function sefRelToAbs($string) {}
}
What does work

In .htaccess rewrite any domain that is not http://www.bombshelters.com/ to be http://www.bombshelters.com/. Works for “bombshelters.com” (without www), “falloutshelter.us,” and etc. secondary domains.
RewriteCond %{HTTP_HOST} !bombshelters.com$ [NC]
RewriteRule ^(.*)$ http://bombshelters.com/$1 [L,R=301]

Big thank you to http://enarion.net/web/apache/htaccess/redirect-www-and-no-www/

 

{ 0 comments }

404SEF Joomla Directories-as-Filenames

by Caroline on July 22, 2006

Joomla’s 404SEF component can be tricky if you want to use directory names instead of file extensions, aka

http://www.bombshelters.com/Education/Biological-Bioterror-Weapons-Effects

not

http://www.bombshelters.com/Education/Biological-Bioterror-Weapons-Effects.html

First, lowercase is on by default. Second, default file extension of .html hurls your pages into deep space.

To hae both, go to 404 config, set All Lowercase to No, set File Suffix to a blank textbox.

{ 0 comments }

AnimalImage.biz dorm room marketing

by Caroline on July 13, 2006

Affiliate Marketing Experiment
AnimalImage.biz is our first full-blown affiliate-driven ecommerce venture. It is powered by Amazon Associates Program and AllPosters.com Affiliates Program. Today I am adding linkshare.com animal magazines.

Animal Image Target Market: Dorm Room Decor
The site’s marketing target is the young girl going to college. Girls — much more than boys — will express their homesickness and actually try to do something about it. So our marketing strategy validates the girl’s experience and offers inspiring animal posters as a remedy.

Visitor Stats
We launched on July 8 2006. As of yesterday AnimalImage.biz had 34 search terms on Yahoo centered on the “dorm room” theme. To date (July 13) the ads have 3,244 impressions and 13 clicks. Today I updated the marketing copy on 8 ads. I believe some of them must have bee written in my sleep. I also need a lot more copy on the site itself but that is taking some time outside of my control. My web stats indicate that following # of unique visitors starting July 8: 40, 26, 34, 52, 8.

Promotion Activites
I launched the site on v7n.com forums by way of asking for feedback. I used OnlyWire and a few other tools to ping this post: Animal Image .biz (animalimage.biz) launched. I also submitted the site to some free search engine submission services, Yahoo, Google and MSN.

college-dorm-room.com, dorm-room-decor.com, dorm-room.net
The Search Engines are rewarding keyword domains so today I added and 301-forwarded some good college dorm room domains. college-dorm-room.com, dorm-room-decor.com and dorm-room.net are not meant for human consumption, they exist for the search engines.

July 12 2006 AnimalImage Revenue Results
$0.00

 

Technorati Tags
, , , , , , , , ,
Ice Rocket Tags
, , , , , , , , , , ,

{ 0 comments }

Affiliate Experiment with LinkShare

by Caroline on July 11, 2006

Today we’re monetizing the blog with LinkShare affiiate links. I chose techie and game links because I assume my audience is techie and game-ie. The LinkShare program is straightforward to join. The interface is similar to commission junction, easier to read.

I placed some links on the sidebar and some are over this article. I’ll report back on AdSense vs. LinkShare success.

By the way. Like this blog? Please click a link.

 

Technorati & Ice Rocket Tags
, , , , , , , , , , , , , , , , , , ,

{ 0 comments }

eSyndicat web directory software

eSyndicat is an open source link directory software package. It’s easy to use. Visitors can submit links or you can add them on the back end. It has unlmited categories and subcategories. It allows you to run AdSense, search the links and display new and popular entries. I had no trouble finding a nice, clean template.

 

Technorati & Ice Rocket Tags
, , , , , ,

{ 0 comments }

Settling on a Blog Theme with AdSense

by Caroline on July 9, 2006

The task today is to decorate the WordPress blog in a theme appropriate for code readers and flexible enough for Adsense Hosting.

After Joomla I’d say WordPress has to be my favorite tool. It works. It doesn’t talk down to me. I don’t have to threaten to hurt its family to make it go.

Finding themes for WordPress is much harder than finding themes for Joomla. My blog posts are full of raw code — PHP, C#, VBScript — so the theme I choose for Bogart’s Answers has to work with dicey content. (When I first created this blog over at Blogger Google made me wait for a human to approve it. Apparently all of that raw C# looked like spam to the filter.)

This theme — Corporate Pro 1.0 by Colleen Chard — has the strength and flexibility to withstand my spamish-looking code rants. This theme is a beautiful combination of color, layout and refinement.

Colleen Chard's Corporate Pro 10 WordPress Theme

Corporate Press 1.0 Theme

Of the many marketing ideas I’ve learned over at John Scott’s V7n forums is the very good idea of making the AdSense the same font as the theme’s font. I have added 1 link unit and three text units to the theme’s index and sidebar using the colors I found in styles.css. The result is Google AdSense that blends right in.

Incorporating AdSense Using the Theme's Fonts

Technorati & Ice Rocket Tags
, , , , ,

{ 0 comments }

decorate your dorm room with www.animalimage.biz dog posters, dog books, dog magazines, cat posters, cat books, cat magazinesJoin us as we experiment with a brand spanking new affiliate marketing site. Today we added dog magazines, dog books and dog stories to our dog posters. The content comes from amazon.com and allposters.com affiliate programs, and our newest writer Castina Watson. Until we figure out exactly how we want to reproduce the results the site is not using a database. The pages are simple table cells that include individual files containing affiliate code.

The Yahoo ad program is setup, were waiting for editorial release. The theme is “decorate your dorm room with animal posters.”

We will be adding internal cross linking to make it easier for the visitor to stick to the site.

Technorati & Ice Rocket Tags
, , , , , , , , , , , , , , , , , , ,

{ 0 comments }

Animal Image . biz (animalimage.biz) launched

by Caroline on July 7, 2006

Animal Image.biz (www.animalimage.biz) affiliate web siteWe are proud to announce the launch of animalimage.biz.

Affiliate Ecommerce Site
Animal Image is an experimental affiliate site designed to create revenue for animal-related web sites. Eventually we will integrate what we learn into animalneighborhood.com and our free New Hampshire animal welfare web sites.

Content
Next week we’ll have 25 or 30 articles on the site. Most will discuss the emotional benefits of caring for animals. The rest will discuss how to make the journey to college easier for young girls.

The marketing tie-in is:
Images of cats, dogs, puppies, horses, dolphins etc will comfort the young girl decorating her dorm room and feeling the pangs of home-sickness.

Stay tuned for more on our experiements in affiliate marketing.






Dorm Room Decor  

{ 0 comments }

A Complete Guide to 404SEF with Joomla

by Caroline on July 4, 2006

If you’ve installed 404SEF and gotten it to work you might find that it still seems to mess up sometimes. You assign a module to a page but that page is not always associated with that menu item. The module therefore doesn’t show up.
Actually it’s Joomla that’s jumping all over the place, 404SEF is just going along for the ride.
Let’s go through everything required to make 404SEF work, including when Joomla keeps renaming pages.

  1. Install 404SEF as a component
  2. modify .htaccess as per below
  3. Turn on SEO in Global Configuration
  4. Turn on 404SEF in 404SEF Configuration
  5. If a module shows up sometimes but not others, and it appears that 404SEF is renaming a page every time it’s loaded, make that page static using the Content/Static Content Manager (create new static content and delete old dynamic content).

## Can be commented out if causes errors, see notes above.
# Options FollowSymLinks
#
# mod_rewrite in use
RewriteEngine On
# Uncomment following line if your webserver’s URL
# is not directly related to physical file paths.
# Update Your Joomla/MamboDirectory (just / for root)
# RewriteBase /
########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named ‘content’ or ‘component’ on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section
########## Begin 3rd Party or Core SEF Section
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End 3rd Party or Core SEF Section

{ 1 comment }

ASP.Net TreeView

by Caroline Bogart on June 10, 2006

My first article on ASPfree.com

{ 0 comments }

500 this page cannot be displayed

by Caroline on May 20, 2006

Of the many reasons you’ll see this page while running locally, one is forehead-slapping good.

Check the protocol for SSL (htts://)

{ 0 comments }

Jesse Liberty Live

by Caroline Bogart on May 12, 2006

See best-selling .net author Jesse Liberty, free.

{ 0 comments }

V7N Tech Blog

by Caroline on May 10, 2006

Proud recipient of the first entry in V7n’s Web Development (Blogs about Web Development) Directory

{ 0 comments }

A master page must have a form tag with a runat=”server” attribute.

A PayPal donation button must be inside a form that posts to “https://www.paypal.com/cgi-bin/webscr”

You can’t put that as an action on the master page’s form tag because (a) it’s ignored, and (b) if it weren’t ignored you hardly want to state that all of your pages should be posted to paypal.com.

One solution is to post the master-page-derived form to a hidden page. The hidden page does not have a master page. It submits to PayPal.

Donation Page

Donation form

‹form action=”submit-paypal.aspx” method=”get”›
‹input type=”image”
src=”images/x-click-butcc-donate.gif” mce_src=”images/x-click-butcc-donate.gif”
style=”border:none” name=”submit”
alt=”Make your Thera-Puppy donation with PayPal - it’s fast, free and secure!”›

‹/form›

submit-paypal.aspx
The body tag loads the form. The user never sees this page. They are taken to form’s action location:
https://www.paypal.com/cgi-bin/webscr

‹%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”submit-paypal.aspx.cs” Inherits=”submit_paypal” %›

‹!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”›

‹html xmlns=”http://www.w3.org/1999/xhtml” ›
‹head runat=”server”›
‹title›Untitled Page‹/title›
‹/head›
‹body onLoad=”SubmitForm.submit()”›
‹form name=”SubmitForm” action=”https://www.paypal.com/cgi-bin/webscr” method=”post”›

‹input type=”hidden” name=”image_url”
value=”http://bogartcomputing.com/therapuppy/images/juggopop.jpg”›

‹input type=”hidden” name=”cmd” value=”_s-xclick”›

‹input type=”hidden” name=”encrypted”
value=”—–BEGIN PKCS7—– [a very long encrypted string from paypal here]==—–END PKCS7—–
“›
‹/form›

‹/body›
‹/html›

{ 0 comments }

Role-based file access and menu security

by Caroline Bogart on May 4, 2006

Show certain menu items and certain files to members of Administrators role. All else see basic site.

ASP.Net Web Site Administration Tool
Set one user to Administrators
Have another user that is in no role.

web.config, deny all but Administrators access to admin directory:

‹location path=”admin”›
‹system.web›
‹authorization›
‹allow roles=”Administrators” /›
‹deny users=”*”/›
‹/authorization›
‹/system.web›

‹/location›

web.config, system.web, roleManager enabled=”true”
web.config, membership, providers add defaultProvider:
‹siteMap defaultProvider=”AspNetXmlSiteMapProvider” enabled=”true”›
‹providers›
‹remove name=”AspNetXmlSiteMapProvider”/›
‹add name=”AspNetXmlSiteMapProvider” description=”SiteMap provider which reads in .sitemap XML files.” type=”System.Web.XmlSiteMapProvider” securityTrimmingEnabled=”true” siteMapFile=”Web.sitemap”/›
‹/providers›
‹/siteMap›

web.sitemap, add roles attribute to menu items to be masked:

‹siteMapNode url=”admin/admin.aspx” title=”Admin” Description=”Edit Functions” roles=”Administrators” ›
‹siteMapNode url=”admin/shelters_edit.aspx” title=”Shelters” description=”Edit Shelters/Rescues” roles=”Administrators” /›

{ 0 comments }

Which is more helpful:
1. “An error was encountered. Please return to the previous page and try again.”
2. A blank web page.
3. A DNS error while running on localhost

Scenario: setup “forgot password” smtp email for site being built on localhost but whose database is on remote server.

Web application
Click ASP.Net configuration icon
Configure SMTP Email Settings
Reply: DNS error, page cannot be found, or,a blank web page

troubleshooting
1: remove system.net and mailsettings from web.config
2. remove and replace remote database via aspnet_regsql

{ 0 comments }

Photoshop vertical sideways type

by Caroline on May 2, 2006


*diversion: photoshop/imageready post*

To create vertical and sideways Photoshop type, so that when you use the Type Tool the letters flow upwards and the bottom of each letter is to the right…

Actually I’m using ImageReady.

Rectangle tool, color #39B54A
New layer
Type tool: verdana bold, 10px, #ffffff
Type a couple of normal horizontal characters
Selection tool: select the characters
Edit menu, Transform, 90 CCW

{ 0 comments }

The W3C CSS Validator doesn’t like the way ASP.Net 2.0 renders the asp:label control.

‹asp:Label ID=”lblSep” runat=”server” CssClass=”datalist” Height=”20px” /›

renders as:

‹span id=”ctl00_rightcontent1_DataList1_ctl01_lblSep” class=”datalist” style=”display:inline-block;height:20px;”›‹/span›

The problem is that display:inline-block is valid in CSS 3.0 but not CSS 2.0.

Note that the framework did not apply the CssClass datalist override:

display
{
display:inline;
display:block;
}

Answer? Let’s call it a workaround:
‹label style=”height:20px;”/›

{ 0 comments }

Upgrade phpadsnew

by Caroline on April 26, 2006

*PHP Post Warning*

Backup yourdomain_banners database
Backup /var/www/html/banners

Unzip phpadsnew 2.8 zip locally
FTP to /var/www/html/banners_208

Run examdiff pro to merge the old config.inc.php with the 2.08 config.inc.php. If you just copy the old config.inc.php into the new installation directory some variables will not be defined and the site will fail.
Put the new config.inc.php in
/var/www/html/banners/config.inc.php to banners_208
Make sure config.inc.php is writable.

/etc/php.ini:
file_uploads: on
magic_quotes_sybase: off
register_long_arrays: on [THIS IS NOT IN OUR PHP.INI, it's a php 5 thing]

Run
http://www.yourdomain.com/banners_208
Rename banners to banners_201
Rename banners_208 to banners
“Lock” config.inc.php (-rw-r–r-)

Your version of phpAdsNew is up-to-date. There are currently no updates available.
You are currently using phpAdsNew 2.0.8 running on Apache, PHP 4.3.9 and MySQL 4.1.12.

{ 0 comments }

.net 2005 asp:login controls

by Caroline on April 25, 2006

ASP.Net 2005 provides a login control that creates a login form with a “remember me” cookie. The functionality to code ratio is huge:

ASP.Net asp login displayCreate two members (ctbogart, caroline) using the ASP.Net configuration icon on the top right of the solution explorer. Create two roles (Member, Admin). Assign ctbogart to the role Admin, caroline to the role Member.

Create two members (ctbogart, caroline) using the ASP.Net configuration icon on the top right of the solution explorer. Create two roles (Member, Admin). Assign ctbogart to the role Admin, caroline to the role Member.Create a web user control login.ascx. Add this tiny piece of code:
‹asp:login id=”login2″ runat=”server”›

Drag the control onto a web form. Run the project. Login. Wow.

Without a LoginView, the asp login control will display regardless of whether our user is logged in. It contains attributes to modify its appearance and abilities:
‹asp:Login ID=”login2″ runat=”server”
CreateUserText=”Create user”
CreateUserUrl=”create-new-user.aspx”
DisplayRememberMe=”true”
FailureAction=”RedirectToLoginPage”
FailureText=”Please try again”
InstructionText=”Enter your login and password”
LoginButtonText=”Click Here”
LoginButtonType=”link”
RememberMeSet=”true”
TextLayout=”textontop”
TitleText=”Hey You!”
UserName=”caroline”
UserNameRequiredErrorMessage=”Please enter your user name”
PasswordRequiredErrorMessage=”Please enter your password”
VisibleWhenLoggedIn=”false” /›

Conditional Login Display
A user can be anonymous or logged in. A logged in user can be in no role, one role, some roles or all roles. Our users are in the Member and Admin roles.

We can use the asp:Login code from above but I don’t yet know why there’s an align=right on the Click Here button link, so we’ll go back to the defaults.

The following code displays the login dialog when the user is logged off and a role-approriate message when the user is logged in:
‹asp:LoginView ID=”loginview2″ runat=”server”›
‹AnonymousTemplate›
‹asp:Login ID=”login3″ runat=”server”›‹/asp:Login›
‹/AnonymousTemplate›

‹LoggedInTemplate›
Hello, ‹asp:LoginName ID=”loginName1″ runat=”server”›‹/asp:LoginName›
‹/LoggedInTemplate›

‹RoleGroups›
‹asp:RoleGroup Roles=”Admin”›
‹ContentTemplate›
Hello, ‹asp:LoginName
ID=”loginName1″
runat=”server”›
‹/asp:LoginName›.‹br /›You are in role: Admin‹br /›
‹asp:LoginStatus ID=”LoginStatus1″ runat=”server”›‹/asp:LoginStatus›
‹/ContentTemplate›
‹/asp:RoleGroup›
‹asp:RoleGroup Roles=”Member”›
‹ContentTemplate›
Hello, ‹asp:LoginName
ID=”loginName1″
runat=”server”›
‹/asp:LoginName›. You are in role: Member‹br /›
‹asp:LoginStatus ID=”LoginStatus1″ runat=”server”›‹/asp:LoginStatus›
‹/ContentTemplate›
‹/asp:RoleGroup›
‹/RoleGroups›
‹/asp:LoginView›

{ 0 comments }

Showing input forms and thank you pages with multiview

by Caroline Bogart on April 15, 2006

The MultiView replaces showing and hiding div tags. Load the input form. When the user clicks submit (and the data is validated, not shown here), change the view to the confirmation pane.

‹asp:MultiView ID=”MultiView1″ runat=”server” ActiveViewIndex=”0″›
‹asp:View ID=”View1″ runat=”server” ›
‹table›
‹tr›‹td›Name‹/td›‹/tr›
‹tr›‹td›
‹asp:Button ID=”save” runat=”server” OnClick=”save_Click” /›
‹/td›‹/tr›
‹/table›
‹/asp:View›
‹asp:View ID=”View2″ runat=”server”›
‹table›
‹tr›‹td›received‹/td›‹/tr›
‹/table›

‹/asp:View›
‹/asp:MultiView›

{ 0 comments }

If your CSS 2.0 positions go all kerflooey check the div tag syntax.

In IE 6 I get this behavior:

‹div›‹/div›renders OK
‹div› pushes all CSS to the right down below any other renderings to date

{ 0 comments }

The ASP.Net community start kit for club websites uses a repeater for its main navigation bars. I couldn’t figure a way to use a repeater as a dropdown menu so I yanked it out and used a menu control.

The steps to replace the repeater with a menu control:

Create a user control controls/navbar.ascx as:
‹%@ Control Language=”C#” AutoEventWireup=”true” CodeFile=”navbar.ascx.cs” Inherits=”controls_navbar” %›
‹asp:sitemapdatasource id=”SiteMapDataSource1″ runat=”server” showstartingnode=”false”›
‹asp:Menu ID=”menu1″ runat=”server”
DataSourceID=”SiteMapDataSource1″
Orientation=”Horizontal”
DynamicEnableDefaultPopOutImage=”false”
StaticEnableDefaultPopOutImage=”false”

‹staticmenuitemstyle verticalpadding=”9″ size=”110%”›
‹staticitemtemplate›

‹asp:Label ID=”Label9″ runat=”server”
Text=’‹%# Eval( “Text” ) %›’›
‹/asp:Label›
‹/staticitemtemplate›
‹/asp:Menu›

Register the control in Default.master:
‹%@ Register Src=”controls/navbar.ascx” TagName=”navbar” TagPrefix=”uc1″ %›

Remove everything from between:
‹div id=”navtop”›‹/div›
and from between:
‹div id=”navbottom”›‹/div›

Replace with:
‹div id=”navtop”›‹uc1:navbar ID=”navbartop” runat=”server” /›‹/div›
and:
‹div id=”navbottom”›‹uc1:navbar ID=”bottomnav” runat=”server” /›‹/div›

{ 0 comments }

The ASP.Net 2.0 Community Starter Kits make the assumption that the host machine is running SQL Express.

This is because, I presume, they’re presented under the Visual Web Developer 2005 Express Edition site.

If you’re running Visual Studio.Net 2005 and Microsoft SQL Server 2005 the starter kits will not work out of the box.

You have to add an IIS application and convert the database to SQL 2005.

The Personal Web Site goes so far as to assume the aspnetdb.mdf file is already on your drive. To create an aspnetdb.mdf file you’d normally use the Visual Studio 2005 command prompt and run aspnet_regsql.exe. Or, you can get the kit I describe below and make the kluge fix as I did. aspnetdb.mdf will contain the user roles and memberships. You can avoid aspnetdb.mdf completely by changing the second web.config sql reference to be the same as the first, i.e., both ClubSiteDB and LocalSqlServer name the same initial catalog. Create xyz database (catalog), define your tables, keys, etc., then point both ClubSiteDB and LocalSqlServer to xyz.

Here is one way to solve the problem. The most elegant way would have been to run aspnet_regsql, but I wasn’t aware of that at the time I was writing this post.

Convert an mdf Express Personal Web Site kit to SQL Server 2005
Both the Personal Web Site and the PayPal-enabled eCommerce starter kits require aspnetdb.mdf. Since The PayPal kit has a copy, we’ll install that kit first.

These examples presume:
a physical web directory root of c:\aaweb
a SQL Server 2005 instance of 6510GZ\SQLSERVER2005
an ASPNET (aka 6510GZ\ASPNET) Windows account as the aspnet_wp account
Windows XP Pro

Commerce Start Kit (PayPal):
Download the PayPal Kit: The PayPal Kit link leads to a PayPal site link which leads to CommerceStarterKit.org. Register and download the kit.

Unzip the contents using “Use Folder Names” into your physical web directory area. I unloaded my zip to c:\aaweb\commerce. Open the IIS MMC, navigation to the c:\aaweb\commerce\website directory; get the properties for the Website folder and “Create” the Website application.

Note that the application runs from Website, not from the commerce directory above Website. When you open the web in Visual Studio 2005 you will open c:\aaweb\commerce\Website.

Open Sql Server Management Studio. My SQL 2005 instance is named 6510GZ\SQLSERVER2005. In Databases:
attach c:\aaweb\commerce\website\app_data\aspnetdb.mdf. Rename the result to ASPNET (it works, though I meant to rename it ASPNETDB).
attach c:\aaweb\commerce\website\app_data\commercedb.mdf. Rename the result to CommerceDB.

For both databases:
navigate to database security
add the 6510GZ\ASPNET system user
give the user aspnet_membership_fullaccess schema and aspnet_membership_fullaccess role membership.

In Visual Studio 2005 open the website c:\aaweb\commerce\website. Change the web.config configuration from Express to Server. Remove the commercedb.mdf and aspnetdb.mdf connection string elements and replace with Server connection strings:

New connection strings:
‹connectionstrings›
‹clear›

‹add n