CRE Loaded Forms and Surveys : System Overview

David M. Graham on February 3rd, 2010 | File Under ecommerce -

During my time at Chain Reaction (now known as Chain Reaction Ecommerce, Inc.), I created conceptual design for several new major system components.   One of those elements is the CRE Loaded Forms and Survey System (FSS).  Now present in the 6.3 and 6.4 cart releases,  FSS suffers from a few serious defects in usability.

The most egregious problem is a lack of documentation.   This is complicated by an absence of  data checking and feedback features and sub-optimal work flow setup in what is, admittedly, a pretty immature product.   Still, there is a good deal of potential in this underwhelming initial deployment, if you know where to look.

Lets start with a quick overview of the system as seen from the Admin tool.  Within the new top level "Forms and Survey" menu, there are 4 options.  Those options are Form Builder, Post Manager, Configuration and Backup.  The configuration and backup functionality are fairly self explanatory.  The form builder is used to build forms and the post manager is used to view post results for various forms.  There are a few gotchas in there, chiefly due to the extension of the terminology to include the term "surveys", but we'll ignore those for now.

The form builder looks somewhat like a standard osCommerce like  category / object management page.  On the first page you see various Forms and Survey "Folders".   Unlike other folder or category structures in the cart, this system does not support any descriptive text or meta tags.   Which makes providing any compelling reason for a visitor to navigate further rather difficult at best without using either the Content Director System , RCI object insertions or direct edits of the content template for the forms system.  Fortunately (if you can call it that), CDS is included on all distributions which include the Forms and Survey System.

Another oddity you will notice right away is that one mandatory folder already exists.  This is entitled the "System Folder" and it holds two subfolders which equate to specific cart locations - Account and Order.  Forms added here will appear during the Account Creation and Checkout (or Order Creation) processes and are of a special type - the "Survey".  It seems that the difference between a "form" and a "survey" is that survey "questions" are rendered within an existing form, while forms are complete forms with their own set of form tags under at least some circumstances.  You can see this by viewing the create_account.php page which shows the inputs associated with the account survey.   The FSS inputs appear in the "Options" section after all others have been rendered but before the password input fields- as part of the "create_account" form, as you can see in a source view.  Its a rather clumsy addition as is, but does offer some additional capabilities without too much silliness visible to the customer.  The order form however, is not so nice.

Forms can also be seen using the fss_forms_detail.php page.   The order form url can be formed by adding "fss_forms_detail.php?fPath=1&forms_id=2" after your B2B installation URL.    You'll see two form inputs - test file upload and Please rate your experience.  Obviously, you won't want each customer to be offered a chance to load up your storage with miscellaneous files in most cases.  So, be sure to turn this input off by toggling the status icon in the admin.  (FSS -> Forms Builder -> System Folder -> Order -> "test file upload" is the path to the control).

My next post on this will go into more detail about how to use the Forms Builder, and what capabilities are offered by the configuration values.  But, before we get into those, it would be helpful to get into the details of what HTML forms are and how they work.  Here are a few helpful resources:

HTML 4.01 Foms standards

HTML  5 Forms Standards

HTML Form Tutorial at w3Schools.com

An older, but more detailed tutorial at htmlgoodies.com

Based on these, and other resources, I'll outline how to use FSS to build a complete form...

Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
No Comments

Magento Product Data Import

David M. Graham on December 19th, 2009 | File Under Magento, ecommerce -

As with most eCommerce specialists, we are looking closely at the new kid on the block, Magento.  Despite the availability of users manuals, I like to begin by just using it.  This is a good way to determine just  how user friendly a new application can be.

I decided to begin with an activity that I have found to be key in effective product management activities in just about every shop I have ever worked with - product  import and export.

This should provide a serious test of usability  that goes beyond the developers ability to generate a pretty layout on the page, as well as determining just how powerful the carts ability to support batch processing can be.

I started by looking at the carts import/export tool.  This didn't take very long to locate,  being found quickly on the first level of the system menu in the cart admin.   The second level selections were profile and advanced profile, which seems to promise some flexibility and potential for expansion in this critical cart system.  Very good so far.

Selecting the Profile tool, I was presented with a searchable and filterable grid listing with configurable listing size and an "Add Profile" button.  The listing  included 6 pre-constructed profiles providing management for 3 data sets.  Customers, Products and Product Stocks.   This is one data object (customers) more than can be managed by an osCommerce cart with Easy Populate without any modification to the Magento cart - again, very good so far.

Having already created on test product, I started with a product export.  This is done by selecting a product related "profile" then selecting the "Run Profile" option from the menu on the left side of the admin screen.  Straight forward, and quickly accomplished.

I did however, skip evaluating the column headers other than a quick glance to assure they were there.  Doing this turned out to be a mistake.  More on that later.

My next step was to attempt an import of foreign product data.  I just happened to have a nifty little data set handy for just that test.  I popped back to the profile listing and hit the "Add New Profile" button to create an import profile to match my file structure.  This presented a 4 section page with the usual left menu and button panel at the right top of the main page.

The first set of  options required setting  a profile name, the type of entity involved, dataflow direction (import/export), a store id (everything left to default), a number of records (bit strange that), and a decimal separator.  This section can be seen in the image below:


Magento Add Profile page top

Notice the "(Products will be added\updated to this store if  'store' column is blank or missing in the import file)"  statement.  Again, more on this later...

The next section was rather obtuse.  Titled "File Information"  It contained a single drop down titled "Data Transfer" and containing two options - Interactive and "Local/Remote Server" .  I left this at "Interactive".

File Information Section


The next section was titled "Data Format".   The first element is a "Type" dropdown with selections including "MS Excel XML" and "CSV/Tab Separated".  Toggling the selection from Excel XML to CSV/Tab Separated switches the initially presented  "Spreadsheet Name" input apparently used to select a single spreadsheet out of a workbook  for new inputs titled "Value Delimiter" and "Enclose Values in"   in a rather cute use of AJAX.  the final input is a dropdown of "Yes/No" options entitled "Original Magento Attribute names in first row."


Magento Data Format


The final section of the page is the "Field Mapping" section.  It presents with a single button labeled "Add Field Mapping" :

Magento Initial Field Mapping Control

On clicking the "Add Field Mapping Button" you're presented with controls to add a "Field Mapping" entry.  This consists of a drop down labeled "In Database" and a text input box entitled "In File" along with a remove button.

Field Mapping Controls for Magento

The attribute selection dropdown contains an extensive selection of Magento product attributes (which refers to attributes of the product class or object rather than any specific aspect of a physical product as an experienced osCommerce user might expect).   I quickly setup a map outlining my file contents:

Initial Data Map

Short sweet and to the point.  Which it had better be.  Take too long and Magento's AJAX admin will bite you in the butt by throwing you to the login screen, which will return you to the profile listing where you started with an "Invalid Post" error like this one:

Invalid Post Data

Ah, the ability to make mistakes more quickly and waste time more obliviously - all thanks to Asynchronous JavaScript's session fracture feature.  In general, I'm not impressed by AJAX.  This is one good reason why.

I then proceeded to attempt to upload this file.  Not so quick.  Turns out that when Magento say's "Products will be added/updated to this store if 'store' column is blank or missing in the import file." - they aren't serious about that.  Really.   After a number of errors about missing "types" , attributes and so forth, I realized that if you expect to import your data you must include at least 4 extra columns in your import file which contains the store, website, attribute_set and type attributes.  For those running only a single store (I expect most users), the values of 'default', 'base', "Default' and 'simple" should work fine.  On export, the store attribute column contains the value "admin" - I ran into a report that using this on import would result in products not being visible in the store front until it had been changed.

Along the way, I also discovered that despite the complete absence of any data on required fields in this tool there are a surprising number of fields which are required before a product can be imported.  Not sure that "Short Description" belongs in that list, but its there.  The complete list, with legal values where applicable, is:

Name
Description
Short Description
SKU
Weight
Status (Enabled, Disabled)
Visibility (Catalog, Search)
qty
tax_class_id (None, Taxable Goods, Shipping)

I'm not sure if the import process can be carried out at the same time as  other administrative tasks or not.   I sure hope so.  It took the better part of 45 minutes to import a mere 1256 products.  What it was before a years worth of optimization work on the EAV based product management, I don't want to know.  By way of comparison, this is at least 5 times as long as it takes to upload 5000 products with 50 more fields on a shared hosting account using Easy Populate on CRE Loaded.  Suffice to say, I plan to have a good book and a cup of coffee handy before attempting to  import 5000 to 10000 products - a catalog size  not uncommon on many sites.

Overall, I'm impressed with many aspects of the import / export tools provided by Magento.    That there is a unified framework for data flow speaks well for this shopping cart.  But, the user friendliness is a bit lacking.   In page documentation of the required fields is lacking, reports in the Varien forums indicates that it is also missing in the User Manual and the exact functionality of the user mapping is not entirely clear.    This appears to be focused entirely on column selection from within the local data set - more of a field listing than mapping - as there is no provision for matching foreign field names.  The main purpose of  this feature seems to be to allow import of files without column headers in place.  While I'm new to Magneto, my more than 25 years worth of experience with delimited files tells me that building such files  without column headers is like juggling hand grenades with loose pins.  You know its going to get ugly, its just a question of when.  The presence of misleading statements as to ability to set the default store and the absence of any required element guidance on the front end are major flaws in this system.  I was however, fairly impressed with the back end error handling.

Keep in mind, this system review is not intended to be a comprehensive critique.  It is shaped by a focus on usability for users new to the software, and limited by my restricting myself to searches of the Magento Knowledge Base, Wiki and Forums in order to obtain a view of the software more congruent with that large portion of such users who seem to never RTFM.  I hope that one or more of the available users guides will address these issues quite well, though comments in the dozens of forum threads containing hundreds of posts from frustrated users tend to indicate otherwise.

Look for more posts on Magento in the near future - many of them from the new user perspective and undertaken without review of available literature as I take a good luck at just how user friendly Magento can be - and survey some of the more common frustrations with the Varien shopping cart's community variant prior to reviewing the available documentation...




Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
1 Comment

osCMax 2.0.4 Release: Security Management

David M. Graham on November 10th, 2009 | File Under ecommerce -

The osCMax project recently released an updated version of osCMax which removes the File Manager and Define Languages tools due to unspecified security concerns.

Details can be found in the osCMax forums - http://www.oscmax.com/forums/announcement-discussions/20984-security-notice-oscmax-2-0-4-released.html and in the osCMax Blog - http://www.oscmax.com/node/341

Few details are available but this flaw may also affect CRE Loaded and other osCommerce derivatives...

Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
No Comments

Web Usability - Some Thoughts

David M. Graham on August 6th, 2009 | File Under ecommerce -

As I write this, I am listening to a rather annoying and repetitive series of cutesy little beeps. Why? Because I've been reading an article I first found back in April of this year and keep meaning to review here. Its not very long, but it packs a good deal of punch and should be read by anyone looking to build a new site or reconstruct an older one.

The article is found at Search-Engine-Optimization-Help-Website-Spider-and-Visitor-Usability and is written by Ivan Strouchliak. He starts off with a small number of examples of how NOT to design sites. The examples are actual working websites that someone, somewhere expects to generate revenue. They are by no means amateur constructed sites for the most part. The list includes 3 apparently expensively produced FLASH websites.

The key mistakes they made include unusable navigation, site structure that is obtuse or worse, excessive use of color, effective but unfamiliar navigation user interface schemes and excessive use of slang vernacular.

Not an exhaustive list of crash landings - but not a bad group to start a good discussion of web usability with either. Ivan goes on to offer some good general advice on site optimization which may not be directly applicable to ecommerce sites using dynamic content management, but which should certainly be shaping development of such systems.

The key points are:

1. Use a widely accepted format for your website (Usually including navigation areas, header, content area and footer) and include contextual links in the content area.

This is important because familiarity breeds usability. A simple concept often ignored in the search for brand differentiation. Its also important in that most users focus their attention on the content. Why not? - it is what they are looking for after all.

2. Follow two simple rules of writing :
A. Use small coherent paragraphs
B. Use Headlines

These rules are important in that people rarely read every word on a page. They scan the page and read what is of interest to them. So breaking the content into readable chunks with attention drawing headlines can improve the rate at which a page captures the users attention.

3. Minimize use of Javascript and include it from separate files whenever possible. He rightly points out that CSS has improved enough to drastically lower the need for Javascript and that spiders can't process it as well as text markup even though they have improved this capability.

4. Be consistent.

While bots see the page as code, human users get confused if the page structure changes too often and will bail from the site.

5. Make finding stuff easy by:

A. Keeping file size small.
B. Include an internal search engine
C. Provide a clear trail of information

He refers to this latter as "information scent" - a reference to the phenomenon of users following the trail of references relevant to the target of their search throughout a sites page content.

I think to me, it may be more important to keep the pages content area small and focused than to keep the file size itself small. Not that the latter is unimportant - but that keeping the content tightly focused on a specific set of associated keywords should generate a more effective search target AND keep the page size lower.

Ivan closes up with a warning about using flash websites. He cites continued difficulty in indexing by search engines and general poor usability as compelling reasons to avoid FLASH as a primary means of site construction - or perhaps at all.

Food for thought.


Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
2 Comments

There is nothing like a good neighbor....

David M. Graham on July 21st, 2009 | File Under ecommerce -

Recently, a security threat was discovered in Zen Cart.  Specifically, the forgotten password routine could be used to discover a limited amount of data on several pages within the admin.  The information disclosed was not much - but any is too much.  So they created a  fix, and like any good development team they distributed it to their users.   But they did not stop there.   Like any good neighbor, they started letting other developers know where the issue might affect their distributions.  Sure enough the issue is also present in other osCommerce variants and descended carts.   This includes CRE Loaded, osC Max and osCommerce with the Admin Access with Levels contribution installed.  The most recent osCommerce releases do not use Admin Access with Levels, but an alternative of their own.   Thus, they may not be prone to this issue.

Thanks to the Zen Cart teams sharing of this issue with other development groups, patches were generated and supplied to users of osC Max within 48 hours of notification.  EOS Online Merchant received a similarly rapid  repair, and a CRE Loaded patch which includes data to address this issue is expected to be released today.   This type of cooperation may not be essential to keeping eCommerce software safe from penetration, but it certainly helps.  I look forward to seeing further collaboration towards more secure software for online shopping in the future.



Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
1 Comment

Market to your local economy

Denver Prophit Jr. on July 21st, 2009 | File Under ecommerce -

Some store owners cater to a local economy or drive foot traffic. By setting up oscommerce and creloaded carts with specific data manager enhancements, you can extend your reach with targeted efforts. Much work still needs to be done to osCommerce, CRE Loaded and EOS in this regard. Watch the Video and make your comments and questions, below.

Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
No Comments

CRE Loaded Clutter

David M. Graham on May 12th, 2009 | File Under creloaded, development, ecommerce -

In his post on CRE Loaded Clutter , Chris at oshelpers.com describes FDMS as inessential clutter in the course of presenting what is essentially an explanation of why CRE Loaded 6.3 is so overpriced for the feature set.

I beg to differ on this specific point.

Perhaps, as the system designer responsible for FDMS and the Chief Operating Officer of the firm which sold the system I have a few biases of my own here.  Download related issues in CRE Loaded accounted for a respectable portion of system complaints before FDMS development.  The existing download system lacked some pretty obvious marketing tools and capabilities.  The reporting systems sucked.  Those issues were just about enough by themselves.  Add to them the negative impact of the "Zero Weight Guessing Game" in the checkout and shipping routines which affect 100% of all cart users and the development of  FDMS  and its eventual inclusion into the core distributions was completely justified.  The market demand was also more like 20% than the 0.2% Chris estimates off the cuff.    The system also made it a lot easier for shops with physical products to offer product related downloads such as instruction manuals, user guides and brochures  -- pushing the number of potential benefactors even higher.  The list of reasons why FDMS is both essential and "A Good Thing" goes on and on.   Inessential is not justified here - though it is certainly fair to say the system is  over-priced when considered against other needs clammering for attention in the CRE Loaded code base.

CRE Loaded actually did a splendid job of selecting contributions for inclusion in the cart up to the 6.2 release.  In fact, it came very close to continuing that streak in the 6.2 release itself.  Ugly story there that I might tell someday, but not today. Fact remains that the top features in any CRE Loaded distribution can still be found in the top downloads of all time for osCommerce contributions and most of them remain in the top 50 if not the top 10 out of over 5000 candidates.

What Chris missed,  ignored  or chose not to  communicate there is that beginning with 6.2, CRE Loaded was no longer to be a "loading project" but a development project. Not a secret at all.  I certainly mentioned it in the CRE Loaded forums as I drove development in a new direction and I am pretty sure Chris was there to see it.    It was the right course then and a better one today.

The problem is that Chainreaction has an issue with steering a course that  calls on building a development company.  A problem with any course that relies on providing value to the community for which the community feels a need to pay.   The fact that so much clutter of any type remains is a reflection of this problem as much as anything.   That 107 of 114  feature requests made over the past 3 years remain open, many of them unanswered much less un-implemented is a clear sign of the weakness of Chainreaction Ecommerce 's  commitment to meet community needs.

Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
1 Comment

StrikeHawk eCommerce releases new training video

Denver Prophit Jr. on April 15th, 2009 | File Under Open Source, creloaded, development, ecommerce, education -

Our latest video, CRE Loaded Manual Order Creator retails for only $15.00 USD and includes up to 6 minutes of live animation slides with voice narrative on every aspect of creating a manual order within CRE Loaded 6.2.13.1 Standard, Pro & B2B. For more details, click the link below.

  • Lesson 1
    • Payment Method Configuration
    • Shipping Method Configuration
    • New Customers
    • Existing Customers
  • Lesson 2
    • Quickly search and use existing customers
    • Enter new customers
    • Customer IDs
    • Using the drop down selectors
  • Lesson 3
    • Selecting a category
    • Selecting a product
    • Assigning attributes
  • Lesson 4
    • Adding Tax
    • Adding Shipping Method and price
    • Selecting Payment Method
    • Adding Discount
    • Adding Comments
  • Lesson 5
    • Updating your order
    • Printing Invoices
    • Printing Packing Slips

More Info: CRE Loaded Admin Manual Order Entry

Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
No Comments

EOS Online Merchant Gets Development/Demo Site

David M. Graham on March 16th, 2009 | File Under ecommerce -

Over the past week, Tom O'Neill has been hard at work getting EOS Online Merchant ready for its 0.53 Alpha release.

Part of that preparation includes deployment of an ongoing demonstration site at the new EOS Online Merchant website.  This demo site is actively being used for development, so expect features to be a bit fluid in not only quality, but quantity.  The EOS Online Merchant Catalog Demo can be found at http://demo.eosonliinemerchant and the Admin Demo can be found at http://demo.eosonlinemerchant.org/admin/ .   The catalog user access information is:  User ID - test1 and Password - test1 .

We're withholding the Admin demo for a bit - as we will need to secure the more vulnerablel spots before allowing public access.  Interested developers can contact me for access.

This marks yet another early milestone in the continued development of the EOS Community.  Keep a weather eye on Source Forge for a new release sometime in the next two weeks.

Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
No Comments

osCommerce code modifications and PS-Pad

David M. Graham on February 6th, 2009 | File Under Open Source, development, ecommerce -

I've recently had to rebuild my working toolset again, following a catastrophic static electricty event which bricked my primary working machine.   The situation is not entirely gloomy though.  It has brought me the opportunity to work with a few new (to me anyway) open source tools.  One of them is the PSPad editor.  Its a handy little editor - and a worthy competitor for my old standby, HTMLKit.  The feature list is different - and one feature comes in REALLY handy as I work on catching up with some cart customization tasks that I want to capture in a modification list.  You know the routine - generating a list of instructions such as "near line 12849823  find  this code and after it add this" and so on.

PSPad has a nifty search feature that really helps here.  On the search box, you can elect to "List" the search results.  This opens a status window with the search results - and presents a button that can be used to open the list in a new file.  The results look like this:

\admin\easypopulate_export.php

222: 'v_products_quantity'          => $iii++,
261: p.products_quantity as v_products_quantity,
289: 'v_products_quantity'          => $iii++,
296: p.products_quantity as v_products_quantity
396: 'v_products_quantity'   => $iii++,
488: p.products_quantity as v_products_quantity,
539: 'v_products_quantity'   => $iii++,
546: p.products_quantity as v_products_quantity

Nifty.  How is this handy?  A number of ways.

First - if you are adding or modifying a given field, this gives you a listing of where it occurs in the file - with line numbers.  This provides a handy guide taking you directly to where you need to go in each file.   Simply work from the bottom of the list upwards, and the references will let you  generate your new code quickly and efficiently.

Next, if you are careful - this listing can form the basis for an instruction list.  The filename is even listed at the top for you already.   Using macro's you can quickly change:

546: p.products_quantity as v_products_quantity

to

At about line 546:

Find:

p.products_quantity as v_products_quantity

Insert After:

p.products_unit_size as v_products_unit_size

There are a couple of small gotcha's to watch for here.  The routine does truncate long lines.  Just copy and paste the actual lines from the target file over the output for the result being modified and you're ok.  Matching the target code to a fixed release point of the distribution you're starting from is also up to you.  Still, a handy approach to generating modification instructions whether for distribution to others, or just a helpful log of a mission accomplished!



Spread eCommerce News:
  • Print
  • email
  • Digg
  • del.icio.us
  • Live
  • Google Bookmarks
  • Facebook
  • MySpace
  • Technorati
  • StumbleUpon
  • Yahoo! Buzz
  • Yahoo! Bookmarks
  • Ping.fm
  • LinkedIn
  • Global Grind
  • Sphinn
  • Internetmedia
  • Slashdot
  • Blogosphere News
No Comments
google.load("language", "1"); var curstate = 0; var hasloaded = 0; function bnc_show_translated() { if (hasloaded == 0) { bnc_lang_callback(); hasloaded = 1; } for (i = 0; i < 0; i++) { var elem = $("bnc_original_" + i); if (elem) { if (curstate) { elem.show(); } else { elem.hide(); } } } for (i = 0; i < 0; i++) { var elem = $("bnc_trans_" + i); if (elem) { if (curstate) { elem.hide(); } else { elem.show(); } } } if (curstate) { $("bnc_trans_state1").show(); $("bnc_trans_state2").hide(); curstate = 0; } else { $("bnc_trans_state1").hide(); $("bnc_trans_state2").show(); curstate = 1; } } function bnc_detect_div(div_id) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; if (text.length > 0) { google.language.detect(text, function(result) { if (!result.error) { if (result.language != "en") { if (result.confidence > 0.25) { $("bnc_translating").show(); bnc_xlate_div(result.language, div_id, "en"); } } } } ); } } } function bnc_xlate_div(src_lang,div_id,o_lang) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; google.language.translate(text, src_lang, o_lang, function(result) { var translated = document.getElementById(div_id); if (result.translation) { translated.innerHTML = result.translation; } }); } } function bnc_lang_callback() { } function bnc_startup() { bnc_xlate_div("en", "bnc_translate_info", "en"); bnc_xlate_div("en", "bnc_translate_info2", "en"); } google.setOnLoadCallback(bnc_startup);
google.load("language", "1"); var curstate = 0; var hasloaded = 0; function bnc_show_translated() { if (hasloaded == 0) { bnc_lang_callback(); hasloaded = 1; } for (i = 0; i < 0; i++) { var elem = $("bnc_original_" + i); if (elem) { if (curstate) { elem.show(); } else { elem.hide(); } } } for (i = 0; i < 0; i++) { var elem = $("bnc_trans_" + i); if (elem) { if (curstate) { elem.hide(); } else { elem.show(); } } } if (curstate) { $("bnc_trans_state1").show(); $("bnc_trans_state2").hide(); curstate = 0; } else { $("bnc_trans_state1").hide(); $("bnc_trans_state2").show(); curstate = 1; } } function bnc_detect_div(div_id) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; if (text.length > 0) { google.language.detect(text, function(result) { if (!result.error) { if (result.language != "en") { if (result.confidence > 0.25) { $("bnc_translating").show(); bnc_xlate_div(result.language, div_id, "en"); } } } } ); } } } function bnc_xlate_div(src_lang,div_id,o_lang) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; google.language.translate(text, src_lang, o_lang, function(result) { var translated = document.getElementById(div_id); if (result.translation) { translated.innerHTML = result.translation; } }); } } function bnc_lang_callback() { } function bnc_startup() { bnc_xlate_div("en", "bnc_translate_info", "en"); bnc_xlate_div("en", "bnc_translate_info2", "en"); } google.setOnLoadCallback(bnc_startup);