1
yingzhao
developing module language files
  • 2010/6/23 15:53

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


I want to find out the right way to develop module language pak. Here is what I did so far. I created language files for my module.
language/english/main.php,
language/english/modinfo.php,
language/english/cates.php,
language/english/profile.php,
language/english/search.php,

and I defined the language related constants as below.

define('_US_REQUIREVIP','You have to be VIP to perform the operation');

and in language/english/main.php I also have the following includes

include_once 'cates.php';
include_once 'search.php';
include_once 'profile.php';

This English pak works fine. However, after I translated the constants into Simplified Chinese. The constants are changed into Chinese. However, the UI style is broken. So I wondering what is the right way of moving the language constants into language files, and modifying the corresponding code to point to these language files. Thank you.




2
yingzhao
Re: backup & restore best practices
  • 2010/6/15 21:34

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


Thank you so much for your quick response. I turned on debug on the restored site, and found out what the problem is. It is complaining about redeclaration of a function, date_diff, used in my modules. So I commented out this function, the restored site seems to be working now. Perhaps, date_diff has already been built in xampp? Because I could not find its other declaration in xoops.



3
yingzhao
backup & restore best practices
  • 2010/6/15 20:16

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


I am almost ready to release my two xoops sites in 2.3.3 & 2.4.4. Before I go production, I would like to figure out what backup routine I should take.

My host is hostmonster. Using Cpanel, I can make a full backup of my account, including all my files & dbs. Hostmonster says that I can use this backup, only if I were to move to another host. So for disater recovery purpose, I do not think this is the approach to go.

I found the following FAQ, https://xoops.org/modules/smartfaq/faq.php?faqid=150,

I followed the instructions and backed up xoops files and db at the host. For testing purpose, I wanted to restore the backup onto my local xampp environment. I loaded the db to my local database, and put xoops files in place. The FAQ tells me all I need to do is modify the mainfile.php. Here is my modification for my local xampp environment.

define( 'XOOPS_ROOT_PATH', 'c:\xampp\htdocs\beauty' );
define( 'XOOPS_PATH', 'c:\xampp\beauprod\site_lib' );
define( 'XOOPS_VAR_PATH', 'c:\xampp\beauprod\site_data' );
define( 'XOOPS_URL', 'http://localhost/beauty' );
define( 'XOOPS_DB_USER', 'root' );
define( 'XOOPS_DB_PASS', '' );
define( 'XOOPS_DB_NAME', 'beauprod' );

Unfortunately, my restore does not work. It does not even get to the point that it needs to connect to db.

Could you share your thougts what I should do keep my backup rotine simple and effective? Many thanks in advance.



4
yingzhao
Re: No email from Xoops - hostname problem?
  • 2010/4/7 3:14

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


I bumped into a similar problem before. On my host, you have to have the "Admin mail address" to have the same domain name as your current domain. Also, I can only use sendmail on my host. Hope this helps.



5
yingzhao
configure allow_url_fopen in php.ini
  • 2010/3/12 3:18

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


My host lets me copy the master php.ini to my public_html. From there, I turned off the allow_url_fopen,

allow_url_fopen=Off


Based on host instruction, I am using this customized php.ini now. However, in protector, I am still seeing this warning that allow_url_fopen is on. Do I have to concern about it now? Thank you.



6
yingzhao
Re: using Xoops text sanitizer
  • 2010/2/28 1:57

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


Thank you for the thorough explanation.



7
yingzhao
using Xoops text sanitizer
  • 2010/2/27 1:22

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


I am developing a custom module for xoops, and need to protect it from SQL injection, script injection and so on. My site has protector installed and configured. In this case, in my own module, do I need to call text sanitizer for $_GET data? Can anyone tell me whether it is good enough to use text sanitizer only on text/textarea fields coming from form post? Thank you.



8
yingzhao
Re: create a site in 3 languages
  • 2010/2/26 2:40

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


You may try xLanguage. I used it to create a site with 2 languages for XOOPS 2.3.3. I think there is also an updated version works for 2.4.x.



9
yingzhao
captcha image missing after switch to Chinese language pack
  • 2010/2/2 17:18

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


On xoo[s 2.4.3, I have added a Chinse language pack to my default English install. After I switch to Chinese, everything else is fine, except that I could not see the Captcha image, when I tried to register a new account. Does anyone know what could be the cause? Thank you.



10
yingzhao
dynamicly switch theme
  • 2010/2/2 15:55

  • yingzhao

  • Just popping in

  • Posts: 45

  • Since: 2008/5/12


Hi all,

Is it possible to present user with a single unique theme based on the value $_SERVER['HTTP_REFERER']? What I want to achieve here is to be able to present a look & feel for my XOOPS site similar to that of the web site that my XOOPS site is linked with. Could anyone give some suggestion how to do so? Thank you.




TopTop
(1) 2 3 4 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

81 user(s) are online (45 user(s) are browsing Support Forums)


Members: 0


Guests: 81


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits