? ? ? Success

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
17 Jan 2018

The option to email a link to a friend and to print an article were outdated when joomla 1.0 was launched - there are far better ways to share content etc.

A quick unscientific test of live sites showed none that were using this

This pr removes the show print and email icons options and code

If I understand everything correctly nothing would need to be done to update upgrading sites databases as the stored param would simply be ignored

avatar brianteeman brianteeman - open - 17 Jan 2018
avatar brianteeman brianteeman - change - 17 Jan 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jan 2018
Category Administration com_content Language & Strings Front End SQL Installation Postgresql Layout Unit Tests
avatar C-Lodder
C-Lodder - comment - 17 Jan 2018

+1

This would fix #19221 I suppose

avatar rdeutz
rdeutz - comment - 17 Jan 2018

email ok, but the print function is not bad

avatar C-Lodder
C-Lodder - comment - 17 Jan 2018

@rdeutz - browsers have their own print functionality.

avatar rdeutz
rdeutz - comment - 17 Jan 2018

@C-Lodder I know but it works different

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 17 Jan 2018

I have tested this item successfully on 3ff030f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19393.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 17 Jan 2018 - Tested successfully
avatar brianteeman
brianteeman - comment - 17 Jan 2018
  1. browsers have their own print
  2. print doesnt work on mobile
  3. print.css will let you customise the print view in a much better way
avatar rdeutz
rdeutz - comment - 17 Jan 2018

That is something I have to explain to a client, at least I know that one of my clients will miss the button.

97c99cb 17 Jan 2018 avatar brianteeman drone
avatar brianteeman brianteeman - change - 17 Jan 2018
Labels Added: ? ? ?
avatar C-Lodder
C-Lodder - comment - 17 Jan 2018

@rdeutz But then again, you also have to explain to new clients that Joomla has a print feature and how to access it.

avatar brianteeman
brianteeman - comment - 17 Jan 2018

If this was a proposal to add a print button it would be rejected on the basis that its something that the majority of site owners would not want

avatar rdeutz
rdeutz - comment - 17 Jan 2018

I can disable the feature for new clients, but anyway do whatever you think is right. I have told my opinion

avatar astridx
astridx - comment - 17 Jan 2018

I have tested this item successfully on 97c99cb
I also made a new installation, as database data are changed. This was OK, too.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19393.

avatar astridx astridx - test_item - 17 Jan 2018 - Tested successfully
avatar astridx astridx - test_item - 17 Jan 2018 - Tested successfully
avatar brianteeman
brianteeman - comment - 19 Jan 2018

thanks for testing

avatar infograf768
infograf768 - comment - 15 Feb 2018

There is a big difference between printing via the browser and the Print article feature.
Printing via the browser will print the whole page.
Your Modules_article.pdf
Your Modules.pdf

I agree with @rdeutz
Let's keep the Print article.

avatar ciar4n
ciar4n - comment - 15 Feb 2018

@infograf768 Currently there is a big difference as there is no print specific CSS in the template. It is quite possible to make both of your examples look the same with the appropriate print specific styling.

avatar C-Lodder
C-Lodder - comment - 15 Feb 2018

@infograf768 That's why we mave @media print { ... }

avatar C-Lodder
C-Lodder - comment - 15 Feb 2018

If we want to just print an article or any content within the component area, then the following CSS can be used:

@media print {
    .container-header,
    .container-top-a,
    .container-top-b,
    .container-sidebar-left,
    .container-sidebar-right,
    .container-bottom-a,
    .container-bottom-b,
    .container-footer {
        display: none !important;
    }
}
avatar infograf768
infograf768 - comment - 15 Feb 2018

This means that there is no choice on one hand between printing the whole page if the user wants to and a single article if the admin desires (after adding this css).

On the other hand, if a blog is displayed and there is no link to the specific article to force it to display alone, the result of such css is to print here 3 pages, 1st one blank, 2nd one with what ever gets into the pdf (it may be one or multiple articles) , 3rd one blank.

Here is the result printing as PDF

screen shot 2018-02-15 at 12 31 01

avatar brianteeman
brianteeman - comment - 15 Feb 2018

#19393 (comment)

How often do you see either of these buttons on a "professional" site - I cant think of the last time that i did

avatar dgt41
dgt41 - comment - 15 Feb 2018

This means that there is no choice on one hand between printing the whole page if the user wants to and a single article if the admin desires (after adding this css).

No. Once the content is delivered on the client they can do whatever they desire with it through the browser, we don't need to replicate existing browser features in our side...

My 2c

avatar ciar4n
ciar4n - comment - 15 Feb 2018

With a push towards paperless work places it seems wrong that Joomla promotes multiple print options.

Leave this feature to a 3 party extension imo.

avatar infograf768
infograf768 - comment - 15 Feb 2018

Once the content is delivered on the client they can do whatever they desire with it through the browser.

I just demonstrated it is not possible as it is. If I mistake, please correct me.

@C-Lodder
I have demonstrated above, alas, that you can't solve it via the CSS you proposed.

With a push towards paperless work places it seems wrong that Joomla promotes multiple print options.

Who talked about paperless. Never heard about pdf one can send via mail?

avatar brianteeman
brianteeman - comment - 15 Feb 2018

Thank you @mbabker

avatar mbabker
mbabker - comment - 15 Feb 2018

Personal attacks removed. JM we know quite well that you would prefer nothing changes, especially if Brian is the one who opened the PR. You do not need to use personal attacks and insults every time. Same goes for everyone else who likes to commonly trash other people's work.

All that is being done is removing core support for creating these buttons. If you want them, create a layout override that generates a link to the current page with this query string: ?tmpl=component&print=1 and you have your "pretty" page that is suitable for print. Not that difficult if it's a capability you really want on your sites.

avatar infograf768
infograf768 - comment - 15 Feb 2018

Apparently you did not like
use Joomla\CMS\MiltonFriedman\ChicagoBoys\PrintNoHelper;

I can understand that. Sense of humor depends on different cultures. ? And it has nothing to do with who created the PR, but to the fact that this functionnality is real useful.
You will remark that I said nothing about mail to a friend as I do think it is a good idea to get rid of that one.

avatar mbabker
mbabker - comment - 15 Feb 2018

We aren't dropping the functionality in full though, that's the main point my comment was making. All we're removing is support for the JHtml helper that builds a button with the appropriate link (current page URI plus the query string I noted). If we were making it impossible to use the functionality I'd say something different, but really, this is so easily duplicated if you really need it I don't see why it needs to be a big concern.

avatar dgt41
dgt41 - comment - 15 Feb 2018

but to the fact that this functionnality is real useful

Those facts are very subjective. The only objective thing here is that the CMS delivers a page to the browser. The browser is responsible for the printing not the CMS. Please let's not use practices from last century.

Also what @mbabker said above

avatar brianteeman
brianteeman - comment - 15 Feb 2018

That wasn't the offensive line as you well know - but nice try. Accept the PR and move into the 21st Century or stay in the dark ages. I am losing interest in Joomla very rapidly

avatar brianteeman brianteeman - change - 3 Apr 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-04-03 18:55:36
Closed_By brianteeman
avatar brianteeman brianteeman - close - 3 Apr 2018
avatar rdeutz rdeutz - change - 3 Apr 2018
Status Closed New
Closed_Date 2018-04-03 18:55:36
Closed_By brianteeman
avatar rdeutz rdeutz - change - 3 Apr 2018
Status New Pending
avatar rdeutz rdeutz - reopen - 3 Apr 2018
avatar infograf768
infograf768 - comment - 4 Apr 2018

The various proposals above (either the one from @C-Lodder or @mbabker )to print a specific article content did not work here except if the article is displayed alone in an otherwise empty page.
To solve the issue, the only way I found was to load a supplementary script (either in the article if one can or in all concerned overrides).

<script>
		function printDiv(divName){
			var printContents = document.getElementById(divName).innerHTML;
			var originalContents = document.body.innerHTML;
			document.body.innerHTML = printContents;
			window.print();
			document.body.innerHTML = originalContents;
		}
	</script>

and then add in the article

<div class="pull-right">
<button class="button btn btn-primary" onclick="printDiv('printarea')">Print only div below</button>
</div>
<div id='printarea'>

<p>The content of the article</p>

</div>

Which is impossible to do directly when using a WYSIWYG editor without a specific extension to enter js .
With this code I can print in staging , but it does not work in 4.0..... IN 4.0 I get the print dialog allright, but not the full div to print.

screen shot 2018-04-04 at 11 27 53

It's a real pity to be forced to use such "century-old practice" "in the 21st century".

One would say it is "normal" for a man using this kind of smartphone...
200px-fullerphone_1918

avatar mbabker
mbabker - comment - 4 Apr 2018

If adding a tmpl=component query string is not working in the 4.0 branch then there is a bug to be addressed. It is not indicative that core is not supporting this at all anymore.

avatar infograf768
infograf768 - comment - 5 Apr 2018

@mbabker
I have no idea how to use this code to print the content of the article and only the content of the article, whatever the way the article is displayed, i.e. alone, in blog or as featured.

avatar mbabker
mbabker - comment - 5 Apr 2018

The "print URL" for the 3.8.6 release article is https://www.joomla.org/announcements/release-news/5725-joomla-3-8-6-release.html?tmpl=component

Similar to that, you need your link to have that tmpl=component query string in the request (the current helper generating the print button does exactly this). In your layout overrides, there are a couple of ways to accomplish this.

Probably the easiest:

$printUrl = clone JUri::current();
$printUrl->setVar('tmpl', 'component');

// When building your link, include 'echo $printUrl' to print the URL
avatar brianteeman
brianteeman - comment - 13 Jul 2018

@wilsonge can I have a yes/no/partial on this please and I will redo the pr

  1. close
  2. Accept removal of print and email
  3. Accept removal of email only
avatar infograf768
infograf768 - comment - 14 Jul 2018

Reminder to @wilsonge
None of the solutions proposed above did work to print a single article displayed in a blog or as featured when we have other articles displayed.

avatar brianteeman
brianteeman - comment - 14 Jul 2018

@infograf768 of course number 3 does - thats why it is there

avatar rdeutz
rdeutz - comment - 18 Aug 2018

for the test can you make a PR against this Repo https://github.com/joomla/test-integration files are in the 4.0-dev branch /legacy and remove the files from your PR here, thanks

avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Aug 2018
Status Pending Information Required
avatar joomla-cms-bot joomla-cms-bot - edited - 18 Aug 2018
avatar brianteeman
brianteeman - comment - 18 Aug 2018

@rdeutz So now we have a chicken and egg scenario

A new pr for the tests in the tests repo should only be merged if this PR is accepted
But this pr wont be accepted without working tests

avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Aug 2018
Status Information Required Pending
avatar wilsonge
wilsonge - comment - 19 Aug 2018

I'm totally happy to remove print - this has been superseded by print stylesheets on pretty much all modern websites (and you'd use that to disable most the module positions in Joomla). I'm unsure as to whether we should remove the email functionality. Probably yes. But not 100%

avatar brianteeman
brianteeman - comment - 19 Aug 2018

Can someone make a decision 100% then so I only have to write/update this once please

avatar dgrammatiko
dgrammatiko - comment - 19 Aug 2018

this has been superseded by print stylesheets on pretty much all modern websites (and you'd use that to disable most the module positions in Joomla)

Just to add to what @wilsonge wrote above, there is a great css just for that: https://github.com/BafS/Gutenberg

avatar brianteeman
brianteeman - comment - 25 Sep 2018

Closed - obviously there is no interest in this

avatar brianteeman brianteeman - change - 25 Sep 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-09-25 18:27:18
Closed_By brianteeman
avatar brianteeman brianteeman - close - 25 Sep 2018
avatar brianteeman brianteeman - change - 26 Feb 2019
Status Closed New
Closed_Date 2018-09-25 18:27:18
Closed_By brianteeman
avatar brianteeman brianteeman - change - 26 Feb 2019
Status New Pending
avatar brianteeman brianteeman - reopen - 26 Feb 2019
avatar dgrammatiko
dgrammatiko - comment - 26 Feb 2019

Thanks for reopening this!

avatar brianteeman
brianteeman - comment - 26 Feb 2019

I am going to resubmit it as this is over 12 months old and a pain to resolve the conflicts.

avatar brianteeman
brianteeman - comment - 26 Feb 2019

See #24025 for up to date PR

avatar brianteeman brianteeman - change - 26 Feb 2019
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2019-02-26 19:22:33
Closed_By brianteeman
avatar brianteeman brianteeman - close - 26 Feb 2019

Add a Comment

Login with GitHub to post a comment