Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2014, 04:31 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,543
parayna is on a distinguished road
Default Promo Help Again >.< (Different kinda question)

Does anyone know how to make it so that when you click on an image of something (just a normal png image) it 'activates' a promo code and gives it to you? (Instead of the promocode link leading you to the promo page where they would have to enter it in manually...)

I want the Adopt page to have talking stuff on it (which is done), a banner saying, 'Adopt a....' (which is done) and then on that page an image of an adoptable and when you click on it it adds it to your account... does anyone know how to do this? Thank you!

~parayna

P.S (Sorry if I was supposed to use my other thread, I wasn't sure... feel free to tell me so I know not to do it again! )

P.P.S Also, I am feeling guilty about mooching off of the community so much... so soon (when my site is up and running) I will be releasing some free linearts for you guys to use! They won't be great... but I want to contribute in some way (the items might be the same as on my site, but the species' won't be. I have unique kind of species on my site so I will be drawing normal animals for the Mysidia community to have. But if I like them enough then I will also use them but just adapt them better for my site XD) I will also include a folder file that will have all of them in and will have GIMP editable files in! (I know that not every one has GIMP so it'll be optional and you could probably just drag the image from the post onto your desktop and colour it in in your chosen program, because it will be transparent)
Reply With Quote
  #2  
Old 10-13-2014, 08:52 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,822
Hall of Famer is on a distinguished road
Default

It would be possible, and shouldnt be too difficult. Right now I am somewhat busy and cant take code requests beyond bug fixes, but I may have time to look at it for you later this week. If you can wait a bit longer, I will let you know.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 10-14-2014, 02:36 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,543
parayna is on a distinguished road
Default

OK! Thanks! It's not that urgent, I just wanted to see if it was possible ^_^ (And then implement it into my site if I could :P)
Reply With Quote
  #4  
Old 10-15-2014, 03:23 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,822
Hall of Famer is on a distinguished road
Default

Of course it can be done. ^^ With proper coding skills, anything is possible with the script. ^^ Its just about how hard and time-consuming it will take. XD
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 10-19-2014, 10:24 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,543
parayna is on a distinguished road
Default

I understand XD I don't have much coding skills but I will be picking things up as people help me so that's most likely how I will learn :P
Reply With Quote
  #6  
Old 11-09-2014, 08:12 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,543
parayna is on a distinguished road
Default

Hi, have you made any progress with the code? Sorry if it seems like I'm bugging you (trying really hard to word this correctly ¬.¬) but I am thinking of opening to beta testers soon.. but it's fine if you're busy! I mean, you obviously have other stuff to do XD Thank you ^_^

~Parayna
Reply With Quote
  #7  
Old 11-09-2014, 08:27 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,520
Kyttias is on a distinguished road
Default

I'm also interested in getting adoptables (and items) directly without the user having to go insert a promo code. Unfortunately, I've got a list of other things to do first. ^^; So I look forward to hearing more about this, too.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #8  
Old 11-09-2014, 09:54 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,386
IntoRain is on a distinguished road
Default

It depends on what you want to do really. Giving an adoptable is a simple db insert. The way to trigger that insert by clicking an image can be done in different ways:

- If the image takes you to a new page (/adopt/code for example), create those files for that page and if needed read the URL to know which adoptable the user is trying to get, check if it exists and if it does give it to the user
- Or with javascript, by making it activate an event on image click, requires the use of ajax though, which mysida isn't very fond of
__________________


asp.net stole my soul.

Last edited by IntoRain; 11-09-2014 at 09:59 AM.
Reply With Quote
  #9  
Old 11-09-2014, 10:30 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,543
parayna is on a distinguished road
Default

Um, I'm not really sure to be honest ^_^'' I do know that I want it to be done in the easiest way possible (although I don't mind having to do a few code edits, obviously). The first way you stated seems like it could be better to do.. (but I don't know). Would you be able to reuse the same page whenever you change the monthly adopts? If so, I would like to use that way XD I just need it to be easy enough so that I don't need to create a different page whenever I want to add another adoptable onto the site. That might become tedious. But if it is a simple matter of just changing the codes on one page (say when they click an image, the corresponding adopt is added into the database) and then just change it every time more is released, I don't mind doing that!

But I may need a bit of help... (although I do have an idea on how it can be done.. but I am not confident enough to have a go myself XD)

~Parayna
Reply With Quote
  #10  
Old 11-09-2014, 10:47 AM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,386
IntoRain is on a distinguished road
Default

Quote:
Originally Posted by parayna View Post
Um, I'm not really sure to be honest ^_^'' I do know that I want it to be done in the easiest way possible (although I don't mind having to do a few code edits, obviously). The first way you stated seems like it could be better to do.. (but I don't know). Would you be able to reuse the same page whenever you change the monthly adopts? If so, I would like to use that way XD I just need it to be easy enough so that I don't need to create a different page whenever I want to add another adoptable onto the site. That might become tedious. But if it is a simple matter of just changing the codes on one page (say when they click an image, the corresponding adopt is added into the database) and then just change it every time more is released, I don't mind doing that!

But I may need a bit of help... (although I do have an idea on how it can be done.. but I am not confident enough to have a go myself XD)

~Parayna
With the first one you can create 1 page, for example a "get" page (so 2 files, get.php and getview.php inside the view folder)
So the image would be linked like

<a href="yoursite.com/get/1">image</a>

You'd just need to change the links in this case.
The number after the link would match the IDs in your adoptables table. So when someone visited a get/ID page, you would need to:

1) Cut the link to get the last part (the ID)
2) Check if ID exists
3) Check if ID is actually an adoptable that can be adopted through this way (people WILL try to adopt other adoptables through this link).

You can do a manual check (for example if your monthly adoptables are 1, 2 and 5 you can check if the ID in the link is 1, 2 or 5).

Or you can try to pull the ID from the adoptables table to see if it exists. To check if it is one of your monthly adoptables, you can add an extra column to the table called "active", which would contain "true" if it is currently obtainable or false otherwise. Then with the ID you would check the contents of that column

If it passes the verifications, do a db insert. If not, throw an error


I can try to help you go through each step
__________________


asp.net stole my soul.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A small question regarding adoption limits and promo codes..c: Pear Feedback and Suggestions 2 06-25-2014 10:06 PM
Promo Codes SilverDragonTears Questions and Supports 2 06-30-2012 01:22 PM
Promo And Banning Alaric Questions and Supports 5 04-20-2012 08:28 AM
News/kinda forum script help SilverDragonTears Questions and Supports 0 10-22-2011 06:48 PM
1 Promo per person Xius Questions and Supports 4 09-21-2009 05:55 PM


All times are GMT -5. The time now is 04:11 PM.

Currently Active Users: 9402 (0 members and 9402 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636