[Plugin: Google XML Sitemaps] Possibily for third party to hop on "addurl" (4 posts)

  1. Ofer Wald
    Posted 7 years ago #


    Writing a plugin which should basically add some pages for each page in the table (not third party pages). When the sm_buildup is called I can't tell which pages were created in the sitemap and so can't do my "mojo".

    Either I am missing something, or I would appreciate if such a feature can be added (maybe as a new event)

    Thanks in advance

  2. mikegogulski
    Posted 7 years ago #


  3. Arne Brachhold
    Posted 7 years ago #

    You already can (see documentation.txt) :-)

    function your_pages() {
    	$generatorObject = &GoogleSitemapGenerator::GetInstance(); //Please note the "&" sign!
    	if($generatorObject!=null) $generatorObject->AddUrl("http://blog.uri/tags/hello/",time(),"daily",0.5);
  4. Ofer Wald
    Posted 7 years ago #


    Just saw this reply now, this is not what I meant. (If it was, I guess I would avoid bothering you).

    What I meant is that your plugin creates a page list, and than creates a sitemap. Naturally the 3rd party pages are added too, with the sm_buildmap action, however they are unable to access the page list.

    Assume that my plugin is a one that creates a few pages from a single page. (you have example.org/page) and my plugin creates example.org/page/1 and example.org/page/2.

    My plugin does this for every page, so a good use of the sitemap plugin would be to add such pages to the map. The suggested callback does not really allow me to do that, rather just add a few pages. When iterating over the list of pages your plugin generates (and adding such pages) would have been helpful.

    Sorry for this long and complex message, I just hope I am understood this time. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic