1
johny
Tinycontent question - printer friendly bug
  • 2004/1/3 0:23

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


I'm using Tiny content 1.5 and I think I discovered a bug - it has to do with the print function (which I suggested including) :)

There is something missing in that file (print.php) which doesn't get the text through the sanitiser (or something). You see, if you add HTML or XOOPS codes, they either are not taken into account there (HTML) or are displayed as they were entered (XOOPS). Line breaks, paragraphs, etc, are ignored. This only applies to the printer-friendly page (using print.php file), while the module itself works like a charm

I imagine that this is a no-brainer for those who are a bit more into coding, so please help me out (and others too, naturally)...

2
johny
Re: Tinycontent question - printer friendly bug
  • 2004/2/7 11:20

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


OK I wrote a really extensive reply to my original post but I got logged out in between and everything was lost, so I'll just recap it briefly:

It seems that users who are not running the multilingual hack of Xoops, are not experiencing these problems.

I also should correct my original post - HTML codes DO get displayed properla, but XOOPS codes DO NOT. Also, the language codes (filter) are not taken into account.

This only applies to the printer-friendly page (print.php), while the base module (index.php) works OK.

News module also has a printer-friendly page and there there are no problems with neither XOOPS codes nor language codes.

I tried comparing the print.php file of the news module with the print.php file of the tinycontent module but they differ too much - my superficial knowledge of PHP and XOOPS isn't sufficiend to do any changes that would work around this.

A quick demonstation of my problem:
[en]<p><b>English</btext</p>[/en][de]<p><b>German</btext</p>[/de]

would get displayed

(en)English text
(-en)(de)
German text
(-de)

while this code:
[en][b]English[/btext[/en]
[
de][b]German[/btext[/de]

would get displayed

(en)(b)English(-b) text(-en)(de)(b)German(-b)(-de)

***I changed the bracket type so that everything gets displayed


PLEASE help me out - I've been struggling with this for over two months, and I can't fix it on my own ;(

3
manel
Re: Tinycontent question - printer friendly bug
  • 2004/2/10 16:37

  • manel

  • Just popping in

  • Posts: 32

  • Since: 2003/1/26


I have the same problem and neither have found solution. The only thing that I could have done is to deactivate the option so that the users do not use it.

¿ Who it can help us ?

4
johny
Re: Tinycontent question - printer friendly bug
  • 2004/5/8 20:24

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


I know this post is quite old but I still haven't solved the problem.

In the meantime, I have installed XOOPS and TinyContent module on another server and I get the same problem again - line breaks, and all codes get displayed in the printer friendly page (codes, not their functions).

PLEASE help!

5
GIJOE
Re: Tinycontent question - printer friendly bug
  • 2004/5/9 6:04

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


It's a bug of original Tiny Content.

line 72 of print.php
} else {
[
color=ff0000]        $myts =& MyTextSanitizer::getInstance();
        echo 
$myts->displayTarea($text, ! $nohtml, ! $nosmiley11, ! $nobreaks);[/color]
        [
d]echo $text;[/d]
    }


Or you can try TinyD.
In TinyD, you can edit an externals of the printing page via template manager.

6
manel
Re: Tinycontent question - printer friendly bug
  • 2004/5/9 10:36

  • manel

  • Just popping in

  • Posts: 32

  • Since: 2003/1/26


GIJOE

Thanks for the solution. TinyD works very well with the Horacio/Marcan multilang version.

Congratulations for your work with tinycontent.

7
johny
Re: Tinycontent question - printer friendly bug
  • 2004/5/10 21:06

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


GIJOE, you have no idea how grateful I am to your solution.

I really appreciate your reply, even though this was an 'old' post.

Would you also be able to help me with line 60, which could also need text sanitizer treatment:
Quote:
<h3>'.$title.'</h3></td></tr>';


Also thank you for suggesting TinyD; but I think I'm going to stick to TinyContent for now

Thanks again!

8
GIJOE
Re: Tinycontent question - printer friendly bug
  • 2004/5/11 4:30

  • GIJOE

  • Quite a regular

  • Posts: 265

  • Since: 2003/8/13


hi johny.
Quote:

Would you also be able to help me with line 60, which could also need text sanitizer treatment:
Quote:
<h3>'.$title.'</h3></td></tr>';

Certainly, it seems a bug.
Perhaps, multi-language hack will be prevented by this bug.

At first insert this into line 55
$myts =& MyTextSanitizer::getInstance();

Then edit line 60.
<h3>'.$myts->makeTboxData4Show($title).'</h3></td></tr>';

And the same bug exists in index.php.
Insert this line in appropriate place.
[code]        $title=$myts->makeTboxData4Show($title);

Don't forget making an instance of MyTextSanitizer before using $myts.

I didnot find the bugs by myself.
I'll repair it about my TinyD.

9
johny
Re: Tinycontent question - printer friendly bug
  • 2004/5/11 20:21

  • johny

  • Just popping in

  • Posts: 23

  • Since: 2003/8/25


And again, thank you very much.

Works like a charm...

10
vanchan
Re: Tinycontent question - printer friendly bug
  • 2005/1/27 14:20

  • vanchan

  • Just popping in

  • Posts: 33

  • Since: 2003/8/15


it took me some searching, but I am glad I found this post. i was having the same problem. the bug still exists, even 18 months after this thread started. it seems such a tiny thing to fix, so I hope that any new release of tiny content will simply include the myts string in print.php

Login

Who's Online

181 user(s) are online (113 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

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

Latest GitHub Commits