21
Mamba
Re: Publisher and xoops 2.5.8 tests
  • 2016/7/10 14:06

  • Mamba

  • Moderator

  • Posts: 11395

  • Since: 2004/4/23


Quote:
Yes, I spoke of the need to warn users to install the TCPDF for XOOPS framework.
This framework from Cedric, not the link to the github tcpdf that is not dedicated to xoops.

Yes, that's not a problem, we'll provide instructions for both:
a) for Cedric's library because is small and is customized for XOOPS
b) for the original TCPDF library with the instructions to download it using Composer, by adding the code:
"tecnickcom/tcpdf":"6.*"


How is the testing going? Is everything working?
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

22
Cesagonchu
Re: Publisher and xoops 2.5.8 tests


23
Mamba
Re: Publisher and xoops 2.5.8 tests
  • 2016/7/11 13:19

  • Mamba

  • Moderator

  • Posts: 11395

  • Since: 2004/4/23


The "wrong url into preferences" has been fixed.

For the "Search", you have to set the permissions correctly, even for you as the Webmaster
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

24
SMEDrieben
Re: Publisher and xoops 2.5.8, and tcpdf
  • 2016/8/9 19:10

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


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

25
SMEDrieben
Re: Publisher and xoops 2.5.8, and tcpdf
  • 2016/8/10 18:19

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


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

26
geekwright
Re: Publisher and xoops 2.5.8, and tcpdf

Quote:

SMEDrieben wrote:
...
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 !
...
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.
...


At line 56 in makepdf.php you should see this:
$content .= $itemObj->plainMaintext();


Change that to:
$content .= $itemObj->getBody();


With this change the PDF should have all the xoopscode formatting.

Unfortunately, I can't explain why this is the way it is. There may be side effects I have not seen.

27
SMEDrieben
Re: Publisher and xoops 2.5.8, and tcpdf
  • 2016/8/22 12:58

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


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

28
SMEDrieben
Re: Publisher and xoops 2.5.8, and tcpdf
  • 2016/8/27 12:46

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


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

29
SMEDrieben
Re: Publisher and xoops 2.5.8.1 and tcpdf (Xoops-Cedric package)
  • 2017/2/24 20:23

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


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

30
SMEDrieben
Re: Publisher and xoops 2.5.8.1: category description
  • 2017/2/25 13:17

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


In the category description field of categories, html codes cannot be entered. They are even stored in the database !

It would be pleasant to have some possibilities to influence text layout in this area.

SMEDrieben

Login

Who's Online

180 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 180


more...

Donat-O-Meter

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

Latest GitHub Commits