Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-23-2009, 06:12 PM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 12,716
Ashje
Default Choosing Adoptables Type [EASY ADOPTABLES SCRIPT ONLY]

Ok, so I don't think I've made a mod before, only tuts. But anyway if you noticed the tag "EASY ADOPTABLES SCRIPT ONLY", this mod is only for the old script. This is for the people with current sites using the old script, just while we're waiting for the upgrade script. Now, onto what it does... If you've ever used the currency & shop mod or tried to make an event, you'll know that you have to run a MySQL query to change it's type so it doesn't appear on the normal adopt.php page and only in the shop/event. With this mod, you'll be able to do it easily from the "Create New Adoptable" page in the ACP. This makes it easy to make new shop adoptables or event adoptables. Before we start, I suggest you make backups of the following:
adopt.php
shop.php
newadoptable.php (found in your adm directory)
makeadoptable.php (found in your adm directory)
Ready?

Step 1
-------------
First, open your phpMyAdmin and go to the adoptables table. Notice how I have a "Kind" column? You need to make one.



Step 2
-------------
To make one, click the following:


Now fill it in like this one:


Step 3
-------------
Now that you have a Kind column, open your FTP Server and open up "adopt.php" in your editor. Find:
PHP Code:
$query "SELECT * FROM adoptables"
and change it to:
PHP Code:
$query "SELECT * FROM adoptables WHERE kind = 'normal'"
Save it.

Step 4
-------------
If you use the shop mod, open up "shop.php" in the editor. Find:
PHP Code:
$query "SELECT * FROM adoptables WHERE memberlevel = 'shop'"
Change to:
PHP Code:
$query "SELECT * FROM adoptables WHERE kind = 'shop'"
Save it.

Step 5
-------------
Now go into your adm directory and open up "newadoptable.php"
Find:
PHP Code:
    <p>Adoptable Description
      <
input name='description' type='text' id='description'
    </
p
Underneath that, place:
<p>Adoptable Kind:
<input name='kind' type='text' id='kind'>
</p>
Save it.

Step 6
-------------
Go back to the adm directory and open "makeadoptable.php". Find:
PHP Code:
$description $_POST["description"]; 
Underneath that, place:
PHP Code:
$kind $_POST["kind"]; 
Then Find:
PHP Code:
$description mysql_real_escape_string($description); 
Underneath that, place:
PHP Code:
$kind mysql_real_escape_string($kind); 
Then find:
PHP Code:
if($level0 == ""){
echo 
"You did not choose a default image for your adoptable.  Please go back and correct this.";
die(
"");

Underneath, place:
PHP Code:
if($kind == ""){
echo 
"You did not choose a kind for your adoptable.  Please go back and correct this.";
die(
"");

Finally find:
PHP Code:
mysql_query("INSERT INTO adoptables VALUES ('', '$name','$level0','free','$description')"); 
Replace with:
PHP Code:
mysql_query("INSERT INTO adoptables VALUES ('', '$name','$level0','free','$description','$kind')"); 
Now, you should get something like this when you go to make a new adoptable. Type "shop" in the Adoptable kind box for it to be a shop adoptable, and type "normal" for it to be a normal one.


NOTE: For the anti-theft, you still have to change the memberlevel to shop, although you can make a memberlevel type field as well by replacing every "kind" in this tut with "memberlevel" with the exception of "adopt.php". Also, there is already a memberlevel column so don't make another one.

I know this mod is probably very confusing so if you have any questions, ask.
Reply With Quote
  #2  
Old 05-23-2009, 11:02 PM
Bloodrun's Avatar
Bloodrun Bloodrun is offline
I am, who I am.
 
Join Date: Apr 2009
Posts: 532
Gender: Male
Credits: 35,966
Bloodrun
Send a message via Yahoo to Bloodrun
Default RE: Choosing Adoptables Type [EASY ADOPTABLES SCRIPT ONLY]

Very nice, when I get my laptop back, ill take a better look at it.

And, well, Ill say nothing more till I get my laptop back =D
Reply With Quote
  #3  
Old 05-24-2009, 04:17 AM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 12,716
Ashje
Default RE: Choosing Adoptables Type [EASY ADOPTABLES SCRIPT ONLY]

Thanks =D
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
Downloading Mysidia Adoptables Script? Rosie-Girl-12- Questions and Supports 25 07-17-2011 12:27 PM
Dechiphering the Adoptables Script Ansem717 Questions and Supports 1 01-15-2011 07:58 PM
How to change language in PHP Adoptables script? MarDeb Questions and Supports 1 08-17-2009 04:21 PM
Adoptables Script + MyBB Blues Questions and Supports 3 08-05-2009 07:24 PM
What can be done with the PHP Adoptables Script! Seapyramid Suggestions and Feature Requests 11 07-19-2009 12:16 PM


All times are GMT -5. The time now is 11:30 AM.

Currently Active Users: 991 (0 members and 991 guests)
Threads: 4,081, Posts: 32,032, 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