Category: George Lerner – Website Tech

Migrated content from website-tech.lc.lndo.site

  • WinXP Added a User, Where Did Administrator Go?

    I added a user to a friend’s WinXP computer. Next time I tried to log on, the Administrator user no longer showed on their computer! They Need That! All of their documents they are working on, are under that account.

    Some support sites say that when there is another user created (in Control Panel, User Accounts) with administrator privileges, the Administrator account is automatically not shown on the Windows Login screen.

    Here’s how to make the Administrator user show on the login screen:

    In a Registry editor (such as RegEdit, if you don’t know how to run that, then you shouldn’t attempt this yourself, you can mess things up Very Easily in RegEdit).

    Find:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList

    Add a new DWORD Value:
    Name: Administrator
    Value: 1

    Save the changes (automatic in RegEdit) and when you log out, you will have Administrator as one of the login choices.

  • WinXP Logins, Know Password Forgot User Name

    If you don’t know all the login names for a WinXP computer (and probably most other versions of Windows), you can find them easily. (Of course, you still have to know the password…)

    Press Win-R (or Start, Run) and type CMD, then press Enter. The Command window appears (used to be called the DOS window).

    Type: Net user, and press Enter.

    You will see all the User Accounts that have been defined (in Control Panel, User Accounts) on this computer.

  • Favorite FireFox Add-Ons

    Here are the FireFox add-ons that I use

    NoScript

    Essential security for your web browser! Allow active content to run only from sites you trust, and protect yourself against XSS and Clickjacking attacks.

    Firebug

    Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page.

    CodeBurner for Firebug

    CodeBurner is a Firefox add-on that integrates with Firebug, to extend it with reference material for HTML and CSS.

    Firefinder for Firebug

    Finds HTML elements matching chosen CSS selector(s) or XPath expression

    CoLT

    CoLT makes it easy to copy either a hyperlink’s text or both the link and the link’s text (in a format you specify). Two handy context-menu items make this possible, and don’t add clutter; the items are only visible when right-clicking a link! Using CoLT to make this list, right click on the link to the Add-On in the search page, press o (for “cOpy link text and location as”), press Enter (HTML is the default, plain text and BBCode are some of the other options).

    ColorZilla

    Advanced Eyedropper, ColorPicker, Page Zoomer and other colorful goodies…

    Live HTTP Headers

    View HTTP headers of a page while browsing.

    TwitterBar

    Post to Twitter from your address bar.

    BetterPrivacy

    Ever wondered why you are still tracked though you tried everything to prevent it?
    BetterPrivacy is a safeguard which protects from usually not deletable LSO’s on Google, YouTube, Ebay…

    Clipmarks

    Clipmarks lets you clip and share specific parts of articles, blog posts or anything else you read on the web. With our newly integrated Amplify service, you can post clips directly to Twitter or Facebook – or share them on clipmarks.com and more.

    Download Statusbar

    View and manage downloads from a tidy statusbar – without the download window getting in the way of your web browsing.

    Pixel Perfect

    Pixel Perfect is a Firefox/Firebug extension that allows web developers and designers to easily overlay a web composition over top of the developed HTML.

    CSS Usage

    Just found this one, I’ve been wanting to clean out my CSS! Firebug extension to view which CSS rules are actually used.

    FireFTP

    FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers. (I use FileZilla instead, easier for multiple projects; but FireFTP runs inside Firefox.)

    FlashGot

    Download all the links, movies and audio clips of a page at the maximum speed with a single click, using the most popular, lightweight and reliable external download managers.

    IE View Lite

    This is a cut down version of IE View by Paul Roub, which is 47.4 KB. All the same UI and features are there. It has a right click menu item to open a page in IE and a list of sites to always open in IE. It can close tabs automatically and send.

    iMacros for Firefox

    Automate Firefox. Record and replay repetitious work. If you love the Firefox web browser, but are tired of repetitive tasks like visiting the same sites every days, filling out forms, and remembering passwords, then iMacros for Firefox is the solution you’ve been dreaming of! Whatever you do with Firefox, iMacros can automate it.

    I have automated reading ClickBank data into a database form; and reading real estate listings, home values and rental prices, into a database.

    Combined with MySQL PHP Generator – Free PHP MySQL Generator by SQL Maestro Group you have a relatively easy to use (compared to coding in PHP) data scraping to database system.

    InFormEnter

    InFormEnter adds a small, clickable icon next to every input field in a web form, from where you can select the item to be inserted – no typing required (but I press Insert, quicker). You can configure it to display your frequently used information such as name, email, address, library card number.

    Minimap Sidebar

    The Minimap Addon gives you a suite of built-in maps and mapping tools for your web browser. Drag and Drop addresses or address links you find on web pages to view their location in the Map Sidebar, or by manually adding locations.

    Operator

    Operator leverages microformats and other semantic data that are already available on many web pages to provide new ways to interact with web services.

    Save Complete

    Saves a webpage completely, providing a better alternative to the built-in save functionality of Firefox.

    Screengrab

    Screengrab! saves webpages as images…

    It will capture what you can see in the window, the entire page, just a selection, a particular frame… basically it saves webpages as images – either to a file, or to the clipboard. It captures Flash too!

    SenSEO

    SenSEO is an extension checking the most important on-page-SEO-criteria and calculating a grade of how good your site fulfills these criteria.

    Add-Ons I Sometimes Use

    DOM Inspector

    DOM Inspector is a tool that can be used to inspect and edit the live DOM of any web document or XUL application. The DOM can be navigated using a two-paned window displaying a variety of different views on the document and all nodes within.

  • Mexico: HEU Free

    The Rachel Maddow Show has a segment on bringing highly enriched uranium (HEU) from Mexico to the USA, part of gathering it from nuclear reactors world-wide, to USA and Russia.

    RMS 3/19/2012, http://www.msnbc.msn.com/id/26315908/ns/msnbc_tv-rachel_maddow_show/#46790266

  • Using Google Web Fonts (Needs Some Quotation Marks)

    http://www.google.com/webfonts has a great collection of web-licensed fonts to use freely in your web pages. It also has a very easy interface for picking the fonts you want and adding them to your web pages.

    One small glitch: In Firefox (at least version 14.0.1) you have to enclose CSS src url(‘site’) (and @import url(‘site’) in single quotes. The Google-supplied code doesn’t (currently) do that. Without the single quotes, the font doesn’t load. http://www.w3schools.com/cssref/css3_pr_font-face_rule.asp shows the proper syntax has the single quotes.

    Google says in your CSS file, put this:
    @import url(http://fonts.googleapis.com/css?family=Uncial+Antiqua);
    but should be this (notice the single quotes):
    @import url('http://fonts.googleapis.com/css?family=Uncial+Antiqua');

    Browse to the Google API URL (e.g. http://fonts.googleapis.com/css?family=Uncial+Antiqua). Copy the CSS from that page.

    It should output this:

    @font-face {
    font-family: 'Uncial Antiqua';
    font-style: normal;
    font-weight: 400;
    src: local('Uncial Antiqua'), local('UncialAntiqua-Regular'), url('http://themes.googleusercontent.com/static/fonts/uncialantiqua/v1/F-leefDiFwQXsyd6eaSlltK4x0DJI-T8q5ozNuxBQHo.woff') format('woff');

    [instead of url(http://themes…woff), it should have single quotes around it, url(‘http://themes…woff’) ]

    Paste the Google URL into your browser address bar, copy the result into your CSS file, and add the proper quotes.

  • iMacros for Retrieving Information from Multiple Web Pages

    iMacros is a great tool for grabbing information from web sites. People often use it for grabbing the latest stock prices, or getting the latest prices on many products. Putting the data into a spreadsheet-compatible file is easy.

    You can also use iMacros to fill out forms from a spreadsheet (.csv) text file.

    iMacros is a free plugin for Firefox (or IE), or there is a more powerful paid version.

    You specify the information to grab using a simple scripting language, that can search a web page for HTML tags or attributes. So, you could search for the the paragraph with an ID, and grab the text. Or look for a link that starts with a particular domain, and grab either the link or the text.

    iMacros automatically handles looping through all the occurrences on a page (for example, each row of a table), the most common need.

    The Firefox version lets you control switching tabs, to grab the data from one tab and write it to a form on another tab. (The form could process the data and save it to a database, or anything else you could program a form processing routine to do.)

    But it doesn’t have a full programming language, with testing variables and calling subroutines based on the test. It doesn’t have FOR loops, or WHILE loops. So, you can grab all the prices on one page, or keep grabbing one value from pages as long as there is a “Next” link. But you can’t easily do both. You can grab and save All the values, but not save only the ones that meet your conditions.

    Well, iMacros for Firefox has a Javascript interface. With that, you can have Javascript control the looping, testing for special conditions, massaging the data, checking for errors. You can pass values from Javascript to iMacros, and return extracted information to Javascript.

    I’m going to show some code snippets for using loops to pass values to iMacros scripts and back to Javascript, and testing for errors.

    So you have some idea what the script does, in my task, one web page lists the MapID of each Map in a section of the County. Another web page lists the Parcels contained in a specific Map. Yet another web page shows what I want, details about a Parcel. I then have iMacros put the details in a custom form, and submit the form data to a PHP program that writes it to a MySQL database.

    Since each section of the county could have an unknown number of Map IDs, and each Map would have an unknown number of Parcels, and each Parcel has information on several web pages, and since there is so much information to collect it couldn’t be done in one day (probably non-stop gathering for 4 months!) and therefore I needed to have the scripts keep track of what had been completed, it was too complex for any iMacros script. But with the Javascript interface controlling 6 scripts, it works!

    mapidnum = 1
    /* Javascript uses labeled loops so you can break out of multiple loops */
    loopm:
    do {
    iimSet("mapidnum", mapidnum)
    /* get the nth map id */
    iret = iimPlay("macro-that-finds-each-map-id.iim")
    if (iret == -101) {
    /* user pressed Stop button */
    break loopm;
    }
    mapid = iimGetLastExtract() /* 849/849010100 */
    if (mapid == "#EANF#") {
    continue;
    }
    iimDisplay("TownshipRange "+t+"("+l+") SectionCount:"+s+" Section "+sections[s]+" Township "+tr[0]+" Range "+tr[1]+" MapIDnum: "+mapidnum+" MapID: "+mapid+" TotAPN="+totalapnsfound);
    mapid = mapid.slice(4,13) /* 849010100 */
    iimSet("mapid", mapid)
    /* read number of parcel IDs for this map ID */
    iret = iimPlay("macro-that-finds-how-many-detail-records-for-map-id.iim")
    apnsfoundstr = iimGetLastExtract()
    if (iret == -101) {
    /* user pressed Stop button */
    break loopm;
    }
    n = apnsfoundstr.indexOf(" APN(s) Found",0)
    if (n != -1) {
    apnsfound = parseInt(apnsfoundstr.slice(0,n))
    } else apnsfound = 0
    loopn:
    for (n=1; n<= apnsfound; n++) { iimSet("parcelloop", n) iimDisplay("TownshipRange "+t+"("+l+") SectionCount:"+s+" Section "+sections[s]+" Township "+tr[0]+" Range "+tr[1]+" MapIDnum: "+mapidnum+" MapID: "+mapid+" TotAPN="+totalapnsfound+" APN "+n+"("+apnsfound+")") iret = iimPlay("macro-that-reads-detail-record.iim") if (iret == -101) { /* user pressed Stop button, break out of labeled loop (both FOR loop and DO...WHILE) */ break loopm; } if (iret == -933) { /* when disconnect WiFi get: -933 Error Loading Page */ /* do something to retry, or run a script PROMPT "Error Loading Page (WiFi Error?)" */ continue; } parceldash = iimGetLastExtract(1) /* have single parcel number (with dashes, maybe with split letter), next step needs parcel number without dashes */ parcel = parceldash.replace(/-/g,''); /* take all values so far, pass to iMacros to put into Form for writing to Database */ iimSet("county", county) iimSet("parcel", parcel) iimSet("parceldash", parceldash) iimSet("mapid", mapid) iimSet("township", tr[0]) iimSet("range", tr[1]) iimSet("section", sections[s]) iimDisplay("TownshipRange "+t+"("+l+") SectionCount:"+s+" Section "+sections[s]+" Township "+tr[0]+" Range "+tr[1]+" MapIDnum: "+mapidnum+" MapID: "+mapid+" TotAPN="+totalapnsfound+" APN "+n+"("+apnsfound+") Parcel:"+parcel); iret = iimPlay("macro-that-reads-parcel-data-puts-it-in-form-that-writes-to-MySQL.iim") } /* end for APNs found */ mapidnum++ } while (mapid != "#EANF#")

    iMacros web site has full documentation on all the commands, including iimSet (sets a variable for use in an iMacros script), iimPlay (play an iMacros script), iimGetLastExtract (bring extracted data into Javascript), and iimDisplay (display text in a status area of the screen).

    In iMacros scripts you would access the variables (set with iimSet).

    ' macro-that-finds-each-map-id.iim uses the parameter like this:
    ' Find the nth Map ID. The page displays a link to a PDF of the map; the Map ID is the text of the link.
    TAG POS=R{{mapidnum}} TYPE=A ATTR=HREF:http://156.42.37.20* EXTRACT=TXT

    ' macro-that-reads-detail-record.iim uses the parameter like this:
    ' Find the nth Parcel Number, displayed as a link to the first page of the parcel's information (the County Assessor's page has links to the County Treasurer's info for this parcel).
    TAG POS=R{{parcelloop}} TYPE=A ATTR=HREF:/Assessor/ParcelApplication/Detail.aspx* EXTRACT=TXT

    Want Me to Help?

    If this is giving you ideas for grabbing information you could use, I can probably write iMacros scripts to get what you need, into a database or web page. Contact Me so we can talk.

  • Form Processing in PHP

    Best I have found for processing forms is
    Tectite Form Mail.

    Tectite is Secure (spammers can’t use your form to send other emails), written from scratch by professional PHP programmers who understand email security. Your email is hidden in a configuration file (not in the form) all the form has is a name like “Me” or “Sales” (optional, but so important of course you’d use that feature).

    Has required fields, value checking, custom error pages (with informative messages, telling the visitor which field they didn’t fill in right).

    Send results to text file and/or the email(s) you specify in your configuration file.

    Completely free. Written in PHP. Thorough documentation.

    Even has a PHP interface. I wrote a form for saving results of online research, used the Tectite PHP interface to save the entire form’s results into a WordPress post.

  • Troubleshooting WordPress Plugin Making Blog SLOW

    Some of my blogs were taking several minutes to load. Nothing would happen, and then they load quickly.

    PhpMyAdmin says all MySQL tables are OK.

    Firefox Web Console (I think it’s part of the Web Developer add-on) shows lines like this:
    GET https://molten-salt-reactor.lc.lndo.site/ [HTTP/1.1 200 OK 283757ms]
    (took 283.757 seconds for the page to load) (more…)

  • WordPress Multi-Site Domain Mapping

    Important: This was written in 2012, when you needed to use a plugin for domain mapping. With version 5.something of WordPress, and with version 6+, domain mapping is built into the WordPress core.

    If you were using the obsolete plugin for domain mapping, you should document the exact domain names you were mapping to, for each site. Then, network disable it and then delete it.

    In new versions of WordPress, you simply put the domain name you want into My Sites, Network Admin, Sites, then hover over the site you want, click Edit, in the Info tab edit the “Site Address (URL)” field. Use the full URL, including https://

    You still have to set the DNS so the domain name points to your WordPress Multi-Site installation.

    With WordPress version 3+ or 4+ in Multi-Site Mode, and the Domain Mapping Plugin, you can map domain names to any of your blogs. I’ll walk you through the steps to install the plugin (you have to move a few files and edit some configuration settings). Then I’ll show how to specify the mappings you want. (There are several blogs with partial instructions, that didn’t explain the configuration settings and didn’t give examples of how to specify the mappings — but you won’t have to figure it out because I did!)

    (more…)
  • SysInternals Utilities

    SysInternals Utilities

    http://technet.microsoft.com/en-us/sysinternals/default.aspx

    If you learn all the tools, you can diagnose and troubleshoot some very complex system problems, crashes, annoyances, bugs, incompatibilities, CPU hogs, program lockups, etc.

    There are a few utilities that are very useful by people who just want their computers to run well. (more…)

  • WordPress 3 (or 4) Multi-Site Installation, on Shared Hosting, Even with Existing Web Sites

    WordPress 3 (or 4) Multi-Site Installation, on Shared Hosting, Even with Existing Web Sites

    Here’s how to Install WordPress 3 with the New Multi-Site Capabilities — Even if you Already Have a Website in your Hosting Account. [Updated, works on WordPress 4 through at least WP 4.5)

    WordPress multi-site features let you very easily create blogs (now officially called “sites”).

    You can now have multiple blogs in WordPress with much less administration of WordPress updates, plug-in updates and settings, theme updates, etc. Multiple blogs, for each domain you are hosting, can be managed by a single installation of WordPress. (more…)

  • WordPress 3 Allow Posts in Menu (as well as Pages)

    In WordPress 3.3 (and probably earlier versions) you can make custom menus in your blog.

    Go to Appearance, Menus (/wp-admin/nav-menus.php) and you can add Pages or Custom Links to your menu.

    But how do you put specific Posts on your menu?

    Click on Screen Options (top right corner of the screen), and you’ll see check  boxes for all the types of items you can put in a menu, plus some other information such as the link target and CSS classes.

    You will probably want to change the text that gets displayed in the menu (the default is the post title). Click on the drop-down arrow by each menu item, and you can change the Navigation Label (what shows in the menu) and the Description (displayed in some themes).