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)
-   -   Need Help Thingy (http://www.mysidiaadoptables.com/forum/showthread.php?t=4740)

parayna 12-20-2014 09:07 PM

Need Help Thingy
 
OK, I decided that I am pretty much filling up the forum with random posts so, unless I am not allowed to do this, I have decided to make this ONE post have all my pleas for help on it XD I have gotten most of the major stuff done now.. just a few small bits left to do. (And a few big bits, but they can wait for the moment..)

Anyway, the small things I need help with as I write this are:

  Spoiler: All the completed stuff have been moved into here :P 
  Spoiler: Completed! (Look below for what solutions were used) 
  • Is it possible to resize adoptable images on the myadopts page? (CSS file or something? >.<) This is so that people can have more than two adoptables on their Adoptables page without it going over the wrapper and extending it too much (thanks to IntoRain, and Kyttias, I already have the myadopts page formatted as I want it and can specify how many to have in a row)


  Spoiler: Completed! (Look below for what solutions were used) 
  • When you go to your profile, you are able to friend yourself XD Is there something I can add in to prevent that? XD


  Spoiler: Completed! (Look below for what solutions were used) 

  • Whenever you go to the message center and try to visit the outbox, it won't let you in unless something is already in it. The page appears blank. And as soon as you add something to it, you can go and view it. Preferably I would like a little message to be there and say that there is currently nothing in your Outbox (instead of the blank page, as it makes it look like the site is broken XD)
  • NEW!! If someone signs up with an apostrophe in their username, it adds a slash into the Member's list and throws an error when trying to access their page.. >.<

The big things I need help with:

  Spoiler: Completed! (The link to the public thread is inside these spoiler tags! Just open and click to go there) 

(Link for shop AND inventory creation) = http://www.mysidiaadoptables.com/for...ad.php?p=31764
  • The inventory page to be like my shop page (Kyttias said they'd look)

  • The adopt shops to be like my item shops.
  • I kind of want my pound to appear differently... but I am not sure exactly how I wish it to appear. (I will probably update this when I have more of an idea)
  • I kind of want the tab on the profile that shows your adoptables to be like the myadopts page... so it'll show the same things, and be lay out similarly with a function for me to resize them. Might look a bit neater than the adoptables just being thrown in as they are now XD (I want this still in the tabbed sections if possible, to avoid any serious recodes just yet, so if you need a screenie of what it currently looks like, ask me :) )

Thank you for reading~

~Parayna

(and I will probably add stuff in new comments when I need help and then also update the main post with the problem and solution for those who come and read after)

Kyttias 12-20-2014 09:36 PM

ovo/ Hi again.

I've got this in my css and it seemed to have helped a lot:
HTML Code:

#form table img, #adopttable img, #top10 img, #rand5 img { width: 250px; }
If you find any other elements that are too large there are ways to inspect the HTML of a page by right-clicking and hitting 'Inspect Element' from the mouse menu in both Firefox and Chrome. Try to look at what container they're sitting inside, and go from there when making your css.

I know next to nothing about the Outbox/Inbox/Message stuff because I'm the only member of my site. Definitely ask IntoRain on this one.

I'll be leaving Monday down to my gf's parents place and I'll be able to work on the inventory for you, definitely. And then sometime after that, can probably help with the adopt shop. I don't actually have an adopt shop set up yet for myself (dunno if I'll use one, in the end), but I'll definitely give it a shot.

I'd kind of like my pound page to be different, too. But maybe too different, aha... I can still probably help once you have a better idea.

parayna 12-20-2014 10:00 PM

Hi XD OK, thanks. I'll try that! And yeah, I sometimes do the F12 thing but I get bored because I can't find it straight away (need to stop doing that ¬.¬) And it's fine, take your time, obviously XD I just thought of having one post instead of many... :P

EDIT: Actually, not sure if that'll help me. (The thingy for the CSS) I tried and it doesn't work *^* Thanks though XD (It might just be because I have differen specifications? I dunno XD I may do the F12 thing in a moment :P

Kyttias 12-20-2014 10:09 PM

Ah, right. You took yours out of the table. But areas like on the stats page, where its still in the table, that code would make the images smaller, etc.

Anyway, back when you did this in the other thread?
PHP Code:

$cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}'></a>")); 

Try just adding an inline style or width there on the image element directly, just like you would if it were html.

parayna 12-20-2014 10:16 PM

Alright, I'll try that thanks!

EDIT: Well, it worked. To an extent. It does resize the larger images, only it also resizes the smaller images XD Which means the eggs now look big and blurry.. and also, peeking around the internet they recommend you be careful as certain browser sizes don't like it.. (small ones for example). This is about as far as my knowledge goes *^*

Could we do a if statement and if it's $eggImage = yes or something, don't resize? (I know that isn't a valid statement XD But to get my point across of kind of the thing I want?)

This is the line so far:

PHP Code:

                $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '200px'></a>")); 

And as I said, I only know html to a short extent... the internet helps me a lot XD But I'm glad I even managed to do that XD And that I knew where to put the width command, so so far I'm happy :P

EDIT again: And would you also be able to do it with the baby image? (All species on my site will have 3 stages, regardless of species)

Kyttias 12-20-2014 11:25 PM

My site's similar -- and basically? I take the largest image and save everything it's size with a lot of extra space around it. That's my easiest solution, though it requires resaving everything. I planned ahead in this.

However, theoretically it should be possible to get the adoptable's level and resize accordingly:
PHP Code:

 $lvl $adopt->getCurrentLevel();
 
# if level 0 (egg) resize to 50px
 
if ($lvl == 0) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '50px'></a>")); }
 
# if level 1 (baby) resize to 100px
 
if ($lvl == 1) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '100px'></a>")); }
 
# if level is 2 or greater (adult) resize to 200px
 
if ($lvl >= 2) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '200px'></a>")); } 

Although if the egg images do not need resizing, just remove the width attribute from theirs entirely. ovo

(I think most browsers only take issue if you resize with percents, rather than exact pixel widths? There's also "sort of" a difference between style="width: 200px", width="200", and width="200px" but mostly just not.)

parayna 12-20-2014 11:38 PM

Thank you! It worked! I even managed to edit the align:

PHP Code:

                $aCell->setAlign(new Align("center""bottom")); 

To make it look like they were on the same level :P

  Spoiler: For anyone interested in the dimensions I used, for whatever reason XD 
PHP Code:

                $lvl $adopt->getCurrentLevel();
                
# if level 0 (egg) resize to 50px
                
if ($lvl == 0) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '90px'></a>")); }
                
# if level 1 (baby) resize to 100px
                
if ($lvl == 1) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '130px'></a>")); }
                
# if level is 2 or greater (adult) resize to 200px
                
if ($lvl >= 2) { $cell->add(new Comment("<a href='/myadopts/manage/{$aid}'><img src='{$adopt->getImage()}' width= '200px'></a>")); } 



Thanks~

parayna 12-22-2014 01:51 PM

I have another problem D: Your method before to get rid of slashes worked, but now I see that there are slashes in the bios of people when they send PM's (only just noticed)

And also when you go to your profile, you are able to friend yourself. Is there something I can add in to prevent that? XD

Kyttias 12-22-2014 04:17 PM

...why is there a bio when a message is being sent? That's a weird feature. o.O

It's probably pulling it up elsewhere and will need the stripslashes wherever that's going on, too...

It's in class_privatemessage.php, function getPostBar, around line 77. Change
PHP Code:

$postHeader->add(new TCell("<b>Member Since: </b><br>{$sender->membersince}<br> <b>Bio:</b><br>{$sender->profile->getBio()}<br> ")); 

to
PHP Code:

$str_bio stripslashes($sender->profile->getBio());
$postHeader->add(new TCell("<b>Member Since: </b><br>{$sender->membersince}<br> <b>Bio:</b><br>{$str_bio}<br> ")); 

As for the friending yourself thing... perhaps we can make a check so that if you are the user that the page belongs to, to not display the trade, message, or friend options. In class_userprofile.php, near the bottom of the page near the bottom of the contactinfo function, you can surround stuff with

PHP Code:

 if (!$mysidia->user == $mysidia->input->get("user")){ ... } 

which reads 'if not the user whose page this is, you can display this' implying that that if you are the user whose page this is, the stuff inside it will therefore not display.

parayna 12-22-2014 04:52 PM

Thank you :3 The message bio thing worked. And yeah, it is a bit weird XD

I tried the friending yourself solution, and it DOES hide it... only when I made another account to test it it was hidden for them as well. So it has hid it, only it seems as if it is for every account as well ^_^''


All times are GMT -5. The time now is 01:47 PM.

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