xoops forums

Forum Index


Board index » All Posts (SMEDrieben)




SMEDrieben

Not too shy to talk
Posted on: 2017/2/24 20:23
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#31

Re: Publisher and xoops 2.5.8.1 and tcpdf (Xoops-Cedric package)

I'am now on 2.5.8.1 and Publisher 1.04.

The small Cedric tcpdf does not work. It generates an error:

XOOPS URL not defined


This message is defined in line 29 of the tcpdf_autoconfig.php of the Cedric package.

How can I get it working ?

SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/27 12:46
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#32

Re: Publisher and xoops 2.5.8, and tcpdf

Similarly, if you want to show only the summary in the pdf, you can use

$content .= $myts->undoHtmlSpecialChars($itemObj->getSummary());


in makepdf.php in stead of

$content .= $myts->undoHtmlSpecialChars($itemObj->getBody());


SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/22 13:13
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#33

Re: extCal 2.39 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

Thanks ! When can we use this module on production sites ? The previous version does not work in 2.5.8 and, therefore, this version is needed to upgrade tot 2.5.8.

SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/22 13:09
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#34

Re: 2.5.8 Upgrade: textsanitizer

In previous Xoops-version, I made an additonal TextSanitizer extension according to the readme.txt:

<?php
class MytsRef extends MyTextSanitizerExtension
{
    
// The code parser
    
function load(&$ts
    {
        
$ts->patterns[] = "/[ref ([0-9]*)](.*)[/ref]/sU";
        
$ts->replacements[] = '<span class="refbal">&nbsp;\1&nbsp;<span><b>\1.</b>&nbsp;\2</span></span>';
        
$ts->patterns[] = "/[ref ([0-9]*) news=([0-9]*)](.*)[/ref]/sU";
        
$ts->replacements[] = '<a href="' XOOPS_URL '/modules/news/article.php?storyid=\2" target="_top"><span class="refbal pointer">&nbsp;\1&nbsp;<span><b>\1.</b>&nbsp;\3</span></span></a>';
        
$ts->patterns[] = "/[ref ([0-9]*) smeb=([0-9]*)](.*)[/ref]/sU";
        
$ts->replacements[] = '<a href="' XOOPS_URL '/modules/publisher/category.php?categoryid=\2" target="_top"><span class="refbal pointer">&nbsp;\1&nbsp;<span><b>\1.</b>&nbsp;\3</span></span></a>';
        
$ts->patterns[] = "/[ref ([0-9]*) smehf=([0-9]*)](.*)[/ref]/sU";
        
$ts->replacements[] = '<a href="' XOOPS_URL '/modules/publisher/item.php?itemid=\2" target="_top"><span class="refbal pointer">&nbsp;\1&nbsp;<span><b>\1.</b>&nbsp;\3</span></span></a>';
        
$ts->patterns[] = "/[ref ([0-9]*) url=(.*)](.*)[/ref]/sU";
        
$ts->replacements[] = '<a href="\2" target="_blank"><span class="refbal pointer">&nbsp;\1&nbsp;<span><b>\1.</b>&nbsp;\3</span></span></a>';        
    }
    
    
// Processing the text
    
static function decode($text)
    {
        
// Load config data if any
        
$config parent::loadConfigdirname(__FILE__) );
        if ( empty(
$text) || empty($config['enabled']) ) return $text;
        
$ret someFunctionToConvertTheTextToDefinedFormat($text);
        return 
$ret;
    }
}
?>


It now generates an message:

OnbekendDeclaration of MytsRef::decode() should be compatible with MyTextSanitizerExtension::decode($url$width$heightin bestand /class/textsanitizer/ref/ref.php regel 28


How can I solve this message ?

SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/22 12:58
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#35

Re: Publisher and xoops 2.5.8, and tcpdf

Sorry for the late response: I was on holiday.

This is a good solution ! Thanks ! I added an additional line after your line to remove the pagebreak-codes:

$content str_replace('[pagebreak]','',$content);


SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/10 18:19
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#36

Re: Publisher and xoops 2.5.8, and tcpdf

Publisher 1.03 Final and tcpdf continued

I did some additional testing and now I am fully convinced that publisher 1.03 has a bug in the pdf-generation process. Let me explain:

1. I copied the new 16 MB tcpdf version to class/libraries/vendor/tecnickcom/tcpdf
2. I changed the makepdf.php of the News-module (1.67 Final) to use this tcpdf version: it works excelllently ! All xoops-codes are interpreted correctly, all line breaks are shown in the pdf.
3. I use the makepdf.php of Publisher 1.03 and the pdf is a mess: xoops-codes are shown uninterpreted (e.g. as [b], [i] etc), lines breaks are omitted. Terrible !
4. I looked at the print.php of Publisher 1.03: this is beautiful ! Xoops-codes interpreted, lines breaks shown etc.

So, the problem of the pdf-generation in Publisher 1.03 is a consequence of the module scritps themselves. It is not due to the tcpdf.

Unfortunately I am not a programmer and I cannot solve this issue.

Thanks !

SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/9 19:32
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#37

Re: 2.5.8 Upgrade

Still one found in 2.5.8:

OnbekendOnly variables should be assigned by reference in bestand /class/tree.php regel 130


SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/9 19:10
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#38

Re: Publisher and xoops 2.5.8, and tcpdf

I tried the tcpdf version of Cedric in 2.5.8 and publisher 1.03 Final: it doesn't work. The full (16 MB) does work, but has two problems:

- it is very, very slow
- Xoops codes (e.g. [b]. [i]) are ignored and shown in the pdf, line breaks are ingnored.

Looking into the makepdf.php, it appears to me that the "$myts->undoHtmlSpecialChars" is meant to interpret the xoops codes.

If I use my old tcpdf version (4.1, from 2008) with the news module, Xoops 2.5.8 and the "$myts->undoHtmlSpecialChars", the generated pdf is excellent !!

What is the problem with makepdf, $myts->undoHtmlSpecialChars and the new tcpdf version 6.2.13 ??

SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/9 18:30
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#39

Re: extCal 2.39 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

Thanks Mamba ! This version is much better with 2.5.8 !

There is one message I don't understand:

Melding: Use of undefined constant _MI_EXTCAL_SUBMIT_EVENT assumed '_MI_EXTCAL_SUBMIT_EVENT' in bestand /modules/extcal/view_new-event.php regel 22


This language constant is included in both the english and dutch modinfo.php.

Any idea ?

SMEDrieben


SMEDrieben

Not too shy to talk
Posted on: 2016/8/8 18:50
SMEDrieben
SMEDrieben (Show more)
Not too shy to talk
Posts: 173
Since: 2009/6/17
#40

Re: extCal 2.39 Beta-1 available for testing (XOOPS 2.5.8, PHP 7)

I have big problems with Extcal. In 2.37, Xoops 2.5.8 generates a fatal error when you try to edit an event (wamp server, php 5.6.16).

The fatal error in 2.37 was in extcal/class/form/formrulecheckbox.php line 8

In 2.39 beta, a fatal error is generated as well:

Fatal errorCall to undefined function eclaircirCouleur() in C:wampwwwhttpdocsmodulesextcalclassevent.php on line 398
Call Stack
#    Time    Memory    Function    Location
1    0.0008    268408    {main}( )    ...index.php:0
2    0.0628    3962096    
include( 'C:wampwwwhttpdocsheader.php' )    ...index.php:82
3    0.0694    4813904    xos_opal_ThemeFactory
->createInstance( )    ...header.php:58
4    0.0694    4818072    xos_opal_Theme
->xoInit( )    ...theme.php:81
5    0.0728    4969384    xos_logos_PageBuilder
->xoInit( )    ...theme.php:331
6    0.0728    4969968    xos_logos_PageBuilder
->retrieveBlocks( )    ...theme_blocks.php:49
7    0.1149    6146848    xos_logos_PageBuilder
->buildBlock( )    ...theme_blocks.php:131
8    0.1151    6148704    XoopsBlock
->buildBlock( )    ...theme_blocks.php:197
9    0.1290    6467648    bExtcalUpcomingShow
( )    ...xoopsblock.php:218
10    0.1384    7491848    ExtcalEventHandler
->getEventsOnPeriode( )    ...upcoming.php:71


Perhaps this module can be updated first, since the previous version cannot be used anymore.

Thanks !

SMEDrieben



TopTop
« 1 2 3 (4) 5 6 7 ... 17 »