1
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/8/7 14:22

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


Quote:

black_beard wrote:

for fix this bug, remplace in ./Frameworks/tcpdf/config/tcpdf_config.php line 35
if (!is_dir(XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/fonts') OR !array_key_exists($xoopsConfig['language'],$tableau_font)) {


with

if (!array_key_exists($xoopsConfig['language'],$tableau_font)) {


I'm updating version


That's great now. Thank you, black_beard.



2
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5

Hi, I tested tcpdf_for_xoops 1.03, and downloaded local_font zip.

I found that "local_font.php" must be copied into "/language/local_language/fonts/" to be valid, if copied into "/Frameworks/tcpdf/fonts", then the invalid.

Thank you.



3
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/7/30 5:02

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


hi,

For Chinese, if change lines 47~66 fonts to "dejavusans" in the tcpdf_config.php, then Chinese characters are displayed as "□□" in the generated pdf. Only changed to "cid0cs" be normal.

Thank you all.



4
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/7/28 14:44

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


Oh~~~, yes. I have corrected it.

But when I try to created the pdf, it can't open the page, and then shows "HTTP error 500(Internal Server Error)" in the Google Chrome.



5
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/7/28 11:43

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


Thank you very much, black_beard

I'd downloaded your 2 zip files. One is news_tcpdf_for_xoops.zip, it's from:

http://sourceforge.net/projects/chgxoops/files/Modules/news/news_tcpdf_for_xoops.zip/download
Quote:
It's structure is:
/modules/News/makepdf.php
/modules/News/tcpdf


Another is tcpdf_for_xoops_1.00.zip, it's from:
https://sourceforge.net/projects/chgxoops/files/Frameworks/
Quote:
It's structure is:
/modules/News/makepdf.php
/xoops_lib/Frameworks/tcpdf


Right?

At first, I replaced "helvetica" and "courier" with "cid0cs" in the file "/modules/News/tcpdf/config/tcpdf_config.php"
The result is great

And at another, I removed "/modules/News/tcpdf", then copied "tcpdf" from the tcpdf_for_xoops_1.00.zip to the "/xoops_lib/Frameworks/", and replaced /modules/News/makepdf.php with new that from tcpdf_for_xoops_1.00.zip, and replaced "helvetica" and "courier" with "cid0cs" in the file "/xoops_lib/Frameworks/tcpdf/config/tcpdf_config.php", then created pdf file, the result is "Selected module does not exist!" :(

Regards.



6
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/7/28 5:32

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


hi, black_beard.

I used charset?
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">

<
head>
    <!-- 
Assign Theme name -->
    <!-- 
Title and meta -->
    <
meta http-equiv="content-language" content="zh-CN" />
    <
meta http-equiv="content-type" content="text/html; charset=UTF-8" />





7
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/7/27 11:35

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


Hi, black_beard.

I edited the file, but it's at line 109.
It created pdf is same as above. All Chinese characters are displayed as "?".

Regards.



8
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/7/26 8:43

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


Thank you black_beard.
Quote:

I adapted the TCPDF class and modify the file makepdf.php

You can download here to try it.


I download it and copied to the news module, and updated news module in the admin area, then created pdf. (Because my language's name is schinese, so I copied "/modules/news/tcpdf/config/lang/chinese.php" to "schinese.php".) It still shows abnormal, all Chinese characters are displayed as "?" in it.



9
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/7/18 8:50

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


Thank you all.

For multi-bytes language (my language is Chinese ), after set "Use keywords highlighting" to true, then open the article by the search, the story's content is abnormal. Modified the class/keyhighlighter.class.php like below, it's OK now.

find:
$patterns[] = '/(?' '>' $keyword '+)/si';

replaced with:
$patterns[] = '/(?' '>' preg_quote($keyword) . ')/si';


find:
$patterns[] = '/(?' '>' $this->preg_keywords '+)/si';

replaced with:
$patterns[] = '/(?' '>' preg_quote($this->preg_keywords) . ')/si';


find:
$this->preg_keywords preg_replace ('/[^w ]/si'''$this->keywords);

replaced with:
if ( XOOPS_USE_MULTIBYTES ) { 
        
$this->preg_keywords trim($this->keywords); 
            } else { 
            
$this->preg_keywords preg_replace ('/[^w ]/si'''$this->keywords); 
            }


find:
$buffer xoops_substr($buffer1, -1);

replaced with:
$buffer substr($buffer1, -1);



Another question:
In the news admin home, here is a "News Statistics", and a stats "There are (x) News published in Home" in it, I published some news in home, and this stats is always "There are 0 News published in Home". This is there any problem?



10
chnwalkman
Re: News 1.67 Final released for XOOPS 2.5.5
  • 2012/7/17 17:11

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


Webserver and localhost are the same, and whether system is windows or ubuntu.

XOOPS 2.5.5
PHP 5.3.5
mySQL 5.5.13




TopTop
(1) 2 3 »



Login

Who's Online

171 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

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

Latest GitHub Commits