Changeset 3005 in products for quintagroup.plonegooglesitemaps/trunk


Ignore:
Timestamp:
Nov 12, 2010 1:07:34 PM (13 years ago)
Author:
olha
Message:

doc files updated

Location:
quintagroup.plonegooglesitemaps/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonegooglesitemaps/trunk/docs/HISTORY.txt

    r3002 r3005  
    22========= 
    33 
    4 1.6.0 (2010-10-11) 
     41.6.0 (2010-11-12) 
    55------------------ 
    66 
     
    88  with default "id" and "path" filters. 
    99  [mylan] 
    10 * Updated tests, added filtering doctests, 
     10* Updated tests, added filtering doctests. 
    1111  [mylan] 
    1212 
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/README.txt

    r2845 r3005  
    1 =============================== 
    2 quintagroup.plonegooglesitemaps 
    3 =============================== 
    4  
    51Plone Google Sitemaps product allows Plone websites to get better visibility for Google search engine by providing it with complete listing of URLs to website content. 
    62   
     
    2218===== 
    2319 
    24   To enable Google Sitemaps on your site: 
     20To enable Google Sitemaps on your site: 
    2521 
    26   * Add Sitemap(s) at Google Sitemap "Settings" tab (Add-on Products Configuarion -> Google Sitemaps). You can add any of the Sitemap types: content, mobile or news.  
     22* Add Sitemap(s) at Google Sitemap "Settings" tab (Add-on Products Configuarion -> Google Sitemaps). You can add any of the Sitemap types: content, mobile or news.  
    2723 
    28   * Let Google know about your Sitemap(s) by adding your Sitemap to Google Sitemaps. 
     24* Let Google know about your Sitemap(s) by adding your Sitemap to Google Sitemaps. 
    2925 
    30   See more detailed instructions on Plone Google Sitemaps usage at http://projects.quintagroup.com/products/wiki/qPloneGoogleSitemaps 
     26See more detailed instructions on Plone Google Sitemaps usage at http://projects.quintagroup.com/products/wiki/qPloneGoogleSitemaps 
    3127 
    3228MIGRATION 
    3329========= 
    3430 
    35    If you UPGRADE older version of quintagroup.plonegooglesitemaps package to newer: 
    36    -------------------------------------------------------------------------------- 
    37     1. In your zope instance configuration or buildout - replace old package version 
    38        with new one. 
    39     2. Run plone instance and reinstall package with Quickinstaller tool 
    40        ("Add-on Products" in plone control panel). 
     31If you UPGRADE older version of quintagroup.plonegooglesitemaps package to newer: 
     32--------------------------------------------------------------------------------- 
    4133 
    42    If your MIGRATE from Products.qPloneGoogleSitemaps to quintagroup.plonegooglesitemaps: 
    43    ------------------------------------------------------------------------------------- 
    44     1. Add to new plone instance/buildout both qPloneGoogleSitemaps product and 
    45        last version quintagroup.plonegooglesitemaps package. 
    46     2. Copy Data.fs from old Plone instance to new one. 
    47     3. Start your new zope instance/buildout. 
     341. In your zope instance configuration or buildout - replace old package version with new one. 
     352. Run plone instance and reinstall package with Quickinstaller tool ("Add-on Products" in plone control panel). 
    4836 
    49     _The following steps are performed in the plone instance_ 
    50     4. With portal_migration (ZMI) - upgrade plone instance. 
    51     5. With Quickinstaller tool ("Add-on Products" in plone control panel) 
    52        deinstall old "Plone Google Sitemaps" product and install new version. 
    53     6. Go to *Import* tab in portal_setup tool (ZMI), select "Migrate from  
    54        qPloneGoogleSitemaps to quintagroup.plonegooglesitemaps" profile from 
    55        selection box and choose same-named import step and push "Import  
    56        selected steps" button. 
     37If your MIGRATE from Products.qPloneGoogleSitemaps to quintagroup.plonegooglesitemaps: 
     38-------------------------------------------------------------------------------------- 
    5739 
    58     _And the last clean-up steps:_ 
    59     7. Remove qPloneGoogleSitemaps product from your zope instance/buildout 
    60        configuration. 
     401. Add to new plone instance/buildout both qPloneGoogleSitemaps product and last version quintagroup.plonegooglesitemaps package. 
     412. Copy Data.fs from old Plone instance to new one. 
     423. Start your new zope instance/buildout. 
     43 
     44The following steps are performed in the plone instance: 
     45 
     464. With portal_migration (ZMI) - upgrade plone instance. 
     475. With Quickinstaller tool ("Add-on Products" in plone control panel) deinstall old "Plone Google Sitemaps" product and install new version. 
     486. Go to *Import* tab in portal_setup tool (ZMI), select "Migrate from qPloneGoogleSitemaps to quintagroup.plonegooglesitemaps" profile from selection box and choose same-named import step and push "Import selected steps" button. 
     49 
     50And the last clean-up steps: 
     51 
     527. Remove qPloneGoogleSitemaps product from your zope instance/buildout configuration. 
    6153 
    6254 
     
    6456========== 
    6557 
    66   Watch Plone Google Sitemaps Screencasts at http://quintagroup.com/cms/screencasts/qplonegooglesitemaps to see how to use this products on your Plone instance. Learn about how to install and configure Sitemaps on your Plone instance, how to create new Google Sitemaps, and how to let Google know about them. 
     58Watch Plone Google Sitemaps Screencasts at http://quintagroup.com/cms/screencasts/qplonegooglesitemaps to see how to use this products on your Plone instance. Learn about how to install and configure Sitemaps on your Plone instance, how to create new Google Sitemaps, and how to let Google know about them. 
    6759 
    6860LINKS 
    6961===== 
    7062 
    71   * See "Google Sitemaps": https://www.google.com/webmasters/sitemaps website for more information. 
    72  
    73   * Product Homepage: http://quintagroup.com/services/plone-development/products/google-sitemaps 
    74  
    75   * Documentation Area: http://projects.quintagroup.com/products/wiki/qPloneGoogleSitemaps 
    76  
    77   * Repository: http://svn.quintagroup.com/products/quintagroup.plonegooglesitemaps 
    78  
    79   * Releases: http://plone.org/products/qplonegooglesitemaps/releases 
    80    
    81   * Watch "Plone Google Sitemeps" Screencast at http://quintagroup.com/cms/screencasts/qplonegooglesitemaps 
    82  
     63* See "Google Sitemaps": https://www.google.com/webmasters/sitemaps website for more information. 
     64* Product Homepage: http://quintagroup.com/services/plone-development/products/google-sitemaps 
     65* Documentation Area: http://projects.quintagroup.com/products/wiki/qPloneGoogleSitemaps 
     66* Repository: http://svn.quintagroup.com/products/quintagroup.plonegooglesitemaps 
     67* Releases: http://plone.org/products/qplonegooglesitemaps/releases 
     68* Watch "Plone Google Sitemeps" Screencast at http://quintagroup.com/cms/screencasts/qplonegooglesitemaps 
    8369 
    8470AUTHORS 
    8571======= 
    8672 
    87   The product was developed by Quintagroup.com team: 
     73The product was developed by Quintagroup.com team: 
    8874 
    89   * Myroslav Opyr 
     75* Myroslav Opyr 
     76* Andriy Mylenkyi 
     77* Nazar Ilchuk  
     78* Mykola Kharechko 
     79  
     80Copyright (c) "Quintagroup": http://quintagroup.com, 2004-2010 
    9081 
    91   * Andriy Mylenkyi 
    92  
    93   * Nazar Ilchuk  
    94  
    95   * Mykola Kharechko 
    96   
    97  
    98 Copyright (c) "Quintagroup": http://quintagroup.com, 2004-2010 
  • quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/filters.txt

    r3002 r3005  
    33================== 
    44 
    5 Filtering introductioin 
    6 ======================= 
    7  
    8 Sitemap portal type has an option, designed to filter out 
    9 objects which should be excluded from a sitemap. This option is 
    10 accessable in sitemap edit form and is labeled as 
    11 "Blackout entries". 
     5Introduction 
     6============ 
     7 
     8Sitemap portal type has an option that filters objects that 
     9should be excluded from a sitemap. This option is accessable 
     10on sitemap edit form and is labeled as "Blackout entries". 
    1211 
    1312In earlier versions of the package (<4.0.1 for plone-4 branch 
    1413and <3.0.7 for plone-3 branch) this field allowed to 
    15 filter objects only by their ids, and looked like: 
     14filter objects only by their ids, and it looked like: 
    1615 
    1716<pre> 
     
    2019</pre> 
    2120 
    22 So, all objects with "index.html" or "index_html" ids were 
    23 excluded from the sitemap. 
    24  
    25 In the new versions of GoogleSitemaps filtering was remade 
    26 to pluggable architecture. Now filters became named multi 
    27 adapters. There are only two default filters - "id" and 
    28 "path". 
     21As a result, all objects with "index.html" or "index_html" ids  
     22were excluded from the sitemap. 
     23 
     24In the new versions of GoogleSitemaps filtering was refactored 
     25to pluggable architecture. Now filters turned to be named multi 
     26adapters. There are only two default filters: "id" and "path". 
    2927 
    3028Since different filters can be used - new syntax was applied 
     
    3432  [<filter name>:]<filter arguments> 
    3533 
    36 If no <filter name> is specified - "id" filter will 
    37 be used. If <filter name> is specified - system will look 
    38 for <filter name>-named  multiadapter to IBlackoutFilter 
    39 interface. If such multiadapter is not found - filter 
    40 will be ignored without raising any errors. 
    41  
    42  
    43 Following parts demonstrate working of the filtering. 
    44 Aspects of default filters ("id" and "path") 
    45 are considered yet. 
    46  
    47 Setup demonstration environment 
     34* If no <filter name> is specified - "id" filter will be used.  
     35* If <filter name> is specified - system will look for  
     36  <filter name>-named  multiadapter to IBlackoutFilter interface.  
     37  If such multiadapter is not found - filter ill be ignored without 
     38  raising any errors. 
     39 
     40The following parts demonstrate how to work with filtering. 
     41Aspects of default filters ("id" and "path") will also be  
     42considered. 
     43 
     44Demonstration environment setup 
    4845=============================== 
    4946 
    50 First, we must perform some setup. We use the testbrowser that is 
     47First, we have to do some setup. We use testbrowser that is 
    5148shipped with Five, as this provides proper Zope 2 integration. Most 
    5249of the documentation, though, is in the underlying zope.testbrower 
     
    5754    >>> portal_url = self.portal.absolute_url() 
    5855 
    59 The following is useful when writing and debugging testbrowser tests. 
    60 It lets us see all error messages in the error_log. 
     56This is useful when writing and debugging testbrowser tests. It lets 
     57us see all error messages in the error_log. 
    6158 
    6259    >>> self.portal.error_log._ignored_exceptions = () 
     
    8885============= 
    8986 
    90 First create some content for demonstrations. 
     87First, create some content for demonstration purpose. 
    9188 
    9289In the root of the portal 
     
    105102    >>> browser.getControl('Add Content Sitemap').click() 
    106103     
    107 Now we bring-up to edit form of the newly created content sitemap. 
    108 We are interested in two things: "Blackout entries" field must 
    109 present in the form and by default it should be empty. 
     104Now we are landed on the newly-created sitemap edit form. 
     105What we are interested in is "Blackout entries" field on the edit  
     106form, it should be empty by default settings. 
    110107 
    111108    >>> file("/tmp/browser.0.html","wb").write(browser.contents) 
     
    121118 
    122119 
    123 Click on "Save" button lead us to result sitemap view. 
     120Clicking on "Save" button will lead us to the sitemap view. 
    124121 
    125122    >>> print browser.contents 
     
    127124 
    128125 
    129 "sitemap.xml" link should appear in "Settings" page of the 
    130 Plone Google Sitemap configlet when "Content Sitemap" 
     126"sitemap.xml" link should appear on "Settings" page of the 
     127Plone Google Sitemap configlet after "Content Sitemap" 
    131128was added. 
    132129 
     
    135132    >>> smedit_url = smedit_link.url 
    136133 
    137 This link points to edit form of the newly created sitemap.xml. 
    138 Let prepare view link to simplifier following demonstrations. 
     134This link points to the newly-created sitemap.xml edit form. 
     135Let's prepare view link to simplify the following demonstrations. 
    139136 
    140137    >>> smedit_url.endswith("sitemap.xml/edit") 
     
    146143========== 
    147144 
    148 Created sitemap has no filters and all documents should appear in it. 
     145The created sitemap has no filters applied and all documents should appear in it. 
    149146 
    150147    >>> browser.open(smview_url) 
     
    152149    >>> no_filters_content = browser.contents 
    153150 
    154 Check if resulted page really is sitemap... 
     151Check if result page is really a sitemap... 
    155152 
    156153    >>> print browser.contents 
     
    158155 
    159156 
    160 Create regular expression, which help us to test which urls pass the filters. 
     157Create regular expression, which will help us to test which urls pass the filters. 
    161158 
    162159    >>> reloc = re.compile("<loc>%s([^\<]*)</loc>" % self.portal.absolute_url(), re.S) 
    163160 
    164 Test if all 4 documents and default front-page present in the sitemap 
    165 without filters. 
     161Test if all 4 documents and default front-page are in the sitemap without filters. 
    166162 
    167163    >>> no_filters_res = reloc.findall(no_filters_content) 
     
    178174================= 
    179175 
    180 Go to the edit form of the sitemap and add "doc1" 
    181 and "front-page" lines with "id:" prefix to the 
    182 "Blackout entries" field. 
     176Go to the sitemap edit form and add "doc1" and "front-page" lines with "id:"  
     177prefix to the "Blackout entries" field. 
    183178 
    184179    >>> browser.open(smedit_url) 
     
    191186    >>> id_filter_content = browser.contents 
    192187 
    193 "doc1" and "front-page" documents should be excluded from the 
     188"doc1" and "front-page" documents should now be excluded from the 
    194189sitemap. 
    195190 
     
    204199=================== 
    205200 
    206 Suppouse we wont to exclude the "front_page" from portal root 
    207 and "doc2" document, located in test_user_1_ home folder, 
    208 but leave untouched "doc2" in portal root with all other objects. 
     201Suppose we want to exclude "front_page" from portal root and "doc2" 
     202document, located in test_user_1_ home folder, but leave "doc2"  
     203untouched in portal root with all other objects. 
    209204 
    210205    >>> browser.open(smedit_url) 
     
    231226==================== 
    232227 
    233 Now I have the question: "What filter will be used when no  
    234 filter name prefix was specified (old-fashion filters for 
    235 example)?" 
    236  
    237 Go to the edit form of the sitemap and add "doc1" and 
    238 "front-page" lines without any filter name prefix to the 
    239 "Blackout entries" field. 
     228Now I have a question: "What filter will be used when no  
     229filter name prefix is specified (e.g. old-fashion filters)?" 
     230 
     231Go to the sitemap edit form and add "doc1" and "front-page" 
     232lines without any filter name prefix to the "Blackout entries"  
     233field. 
    240234 
    241235    >>> browser.open(portal_url + "/sitemap.xml/edit") 
     
    248242    >>> default_filter_content = browser.contents 
    249243 
    250 "id" filter must be used as default filter. So all "doc1" and 
     244"id" filter must be used as default filter. So, all "doc1" and 
    251245"front-page" objects should be excluded from the sitemap. 
    252246 
     
    258252 
    259253 
    260 Creation own filters 
    261 ==================== 
    262  
    263 Suppouse we want to create own blackout filter,  
    264 which behave like id-filter, but has some differencies. 
    265 Our fitler has following format: 
     254Create your own filters 
     255======================= 
     256 
     257Suppose we want to create our own blackout filter,  which will 
     258behave like id-filter, but will have some differences. Our fitler  
     259has the following format: 
    266260 
    267261  (+|-)<filtered id> 
    268262 
    269   - when 1st sign is "+" then only objects with <filtered id> 
    270     should be leaved in sitemap after filetering; 
    271   - if 1st sign is "-" then all objects with <filtered id> 
    272     should be excluded from the sitemap (like default id 
    273     filter). 
    274  
    275 You need create new IBlckoutFilter multi-adapter, 
    276 and register it with unique name. 
     263- if the 1st sign is "+" then only objects with <filtered id> 
     264  should be left in sitemap after filetering; 
     265- if the 1st sign is "-" then all objects with <filtered id> 
     266  should be excluded from the sitemap (like default id filter). 
     267 
     268You need to create new IBlckoutFilter multi-adapter, and register 
     269it with unique name. 
    277270 
    278271    >>> from zope.component import adapts 
     
    302295    ...                name=u'signedid') 
    303296 
    304 So that's all what needed to add new filter. 
    305 Now test newly created filter. 
     297So that's all what needed to add new filter. Now test newly-created 
     298filter. 
    306299 
    307300Check whether white filtering ("+" prefix) works correctly. 
    308 Go to edit form of the sitemap and add "signedid:+doc1" 
     301Go to the sitemap edit form and add "signedid:+doc1" 
    309302to the "Blackout entries" field. 
    310303 
     
    317310    >>> signedid_filter_content = browser.contents 
    318311 
    319 Only objects with "doc1" id should be leaved in the sitemap. 
     312Only objects with "doc1" id should be left in the sitemap. 
    320313 
    321314    >>> signedid_filter_res = reloc.findall(signedid_filter_content) 
     
    326319 
    327320 
    328 And for the last - check wheter black filtering ("-" prefix) 
    329 works correctly. 
    330 Go to the edit form of the sitemap and add "signedid:-doc1" 
    331 to the "Blackout entries" field. 
     321Finally, check whether black filtering ("-" prefix) works correctly. 
     322Go to the sitemaps edit form and add "signedid:-doc1" to the "Blackout  
     323entries" field. 
    332324 
    333325    >>> browser.open(smedit_url) 
     
    339331    >>> signedid_filter_content = browser.contents 
    340332 
    341 All objects except those having "doc1" id must be included in 
     333All objects, except those having "doc1" id, must be included in 
    342334the sitemap. 
    343335 
Note: See TracChangeset for help on using the changeset viewer.