') ') Fork me on GitHub

Search

Donat-O-Meter

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

Donations
Dante7237  ($10)Dec-3

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield Blocks Bootstrap By Captcha cell chronolabs content CĂN demo Digitally download Dresses facebook Fat Food for free Gateway Google Guide herre Honeypot HP html5 Human HỘ IP iPhone jQuery Law Legal List Loss mobile module modules Monster new newbb news NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon Room security Sentry Signed site Smartphone Smarty Solution Spam Studio support tag tags tdmcreate The Theme themes User userlog web weight Wishcraft xoops Xortify XPayment

New Users

Registering user

# 137911

mydarkglobe

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  |  Register To Post

« 1 ... 6 7 8 (9) 10 11 12 »


#81 Posted on: 2012/8/1 6:00 Re: News 1.67 Final released for XOOPS 2.5.5
I'm going to do it today (at work, in coffee time).

Top

panwac
Joined:
2005/11/11 18:01
From Poland
Group:
Registered Users
Posts: 60
(Show More) (Show Less)


#82 Posted on: 2012/8/1 16:21 Re: News 1.67 Final released for XOOPS 2.5.5
Mamba,
A file was checked. Conclusion: sth is wrong with func. xoops_utf8_encode(); XoopsLocal::convert_encoding() works fine.

Below you've got a code with signs, were is an old code (a red color). You will see, were an old code is enable or not and were a new part was deactivated by me. In this moment a file backendt.php with this code working fine in my website.

Quote:
<?php
// $Id: backendt.php 9767 2012-07-02 06:02:52Z beckmi $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System VVV //
// Copyright (c) 2000 XOOPS.org //
// <http://www.xoops.org/> //
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License, or //
// (at your option) any later version. //
// //
// You may not change or alter any portion of this comment or credits //
// of supporting developers from this source code or any supporting //
// source code which is considered copyrighted (c) material of the //
// original comment or credit authors. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program; if not, write to the Free Software //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
/**
* RSS per topics
*
* This script is used to generate RSS feeds for each topic.
* You can enable and disable this feature with the module's option named "Enable RSS feeds per topics ?"
* The script uses the permissions to know what to display.
*
* @package News
* @author Xoops Modules Dev Team
* @copyright (c) The Xoops Project - www.xoops.org
* @param type $nomvariable description
*/
//include_once 'header.php'; //panwac - code from an old file
include_once '../../mainfile.php';
include_once XOOPS_ROOT_PATH.'/class/template.php';
include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php';
include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newstopic.php';
include_once XOOPS_ROOT_PATH.'/modules/news/include/functions.php';

error_reporting(0);
$GLOBALS['xoopsLogger']->activated = false;

if(!news_getmoduleoption('topicsrss')) {
exit();
}

$topicid = isset($_GET['topicid']) ? intval($_GET['topicid']) : 0;
if($topicid == 0) {
exit();
}

if (function_exists('mb_http_output')) {
mb_http_output('pass');
}

$restricted = news_getmoduleoption('restrictindex');
$newsnumber = news_getmoduleoption('storyhome');

$charset = 'utf-8';

header ('Content-Type:text/xml; charset='.$charset);
$story = new NewsStory();
$tpl = new XoopsTpl();
//$tpl->xoops_setCaching(2); //panwac - code from an old file
$tpl->caching=2; //panwac - code from a new file
$tpl->xoops_setCacheTime(5); // Change this to the value you want
if (!$tpl->is_cached('db:news_rss.html', $topicid)) {
xoops_load('XoopsLocal'); //panwac - code from an old file
$xt = new NewsTopic($topicid);
$sarray = $story->getAllPublished($newsnumber, 0, $restricted, $topicid);
if (is_array($sarray) && count($sarray)>0) {
$sitename = htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES);
$slogan = htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES);
$tpl->assign('channel_title', XoopsLocal::convert_encoding($sitename)); //panwac - code from an old file
//$tpl->assign('channel_title', xoops_utf8_encode($sitename)); //panwac - code from a new file
$tpl->assign('channel_link', XOOPS_URL.'/');
$tpl->assign('channel_desc', XoopsLocal::convert_encoding($slogan)); //panwac - code from an old file
//$tpl->assign('channel_desc', xoops_utf8_encode($slogan)); //panwac - code from a new file
$tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss'));
$tpl->assign('channel_webmaster', checkEmail($xoopsConfig['adminmail'],true)); // Fed up with spam
$tpl->assign('channel_editor', checkEmail($xoopsConfig['adminmail'],true)); // Fed up with spam
$tpl->assign('channel_category', $xt->topic_title());
$tpl->assign('channel_generator', 'XOOPS');
$tpl->assign('channel_language', _LANGCODE);
$tpl->assign('image_url', XOOPS_URL.'/images/logo.gif');
$dimention = getimagesize(XOOPS_ROOT_PATH.'/images/logo.gif');
if (empty($dimention[0])) {
$width = 88;
} else {
$width = ($dimention[0] > 144) ? 144 : $dimention[0];
}
if (empty($dimention[1])) {
$height = 31;
} else {
$height = ($dimention[1] > 400) ? 400 : $dimention[1];
}
$tpl->assign('image_width', $width);
$tpl->assign('image_height', $height);
$count = $sarray;
foreach ($sarray as $story) {
$storytitle = $story->title();
//if we are allowing html, we need to use htmlspecialchars or any bug will break the output
//$description = htmlspecialchars($story->hometext(), ENT_QUOTES); //panwac - code from an old file
$description = htmlspecialchars($story->hometext()); //panwac - code from a new file
$tpl->append('items', array(
'title' => XoopsLocal::convert_encoding(htmlspecialchars($storytitle, ENT_QUOTES)) , //panwac - code from an old file
//'title' => xoops_utf8_encode($storytitle), //panwac - code from a new file
'link' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(),
'guid' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(),
'pubdate' => formatTimestamp($story->published(), 'rss'),
'description' => XoopsLocal::convert_encoding($description))); //panwac - code from an old file
//'description' => xoops_utf8_encode($description))); //panwac - code from a new file
}
}
}
$tpl->display('db:news_rss.html', $topicid);
?>


Top

panwac
Joined:
2005/11/11 18:01
From Poland
Group:
Registered Users
Posts: 60
(Show More) (Show Less)


#83 Posted on: 2012/8/2 11:50 Re: News 1.67 Final released for XOOPS 2.5.5
Hello,
a new version 1.03 of tcpdf_for_xoops is available here, I have considered your comments. Here are the changes made ​​to the frameworks:
Quote:

- PHP TCPDF class has been updated (5.9.172 => 5.9.176)
- Exotic font has been deleted
- Creating a separate package for Japanese, Chinese simplified,
Chinese Taiwanese, Korean fonts. You can install them in
the directories ./Frameworks/tcpdf/fonts or ./language/fonts
- Adding the support Ukrainian language (./Frameworks/tcpdf/config/lang/ukrainian.php)
- Adding support Chinese simplified language (./Frameworks/tcpdf/config/lang/schinese.php)
- Adding support Chinese taiwanese language (./Frameworks/tcpdf/config/lang/tchinese.php)
- Adding file : ./Frameworks/tcpdf/docs/changelog.txt
- Adding file : ./Frameworks/tcpdf/docs/README.txt
- Adding makepdf.php for 'newbb' mobule


Top

black_beard
Joined:
2012/6/24 5:58
From Castelnau Montratier, LOT
Group:
Registered Users
Posts: 53
(Show More) (Show Less)


#84 Posted on: 2012/8/7 0:50 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.

Top

chnwalkman
Joined:
2004/8/24 21:54
Group:
Registered Users
Posts: 35
(Show More) (Show Less)


#85 Posted on: 2012/8/7 1:51 Re: News 1.67 Final released for XOOPS 2.5.5
hello chnwalkman,

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

Top

black_beard
Joined:
2012/6/24 5:58
From Castelnau Montratier, LOT
Group:
Registered Users
Posts: 53
(Show More) (Show Less)


#86 Posted on: 2012/8/7 5:03 Re: News 1.67 Final released for XOOPS 2.5.5
I test in my test website and it is a miracle that finally i could see the persian words instead of ????
It works great in newbb and news.
Thank you very much black beard.
I will test in my production websites.
I will investigate your changes in makepdf.php files in news and newbb.

Thank you again.



Top

irmtfan
Joined:
2003/12/7 14:14
From In the middle of nowhere
Group:
Registered Users
Community Coordinator (temporary)
Posts: 3371
(Show More) (Show Less)


#87 Posted on: 2012/8/7 5:17 Re: News 1.67 Final released for XOOPS 2.5.5
Thanks irmtfan,

I prepare a manual (french and english version) for creating file makepdf.php, the draft is here

Top

black_beard
Joined:
2012/6/24 5:58
From Castelnau Montratier, LOT
Group:
Registered Users
Posts: 53
(Show More) (Show Less)


#88 Posted on: 2012/8/7 9:22 Re: News 1.67 Final released for XOOPS 2.5.5
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.

Top

chnwalkman
Joined:
2004/8/24 21:54
Group:
Registered Users
Posts: 35
(Show More) (Show Less)


#89 Posted on: 2012/8/8 4:26 Re: News 1.67 Final released for XOOPS 2.5.5
Black beard:
I test tcpdf deeply and it is amazing.
Just i wonder that why you add the lang config and dont use it at all?
in newbb/makepdf.php
if (is_file(XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/'.$xoopsConfig['language'].'.php')) {
    require_once( 
XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/'.$xoopsConfig['language'].'.php');
} else {
    require_once( 
XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/english.php');
}


IMO there is no need for this config file in XOOPS.
there are 3 configs there:
eg for persian.php
$l['a_meta_charset'] = 'UTF-8';
$l['a_meta_dir'] = 'rtl';
$l['a_meta_language'] = 'fa';


We already have _CHARSET and _LANGCODE. we just still dont have _RTL definition which is a pity

we can add that _RTL in global.php easy.
define('_RTL'true);


anyway im still wonder why you not use that so in RTL language we should add something like this to newbb/makepdf.php
// Restore RTL direction
global $l;
$pdf->setLanguageArray($l);


But i think it is better to define that _RTL in xoops and then remove Frameworks/tcpdf/config/lang/*.php

so we can sue it like this in our makepdf.php:
// Restore RTL direction
$pdf->setRTL(_RTL);


I like the above method.

So black_beard please choose one of the above methods because you knows better. then we can follow in makepdf.php files.

But as i said i think that _RTL definitions is very nice!

Edit:
Also one thing that i forgot.
It can not read the [en] [/en] and [fa] [/fa] codes.
I mean when the website is english it just should makepdf from english content and vice verse.
*/

Top

irmtfan
Joined:
2003/12/7 14:14
From In the middle of nowhere
Group:
Registered Users
Community Coordinator (temporary)
Posts: 3371
(Show More) (Show Less)


#90 Posted on: 2012/8/8 5:06 Re: News 1.67 Final released for XOOPS 2.5.5
Quote:
So black_beard please choose one of the above methods because you knows better. then we can follow in makepdf.php files.

It's great to hear that TCPDF works with Farsi, since you guys had some issues in the past with FPDF, if I remember correctly.

Black_beard, whatever you choose, I hope that it will reflect the structure of TCPDF files, i.e. if the next version of TCPDF comes out, we only need to copy the selected files to the /Frameworks/tcpdf directory, and we are done, i.e. we don't have to make any changes to any files, and we don't have to change directories.

Of course, as long as TCPDF people don't make any changes in their folder structure

Top


Please support XOOPS & DONATE
Use 2.5.7 | Debugging | Requests | Bugs
Mamba
Joined:
2004/4/23 13:58
From Ohio, USA
Group:
Webmaster
Registered Users
Designer Group
Posts: 8157
(Show More) (Show Less)




« 1 ... 6 7 8 (9) 10 11 12 »



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]