User tests: Successful: Unsuccessful:
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content Language & Strings Front End SQL Installation Postgresql Layout Unit Tests |
email ok, but the print function is not bad
I have tested this item
That is something I have to explain to a client, at least I know that one of my clients will miss the button.
Labels |
Added:
?
?
?
|
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
I can disable the feature for new clients, but anyway do whatever you think is right. I have told my opinion
I have tested this item
I also made a new installation, as database data are changed. This was OK, too.
thanks for testing
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.
@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.
@infograf768 That's why we mave @media print { ... }
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;
}
}
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
How often do you see either of these buttons on a "professional" site - I cant think of the last time that i did
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
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.
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?
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.
Apparently you did not like
use Joomla\CMS\MiltonFriedman\ChicagoBoys\PrintNoHelper;
I can understand that. Sense of humor depends on different cultures.
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.
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.
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
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
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-04-03 18:55:36 |
Closed_By | ⇒ | brianteeman |
Status | Closed | ⇒ | New |
Closed_Date | 2018-04-03 18:55:36 | ⇒ | |
Closed_By | brianteeman | ⇒ |
Status | New | ⇒ | Pending |
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.
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...
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.
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
@infograf768 of course number 3 does - thats why it is there
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
Status | Pending | ⇒ | Information Required |
Status | Information Required | ⇒ | Pending |
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%
Can someone make a decision 100% then so I only have to write/update this once please
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
Closed - obviously there is no interest in this
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-09-25 18:27:18 |
Closed_By | ⇒ | brianteeman |
Status | Closed | ⇒ | New |
Closed_Date | 2018-09-25 18:27:18 | ⇒ | |
Closed_By | brianteeman | ⇒ |
Status | New | ⇒ | Pending |
Thanks for reopening this!
I am going to resubmit it as this is over 12 months old and a pain to resolve the conflicts.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-02-26 19:22:33 |
Closed_By | ⇒ | brianteeman |
+1
This would fix #19221 I suppose