Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   1.3.4 - group sort (http://www.mysidiaadoptables.com/forum/showthread.php?t=4823)

draugluin 04-17-2015 03:53 AM

1.3.4 - group sort
 
Hi together,

is there anyone with a great idea, how to sort the pets in groups ?

once it gave this for 1.3.1, maybe it could be re-constructed ?

http://www.mysidiaadoptables.com/for...ead.php?t=3672

Kyttias 04-17-2015 03:01 PM

Well I can give you this, to simplify the database stuff at the start, but read the entire post first:
Database
Create the adopts_pets_group table in the database. You can use the following SQL:
Code:

CREATE TABLE IF NOT EXISTS `adopts_pet_groups` (
  `name` varchar(15) NOT NULL,
  `user` varchar(20) NOT NULL,
  `id` int(11) NOT NULL,
  `group` varchar(15) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Note that if your prefix is not adopts_, which it would be by default, then you need to change it in the code above to match what you set your prefix to be during installation.
http://orig10.deviantart.net/1814/f/...as-d8q1fm3.gif
HOWEVER, after this point there's not much I can say on the matter without understanding what the code did better.

I CAN say that doadopt.php does not exist anymore, but, similar lines in similar locations do exist -- however, even though they do, it is not a line that actually needs modifying. When a pet is created, the database is automatically going to already give it a group column, and, it is going to be set the default value of zero. So no worries here, moving on--

As for myadopts.php, obviously things have changed a lot, so you cannot simply replace your entire file. I don't know what in there belonged to the original myadopts.php for v1.3.1 and what was newly added by the mod, and I'd have to compare the two to find out. Further, as of v1.3.4, pages are now controlled in a model-view-controller fashion, meaning, there are "two" files for every one page. This is mostly useful in being able to bounce form data back and forth on the "same" page.

Since a form is definitely being used in this mod to create new pet groups and to manage what group you want to belong to, I'd have to study what's going and catch the data, then update the database for these form submissions.

I don't have time right now, but perhaps others can take a crack at it. For the best (simple) example of how form data is being sent and collected, I'd observe how donate.php and view/donateview.php are working together to submit forms. And for further general reading on working with the framework in v1.3.4, I recommend reading this vague guide I made while helping someone once.

Good luck!

Hall of Famer 04-18-2015 02:39 AM

Its possible to port that mod into Mys v1.3.4 compatible version, with a little bit of coding of course.

draugluin 04-19-2015 11:44 PM

Oookay, I try it and if I fixed it, I will show you the success :pleased:
I've modified my Mys 1.3.2, so I'm hopeful, I will solve this too.

SilverDragonTears 01-16-2017 09:50 AM

HoF can you find time to work on this? My users are requesting this. I should have just downloaded an older Mys script because I am so lost with all the new coding :(

Silver_Brick 01-16-2017 10:44 AM

i am also intrested in it but I can't find a way to implement it but i can suggest you some snippet of it
see this

SilverDragonTears 01-16-2017 12:02 PM

Yeah I'm just totally lost with this type of coding :(


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.