Jump to content
evina

TheEvina's DragHatch

Recommended Posts

There is an easy way, just check to see if the dragon is frozen, just check to see if there is time remaining. Adults and frozens don't have time remaining so you can filter them out.

 

$id=$_POST["id"];

@$doc = new DOMDocument();
@$doc->loadHTMLFile('http://dragcave.net/view/' . $id);

$tags = $doc->getElementsByTagName('div');
foreach ($tags as $tag)
{
     $tag->getAttribute('id');
     $tag->getAttribute('href');
     $source .= $tag->nodeValue."\n";
}

$pos = strpos($source, "Egg will die if it doesn't hatch in: ");
if ($pos === false)
{
       $pos = strpos($source, "Hatchling will die if it doesn't grow up in");
       if ($pos === false)
       {
               $allow = "NO";  // Adult and frozen checker
       }
}

 

Here is a basic test for frozens and adults, written in php, not sure what you are coding in, but hey, it gives you something to think about.

 

Try adding something like

 

if($allow == "NO");
{
         // reject code here ... eg
         print "Sorry, adults and frozen hatchlings are not accepted here";
}

Share this post


Link to post

Just spotted a typo: "View n dragons every t seconds" in the Nursery Viewer.

 

And Soti, that block of code may have just saved me a bunch of trouble too. Thank you!

Share this post


Link to post

Nice site! thanks for the aid and will my friends know about you! happy.gif

Edited by priscel

Share this post


Link to post

Version 1.2.0. released

 

Several things have been fixed and improved. This is the most stable version of Draghatch so far.

Share this post


Link to post

Abusing the site means adding adults, fogged and dead dragons or adding eggs to the ER that don't need help. The site will automatically remove dragons (or the future mods will). And don't worry... you won't be banned for making one mistake.

Wonderful, thank you. smile.gif

 

And this a gorgeous site. happy.gif

 

EDIT: Rather than double post, I'll just edit.

 

Okay, I had added an ER several days ago, possibl even a week, but I can't remember which one I added. So if you see one of mine in there that doesn't need to be, that's why. I'll remember from now one which ones I add, so I can remove them when they hatch. Sorry! happy.gif

Edited by Gyps13

Share this post


Link to post

Version 1.3.0. of the site has been released. The system is working better than ever and there is a new moderating system.

Share this post


Link to post

Oh, this is so my favorite Fan site! Its very simple and easy, and a big + that it has an ER :3

 

A big nice BUMP to this thread happy.gif

Share this post


Link to post

Abusing the site means adding adults, fogged and dead dragons or adding eggs to the ER that don't need help. The site will automatically remove dragons (or the future mods will). And don't worry... you won't be banned for making one mistake.

Hi! Thank you so much for a new hatchery, and for clearing that up.

 

When I first read " Add your codes below. They will automatically be removed after 3 days. Your IP address will be recorded and you will be banned for abusing this system. "

 

 

I paused and went blink.gifunsure.gif

 

LOL the way it reads to me is if you add the codes your IP will be recorded and you'll be banned tongue.gif

 

I am bookmarking this site.

 

 

P.S. Is it just the nursery viewer than can refresh or does the ER refresh too?

 

P.S.S. Can anyone make a banner so it can be advertised in signatures?

Edited by Dragonbox

Share this post


Link to post

Hi! Thank you so much for a new hatchery, and for clearing that up.

 

When I first read " Add your codes below. They will automatically be removed after 3 days. Your IP address will be recorded and you will be banned for abusing this system. "

 

 

I paused and went  blink.gif  unsure.gif

 

LOL the way it reads to me is if you add the codes your IP will be recorded and you'll be banned  tongue.gif

 

I am bookmarking this site.

 

 

P.S. Is it just the nursery viewer than can refresh or does the ER refresh too?

 

P.S.S.  Can anyone make a banner so it can be advertised in signatures?

I'll clear up that banning message.

 

Only the Nursery refreshes to show more dragons. The ER dragons are ALL shown so I don't think it needs to refresh, but I'll think about it.

 

I'm going to make some banners.

 

And...

 

Verision 1.4.0. released

  • Error and success messages are more clear.
  • Some bugs were fixed.
  • ER dragons will only be held for 3 hours now, because it was clogged up with too many adults for too long.
Edited by evina

Share this post


Link to post

It says Error: Code needs to be 4 charceters long. I put in s9te . Four Charceters... tried it 5 times. It was in the Emergency one. I didnt try in the Nursery.

 

EDIT: Tried again and it actaully says. That code is invalid! It needs to be 4 characters long!

 

Couldnt remember the exact wording. So tried it again.

Edited by Kanaye

Share this post


Link to post
It says Error: Code needs to be 4 charceters long. I put in s9te . Four Charceters... tried it 5 times. It was in the Emergency one. I didnt try in the Nursery.

 

EDIT: Tried again and it actaully says. That code is invalid! It needs to be 4 characters long!

 

Couldnt remember the exact wording. So tried it again.

Fixed.

Share this post


Link to post

Well done.

 

Under request of dragonbox (IRC) I've done a banner...

 

>>;

 

user posted image

 

[IMG=http://i41.tinypic.com/amqwc9.png]

 

Horrible. D:

(banner, that is. DX)

 

Share this post


Link to post

Well done.

 

Under request of dragonbox (IRC) I've done a banner...

 

>>;

 

user posted image

 

[IMG=http://i41.tinypic.com/amqwc9.png]

 

Horrible. D:

(banner, that is. DX)

Yay!

 

 

I love it. Thank you for taking the time to get one out for us! Adding it shortly! biggrin.gif

 

Ok... I tweaked the code a bit so there is a link.

 

[URL=http://draghatch.tk][IMG=http://i41.tinypic.com/amqwc9.png][/URL]

Edited by Dragonbox

Share this post


Link to post

I like this site now. I tried it about a week ago and something about it made me cringe.

But now it could easily become one of my favorite site mostly due to the automatic refresher or the hatchery. Love those.

Share this post


Link to post

Hope the kinks work themselves out soon. Your hatchery has been working great for my eggs and hatchies. I was sad to see it down.

Edited by Sir Barton

Share this post


Link to post

Version 2.0.1 released! The bugs have been fixed (as far as I can tell). Please let me know if anything else if wrong.

Share this post


Link to post

  • Recently Browsing   1 member