Need help with the site/forum/pets? Ask questions and get help from other members here.
by Nick » Tue Dec 30, 2008 1:06 pm
Lady wrote:I'm having trouble with the files in the zip.
I had problems every time I edited it on my own, so I scraped all of it and started from the zip files to see what I kept messing up on. Unfortunately, the problem keeps coming up anyway.
Do you have somewhere where I can view the system?
-

Nick
- Admin
-
- Posts: 6348
- Joined: Thu Jul 03, 2008 2:40 pm
- My pets
- My items
- My wishlist
- My gallery
- My scenes
- My dressups
- Trade with me
-
by qhost » Tue Dec 30, 2008 10:40 pm
Rolly-chan wrote:I just found out that the pictures are not displayed even if I don't put them into another folder.
And I have no clue what's wrong. ?_?
EDIT: It works o_O And I have no idea how I made it work. Scary...
That happened to me once. The pictures were working just fine one moment, then the next they weren't. Then suddenly, a while later, the pictures came back again. And I didn't have to edit the codes or anything

-----
she/they | adult | australia | artist | writer
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
My name is Boo & I am perpetually tired.
Taking a break from CS for a little while!
Spotted Tribal count: 31
♥︎ Click here to see the hoard! ♥︎
-
-

qhost
-
- Posts: 4352
- Joined: Wed Oct 01, 2008 6:36 pm
- My pets
- My items
- My wishlist
- My gallery
- My scenes
- My dressups
- Trade with me
by Rolly-chan » Tue Dec 30, 2008 10:58 pm
Kiara wrote:Rolly-chan wrote:I just found out that the pictures are not displayed even if I don't put them into another folder.
And I have no clue what's wrong. ?_?
EDIT: It works o_O And I have no idea how I made it work. Scary...
That happened to me once. The pictures were working just fine one moment, then the next they weren't. Then suddenly, a while later, the pictures came back again. And I didn't have to edit the codes or anything

Yeah, it's happening again. But this time I know why (at least a little XD)
The script does work without the key.php and without encrypting the variations. But as soon as I change the script to the encrypting-part it doesn't work any more. Why this? ?_?
-

Rolly-chan
-
- Posts: 2790
- Joined: Tue Nov 18, 2008 8:09 am
- My pets
- My items
- My wishlist
- My gallery
- My scenes
- My dressups
- Trade with me
-
by qhost » Tue Dec 30, 2008 11:30 pm
Rolly-chan wrote:Yeah, it's happening again. But this time I know why (at least a little XD)
The script does work without the key.php and without encrypting the variations. But as soon as I change the script to the encrypting-part it doesn't work any more. Why this? ?_?
What does your simple.php file look like? That's the reason why mine wasn't working to start off with .
-----
she/they | adult | australia | artist | writer
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
My name is Boo & I am perpetually tired.
Taking a break from CS for a little while!
Spotted Tribal count: 31
♥︎ Click here to see the hoard! ♥︎
-
-

qhost
-
- Posts: 4352
- Joined: Wed Oct 01, 2008 6:36 pm
- My pets
- My items
- My wishlist
- My gallery
- My scenes
- My dressups
- Trade with me
by Rolly-chan » Wed Dec 31, 2008 12:31 am
It looks like this
- Code: Select all
<?php
//Tell the browser that we are sending it a PNG image to display
//header("Content-Type: image/png");
require("adopttools.php");
//Find the variation with the given adoptable id ('a') and variation id ('v')
$variation=find_variation($_REQUEST['a'], decrypt_variation($_REQUEST['v']));
//Decide which of the ages we want to show for the adoptable
$pickedAge=NULL; //We'll store the age we eventually pick into the variable $pickedAge
/* Check the ages in order. The age we end up picking will be the last age
* in the file where the current date is after the 'date' attribute
*/
foreach ($variation->age as $age) {
if (!isset($age['date']) || time() > strtotime($age['date'])) {
$pickedAge=$age;
}
}
//Now that we've picked the age, display the image that that age uses
readfile($pickedAge['image']);
exit();
?>
-

Rolly-chan
-
- Posts: 2790
- Joined: Tue Nov 18, 2008 8:09 am
- My pets
- My items
- My wishlist
- My gallery
- My scenes
- My dressups
- Trade with me
-
by qhost » Wed Dec 31, 2008 12:44 am
Rolly-chan wrote:It looks like this
- Code: Select all
<?php
//Tell the browser that we are sending it a PNG image to display
//header("Content-Type: image/png");
require("adopttools.php");
//Find the variation with the given adoptable id ('a') and variation id ('v')
$variation=find_variation($_REQUEST['a'], decrypt_variation($_REQUEST['v']));
//Decide which of the ages we want to show for the adoptable
$pickedAge=NULL; //We'll store the age we eventually pick into the variable $pickedAge
/* Check the ages in order. The age we end up picking will be the last age
* in the file where the current date is after the 'date' attribute
*/
foreach ($variation->age as $age) {
if (!isset($age['date']) || time() > strtotime($age['date'])) {
$pickedAge=$age;
}
}
//Now that we've picked the age, display the image that that age uses
readfile($pickedAge['image']);
exit();
?>
Looks fine to me...what webhost do you use? Have you uploaded the key.php file? Other than that I can't really think of anything...
-----
she/they | adult | australia | artist | writer
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
My name is Boo & I am perpetually tired.
Taking a break from CS for a little while!
Spotted Tribal count: 31
♥︎ Click here to see the hoard! ♥︎
-
-

qhost
-
- Posts: 4352
- Joined: Wed Oct 01, 2008 6:36 pm
- My pets
- My items
- My wishlist
- My gallery
- My scenes
- My dressups
- Trade with me
by Nick » Wed Dec 31, 2008 1:32 am
Rolly-chan wrote:It looks like this
- Code: Select all
//header("Content-Type: image/png");
With this line commented out, you cannot see the image loading (perhaps you knew that and were just using it to test for error messages). When you added the encryption, all the old pet codes stop working. You need to update adopt.php so that it includes the encyption too.
-

Nick
- Admin
-
- Posts: 6348
- Joined: Thu Jul 03, 2008 2:40 pm
- My pets
- My items
- My wishlist
- My gallery
- My scenes
- My dressups
- Trade with me
-
by Rolly-chan » Wed Dec 31, 2008 3:05 am
thenickdude wrote:Rolly-chan wrote:It looks like this
- Code: Select all
//header("Content-Type: image/png");
With this line commented out, you cannot see the image loading (perhaps you knew that and were just using it to test for error messages). When you added the encryption, all the old pet codes stop working. You need to update adopt.php so that it includes the encyption too.
You mean this line?
- Code: Select all
$v_id=encrypt_variation($variation['id']);
Because I already included this line in adopt.php
-

Rolly-chan
-
- Posts: 2790
- Joined: Tue Nov 18, 2008 8:09 am
- My pets
- My items
- My wishlist
- My gallery
- My scenes
- My dressups
- Trade with me
-
Who is online
Users browsing this forum: No registered users and 2 guests