WordPress.org

Ready to get started?Download WordPress

Forums

Site Last Modified
[resolved] Gr8 ;-) (7 posts)

  1. holgerhubbs
    Member
    Posted 1 year ago #

    How could this modification date be displayed on a different website?

    http://wordpress.org/extend/plugins/site-last-modified/

  2. EXED internet
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Do I understand correctly that you wish to show the modification date on site 1 to be displayed on site 2? Is site 2 completely seperated from site 1?

  3. holgerhubbs
    Member
    Posted 1 year ago #

    Thank you for your response ;-)
    Yes, the websites would be separate.
    Different servers, different domains, eventually even different platforms.

    How to do?
    - PHP class >>> WP Plugin
    - Write modification date and url (Site 1) into a text file...
    - Site 2 (same plugin or PHP class) would read and display
    - Mechanism to report several sites...

    For example my other websites:
    http://www.Dogs.com (updated May 13th)
    http://www.Cats.com (updated May 12th)
    http://www.Frogs.com (updated May 12th)

  4. EXED internet
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    When you have access to the database you could retreive the last modified timestamp of the posts directly.

    Otherwise you could indeed use a seperate textfile.

    Or as an alternative, more WordPress-like solution, you could create a new page and use the shortcode on that page. After that you can retreive that page from your other websites and destilate the timestamp from the page.
    You can make this a more easy job by adding some kind of id to the container element.

    Little example:

    • in the WordPress page, create something like
      <div id="last-modified">[site-last-modified]</div>
    • on another site, retreive the page (file_get_contents, but cUrl is also possible)
      $wppage = file_get_contents('url-of-file');
    • destilate the timestamp
      preg_match('|<div id="last-modified">([^<]*)</div>|is', $wppage, $timestamp);
  5. holgerhubbs
    Member
    Posted 1 year ago #

    Cool ;-)

  6. EXED internet
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    Can I close this issue?

  7. holgerhubbs
    Member
    Posted 1 year ago #

    Thank you, that's very polite. I closed it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags