Jump to content

thosecars82

Members
  • Posts

    59
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.arreglaordenador.com
  • Yahoo
    arreglaordenador

Profile Information

  • Gender
    Not Telling

thosecars82's Achievements

Member

Member (2/5)

0

Reputation

  1. Sorry, I just realized that I had not described the problem accurately. The problem is that I have this simple code <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.arreglaordenador.com" ); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php $language="fr_FR"; putenv("LC_ALL=$language"); setlocale(LC_ALL, $language); bindtextdomain("messages", "./locale"); textdomain("messages"); print "<p>"._("hi! This website is written in English.")."</p>\n"; ?> </body> </html> and no matter what string I set the variable $language with that gettext will always look for a translation in the folder locale\es_ES\LC_MESSAGES whether the language is Spanish (es_ES) or not. For example, in the above code, gettext will not look for the French translation as it should in locale\fr_FR\LC_MESSAGES but it will look for the translation into the folder corresponding to Spanish language, that is to say, locale\es_ES\LC_MESSAGES. Moreover, if gettext does not find the folder locale\es_ES\LC_MESSAGES then it will display the string in the original language(English) even if $language equals "fr_FR" and at the same time there is a locale\fr_FR\LC_MESSAGES folder created and the corresponding messages.mo and messages.po files created in this folder. I made sure that I re-run Apache and MySql under Xampp whenever I change anything in the code but it keeps having this behaviour anyways. Do you have any idea about why only translations in .po files in the Spanish folder locale\es_ES\LC_MESSAGES are considered and not those translations corresponding to other languages and other folders? Thanks in advance.
  2. Hello I have a problem. Altough I got gettext working under a remote server environment, I have not got it working yet under a XAMPP installation. I have made sure that gettext is enabled by going to http://localhost and looking into phpinfo. The code is really simple: <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.arreglaordenador.com" ); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <?php $language="es_ES"; putenv("LC_ALL=$language"); setlocale(LC_ALL, $language); bindtextdomain("messages", "./locale"); textdomain("messages"); print "<p>"._("This website is written in English")."</p>\n"; ?> </body> </html> Any idea? Thanks
  3. Just had to include a .htaccess file into the wordpress installation with this code: DirectoryIndex index.php Thanks though.
  4. Hello there I would appreciate if any of you could give me a hint about why I just see a blank page when I click http://www.arreglaordenador.com/blog/wp-admin/install.php I uploaded all the unzipped wordpress installation file and uploaded the content into the blog directory http://www.arreglaordenador.com/blog Now I do not understand why I do not even see anything in this page. I just see blank. Does any of you have any idea about it? Thanks a lot.
  5. Hello I would like to ask you why I see this square in red color just in my local xampp installation. If I run the code in the remote server (http://www.arreglaordenador.com/numberimage2.php) I see the square in black color instead of red. Do you have any ideas? <?php $im = imagecreatetruecolor(100, 100); // sets background to red $red = imagecolorallocate($im, 255, 0, 0); imagefill($im, 0, 0, $red); header('Content-type: image/png'); imagepng($im); imagedestroy($im); ?> Thanks
  6. Ok, thanks for those two lines for debugging. They helped me to know the problem was the $rootPath variable. Now, if you see the number is displayed, however the background is displayed in black color making the number very difficult to see. However, I do not understand why this just happens remotely and not locally. <?php $fontDir = "fonts/"; $fn = (isset($_GET['fn'])) ? $_GET['fn'] : "arial.ttf"; $fs = (isset($_GET['fs'])) ? $_GET['fs'] : 10; $maxWidth = 80 * $fs; $colorArray = array ("red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "gray"); // $colorArray = array ("black", "black", "black", "black", "black", "black", "black", "black", "black"); $color = (isset($_GET['color'])) ? $colorArray[$_GET['color']] : $colorArray[rand(0, ]; $txt = (isset($_GET['txt'])) ? $_GET['txt'] : "0000000"; $coords = imagettfbbox($fs, 0, $fontDir . $fn, $txt); $w = abs($coords[4]) + 8; $h = abs($coords[5]) + 8; $img = imagecreatetruecolor($w, $h); $red = imagecolorallocate($img, 255,0,0); $green = imagecolorallocate($img, 0,255,0); $blue = imagecolorallocate($img, 0,0,255); $cyan = imagecolorallocate($img, 0,255,255); $magenta = imagecolorallocate($img, 255,0,255); $yellow = imagecolorallocate($img, 255,255,0); $black = imagecolorallocate($img, 0,0,0); $white = imagecolorallocate($img, 255,255,255); $gray = imagecolorallocate($img, 127,127,127); $fill = ($color == "white") ? $black : $white; imagefill($img, 0, 0, $fill); $position = 4; if (isset($_GET['position'])) $position = $_GET['position']; imagettftext($img, $fs, 0, 0, $h-$position, $$color, "$fontDir$fn", $txt); header("content-type: image/jpeg"); imagejpeg($img, "", 100); imagedestroy($img); ?> Thanks
  7. Hello I do not know why but this code seems to work fine only in my xampp local insallation but not in the remote server. I just see a black square instead of the number 0000000 when I run this code in the remote server through the link http://www.arreglaordenador.com/numberimage.php and the code in numberimage.php is: <?php $fontDir = $rootPath . "fonts\\"; $fn = (isset($_GET['fn'])) ? $_GET['fn'] : "ARIAL.ttf"; $fs = (isset($_GET['fs'])) ? $_GET['fs'] : 10; $maxWidth = 80 * $fs; //$colorArray = array ("red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "gray"); $colorArray = array ("black", "black", "black", "black", "black", "black", "black", "black", "black"); $color = (isset($_GET['color'])) ? $colorArray[$_GET['color']] : $colorArray[rand(0, ]; $txt = (isset($_GET['txt'])) ? $_GET['txt'] : "0000000"; $coords = imagettfbbox($fs, 0, $fontDir . $fn, $txt); $w = abs($coords[4]) + 8; $h = abs($coords[5]) + 8; $img = imagecreatetruecolor($w, $h); $red = imagecolorallocate($img, 255,0,0); $green = imagecolorallocate($img, 0,255,0); $blue = imagecolorallocate($img, 0,0,255); $cyan = imagecolorallocate($img, 0,255,255); $magenta = imagecolorallocate($img, 255,0,255); $yellow = imagecolorallocate($img, 255,255,0); $black = imagecolorallocate($img, 0,0,0); $white = imagecolorallocate($img, 255,255,255); $gray = imagecolorallocate($img, 127,127,127); $fill = ($color == "white") ? $black : $white; imagefill($img, 0, 0, $fill); $position = 4; if (isset($_GET['position'])) $position = $_GET['position']; imagettftext($img, $fs, 0, 0, $h-$position, $$color, "$fontDir$fn", $txt); header("content-type: image/jpeg"); imagejpeg($img, "", 100); imagedestroy($img); ?> Does any of you have any suggestion? Thanks
  8. Hello there I am just realizing that first time I enter into http://www.arreglaordenador.com and try to click on any of the header links like "Inicio", "Servicios", "Contacto", or "Acerca de mi" I see a really long dynamic url containing the url itself followed by ?PHPSESSID= .......................... where those ...... symbolize a string of chars I have to say that this second dynamic part consisting of PHPSESSID=..... does not appear from the second click in one of those header links. But it does appear on the first click in any of those links. The thing is that I heard that dynamic urls are bad for search engines to crawl at them and then I thought that I might do something to avoid this dynamic url since search engines has not been very keen on this site so far. The thing is that I am using the sessions to keep the state of an email that might have been started by the user in the Contact page. That way if the user leaves that contact page but comes back later, he would find the text written as he left it instead of having to write the email from the beginning. Thank you very much.
  9. Well, that reply is really useful to me. I guess they might be using available software like OSCommerce, CubeCart, ZenCart or any other of their own. But the interesting thing is that they are not starting that without an already made software of this kind. Thanks a lot.
  10. I think there are some applications like OSCommerce, CubeCart, ZenCart. Nevertheless I do not know which one is the most standard. Moreover, I was looking for some application which was made like a framework to build upon instead of as a rigid application. Another question, I have seen some offers of companies which sell this online stores for like 1700euros. They make the online store for you. I just was wondering whether they develop this kind of site from 0 or they use some kind of framework.
  11. Hello there I would like to hear your suggestions about this: When someone comes to the point of wanting to design an online store, what is the best choice? I guess I could start from 0, doing it with mysql, php and appache. But, I just thought that may be, there is some kind of already made software for this kind of website which is easily customizable. What I mean is: there are a lot of times when we end up doing things that were already done in the past and may be it is not worth it to devote time to that task because there is already a software which does that. For example, to make a forum, you can use SFM, or to make a blog you can use wordpress, etc. That is the kind of software that I might be asking for but this time with reference to online stores. If there is nothing, it is ok, then I will start it from 0. Thanks for all.
  12. solved with this code: .enlacespanishflag { padding-left: 0px; padding-right:0px; padding-top:0px; padding-bottom:0px; background-image:url(images/spanishflag.gif); background-repeat:no-repeat; background-color:transparent; width:30px; height:18px; outline:none; border:none; } .enlacebritishflag { padding-left: 0px; padding-right:0px; padding-top:0px; padding-bottom:0px; background-image: url(images/britishflag.gif); background-repeat:no-repeat; background-color:transparent; width:30px; height:18px; outline:none; border:none; } echo "<input type='submit' class='enlacespanishflag' value='' onclick='storeState()' onfocus='this.blur()'"; echo " />"; echo "<input type='submit' class='enlacebritishflag' value='' onclick='storeState()' onfocus='this.blur()'"; echo " />";
  13. Well, I thought that I had solved this problem, but I have just realized that although I can see the language flags in safari, firefox, opera and ie6 in the remote installation of the website, I cannot see these flags in the local installation of the website in my pc. Nothing similar had happened to me so far. Moreover, I have syncronized both remote and local server and they have exactly the same website. Still looking for a solution. Any idea? Thanks in advance
  14. Thanks BlueSkyIS, I liked your idea of putting an image type as input and that actually fixed the problem. Just in case other people wanna see how the code ended up, here it is: .... echo "<INPUT type='image' SRC='../estilos/images/spanishflag.gif' value='"; echo _(" ") . "'>"; .... echo "<INPUT type='image' SRC='../estilos/images/britishflag.png' value='"; echo _(" ") . "'>"; ...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.