Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #51  
Old 11-13-2015, 01:09 PM
Nieth's Avatar
Nieth Nieth is offline
Aspiring
 
Join Date: Dec 2012
Location: North Carolina
Posts: 154
Gender: Male
Credits: 10,906
Nieth is on a distinguished road
Send a message via MSN to Nieth
Default

I didn't try the original, but in the one I edited, I believe I allowed for the order. It doesn't seem to work though.

../admincp/alchemy.php @ line 85
I changed:
PHP Code:
$whereClause "(item = {$mysidia->input->post("item")} and item2 = {$mysidia->input->post("item2")}) OR (item = {$mysidia->input->post("item2")} and item2 = {$mysidia->input->post("item")})"
to
PHP Code:
$whereClause "(item = {$mysidia->input->post("item")} and item2 = {$mysidia->input->post("item2")} and item3 = {$mysidia->input->post("item3")}) OR (item = {$mysidia->input->post("item")} and item3 = {$mysidia->input->post("item3")} and item2 = {$mysidia->input->post("item2")}) OR (item2 = {$mysidia->input->post("item2")} and item = {$mysidia->input->post("item")} and item3 = {$mysidia->input->post("item3")}) OR (item2 = {$mysidia->input->post("item2")} and item3 = {$mysidia->input->post("item3")} and item = {$mysidia->input->post("item")}) OR (item3 = {$mysidia->input->post("item3")} and item2 = {$mysidia->input->post("item2")} and item = {$mysidia->input->post("item")}) OR (item3 = {$mysidia->input->post("item3")} and item = {$mysidia->input->post("item")} and item2 = {$mysidia->input->post("item2")})"
and I changed ../classes/class_alchemy.php @ line 27
from:
PHP Code:
$whereClause "(item = {$this->item->id} and item2 = {$this->item2->id}) OR (item = {$this->item2->id} and item2 = {$this->item->id})"
to
PHP Code:
$whereClause "(item = {$this->item->id} and item2 = {$this->item2->id} and item3 = {$this->item3->id}) OR (item = {$this->item->id} and item3 = {$this->item3->id} and item2 = {$this->item2->id}) OR (item2 = {$this->item2->id} and item = {$this->item->id} and item3 = {$this->item3->id}) OR (item2 = {$this->item2->id} and item3 = {$this->item3->id} and item = {$this->item->id}) OR (item3 = {$this->item3->id} and item2 = {$this->item2->id} and item = {$this->item->id}) OR (item3 = {$this->item3->id} and item = {$this->item->id} and item2 = {$this->item2->id})"
Didn't seem to work. Don't know if I did something wrong or not.
Reply With Quote
  #52  
Old 11-13-2015, 01:22 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: 327,386
Hall of Famer is on a distinguished road
Default

Of course it doesnt work, because you are just reversing the order of the WHERECLAUSE, rather than changing the actual content. In your sample code, these two are equivalent, and make no difference:

Code:
item = {$mysidia->input->post("item")} and item2 = {$mysidia->input->post("item2")} and item3 = {$mysidia->input->post("item3")}
vs

Code:
item2 = {$mysidia->input->post("item2")} and item = {$mysidia->input->post("item")} and item3 = {$mysidia->input->post("item3")}
Do you understand what I mean? Lets consider this example. To say 'you have an apple and your friend has a banana', or to say 'your friend has a banana and you have an apple', it means the same thing. You are just reversing the logical order of the statement, but doesnt change the fact that apple belongs to you and banana belong to your friend. But its different if you say 'you have a banana and your friend has an apple', since in this case banana belongs to you and apple belongs to your friend. Now you can have either apple or banana, and so are with your friend. Sorry if I aint good at explaining, but I hope you get the idea.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #53  
Old 11-13-2015, 01:33 PM
Nieth's Avatar
Nieth Nieth is offline
Aspiring
 
Join Date: Dec 2012
Location: North Carolina
Posts: 154
Gender: Male
Credits: 10,906
Nieth is on a distinguished road
Send a message via MSN to Nieth
Default

Oh, wow. I see the difference in the first statement now, I can't believe I overlooked that the first time. Thanks a bunch. I'mma rewrite it a bit, I'm sure I'll be able to get it to work this time. xD

Man, I feel so stupid for not noticing the placements.

I just need to figure out how many different 'OR's that I need now.

EDIT: Yep, all good and functional now. Thanks for the help, still new to trying to program/edit stuff.

Last edited by Nieth; 11-13-2015 at 02:06 PM.
Reply With Quote
  #54  
Old 11-13-2015, 02:37 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: 327,386
Hall of Famer is on a distinguished road
Default

You are very welcome, I am glad I can help. You can also try SQL IN clause, so you will get rid of the OR operators. However, you will need to compare each user input, ie. $mysidia->input->post("item"), and $mysidia->input->post("item2") so that your users wont enter the same item for item1, item2, etc. Here is an example for two items SQL:

Code:
$items = "({$mysidia->input->post('item')}, {$mysidia->input->post('item2')})";
$whereClause = "(item IN {$items} and item2 IN $items)";  
Read the below tutorial on w3schools, and it will help:
http://www.w3schools.com/sql/sql_in.asp
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #55  
Old 11-13-2015, 03:18 PM
Nieth's Avatar
Nieth Nieth is offline
Aspiring
 
Join Date: Dec 2012
Location: North Carolina
Posts: 154
Gender: Male
Credits: 10,906
Nieth is on a distinguished road
Send a message via MSN to Nieth
Default

Ah, alright! Thanks again, I'm learning so much by messing around with everything, realizing what means what etc. Still a complete beginner, but learning is still learning.

Would there be a simple way to change the URL for the alchemy stuff or would that be too difficult to do?

Also, where can the alchemy page be edited? I'd like to add images and specific things to that page, but I can't find where to edit it.

Last edited by Nieth; 11-13-2015 at 03:41 PM.
Reply With Quote
  #56  
Old 11-18-2015, 01:44 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: 327,386
Hall of Famer is on a distinguished road
Default

Well there are two view files you can edit to add images and other specific things to the alchemy page:
/view/inventoryview.php
/admincp/view/alchemyview.php

Note you need to understand GUI programming in order to make changes, its not the HTML a front end designer may be familiar with. The style of coding is similar to Java swing, so if you understand how swing works, it will be easy for you.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #57  
Old 11-18-2015, 05:45 AM
Nieth's Avatar
Nieth Nieth is offline
Aspiring
 
Join Date: Dec 2012
Location: North Carolina
Posts: 154
Gender: Male
Credits: 10,906
Nieth is on a distinguished road
Send a message via MSN to Nieth
Default

Yeah, I figured out after reading some guides that I would have to edit the view pages to change what the user sees, so I went in there and tried looking around to see what made sense. Absolutely nothing! So, I've decided to leave that alone until I've reached a bit more advanced stage.
Reply With Quote
  #58  
Old 11-18-2015, 12:41 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: 327,386
Hall of Famer is on a distinguished road
Default

Its not actually that hard to understand, you just need some OOP skills and understand how the composite design pattern works. I would recommend you to read the tutorial for Java swing, and after going through it you should have no problem dealing with Mysidia's GUI API(although you will need basic Java programming knowledge to follow the tutorial):
http://www.tutorialspoint.com/swing/
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #59  
Old 11-30-2015, 02:31 PM
SapphirePhoenix's Avatar
SapphirePhoenix SapphirePhoenix is offline
Adoptable Site Owner
 
Join Date: Nov 2015
Location: Australia
Posts: 81
Gender: Female
Credits: 8,170
SapphirePhoenix is on a distinguished road
Default

Which file am I supposed to upload the file into?
Reply With Quote
  #60  
Old 11-30-2015, 03:58 PM
Nieth's Avatar
Nieth Nieth is offline
Aspiring
 
Join Date: Dec 2012
Location: North Carolina
Posts: 154
Gender: Male
Credits: 10,906
Nieth is on a distinguished road
Send a message via MSN to Nieth
Default

Using the FTP, you upload the contents of the folder to the public_html folder. All the directories should split and upload into their appropriate folders so long as you do it correctly.
Reply With Quote
Reply

Thread Tools
Display Modes

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
Alchemy Mod - HoF Nieth Questions and Supports 4 11-13-2015 11:52 AM


All times are GMT -5. The time now is 08:12 AM.

Currently Active Users: 440 (0 members and 440 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