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-20-2017, 02:30 PM
gwynmil's Avatar
gwynmil gwynmil is offline
Member
 
Join Date: Sep 2017
Location: UK
Posts: 25
Gender: Female
Credits: 3,500
gwynmil is on a distinguished road
Default A bunch of small questions

I've been tinkering for a few days and am impressed so far. All features are working, the number of mods and tips shared in the community are amazing, and it seems the only errors are caused by me not knowing how to properly edit scripts. But I'm learning quickly :)

Just a few things are currently leaving me stumped. It would be great if more experienced Mysidia users could answer these.

1. Changed the auto-ban to redirect to a warning page, but still curious, do either of these actually stop the action being done (like user pounding another's pet)?

2. The inventory is hideous to scroll down, as my Background item images are huge. I'd like to change the table layout and resize images, but can't find the exact script/page to edit this. Same for the myadopts page, it'd be lovely to rearrange pets into rows of 2 or 3 thumbnails rather than scrolling one by one.

(ah never mind, just found the tables. Looks like they're constructed with PHP rather than HTML. This will be tricky to edit but I'll try. Still not sure how to deal with image sizes though)

3. Where are custom pages stored among the other scripts? /pages/view/whatever. Made a few in the admincp and now can't find them in the file manager.

4. It seems it's not possible to edit the Main or Element themes in the admincp. Anyway, I have another ready to use. Is it safe to delete them? Will the new theme become the default?

5. I'm not very good at "reading" PHP and understanding exactly how some functions work, yet. Half of our breeding system involves mixing colours and I'm supposing hex/rgb are the way to go. Found this function and am wondering if anyone's used it already, or can tell what it will output.

For example rgb 255,255,56 (bright yellow) + 46,88,134 (dark blue) could result in 167,124,101 (murky red-brown) which is technically within the 3 number ranges, but looks very wrong overall. What's needed is for all 3 values to change in the same way, like the gradients on this page.
So it would be great to know if this how the above function also works, before I start fidding with the breeding scripts and possibly mess them up :) (although I'll probably do that anyway)

6. I would like to have small bits of custom CSS on certain pages (only a different body background and a faded illustration in the BG of the main content div). Such as a nest background for all the breeding-related pages, a market background for the shop and trade areas... what's the most sensible way to set that up? Still slightly overwhelmed by the number of scripts/parts making up the site, haha.

Thanks very much for any help!

Last edited by gwynmil; 10-20-2017 at 02:52 PM.
Reply With Quote
  #2  
Old 10-20-2017, 03:02 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,643
Dinocanid is on a distinguished road
Default

1. It stops it, so the other user's pet won't go to the pound if it is attempted.
3. The ACP-made pages are stored in the database (a.k.a phpMyAdmin) under "content"
3.5. To be frank, I 100% prefer creating new pages without the ACP. It's less clunky and adds freedom, so the old way quickly become obsolete. You can read up on it here: link
4. It is safe to delete them, but it is best to have something to fall back on if the new theme doesn't work out. The new theme won't automatically become the new default, you have to set it as such through the ACP under settings->basic settings.
5. Not entirely sure on this one, since I don't know how you would tint/add color to the pet images
6. This can be done with the custom page solution. You can use custom style tags in them as well; just make sure you use them above the php tags!
__________________
Reply With Quote
  #3  
Old 10-21-2017, 10:19 AM
gwynmil's Avatar
gwynmil gwynmil is offline
Member
 
Join Date: Sep 2017
Location: UK
Posts: 25
Gender: Female
Credits: 3,500
gwynmil is on a distinguished road
Default

Excellent, thank you again for the answers! :)

I tried poking around with the tables but can't wrap my head around this TableBuilder method. $NameOfTable->setBordered(TRUE/FALSE); why does that work in the daycare table but have no effect in any others? Mysterious stuff.

Guessing it would be alright to remove the default tables and build new ones with echoed HTML and foreach loops, styled with CSS?

About 6. <link rel="stylesheet" type="text/css" href="style.css"> - so you can just add that at the beginning, before the PHP starts, and the contents will overwrite parts of the main site theme? If yes, this should be done on the breeding.php rather than breedingview.php (for one example) page, right?
Reply With Quote
  #4  
Old 10-21-2017, 11:00 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,643
Dinocanid is on a distinguished road
Default

I forgot about the table builder! I would say phase it out, absolutely. I'm in the process of doing that now, and the results are so much better; especially if you use Bootstrap (or Foundation):

This is the method I use for custom tables, and I highly recommend it:
PHP Code:
public function index(){
        
//header("Location: /myadopts");
        
$mysidia Registry::get("mysidia");
        
$document $this->document;
        
$document->setTitle($this->lang->title);
        
//tab title
 
$document->add(new Comment("<title>Your Pantry</title>"));

        
$pagination $this->getField("pagination");
        
$stmt $this->getField("stmt")->get();
        if(
$stmt->rowCount() == 0){
            
$document->addLangvar($this->lang->empty);
            return;
        }
        
$shelfSpace $mysidia->db->select("users", array("shelfspace"), "username = '{$mysidia->user->username}'")->fetchColumn(); 
        
$adoptAmount $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->user->username}' AND health > '0'")->rowCount();
        if(
$adoptAmount >= 10){
        
$mysidia->db->update("users_status", array("fullpantry" => 'unlocked'), "username='{$mysidia->user->username}'");
        }
        
$document->add(new Comment("
            <div class='card'>
              <h2 class='card-header'><center>Pantry Stats</center></h2>
              <div class='card-body'>
                    <b>Shelf space:</b> 
{$adoptAmount}/{$shelfSpace} <a href='/expand' class='badge badge-secondary'>+</a>
              </div>
            </div>"
));
         
$document->add(new Comment("<table class='table table-bordered table-dark'>
  <thead>
    <tr>
      <th>Image</th>
      <th>Info</th>
      <th>Action</th>
    </tr>
  </thead>
  <tbody>"
FALSE));
        while(
$aid $stmt->fetchColumn()){
            
$adopt = new OwnedAdoptable($aid);
            
$gender_lookup $mysidia->db->select("owned_adoptables", array("gender"), "aid = '{$adopt->getAdoptID()}'")->fetchColumn(); 
            
$type $adopt->getType();
                   if (
$gender_lookup == "m") { $Gender "Male"; } 
                   if (
$gender_lookup == "f") { $Gender "Female"; }
                   
                   
$document->add(new Comment("<tr>
      <td><img src='
{$adopt->getImage()}'></td>
      <td><b><em>
{$adopt->getName()}</b></em><br></br> Level {$adopt->getCurrentLevel()}<br></br> {$Gender}</td>
      <td><a href='/myadopts/manage/
{$aid}' class='btn btn-primary' style='width:200px; height:auto;'>Manage</a></td>
    </tr>"
FALSE));
                   } 
        
        
$document->add(new Comment("</tbody></table>"));
    } 
It can even by applied to messages and stuff:


For #6, I've only ever tried it in the view file, so I don't know. I would try styling with "<style></style>" above the PHP tags first, since I don't know if "link rel" would work; you can try it though.
__________________
Reply With Quote
  #5  
Old 10-21-2017, 02:29 PM
gwynmil's Avatar
gwynmil gwynmil is offline
Member
 
Join Date: Sep 2017
Location: UK
Posts: 25
Gender: Female
Credits: 3,500
gwynmil is on a distinguished road
Default

Ooh, your site design is lovely! I'll give that code a try right away, thanks for sharing.

Custom CSS is working, hooray. Style tags had no effect, but it seems extra CSS for certain pages can be done in the admincp.

Properly-custom pages are also so much nicer to design from scratch. Thank you yet again.

Another thing you just made me wonder: what's the default maximum number of adopts a user can have, and where can it be changed? Never seen it mentioned anywhere.
Reply With Quote
  #6  
Old 10-21-2017, 02:57 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,643
Dinocanid is on a distinguished road
Default

There is no limit, I just made one myself. I coded my site so user can only own a certain number of pets at a time, and they have to get an expansion to be able to breed/own more. I can give you the code if you want.
__________________
Reply With Quote
  #7  
Old 10-22-2017, 09:55 AM
gwynmil's Avatar
gwynmil gwynmil is offline
Member
 
Join Date: Sep 2017
Location: UK
Posts: 25
Gender: Female
Credits: 3,500
gwynmil is on a distinguished road
Default

That would be very kind of you! Maybe later, though - we have so many bigger features to fix first. Us two admins will probably end up with hundreds of griffs while trying to test breeds, sexes, ages, markings, colours... ah, this is daunting.

The task perplexing me today: never been able to get backgrounds to appear (based on Abronsynth's mod). Div/table is empty. Also any attempt to add an adopt's image, other than usual $document->add($image);, causes blank page.

But I'm not fond of the current set-up anyway - having separate manage, click and profile pages. It would be great just to have a single page for each griff, with all their info and click/management links, for visitors and owner alike. Something roughly like this image.

Any ideas how to arrange this? Someone in another topic mentioned making petprofile/petprofileview.php. I can probably figure out how to add all the stuff in there, but how to make levelup and the myadopts page link there instead of /manage?

(also it looks like I'm really gonna need help with the breeding/colour scripts, are there any other Mysidia members who've used ImageMagick in this way? Will pay/draw/make 3D stuff/whatever in exchange for help! Getting slightly desperate haha.)

Last edited by gwynmil; 10-22-2017 at 10:04 AM.
Reply With Quote
  #8  
Old 10-22-2017, 10:18 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,643
Dinocanid is on a distinguished road
Default

I assume you mean the public profile mod: http://www.mysidiaadoptables.com/for...ead.php?t=5448
To make myadopts and levelup redirect to there instead, you would have to go into the respective view files and change where the links lead. If you're using my myadopts table code, for example, you would change this:
HTML Code:
<td><a href='/myadopts/manage/{$aid}' class='btn btn-primary' style='width:200px; height:auto;'>Manage</a></td>
To this:
HTML Code:
<td><a href='/levelup/publicprofile/{$aid}' class='btn btn-primary' style='width:200px; height:auto;'>Manage</a></td>
I've never been able to get backgrounds to appear with that mod either, but I have been able to show an adopt's image without $document->add($image);. Have you tried this?:
Code:
$document->add(new Comment("<img src='{$adopt->getImage()}'><br>"));
I know Abronsyth's started using ImageMagick, but I think they're using pre-drawn images instead of hex color codes. You can try asking though. I can try and help too, but I don't know how much help I can be since I've never attempted it.
__________________
Reply With Quote
  #9  
Old 10-22-2017, 11:09 AM
gwynmil's Avatar
gwynmil gwynmil is offline
Member
 
Join Date: Sep 2017
Location: UK
Posts: 25
Gender: Female
Credits: 3,500
gwynmil is on a distinguished road
Default

Yes, that profile mod. Thanks! Will have a go. And will message Abronsynth about the IM.

Nope, that gives a blank page. Your biography mod wouldn't work either. Perhaps I made a mistake while adding the BG or the profile mods... anyway I suppose neither will be needed any more, with the new profile pages. Ought to remove them.

Need to instead come up with an item that changes the body background-image for these pages. Until one is chosen, a griff's profile sticks with default CSS. This feature would be possible to implement, right? Not too different to what the BG mod did...
Reply With Quote
  #10  
Old 10-22-2017, 11:42 AM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,643
Dinocanid is on a distinguished road
Default

It should be possible...somehow. I couldn't wrap my head around the google search results, but it is possible to apply PHP variables in css: link
__________________
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


All times are GMT -5. The time now is 12:57 PM.

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