Giter Club home page Giter Club logo

sitemapcfc's People

Contributors

jamiekrug avatar

Watchers

 avatar

sitemapcfc's Issues

Add locPrefix and locSuffix as optional init args

Add locPrefix and locSuffix as optional init args. When a locPrefix is
supplied, it's value will prepend every loc tag value in the collection
initialized. Similarly, a locSuffix argument will be appended to the end of
each loc value.

For example, if you have a query (call it pages) with a column alias and a
row with an alias value of 'page2' that needs to translate to a URL loc tag
value of 'http://site.com/page2.html' then this code...

collectionKeyMap = { loc = 'alias' };
sitemapArgs = { collection = pages,
                collectionKeyMap = collectionKeyMap,
                locPrefix = 'http://site.com/',
                locSuffix = '.html' };
sitemap = createObject('component', 'Sitemap').init(sitemapArgs);
writeOutput( sitemap.getXmlString() );

...should produce output containing the following...

<url><loc>http://site.com/page2.html</loc></url>

Original issue reported on code.google.com by [email protected] on 20 Mar 2009 at 5:05

Actual W3C datetime format for lastmod keys errors

Any CFML date/time string or object works great, but ironically, an actual
W3C datetime format, which is what the final result is always converted to,
fails.

For example:

collection = [];
collection[1] = { loc='http://site.com/', lastmod='1994-11-05T13:15:30Z' };
sitemap = createObject('component', 'Sitemap').init(collection);

Original issue reported on code.google.com by [email protected] on 22 Mar 2009 at 2:58

Format lastmod as given time and use TZD for UTC offset

Rather than having formatAsW3CDateTime() convert given lastmod date/time
values to UTC and always using "Z" for W3C Datetime's TZD (time zone
designator), simply format given date/time and calculate UTC offset for TZD
accordingly.

Original issue reported on code.google.com by [email protected] on 14 Jul 2009 at 9:07

thisURL needs to be reset in getCollectionFromArray() loop

What steps will reproduce the problem?
1. Create an array (what I used) of URLs.  Put a lastmod value in some entries 
but not in others
2. Create Sitemap object: createObject("component", "Sitemap").init(a_siteMap);
3. Run siteMap.getXML();

What is the expected output? What do you see instead?
I get the following error: lastmod must be a valid date/time string or object.
This is because on line 207 (at least this is where I fixed it) of the code, 
when you loop to the 
next array entry, you don't reset the structure.  Therefore the data from the 
previous array 
element is used if the current array element does not have a lastmod entry.  I 
picked up on this 
because the date is W3C formatted which doesn't validate as a date in 
ColdFusion.

What version of the product are you using? On what operating system?
Version 1.0 (March 21, 2009), downloaded from RIAForge 2009-07-08.  Windows 
2008, 
ColdFusion 8.

Please provide any additional information below.
I just started using this CFC this morning.  Thanks a lot for releasing it and 
saving me a lot of 
time!  Please let me know if you have any questions about this: [email protected] .

Original issue reported on code.google.com by [email protected] on 8 Jul 2009 at 7:19

Allow array of URL strings as init collection

Allow initialization from array of URLs. This will be in addition to the
currently supported array of structs collection (and will be much like the
list type option already supported).

For example, this should be a valid initialization and sitemap.xml
generation code snippet (in CF8/Railo3 at least):

urlCollection = [ 'http://site.com/', 'http://site.com/page2.html' ];
sitemap = createObject('component', 'Sitemap').init(urlCollection);
sitemap.toFile( expandPath('sitemap.xml') );

Original issue reported on code.google.com by [email protected] on 20 Mar 2009 at 4:45

Need unit tests.

Stop being lazy/stupid and use a bit o' test driven development (TDD) with
MXUnit unit tests on this bad boy!

Original issue reported on code.google.com by [email protected] on 23 Mar 2009 at 8:35

Add Sitemap Index XML support

Add functionality to model and write a Sitemap Index XML file, much like
Sitemap.cfc does for standard Sitemap XML files:
http://sitemaps.org/protocol.php#index

Original issue reported on code.google.com by [email protected] on 24 Mar 2009 at 5:22

Allow global default values for all optional collection keys

Allow global default values for all optional url child tags (lastmod,
changefreq, priority). So, you could leave any optional tag out of the
collection argument at initialization, but instead optionally pass a value
that will be used for the respective tag for every url item in the sitemap.

This should be accomplished by adding three more optional init arguments:
lastmodDefault, changefreqDefault and priorityDefault.

For example, the following code would produce a sitemap.xml with two url
tag groups, each with a different loc value of course, but with the same
lastmod value for each url...

urlList = 'http://site.com/,http://site.com/page2.html';
lastmodDefault = now();
sitemap.createObject('component', 'Sitemap').init( collection=urlList,
lastmodDefault=lastmodDefault );

Original issue reported on code.google.com by [email protected] on 20 Mar 2009 at 5:14

CFML compatibility testing

Pass all unit tests for ColdFusion 8, ColdFusion 9, Railo 3.0, Railo 3.1,
OpenBD 1.1 (and previous OpenBD, if I can find info/download?).

Original issue reported on code.google.com by [email protected] on 17 Jul 2009 at 8:47

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.