Elxis CMS Forum

Extensions => Components => Topic started by: Luca on August 25, 2010, 15:53:10

Title: com_content and eHide bot. Hidden content shown on .pdf output
Post by: Luca on August 25, 2010, 15:53:10
It happens that hidden pieces of article, stated (with
Code: [Select]
{noreg}{/noreg} eHide bot tags) to be hidden to un-registered users, are visible on that article .pdf.
I don't want to spam so I will provide the link in PM if required so.

Furthermore, .pdf icons in this site are not available as site default and in that article Parameters too, though .pdf could be accessed via google cache. Please, where to fully disable that function?

Thanks

Luca
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: CREATIVE Options on August 25, 2010, 19:01:25
The PDF on the fly has many problems and we know it.
The PDF process don't see / understand the commands from any bot.

I am sorry but right know we can't solve it. You will have the same problem for any Bot code such as video / gallery etc.

We will try to figure out how (if can be done) we can learn the PDF to not read the secrets.
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: Luca on August 25, 2010, 22:53:00
Ok, how could I, then, disable the pdf?
 ;)
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: CREATIVE Options on August 26, 2010, 08:21:43
From the Global Configuration -> Content
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: Luca on August 26, 2010, 11:58:30
Furthermore, .pdf icons in this site are not available as site default and in that article Parameters too, though .pdf could be accessed via google cache. Please, where to fully disable that function?

 >:(
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: apkoutsou on August 26, 2010, 12:33:10
I cann't see any reason for that angry face ...

Sirigos answered just above your question!
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: Luca on August 26, 2010, 12:59:54
Nice to meet you, apkoutsou  :)
The face is angry, not me. It was put there to merely underline the quotation.

So, the issue is, being .pdf disabled as the site default (Global Configuration -> Content) and in article Parameters - .pdf docs are still being created while accessing site.com/index2.php?option=com_content&do_pdf=x&id=xx , i.e. via G cache.

I wish this not happening, so would there be an action to take in order to completely and definitely disable .pdf creation...? Hope yes  ;)
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: apkoutsou on August 26, 2010, 13:30:54
I'm sorry but I thought that you question had two parts, but reading it again, I was wrong...  :-X

As far as I know, there is unfurtunately no way to delete google's cached pages or files, unless google is willing to do so...
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: Luca on August 26, 2010, 14:02:55
You are welcome, apkoutsou! Don't mention it! ;)

IMO, I have to reformulate my question. Sorry, I realize I were not so clear, after all.

G cache: there was a time when .pdf icons were on, so G did met them. It's ok.

I discovered my issue due a .pdf cached by G.

So: no matter G cache. Forget about it.

Now:
1) .pdf icons are sitewide disabled, main Config AND article's Prefs.
2) Typing in the browser "mysite.com/index2.php?option=com_content&do_pdf=x&id=xx", where "x" are article ids, everybody can download the pdf version of that article.

If I do understand right, .pdf settings in Global Config and article Params are TO SHOW or NOT TO SHOW .pdf "ICONS" as icons, not to disable/inhibit the .pdf creation itself.
Please correct me.

The main issue (IMO) regarding this is that that behavior let eventually sensible data go public (as stated by Sirigos: the function doesn't recognize some commands), as in the case where we have, as an exemple, a list available to reg users only (in my specific, hidden by a bot) but freely accessible by typing directly the .pdf version address in a browser.

If I knew where and what, I would be happy to edit that function in the code, in order to prevent or totally disable the .pdf creation.

---

BTW: how to become "Elxis Full Member"? I like it.

EDIT: deleted external url
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: CREATIVE Options on August 26, 2010, 14:09:56
On the Google Webmaster tools check for not to index
Also you can add a rule to robots.txt!!!
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: CREATIVE Options on August 26, 2010, 14:11:11
As for the
Code: [Select]
mysite.com/index2.php?option=com_content&do_pdf=x&id=xx"add a rule to the htaccess
Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: Luca on August 26, 2010, 14:15:01
As for the
Code: [Select]
mysite.com/index2.php?option=com_content&do_pdf=x&id=xx"add a rule to the htaccess

Thanks Sirigos, I've already taken in consideration that solution, though it's only a band-aid...

Title: Re: com_content and eHide bot. Not hidden content on .pdf output
Post by: CREATIVE Options on August 26, 2010, 14:27:18
BTW: how to become "Elxis Full Member"? I like it.

it is automatic by posts.
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: Luca on August 26, 2010, 14:32:51
I'm happy to hear that!

So, the problem is not G nor robots.txt nor indexing.

The target is: manually modify a piece of Elxis code in order to exclude .pdf creation.

Thanks!
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: CREATIVE Options on August 26, 2010, 14:39:28
hard code !!

remove the
Code: [Select]
tcpdf folder from the:
Code: [Select]
/public_html/includes
Of course create a backup before do anything.
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: apkoutsou on August 26, 2010, 14:40:43
or just rename it...
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: CREATIVE Options on August 26, 2010, 14:41:59
yes
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: CREATIVE Options on August 26, 2010, 14:42:41
and all this with out I have check them.
Because I am via the mobile.
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: Luca on August 26, 2010, 14:43:32
Thanks you both!
@Sirigos: what "hard code" does mean? That the function is hard coded or the patch is simple? In the latter case, everything is simple, just know what to (correctly) do. ;)
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: Luca on August 26, 2010, 14:44:23
I will check for you and post the results, thanks again
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: Luca on August 26, 2010, 14:50:33
No, my friends, that's not good because leads to php errors.
The solution could not be so easy as to delete something as that way.
I will stay in stand-by for a valid solution.

Thanks again
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: CREATIVE Options on August 26, 2010, 15:39:44
OK I am back to my office, but I have 3 meeting with customer to do.
Tomorrow I will come with a solution.
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: Luca on September 19, 2010, 22:29:41
Electric hazard... 220.000V  >:(
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: CREATIVE Options on September 20, 2010, 10:31:39
The target is: manually modify a piece of Elxis code in order to exclude .pdf creation.

TCPDF is part of the core files.
I don't recommend any change on call functions for the TCPDF

root/index2.php:
Code: [Select]
line67: $do_pdf = intval(mosGetParam( $_REQUEST, 'do_pdf', 0 ));
line91: if ( $do_pdf == 1 ) {
           include ($mainframe->getCfg('absolute_path').'/includes/pdf.php');
           exit();
}

root/content.html.php
Code: [Select]
line519:  $link = $mainframe->getCfg('live_site').'/index2.php?option=com_content&do_pdf=1&id='.$row->id;
If I was one your position, I would use the htaccess rule.
Title: Re: com_content and eHide bot. Hidden content shown on .pdf output
Post by: Luca on September 20, 2010, 13:06:40
Thank you Sirigos, you and Datahell are the men, as usually.
I will pay attention to your advices.

Have a great day,
Luca.