Caker, Web developer,Beijing,China.

My projects

Translation of FrontPage of joomla

When you using joomfish to translate your joomla frontpage,one thing you need noticed , seems you can found language file in the languages folder called ‘en-GB.com_frontpage.ini’, but this file never load, so if you wanna translate some text in the frontpage, you need put them to en-GB.com_content.ini,yes! this is all I wanna tell you !!

Filed under:default

get lanuage code of joomfish in joomla

use $GLOBALS['iso_client_lang'] to get current language code .

Filed under:default

Set default language of the joomfish

in the plugin of Joomla Basic Router , you can define the default language

Filed under:default

Cannot create new user after install the juga on joomla

Today, I try to installed th JUGA on the joomla 1.5.7, after then , I cannot create new user with joomla user manager interface, check the file and database, cause the JUGA delete the some record from jos_core_acl_aro_sections, by default , it has a record like below :

id value order_value name hidden
10 users 1 Users 0

when I try create new record in that talbe , I can create new user with User manager of joomla, but why ? I don’t know , kepping research …

Tags:

Filed under:default

将mod_perl静态嵌入到Apache2

1. 配置mod_perl
perl Makefile.PL MP_USE_STATIC=1 MP_AP_PREFIX=$HOME/build/httpd-2.2.10  MP_AP_CONFIGURE=”–with-mpm=prefork” MP_AP_CONFIGURE=” –prefix=/usr/local/testapache2″

2. 编译

make
make test
make install

*******************
注释:
Static mod_perl
Before you proceed make sure that Apache 2.0 has been downloaded and extracted. mod_perl cannot be built before that.

If this is an svn checkout and not an official distribution tarball, you need to first run:

  % cd httpd-2.0
  % ./buildconf
To enable statically linking mod_perl into Apache, use the MP_USE_STATIC flag like this:

  % perl Makefile.PL MP_USE_STATIC=1 \
    MP_AP_PREFIX=$HOME/src/httpd-2.x \
    MP_AP_CONFIGURE=”–with-mpm=prefork”
MP_AP_PREFIX must point to an extracted Apache 2.0 source tree.

This will configure Apache by passing MP_AP_CONFIGURE to Apache’s ./configure script.

Here is an example:

  % cd ~/src
  % tar -xvzf perl-5.8.x.tar.gz
  % cd perl-5.8.x
  % ./Configure -des
  % make install
  % cd ..
  % tar -xvzf httpd-2.0.xx.tar.gz
  % tar -xvzf mod_perl-2.x.x.tar.gz
  % perl5.8.x Makefile.PL \
    MP_USE_STATIC=1 \
    MP_AP_PREFIX=”$HOME/src/httpd-2.0.xx” \
    MP_AP_CONFIGURE=”–with-mpm=prefork”
  % make
  % make test
  % make install
  % ./httpd -l | grep perl
     mod_perl.c
**********************

Tags: , , ,

Filed under:default

Perl语言中获取本机IP地址

使用Sys::HostIP包。

用法:

         use Sys::HostIP;
         my $ip_address = Sys::HostIP->ip;
         print $ip_address;

Tags: , ,

Filed under:default

jfalternative plugin of joomfish

syntax : {jfalternative}5|content|FRONTPAGE_NO_TRANSLATION_AVAILABLE{/jfalternative}

5 - content id
content  - table name
FRONTPAGE…. text

function :  display another translation of this content if you translate yet with current language …

Tags:

Filed under:default

Perl中正则表达式的特性

在Perl语言中,当正则式为空的时候,指的是前一次成功匹配的正则式。

Tags: ,

Filed under:default

How to remove ‘Welcome to the Frontpage’ title in Joomla! 1.5

If you install new Joomla! 1.5 on your server, you get the ‘Welcome to the Frontpage’ title on your Frontpage. Sometimes, it is difficult to find, where you can change this title.

Go to your Joomla! 1.5 Administration site and login. In your administration site go to:

  • Menus - Main Menu (now you are in: Menu Item Manager: mainmenu).
  • Click on ‘Home’ link to edit this link (you are now in: Menu Item: Edit).
  • Click on Parameters System and change or delete the Page title.
    • If you change the Page title, changed title will be displayed on your Frontpage as a title.
    • If you delete the Page title, Menu link will be displayed on your Frontpage as a title (in the present case ‘Home’ will be displayed as title, because ‘Home’ is the name of the link to the Frontpage).
    • If you don’t want to display any title, set Show Page Title below Page title parameter to ‘No’.
  • Don’t forget to save changes.

Tags:

Filed under:default

自动启动Oracle

http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php

Tags: , , ,

Filed under:default