PEAK XOOPS - News in englishin japanese

Archive | RSS |
  
Poster : GIJOE on 2008-06-13 16:24:49 (8728 reads)

in englishin japanese
For multilanguation, I often use such a flagment of php code in my modules like this:


if( function_exists('easiestml') ) {
	$mail_body = easiestml( $mail_body ) ;
}

This code removes language tags and needless text from text for e-mail etc.

If you use XCL2.1 with cubeUtils module instead of EMLH, just try this preload with MultiLanguagePreLoad.class.php of cubeUtils.

MultiLanguageCompatibleEMLH.class.php

<?php
function easiestml( $s , $lang = '' )
{
	global $cubeUtilMlang ;

	if( is_object( @$cubeUtilMlang ) ) {
		if( $lang ) {
			$orig_lang = $cubeUtilMlang->mLanguage ;
			$cubeUtilMlang->mLanguage = $lang ;
			$ret = $cubeUtilMlang->obFilter( $s ) ;
			$cubeUtilMlang->mLanguage = $orig_lang ;
			return $ret ;
		} else {
			return $cubeUtilMlang->obFilter( $s ) ;
		}
	} else {
		return $s ;
	}
}

This preload allows you to process multilingual email eg) pico's form mail
----
(2008/06/22 updated)
2nd parameter is added for the compatibility with EMLH 1.30


Poster : GIJOE on 2008-04-30 05:36:07 (12675 reads)

in englishin japanese
Somehow, I cannot find EmailLogin for XCL2.1, though it must have been already created by someone.

Then, I've just created a preload.
Download and try it.
http://www.peak.ne.jp/support/xoops/XCL_EmailLoginHack.tar.gz

Of course, you can use this preload with cubeUtils module (auto-login).

0 comments

Poster : GIJOE on 2008-04-29 05:25:45 (9395 reads)

in englishin japanese
There are a lot of invalid feeds of RSS/Atom in the world.
eg) http://feedanalyzer.com/?url=http%3A%2F%2Fwww.ec-cube.net%2Fec-cube.php

But we cannot fix the feed by ourselves. (just claim it)

Then, you can use 'tidy' for such a purpose.
With d3pipes 0.61, we added a joint D3pipesReplaceTidy4xml.

Just insert 'tidy4xml' before xml parser.
You will receive such invalid RSS/Atom into your XOOPS.

0 comments

Poster : GIJOE on 2008-01-10 04:53:50 (16348 reads)

in englishin japanese
resource.(type).php is a smarty plugin controlling:
- which template source is adopted
- how new is the template

Since default template resource of XOOPS is "db:", resource.db.php is the most important file.

Default resource.db.php of XCL2.1 has problems like:
(1) With "default" theme, DB templates will be broken easily
(2) Templates under theme will stay alive even after the theme is changed
(3) Paths of templates under theme should be flat because "db:" is flat.
(4) Directory name of "template under theme" is not unified. (templates or modules)
(5) A template file under theme is not recognized its deletion
(6) A template file under theme is not recognized its addition if the compile cache is newer than the file

I've made a new resource.db.php solving the problems (1),(2),(3), and (4).

Of course, it is not a hack.
Just using "XoopsTpl Hooking" by preload, we can put the file under XOOPS_TRUST_PATH/libs/smartyplugins/

You can test it right now.
Just try hodajuku distribution of nightly build (not a preview version).
The theme of "skel_flex" has many templates.
The tempaltes will be adopted with the theme, hence they will never adopted after switching the theme like "chic_black".

Read more... | 2881 bytes more |9 comments

Poster : GIJOE on 2008-01-08 06:31:56 (20954 reads)

in englishin japanese
You can use http:BL as useful comment/trackback spamming Black List with Protector 3.16

Here is the procedure.

(1)
go to
http://projecthoneypot.org/
and get account, then login.

(2)
Services -> HTTP Blacklist
and get the key (12 alphabets) for yourself.

(3)
copy
XOOPS_TRUST_PATH/modules/protector/filters_disabled/postcommon_post_deny_by_httpbl.php
into
XOOPS_TRUST_PATH/modules/protector/filters_enabled/

(4)
modify '............' into your key in the file.


// get your 12-character access key from http://www.projecthoneypot.org/
define( 'PROTECTOR_HTTPBL_KEY' , '............' ) ;



« 1 2 3 4 (5) 6 7 8 ... 37 »
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!