Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#11
|
||||
|
||||
Okie dokie, so you'll need to put it in the manage function. (Assuming you want it to appear while a user is managing an individual pet).
You can do it like this: Under the manage function you'll see this: PHP Code:
PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) |
#12
|
|||
|
|||
Sorry to keep bothering you, but it still doesn't work. It's givin me a blank page (syntax error on "<img src='{$adopt->getImage()}'/>" and when I get rid of it, the background still doesn't show. I've tried all sorts of things but for some reason can't get it. I even tried echoing the {$adopt->background} inside the style to see if that helped but still nothing.
|
#13
|
||||
|
||||
to call the background you must use the same name given in the owned_adoptables database, so if you used the same name posted here: adoptbackground then the correct way to call it it would be: {$adopt->adoptbackground} and the way to call the adopt image is the one you posted: <img src='{$adopt->getImage()}'/> dont know why is giving you a syntax error...=\
|
#14
|
|||
|
|||
That was a typo in my comment, oops! Here is the code I use which gives me a 500 error:
public function manage(){ $mysidia = Registry::get("mysidia"); $aid = $this->getField("aid")->getValue(); $name = $this->getField("name")->getValue(); $image = $this->getField("image"); $document = $this->document; $document->setTitle("Managing {$name}"); $document->add(new Comment("<div style='background:{$adopt->adoptbackground} no-repeat;vertical-align:bottom;text-align:center;width:100px;height:400px'><img src='{$adopt->getImage()}'/></div><br><br>This page allows you to manage {$name}. Click on an option below to change settings.<br> ")); Here is what happens with the same code except I removed the "img src" tag" (I gave it a height and width to show the div was being created and modified): Thanks for the help guys. |
#15
|
||||
|
||||
Alright, so it's failing to call the background URL. What should the URL appear as for that adoptable?
Okay, so this is what I have for my site: PHP Code:
PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 05-04-2017 at 10:05 AM. |
#16
|
||||
|
||||
Heya! I'd love to get this working, but the background image isn't showing up on the pet. Halp?
My code isn't throwing any errors, so not really sure where to go from here. I've tried it in a few different places, but every time nothing changes. This is the line of code Dinocaid helped me put together, but it's not working either: PHP Code:
Thanks for any help!
__________________
Venture Into The Mist |
#17
|
||||
|
||||
@ Abronsyth
cool. Thank you very much for for sharings this :) @ Nobody Have you try it with PHP Code:
this works for me Last edited by draugluin; 08-21-2018 at 09:24 AM. |
#18
|
|||
|
|||
Hi (sorry for my bad english, i'm from germany :D ),
i tried to bring the background to my game, but i'ts dont show =/ and when i try to show the pet-picture, i became an error: Code:
Fatal error: Call to a member function getImage() on null in /users/equino/www/view/myadoptsview.php on line 135 PHP Code:
btw i hope you understand me |
#19
|
||||
|
||||
Hey Nairi ... endlich mal jemand aus der Heimat
hast du unter "Public function manage" stehen PHP Code:
und versuch es mal mit getadoptbackground PHP Code:
__________________
|
#20
|
|||
|
|||
Hey :)
Na, das ist ja klasse. Also das Bild vom Haustier wird nun angezeigt, danke :) Der Hintergrund aber leider noch immer nicht. Sehr mysteriös |
|
|
What's New? |
What's Hot? |
What's Popular? |