Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Suggestions and Feature Requests (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=21)
-   -   help - changeing language (http://www.mysidiaadoptables.com/forum/showthread.php?t=1530)

vexel 08-10-2010 07:16 AM

help - changeing language
 
hello ;-)

i'm from poland, so sorry for my mistakes in this post, but i can't speak english as well as you can ;|

i'm trying to install rusnak php adoptables for me.
but i have a problem -when i write oru polish font - ??ó?????? i have êó³?¹¿?æñ

what should i do, to change this scrpit's language?


please help ;-)



PS. i have polish fonts only on menu and sidebar but on index page or on my adopts page no:|

PokePets 08-10-2010 09:52 AM

RE: help - changeing language
 
I think you must take a look on adminpost.php & pages.php ;)

MikiHeart 08-10-2010 10:45 AM

RE: help - changeing language
 
You have to edit the lang/lang.php to polish ^^
Good luck!

vexel 08-10-2010 11:27 AM

RE: help - changeing language
 
Thank you for help ;-)


It's working!
I change uft-8 for windows-1250 and i must make new bbconverter and it works!

Jupi!
Thank you :*

PS. I translate lang/lang.php to polish ;)

Now i'm working with sending money script.
Have you got it?

MikiHeart 08-11-2010 12:31 AM

RE: help - changeing language
 
If you mean virtual currency donations, yes I do.
But it's in the premium forum.

If you mean a paypal IPN, I also have that.
But I can't give it to you as I commissioned it.

vexel 08-11-2010 03:56 AM

RE: help - changeing language
 
Ok, i understand ;|

I'm trying to make my own, but i always have a problem

PokePets 08-11-2010 05:07 AM

RE: help - changeing language
 
What's the problem? We are here to help you :p

vexel 08-11-2010 05:37 AM

RE: help - changeing language
 
Ok, but now i'm working with breeding system, that animals can breed 1time for 3 days ;D

PokePets 08-11-2010 05:38 AM

RE: help - changeing language
 
Im also looking/working on that & with;
-Money
-Levelup
....
:p

vexel 08-11-2010 06:51 AM

RE: help - changeing language
 
I have breeding 1 time for 3 days, do you want?

what do you want to add on level up? and money? i have a currency system, but i can't send money, because i can't do it...



hello... i've got a problem...

my siggy are not shown
Image "http://pets.y0.pl/siggy.php?id=1" can't be shown, because it include an error(i translate this ;-))

my siggy.php
PHP Code:

<?php

// **********************************************************************
// Rusnak PHP Adoptables Script
// Copyright 2009 Brandon Rusnak
// For help and support: http://www.rusnakweb.com/forum/
//
// Redistribution prohibited without written permission
//
// File ID: siggy.php
// Purpose: Show signature images for adoptables
// **********************************************************************

// Wake the sleeping giant

// **********************************************************************
// Basic Configuration Info
// **********************************************************************

include("inc/functions.php");
include(
"inc/config.php");
include(
"lang/lang.php");

$themeurl grabanysetting("themeurl");

// **********************************************************************
// Define our top links by calling getlinks()
// **********************************************************************

$links getlinks();

// **********************************************************************
// Define our ads by calling getads()
// **********************************************************************

$ads getads("any");

// **********************************************************************
// Grab any dynamic article content from the content table
// **********************************************************************

$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content $pagecontent[content];
$article_content nl2br($article_content);

// **********************************************************************
// Grab any settings that we will need for the current page from the DB
// **********************************************************************

$browsertitle grabanysetting("browsertitle");
$sitename grabanysetting("sitename");
$slogan grabanysetting("slogan");

// **********************************************************************
// Check and see if the user is logged in to the site
// **********************************************************************

$loginstatus logincheck();
$isloggedin $loginstatus[loginstatus];
$loggedinname $loginstatus[username];

// **********************************************************************
// End Prepwork - Output the page to the user
// **********************************************************************

// We need to grab an adoptable ID

$id $_GET["id"];
$id preg_replace("/[^a-zA-Z0-9s]/"""$id);
$id secure($id);

// Check that ID exists and is valid

if(is_numeric($id)){

// The ID appears to be valid, so double check...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE aid='$id'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$owner=@mysql_result($result,$i,"owner");

$i++;
}

if(
$aid == $id){

// The adoptable exists, so let's try and show the image

$usingimage "no";

$image getcurrentimage($id);

    
// Let's see if the server has support for GD or not
    // Also to use fancy images the image must be a gif and fancy images must be enabled...

    
$usegd grabanysetting("gdimages");
    
$imageinfo = @getimagesize($image);
    
$imagemime $imageinfo["mime"]; // Mime type of the image file, should be a .gif file...

    
if(function_exists('imagegif') and $usegd == "yes" and $imagemime == "image/gif")
    {

    
$usingimage "yes"//Turn the template system off

    // BEGIN NEW CODE

    
list($width$height$type$attr) = getimagesize($image); // The size of the original adoptable image

    // Begin the fancy outputs...

    // Lets create the new target image, with a size big enough for the text for the adoptable

    
$newheight $height 72;

    if(
$newwidth 250){
    
$newwidth 250;
    }
    else{
    
$newwidth $width;
    }

      
$img_temp imagecreatetruecolor($newwidth$newheight); 


      
$alphablending true;  


        
// Lets create the image and save its transparency  
      
$img_old = @imagecreatefromgif($image);  
      
imagealphablending($img_oldtrue);  
      
imagesavealpha($img_oldtrue);
   
     
// Lets copy the old image into the new image with  
     // the given size  
     
ImageCopyResampled(  
         
$img_temp,  
         
$img_old,  
         
0000,  
         
$width,  
         
$height,  
         
$width,  
         
$height  
     
);  
   
    
    
$textheight $width 2;

    
$image $img_temp;

    
$bgi imagecreatetruecolor($newwidth$newheight);

    
$color imagecolorallocate($bgi515151);


    
$str1 "Imi?: ".$name;
    
$str2 "W?a?ciciel: ".$owner;
    
$str3 "Nakarm mnie!";
    
$str4 "More Adopts at:";
    
$str5 "www.".$domain;


    
imagestring ($image120$textheight,  $str1$color);
    
imagestring ($image120$textheight 13,  $str2$color);
    
imagestring ($image120$textheight 26,  $str3$color);
    
imagestring ($image120$textheight 42,  $str4$color);
    
imagestring ($image120$textheight 55,  $str5$color);

    
$background imagecolorallocate($image000);  
      
ImageColorTransparent($image$background);  
 
    
header("Content-Type: image/GIF");
    
ImageGif ($image);
    
imagedestroy($image);
    
imagedestroy($img_temp);
    
imagedestroy($img_old);
    
imagedestroy($bgi);

    }
    else{
    
    
// We are going to try and get this image the old fashioned way...
    // Define a list of allowed file extentions...

    
$extList = array();
    
$extList['gif'] = 'image/gif';
    
$extList['jpg'] = 'image/jpg';
    
$extList['jpeg'] = 'image/jpeg';
    
$extList['png'] = 'image/png';

    
//Define the output file type
    
$contentType 'Content-type: '.$extList$imageinfo['extension'] ];

    if(
$imageinfo['extension'] =! "image/gif" and $imageinfo['extension'] =! "image/jpeg" and $imageinfo['extension'] =! "image/png"){

    
// The file type is NOT ALLOWED
    
die("Hacking Attempt!");

    }
    else{

    
// File type is allowed, so proceed
    // Try and read the file in

    
$status "";

    
header ($contentType);
    
$status readfile($image);

    if(
$status == "" or $status == "false" or $status == "FALSE"){

    
// Reading the file failed, so show an error...    
    
header ("text/plain");
    die(
"Readfile appears to be disabled on your host.");

    }
    


    } 

    }


}
else{

// Bogus ID

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;


}
}
else{

// Bogus ID

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}


// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file $themeurl;

// Do the template changes and echo the ready template
$template file_get_contents($file);

$template replace(':ARTICLETITLE:',$article_title,$template);
$template replace(':ARTICLECONTENT:',$article_content,$template);
$template replace(':ARTICLEDATE:',$article_date,$template);

$template replace(':BROWSERTITLE:',$browsertitle,$template);
$template replace(':SITENAME:',$sitename,$template);

//Define our links
$template replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar getsidebar();
$template replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template replace(':ADS:',$ads,$template);

//Get the slogan info
$template replace(':SLOGAN:',$slogan,$template);


if(
$usingimage != "yes"){
echo 
$template// Only echo the template if we are not showing an image... 
}

// **********************************************************************
// End Template Definition
// **********************************************************************



?>


ps picuploasdgif anf jpg have CHMOD 777

PokePets 08-11-2010 08:52 AM

RE: help - changeing language
 
This is my siggy.php, take a look ;)
PHP Code:

<?php

// **********************************************************************
// Rusnak PHP Adoptables Script
// Copyright 2009 Brandon Rusnak
// For help and support: http://www.rusnakweb.com/forum/
//
// Redistribution prohibited without written permission
//
// File ID: siggy.php
// Purpose: Show signature images for adoptables
// **********************************************************************

// Wake the sleeping giant

// **********************************************************************
// Basic Configuration Info
// **********************************************************************

include("inc/functions.php");
include(
"inc/config.php");
include(
"lang/lang.php");

$themeurl grabanysetting("themeurl");

// **********************************************************************
// Define our top links by calling getlinks()
// **********************************************************************

$links getlinks();

// **********************************************************************
// Define our ads by calling getads()
// **********************************************************************

$ads getads("any");

// **********************************************************************
// Grab any dynamic article content from the content table
// **********************************************************************

$pagecontent getsitecontent("index");
$article_title $pagecontent[title];
$article_content $pagecontent[content];
$article_content nl2br($article_content);

// **********************************************************************
// Grab any settings that we will need for the current page from the DB
// **********************************************************************

$browsertitle grabanysetting("browsertitle");
$sitename grabanysetting("sitename");
$slogan grabanysetting("slogan");

// **********************************************************************
// Check and see if the user is logged in to the site
// **********************************************************************

$loginstatus logincheck();
$isloggedin $loginstatus[loginstatus];
$loggedinname $loginstatus[username];

// **********************************************************************
// End Prepwork - Output the page to the user
// **********************************************************************

// We need to grab an adoptable ID

$id $_GET["id"];
$id preg_replace("/[^a-zA-Z0-9s]/"""$id);
$id secure($id);

// Check that ID exists and is valid

if(is_numeric($id)){

// The ID appears to be valid, so double check...

$query "SELECT * FROM ".$prefix."owned_adoptables WHERE aid='$id'";
$result mysql_query($query);
$num mysql_numrows($result);

//Loop out code
$i=0;
while (
$i 1) {

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlevel");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$totalclicks=@mysql_result($result,$i,"totalclicks");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$owner=@mysql_result($result,$i,"owner");

$i++;
}

if(
$aid == $id){

// The adoptable exists, so let's try and show the image

$usingimage "no";

$image getcurrentimage($id);

    
// Let's see if the server has support for GD or not
    // Also to use fancy images the image must be a gif and fancy images must be enabled...

    
$usegd grabanysetting("gdimages");
    
$imageinfo = @getimagesize($image);
    
$imagemime $imageinfo["mime"]; // Mime type of the image file, should be a .gif file...

    
if(function_exists('imagegif') and $usegd == "yes" and $imagemime == "image/gif")
    {

    
$usingimage "yes"//Turn the template system off

    // BEGIN NEW CODE

    
list($width$height$type$attr) = getimagesize($image); // The size of the original adoptable image

    // Begin the fancy outputs...

    // Lets create the new target image, with a size big enough for the text for the adoptable

    
$newheight $height 72;

    if(
$newwidth 250){
    
$newwidth 250;
    }
    else{
    
$newwidth $width;
    }

      
$img_temp imagecreatetruecolor($newwidth$newheight); 


      
$alphablending true;  


        
// Lets create the image and save its transparency  
      
$img_old = @imagecreatefromgif($image);  
      
imagealphablending($img_oldtrue);  
      
imagesavealpha($img_oldtrue);
   
     
// Lets copy the old image into the new image with  
     // the given size  
     
ImageCopyResampled(  
         
$img_temp,  
         
$img_old,  
         
0000,  
         
$width,  
         
$height,  
         
$width,  
         
$height  
     
);  
   
    
    
$textheight $width 2;

    
$image $img_temp;

    
$bgi imagecreatetruecolor($newwidth$newheight);

    
$color imagecolorallocate($bgi515151);


    
$str1 "".$name;
    
$str2 "level ".$totalclicks;


    
imagestring ($image120$textheight,  $str1$color);
    
imagestring ($image120$textheight 13,  $str2$color);
    
imagestring ($image120$textheight 26,  $str3$color);
    
imagestring ($image120$textheight 42,  $str4$color);
    
imagestring ($image120$textheight 55,  $str5$color);

    
$background imagecolorallocate($image000);  
      
ImageColorTransparent($image$background);  
 
    
header("Content-Type: image/GIF");
    
ImageGif ($image);
    
imagedestroy($image);
    
imagedestroy($img_temp);
    
imagedestroy($img_old);
    
imagedestroy($bgi);

    }
    else{
    
    
// We are going to try and get this image the old fashioned way...
    // Define a list of allowed file extentions...

    
$extList = array();
    
$extList['gif'] = 'image/gif';
    
$extList['jpg'] = 'image/jpeg';
    
$extList['jpeg'] = 'image/jpeg';
    
$extList['png'] = 'image/png';

    
//Define the output file type
    
$contentType 'Content-type: '.$extList$imageinfo['extension'] ];

    if(
$imageinfo['extension'] =! "image/gif" and $imageinfo['extension'] =! "image/jpeg" and $imageinfo['extension'] =! "image/png"){

    
// The file type is NOT ALLOWED
    
die("Hacking Attempt!");

    }
    else{

    
// File type is allowed, so proceed
    // Try and read the file in

    
$status "";

    
header ($contentType);
    
$status readfile($image);

    if(
$status == "" or $status == "false" or $status == "FALSE"){

    
// Reading the file failed, so show an error...    
    
header ("text/plain");
    die(
"Readfile appears to be disabled on your host.");

    }
    


    } 

    }


}
else{

// Bogus ID

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;


}
}
else{

// Bogus ID

$article_title $err_idnoexist;
$article_content $err_idnoexist_text;

}


// **********************************************************************
// Begin Template Definition
// **********************************************************************

//Define our current theme
$file $themeurl;

// Do the template changes and echo the ready template
$template file_get_contents($file);

$template replace(':ARTICLETITLE:',$article_title,$template);
$template replace(':ARTICLECONTENT:',$article_content,$template);
$template replace(':ARTICLEDATE:',$article_date,$template);

$template replace(':BROWSERTITLE:',$browsertitle,$template);
$template replace(':SITENAME:',$sitename,$template);

//Define our links
$template replace(':LINKSBAR:',$links,$template);

//Get the content for the side bar...

$sidebar getsidebar();
$template replace(':SIDEFEED:',$sidebar,$template);

//Get the ad content...
$template replace(':ADS:',$ads,$template);

//Get the slogan info
$template replace(':SLOGAN:',$slogan,$template);


if(
$usingimage != "yes"){
echo 
$template// Only echo the template if we are not showing an image... 
}

// **********************************************************************
// End Template Definition
// **********************************************************************



?>

& that script is welcome :D, i have a slot machine script & a code that some adoptables only can have 1 gender.

vexel 08-11-2010 10:19 AM

RE: help - changeing language
 
Than you, but yoru siggy also doesn't work... why??:O


So if you want the adoptables can breed 1 time for 3 days:

add new pole - breed varchar(20) and be default yes - it must be in database abandon and owned_adoptables



in breeding.php find

Quote:

//This will select all the female adoptables the user has
$result = mysql_query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '$loggedinname' AND gender = 'female'");
$num = mysql_num_rows($result);
and repalce it with:


Quote:

//This will select all the female adoptables the user has
$result = mysql_query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '$loggedinname' AND gender = 'female' AND breed = 'yes' AND isfrozen = 'no'");
$num = mysql_num_rows($result);
and find a little down


Quote:

//This will select all the female adoptables the user has
$result = mysql_query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '$loggedinname' AND gender = 'male'");
$num = mysql_num_rows($result);

and replace it with:

Quote:

//This will select all the female adoptables the user has
$result = mysql_query("SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '$loggedinname' AND gender = 'male' AND breed = 'yes' AND isfrozen = 'no'");
$num = mysql_num_rows($result);

next also in breeding.php find



Quote:

mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no','$gender','$date')");
a replace it with:

Quote:

mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','fortrade','no','$gender','$date','yes' )");
and up paste it:
Quote:

$breed=time('U');
and down past it:

Quote:

mysql_query("UPDATE ".$prefix."owned_adoptables SET breed='".$breed."' WHERE aid='".$male_id."'");
mysql_query("UPDATE ".$prefix."owned_adoptables SET breed='".$breed."' WHERE aid='".$female_id."'");
breeding file ok ;-)

in doadopt.php find


Quote:

mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender','$date')") ;

and replace it with


Quote:

mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender','$date','y es')");


also in doadoptab.php find

Quote:

mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender','$date')") ;

and replace it with


Quote:

mysql_query("INSERT INTO ".$prefix."owned_adoptables VALUES ('', '$type', '$name','$loggedinname','0','0', '$code', '','$alts','notfortrade','no','$gender','$date','y es')");


the last file is myadopts.php

find
Quote:

else if($act == "manage"){

and down you have
Quote:

$aid=@mysql_result($result,$i,"aid"); //The adoptable's ID
$currentlevel=@mysql_result($result,$i,"currentlev el");
$type=@mysql_result($result,$i,"type");
$name=@mysql_result($result,$i,"name");
$gender=@mysql_result($result,$i,"gender");
$isfrozen=@mysql_result($result,$i,"isfrozen");
$totalclicks=@mysql_result($result,$i,"totalclicks ");
and down past it:
Quote:

$breed=@mysql_result($result,$i,"breed");
$decay=time() - 3 * 24 * 60 * 60;
// here you can set how many days. now it's 3 days, but if you past
// $decay=time() - 2 * 24 * 60 * 60;
// it will be 2 days ;-)
$removed="no";


if($breed < $decay){ //check if the creature is too the abandoned database
//yes it is, time to remove it
$removed="yes";
mysql_query("UPDATE ".$prefix."owned_adoptables SET breed='yes' WHERE aid='".$aid."'");
}

and down find

find
Quote:

else if($act == "manage"){
Quote:

mysql_query("INSERT INTO ".$prefix."abandoned VALUES ('$aid', '$type', '$name','$owner', '$currentlevel', '$totalclicks', '$code', '', '$usealternates', '$tradestatus', '$isfrozen', '$gender', '$date')");
mysql_query("DELETE FROM ".$prefix."owned_adoptables WHERE aid='$id' and owner='$loggedinname'");
replace with

Quote:

mysql_query("INSERT INTO ".$prefix."abandoned VALUES ('$aid', '$type', '$name','$owner', '$currentlevel', '$totalclicks', '$code', '', '$usealternates', '$tradestatus', '$isfrozen', '$gender', '$date', 'yes')");
mysql_query("DELETE FROM ".$prefix."owned_adoptables WHERE aid='$id' and owner='$loggedinname'");

Ok - it's the end ;-)
it's working for me ;-)


I thing you understand me ;-)

and please help me with siggy.php ;-)

vexel 08-11-2010 11:53 AM

RE: help - changeing language
 
where can i find a free hosting?
my polish hosting have readfile disabled :|

PokePets 08-11-2010 12:15 PM

RE: help - changeing language
 
000webhost.com ;)
I use it to.
Thanks for your scirpt, gone try it soon.

vexel 08-11-2010 12:39 PM

RE: help - changeing language
 
thank you for hosting :*:*

chucksrhodes 08-20-2010 10:06 AM

RE: help - changeing language
 
The solution to your trouble is that you should have admin rights for that purspose and with that admin panel you can change this scripts or so.


All times are GMT -5. The time now is 10:20 AM.

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