The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Adopt Pet System

View previous topic View next topic Go down

In progress Adopt Pet System

Post by mangaka on June 13th 2013, 2:26 pm

Hello there,glad to see you all again

I want to know,how to make an Adopt Pet System?Like this,if someone click some pet,the question pop up will appear like this,"Are you sure you want to adopt this pet?" i want to be like that.Sorry if that is not possible for forumotion forums.Thank you for the answer

Greetings,

mangaka

mangaka
Forumember

Female Posts : 121
Reputation : 5
Language : Indonesia
Location : Well

Back to top Go down

In progress Re: Adopt Pet System

Post by Sanket on June 13th 2013, 4:11 pm

What happens after the Popup is appeared?

Sanket
ForumGuru

Male Posts : 48766
Reputation : 2819
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

In progress Re: Adopt Pet System

Post by kirk on June 13th 2013, 4:50 pm

I think i saw or heard of this before somewhere but cant remember exactly where it was? The only thing i can think of is if you have some sort of java script or other coding that allows you to set it up on the forums. Do you have anything like this, or link with instructions on how to set it up on sites/forums?

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

In progress Re: Adopt Pet System

Post by mangaka on June 14th 2013, 12:23 pm

@Sanket wrote:What happens after the Popup is appeared?
Then,the answer appeared, "Thanks For Adopt This Pet!" Like that

@kirk wrote:I think i saw or heard of this before somewhere but cant remember exactly where it was? The only thing i can think of is if you have some sort of java script or other coding that allows you to set it up on the forums. Do you have anything like this, or link with instructions on how to set it up on sites/forums?

Well,no tutorials...or how to set up....i just ask...no tutorials for my questions

mangaka
Forumember

Female Posts : 121
Reputation : 5
Language : Indonesia
Location : Well

Back to top Go down

In progress Re: Adopt Pet System

Post by Ultron's Vision on June 14th 2013, 12:27 pm

Well, yes, for sure it is possible, how you want to implement it is another question.

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: Adopt Pet System

Post by kirk on June 14th 2013, 2:44 pm

dunno then, i know i heard of it before but cant remeber exactly what it was.. i dont have the time to search/check right now but will see what i can dig up when i get home.

Or you can try to google something like?
How toadd adopt a pet to your website?

see what comes up Smile

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

In progress Re: Adopt Pet System

Post by Ultron's Vision on June 14th 2013, 4:02 pm

I can surely imagine it to be something like this.

Code:
function adopt(pet,index){
if(typeof index !== "number") return false;
if(!pet) return false;
var pets = document.getElementsByClassName("pet-span");
for(var i = index; i < pets.length; i++) {
if(pets[i].getAttribute("id") != pet.getAttribute("id") return false;
else { if(document.onclick) pets[i].onclick = function(){...

I decided to stop writing and that I could do so when I am on a PC.

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: Adopt Pet System

Post by mangaka on June 17th 2013, 9:07 am

@kirk wrote:dunno then, i know i heard of it before but cant remeber exactly what it was.. i dont have the time to search/check right now but will see what i can dig up when i get home.

Or you can try to google something like?
How toadd adopt a pet to your website?

see what comes up Smile
Oh ok i already tried them,but nothing show me how...i like to be like this one:[url=http://www.chickensmoothie.com/adoptables/second-generation pets]http://www.chickensmoothie.com/adoptables/second-generation%20pets[/url]
@Ultron's Vision wrote:I can surely imagine it to be something like this.

Code:
function adopt(pet,index){
if(typeof index !== "number") return false;
if(!pet) return false;
var pets = document.getElementsByClassName("pet-span");
for(var i = index; i < pets.length; i++) {
if(pets[i].getAttribute("id") != pet.getAttribute("id") return false;
else { if(document.onclick) pets[i].onclick = function(){...

I decided to stop writing and that I could do so when I am on a PC.

Thank you for helping,but sorry,it's not working!

Any solutions for this problem?

mangaka
Forumember

Female Posts : 121
Reputation : 5
Language : Indonesia
Location : Well

Back to top Go down

In progress Re: Adopt Pet System

Post by Ultron's Vision on June 17th 2013, 9:08 am

Of course it is not working, it's an incomplete function.

I might write something more for you today.

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: Adopt Pet System

Post by kirk on June 17th 2013, 5:06 pm

yeah i cant seem to find anything for it.
i think tghis may have to be moved to scripts and coding section.

kirk
Forumaster

Male Posts : 11037
Reputation : 651
Language : English,Vulcan,Klingon, Romulan,& Gorn

Back to top Go down

In progress Re: Adopt Pet System

Post by Ultron's Vision on June 17th 2013, 5:57 pm

Currently writing out a long script for this, setting up a new domain for this and doing some other modifications.

Hope that the result will be promising!

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: Adopt Pet System

Post by Ultron's Vision on June 22nd 2013, 12:05 am

Some updates required here...

Still working on my principal JavaScript, I get some errors when executing it how I want it to execute, looking for a solution tomorrow or so...

Database connection and PHP scripts need to be optimized, but, generally, I see this to be done soon.

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: Adopt Pet System

Post by mangaka on June 26th 2013, 7:46 am

Well,i found the code on some sites,it's like this:

Code:
<h2>Adopt second-generation pets</h2><p>
  <img src="../Forum/styles/CSDullGreen/theme/images/adoptex/2ndgens.jpg?v=2?v=1" style="display:block; max-width:100%; margin:0 auto">
  </p><p>
  </p><p>
Occasionally the staff will cross a pair of animals on CS, and offer up the babies for you to adopt here.
 The above image shows an example of a pair of dogs on CS and their offspring. The babies would grow like normal pets.
 <b>Most pets will be fully grown in 35 days, sometimes much faster.</b>
 </p><p>
There are multiple newborns from each pairing - usually about 2 - 5 babies in a 'litter'.
The differences will usually be obvious at the newborn stage, so you can often tell how many different adults you'll
 get just by looking at the newborns.
 </p><div class="width_limit">
 

<table class="giveaway">
<tbody><tr>
 <td class="releaseimage">
 <img src="http/static.chickensmoothie.com/pic.php?k=6E69D36AA242270CEEC860A8DECB6D1F&amp;bg=e0f6b2" alt="Pet">
 </td>
 <td>
 <p>
 This pair was bred by Guest Artist DisabledLlama
 </p>
 <a href="/namepet.php?id=2390&amp;ap=second-generation%20pets&amp;src=%2Fadoptables%2Fsecond-generation%20pets" class="button-adopt-me" title="Click here to adopt!">Adopt me!</a>
 </td>
</tr>
</tbody></table>
 



</div>

But it still not working!! Sad

Can you help me please???Here is the site:

http://test.shop-forum.net/t11-how-to-add-adopt-pet-system-on-forums

mangaka
Forumember

Female Posts : 121
Reputation : 5
Language : Indonesia
Location : Well

Back to top Go down

In progress Re: Adopt Pet System

Post by Ultron's Vision on June 26th 2013, 2:36 pm

@mangaka wrote:Well,i found the code on some sites,it's like this:

Code:
<h2>Adopt second-generation pets</h2><p>
  <img src="../Forum/styles/CSDullGreen/theme/images/adoptex/2ndgens.jpg?v=2?v=1" style="display:block; max-width:100%; margin:0 auto">
  </p><p>
  </p><p>
Occasionally the staff will cross a pair of animals on CS, and offer up the babies for you to adopt here.
 The above image shows an example of a pair of dogs on CS and their offspring. The babies would grow like normal pets.
 <b>Most pets will be fully grown in 35 days, sometimes much faster.</b>
 </p><p>
There are multiple newborns from each pairing - usually about 2 - 5 babies in a 'litter'.
The differences will usually be obvious at the newborn stage, so you can often tell how many different adults you'll
 get just by looking at the newborns.
 </p><div class="width_limit">
 

<table class="giveaway">
<tbody><tr>
 <td class="releaseimage">
 <img src="http/static.chickensmoothie.com/pic.php?k=6E69D36AA242270CEEC860A8DECB6D1F&bg=e0f6b2" alt="Pet">
 </td>
 <td>
 <p>
 This pair was bred by Guest Artist DisabledLlama
 </p>
 <a href="/namepet.php?id=2390&ap=second-generation%20pets&src=%2Fadoptables%2Fsecond-generation%20pets" class="button-adopt-me" title="Click here to adopt!">Adopt me!</a>
 </td>
</tr>
</tbody></table>
 



</div>

But it still not working!! Sad

Can you help me please???Here is the site:

http://test.shop-forum.net/t11-how-to-add-adopt-pet-system-on-forums

Well, the site is using PHP to create the adoption links, what I cannot do on forumotion, so I have to resort to using Ajax (aysnchronous JavaScript and XML) to transfer the data from your forum to a .php script of mine which will create a database entry for you. But, you see, I am having troubles finishing the JavaScript due to some errors appearing when I send the jQiery XMLHttpRequest (I could try using pure JS without any help from jQuery, but that'd require a lot of coding).
As a reminder: I already have the script finished that pops up a new window which asks the user to confirm the adoption, and it does work, but I am not able to send the data cross-domain.
I will keep you informed, I am trying day by day.

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

In progress Re: Adopt Pet System

Post by mangaka on June 27th 2013, 6:27 am

@Ultron's Vision wrote:
@mangaka wrote:Well,i found the code on some sites,it's like this:

Code:
<h2>Adopt second-generation pets</h2><p>
  <img src="../Forum/styles/CSDullGreen/theme/images/adoptex/2ndgens.jpg?v=2?v=1" style="display:block; max-width:100%; margin:0 auto">
  </p><p>
  </p><p>
Occasionally the staff will cross a pair of animals on CS, and offer up the babies for you to adopt here.
 The above image shows an example of a pair of dogs on CS and their offspring. The babies would grow like normal pets.
 <b>Most pets will be fully grown in 35 days, sometimes much faster.</b>
 </p><p>
There are multiple newborns from each pairing - usually about 2 - 5 babies in a 'litter'.
The differences will usually be obvious at the newborn stage, so you can often tell how many different adults you'll
 get just by looking at the newborns.
 </p><div class="width_limit">
 

<table class="giveaway">
<tbody><tr>
 <td class="releaseimage">
 <img src="http/static.chickensmoothie.com/pic.php?k=6E69D36AA242270CEEC860A8DECB6D1F&bg=e0f6b2" alt="Pet">
 </td>
 <td>
 <p>
 This pair was bred by Guest Artist DisabledLlama
 </p>
 <a href="/namepet.php?id=2390&ap=second-generation%20pets&src=%2Fadoptables%2Fsecond-generation%20pets" class="button-adopt-me" title="Click here to adopt!">Adopt me!</a>
 </td>
</tr>
</tbody></table>
 



</div>

But it still not working!! Sad

Can you help me please???Here is the site:

http://test.shop-forum.net/t11-how-to-add-adopt-pet-system-on-forums

Well, the site is using PHP to create the adoption links, what I cannot do on forumotion, so I have to resort to using Ajax (aysnchronous JavaScript and XML) to transfer the data from your forum to a .php script of mine which will create a database entry for you. But, you see, I am having troubles finishing the JavaScript due to some errors appearing when I send the jQiery XMLHttpRequest (I could try using pure JS without any help from jQuery, but that'd require a lot of coding).
As a reminder: I already have the script finished that pops up a new window which asks the user to confirm the adoption, and it does work, but I am not able to send the data cross-domain.
I will keep you informed, I am trying day by day.

I see...Well,i doesn't have a clue at all about my problem....bwi

mangaka
Forumember

Female Posts : 121
Reputation : 5
Language : Indonesia
Location : Well

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum