It's fast and easy, and you can get in contact with others straight away...

Enter a Display Name
Enter your full name or a display name. Businesses, couples and families are also accepted. e.g.
Model Trains Inc.,
Sam and Janis Allen
Enter a username
Your username must be at least 6 characters in length, contain both letters and numbers, and end in a numbers.
Suggested usernames:
Password strength:
Your password can be up 250 characters in length and can contain letters, numbers, punctuation marks and spaces.
Hint: a secure password is long but easy to remember and not complex, e.g.
Jules Verne is an excellent author
Retype password
Enter the same password again to check for errors.

By signing up you agree to our Terms of Use & Privacy Policy

 
RecentNew
Sort posts by: Date
Cancel
Visibility
( )
Replies
Click for advanced permissions.
View
Edit
Reply
Approve
Moderate
Tags

Undo Redo Paste Link Attach an image or file
Welcome to the Pet Classifieds
This is a place intended for people that have a genuine love of animals to find a home for their pet, look to give a home, pet accessories &more questions & answers & anything in regards to pets in general.
Another small update this time.

Today we added some neat tricks in getting Mirror Island to work with Thoth. The plain text of any post can now be viewed with the "/src" page option. As well as unformatted text, you can also access the HTML version if it contains markdown formatting with the "/htm" page option.

Try it out now with this post using these links:
https://www.mirrorisland.com/1356/src
https://www.mirrorisland.com/1356/htm



Additional markdown formatting was also included in the update. Headings underlined with dashes (-) and equal signs(=) are handled, as well as horizontal lines with 3 or more dashes and asterisks (*) on a single line. Strong and emphasised text can be used with underscores(_) as well now.
Lately we have been compiling Thoth for Windows. Thanks to msys2 (http://msys2.org/) compiling GTK+ apps on Windows have gotten a lot more easier.

At this stage we have been able to compile a version that can run in the build environment, although the goal is to have a complete standalone application. Once we have a working standalone application we will publish it on here, including the source code and build instructions which hopefully, would also apply to compiling any GTK+ application on Windows.

Reading Open Graph Meta Properties


Last night we pushed a small update to improve link sharing on Mirror Island.

When people share links, finding the right information can be made easy if Open Graph tags are available. Some guesswork can be made by using HTML's <title> tag for the link text, and allowing people to choose one of many images found on the page (if we're lucky).

Previously, links added to a blank document used to look like this:
Thankfully the Open Graph protocol (http://ogp.me/) provides a number of useful <meta> tags allowing easy and a more accurate way of sharing links between websites and networks. In the <head> section of an HTML page we might find these meta tags:
<meta property="og:title" content="World largest steam locomotive is back! Big Boy 4014 hits the main line">
`<meta property="og:url" content="https://www.youtube.com/watch?v=RR7Q27cIEvo">`
<meta property="og:image" content="https://i.ytimg.com/vi/RR7Q27cIEvo/maxresdefault.jpg">
`<meta property="og:description" content="They said it couldn't be done. It was too heavy, too long, it burned too much fuel, and would cost too much to restore. But they were wrong. Union Pacific, B...">`

There are a number of other meta tags we could use. In our case we need to only use og:title, og:image, og:url and og:description.

Using these Open Graph tags, links generated in new posts now look like this:
Much better.

At this point each Open Graph meta tag is self-explanatory. So now we know what tags to read, the next part is how to read them. Usually, some usable information can be extracted by using regexp to read tags. However, regexp isn't the best solution when dealing with markup tags.

The method we use is to read the DOM (Document Object Model) with PHP's DOMDocument class. It can also handle most errors that would occur if using regexp, such as tags inside comments or javascript code. First, we load the web page as an HTML string. Next, the string is loaded in to a blank domDocument. From here we can navigate and read data from the DOM tree.

The following lines of code can read the Open Graph url, title, image, and description. This is a cut-down version of what we used, in order to focus on DOM features in this article. This code snippet is free to use for whatever purpose you see fit.


/* func_php_cleantext is a custom function used to
   sanitise the input */
$url = func_php_cleantext($_POST['url'], 1024);

/* Load the HTML as a DOM document
 */
$html = file_get_contents($url);
$dom = new domDocument;
$dom->preserveWhiteSpace = false;
$dom->loadHTML($html);

/* Fetch data from any Open Graph tags
 */
$og_url = '';
$og_title = '';
$og_image = '';
$og_description = '';
$metatags = $dom->getElementsByTagName('meta');
foreach ($metatags as $meta) {
    $metaproperty = $meta->getAttribute('property');
    $metacontent = $meta->getAttribute('content');

    if ($metaproperty == "og:url") {
        $og_url = $metacontent;
    } else if ($metaproperty == "og:title") {
        $og_title = $metacontent;
    } else if ($metaproperty == "og:image") {
        $og_image = $metacontent;
    } else if ($metaproperty == "og:description") {
        $og_description = $metacontent;
    }
}

/* Use the Open Graph title if available, otherwise
   fall back to the HTML document's title tag */
$title = '';
if ($og_title) {
    $title = $og_title;
} else {
    $headtitle = $dom->getElementsByTagName('title');
    foreach ($headtitle as $t) {
        if ($t->nodeValue != '')
            $title = $t->nodeValue;
    }
}

/* Overwrite the provided URL with the Open Graph
   provide one if available. */
if ($og_url) {
    $url = $og_url;
}

/* From here on, $og_image and $og_description are used
   as-is */
A small change this time. Markdown for inline code can be wrapped in <code> tags by surrounding them with backticks ( ` ). As usual, a few minor bug fixes with small screen support in CSS also were included.

How We Got Line Break To Work Consistently with contentEditable


(Well, In Firefox At Least)

A challenge of getting the markdown parser to work more reliably was getting predictable HTML from the contentEditable node. Depending on what the user entered, contents of a contentEditable (at least in Firefox for these tests) generated <div> elements around <br>s, and a collection of seemingly random combinations of HTML tags.

The other main quirk we encountered is not being able to append new lines unless <br> was the last child node of a contentEditable div.

For this we wrote an event handler to intervene when the Enter key is pressed. It forces the contentEditable to insert <br> tags where needed, instead of Firefox's default behaviour which tries to generate HTML the best it can. This way we can make a contentEditable behave more like a <textarea> and still have rich-text editing features for images, videos, and links.

We have attached the code used which is minimalist and has only been tested in Firefox itself. Other browsers will be tested in later coding sessions. It works as expected although we are constantly searching for other bugs that appear.

Throughout these code snippets, index_editdescription is the node of the <div> being edited, usually accessed through document.getElementById(...).

Firstly, we need to capture the key presses to intervene when Enter is pressed:

index_editdescription.addEventListener('keydown', index_js_editorKeyDownEvent, false);

Next, the following function inserts the required <br> tags; one at the cursor, and another if the last child element isn't a line break. Additionally, the function also prevents new lines being inserted in a blank div although this is oversimplified and doesn't check for white-space characters.

function index_js_editorKeyDownEvent(ev)
{
    if (ev.keyCode == 13) {
        ev.preventDefault();
        if (index_editdescription.innerHTML == '') {
            return false;
        }
        if (window.getSelection) {
            var sel = window.getSelection();
            var range = sel.getRangeAt(0);
            var brNode = document.createElement('br');
            range.deleteContents();
            range.insertNode(brNode);
            range = range.cloneRange();
            range.selectNodeContents(brNode.nextSibling);
            range.collapse(true);
            sel.removeAllRanges();
            sel.addRange(range);
        } // TODO: Impliment document.getSelection and document.selection.createRange for cross-browser compatibility.

        var lastChildTag = index_editdescription.lastChild.nodeName.toLowerCase();
        if (lastChildTag != 'br') {
            index_editdescription.appendChild(document.createElement('br'));
        }

        index_editdescription.focus();
    }
}

Bug Fix Release #1


On getting closer to the 0.1.1 release, we have included a few bug fixes and usability improvements. Changes in this release include:

- FEATURE Posts can now be search by their page ID.
- USABILITY Moved "share menu" item. The popup for sharing links covered other menu items below it.
- USABILITY The search popup resizes correctly on small screens.
- BUGFIX Fixed bug not not showing search results if replying to own post.
- BUGFIX Improved editor with irregular line breaks.

We also updated the current terms describing minimum age requirements of primary account holders, and the data usage of advertisements (when implemented).

An Update On Recent Updates


For the past few weeks (and at this point in time) we have mainly been working on bug fixes rather than adding new features to Mirror Island. Our attention has been put towards building the network-connected text editor and note taker, Thoth.


One of the primary aims for Mirror Island was for it to connect to many different apps, depending on what services would be needed.

Thoth is the first component that will be able to edit and send notes to others either through this website or any email service. Attachments to notes will also be featured, so you can always use more than words to get your ideas across to others.

This project is currently in its alpha status, although it is capable of taking notes and editing text files stored on a computer.

Precompiled binaries including source, as well as news of updates at is available at https://mirrorisland.com/thoth.

Alternatively, you can get the source code via git and read the build instructions at
https://gitlab.com/samjanis/thoth

--Sam and Janis

Small Screen Support and Upcoming Apps

Recently we just updated the code base to allow mobile and tablet devices to view this website more comfortably. Also, a few more changes were made to the code and front-end to make moderation easier to understand and less technical, such as "banned" posts are simply "hidden" when approving (or hiding) replies.
As well as these changes, a text editor and note-taker we have been using internally is going to be released as a mobile and cross-platform app where posts on here can be accessed as notes, but more of than in the future as progress is made on it.
Thanks for visiting!
--Sam and Janis.
Let's get on top of the world.Stress today is in abundance to those who let it.There are many ways to combat the hopelessness feeling .Meditation is one of the best forms to cure stress.

Happy New Year! (And Other Status Updates)


For what seems to be a quiet time during these holiday seasons, we have been laying the foundation for easier interoperability with different social networks and non-members. The previous year, 2018, helped establish the direction that Mirror Island will take for this year, including the ability to save and share notes in an upcoming cross-platform app.

Thankfully, we had time over the holidays to implement a few major features that were planned, including:

Instant sharing on major social networks.
From the menu in the top-right of every post is now the option to share it with popular social outlets. The feature to send the post as an email is still there and accessible from the same menu

Reply to any page or post with email.
It is now possible to add a reply to any page or post simply by sending it an email.
You can test it on this post simply by sending an email to: 1144@mirrorisland.com
Attachments aren't handled yet, although that feature is planned for on of the next major releases. In the future, we will work out ways to make this user friendly and to keep "junk mail" from appearing in threads, but at least this part is functional now.

First version of web scraping.
When pasting a link in a blank document, information about that page will be automatically included in the post, as well as the option to display any images that are included in that link. This feature is in its early stage, so its functionality might change depending on well this works out for us.
Numerous other changes included cosmetic updates and fixing bugs affecting performance and usability. We're currently at version 0.1.1 with our current focus on updating the documentation explaining how to install and use Mirror Island, and changing the CSS to allow this website to be usable on multiple devices with responsive design.
Thanks for dropping by!
--Sam and Janis
Page 1

Loading
Loading...

Loading messages...
Visibility
( )
Replies
Click for advanced permissions.
View
Edit
Reply
Approve
Moderate
Tags