tt_news - How to add comments in tt_news single view? - plugins

I setup my own tt_news template and currently try to use the "comments" plugin. After installing and import the standard plugin constants it should show the comments automaticly (so I've read it). But no. Nothing.
How do I get the comments into my tt_news single template?

you also have to insert the comments plugin on the news single page, below the news plugin with single view.
Here you can read about this in the extension manual:
comments manual in TER
Regards
Patrick

Related

TYPO3 tt_news - show hidden news

on TYPO3 with the tt_news extension, my contributors would like to previews news before publishing ; Problem : impossible to get a preview if the news is hidden. Our website is big and we can't display the news before to finish it, even for preview for a few seconds.
According to this documentation :
If a preview of hidden records needs to be allowed too, the checkbox
“Allow hidden records” needs to be checked in the plugin.
No way to find this checkbox.
Do you have any solution ?
According to the tt_news documentation, you have to set the following Page TSconfig:
tx_ttnews.singlePid = 37
where 37 is the UID of the page containing the single view plugin.
Apparently this functionality is currently broken:
https://forge.typo3.org/issues/67304
https://forge.typo3.org/issues/75768
The second issue on forge.typo3.org provides a possible solution which should work in general with all records of any extension (TYPO3 v7 and above!). Again, Page TSconfig (no TypoScript):
TCEMAIN.preview {
tt_news {
previewPageId = 37
useDefaultLanguageRecord = 0
fieldToParameterMap {
uid = tx_ttnews[tt_news]
}
}
}
I successfully tested this in TYPO3 v7. One major drawback – as already noted in your question – is that this does not work with hidden records.
Previewing hidden records result in the error message
no news_id given
Edit: As Bernd suggested, you could make use of categories to hide drafts of news records and use the preview solution above:
If you already use news categories: Set the category mode in the list view plugin(s) of tt_news to hide news records which do not own the desired categories. Let the editors assign the categories only if the content is ready.
Otherwise: use a new category preview – as Bernd suggested – and hide records with this category in the list view plugin.
The latter is a bit more risky to use for editors, as they could forget to set this temporary category. Nonetheless, you as an integrator could use the TSconfig TCAdefaults to automatically assign this preview category to all new records. The editors would only have to remove the category when the news record is completed.
Another possible workaround could be to save drafts in a separate folder which is not used by the list view plugin of tt_news. Then you also could use the preview solution above.
If that's not the right way of working for you or your editors, you could try using the workspaces extension which ships with the TYPO3 core.
a clean solution would be the usage of workspaces. but not all extension support it.
so another option would be to simulate workspaces:
build a page where your news can be seen and secure it with a login. so if only the new records should be shown you might create a 'preview' category, which is shown only on the special preview page.

TYPO3 news: how to link to another news within rte editor

A question for tt_news:
how to link within the rte-editor - is there a possibilitiy to see a list of all news or is there another way to link news in the text
Best reguards
Volker
Yes, you can configure the RTE to have custom records (e.g. news) in the link wizard.
I wrote a tutorial about this for TYPO3 8LTS: https://usetypo3.com/linkhandler.html
For TYPO3 7LTS you have to use an extension like coding.ms already wrote.
Für TYPO3 7.6.x: https://github.com/cobwebch/linkhandler
Für TYPO3 8.7.x: https://docs.typo3.org/typo3cms/extensions/core/8.7/Changelog/8.6/Feature-79626-IntegrateRecordLinkHandler.html

Map tt_news links to work with tx_news extension in TYPO3

I'm using tx_news with imported news entries from tt_news.
The import worked well, but some news contain "old" links in the body field of this form
/index.php?id=10&tx_ttnews[tt_news]=123&tx_ttnews[mode]=single&tx_ttnews[backPID]=2&no_cache=1
Can these links be "mapped" somehow to work with tx_news?
Using Typo3 7.6.12
In short, this is not possible. However there are several options I am thinking of. In general those links should be defined by using the EXT:linkhandler
1) Convert manually: Sounds sad but if not too many links are there, it is certainly the fastest one.
2) Use one of the hooks of TYPO3 which are used during the bootstrapping and do custom redirects. E.g. $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/index_ts.php']['preprocessRequest'].
3) Hook into the error handling and redirect right before showing any error page. One example to check out could be an ext I did: https://github.com/georgringer/fast_redirect. It must be certainly modified to fit your needs.
What you can actually do as well, which I did for a big import a while ago: Remove all news records again, truncate the table and use any PHP script and fill up the table tx_news_domain_model_newswith the same amount of news entries found in tt_news and set the uid to the one of tt_news and set the import_source field to TT_NEWS_IMPORT and the import_id field as well to the uid of the tt_news uid. After that, the import will pick the dummy tx_news_domain_model_news record, found by findOneByImportSourceAndImportId() and will enrich it with the regular data. You will end with news records having the same uid.

Configure TT_News

I'm searing for several hours but can not found an good example on how to configure the tt_news extension with typoscript. I would like to know how I can disable showing the date, cat info and archive to make it a simple overview. Also clicking on the news item does not show the single page? Can any one post an simple example of typoscript for configuring an simple news overview with the tt_news extension?
I think the tt_news documentation will answer all your questions.
Your first issue is very simple to solve: just use your own templates and remove the corresponding marker.
Copy the template from tt_news/pi/tt_news_v2_template.html to somewhere else, e.g. into fileadmin/myproject/tt_news_v2_template.html
Configure tt_news with the new location of the template in your TypoScript Constants: plugin.tt_news.file.templateFile = fileadmin/myproject/tt_news_v2_template.html (you have to include the static TypoScript of tt_news too)
Your second issue seems to be a problem with the single pid configuration. You can solve this with defining your single page in the TypoScript Constants:
plugin.tt_news.singlePid = 123
It seems that you are new to TYPO3 and tt_news, so maybe you should simply follow the quick start guide in the tt_news documentation.

Disqus comment count in TYPO3 tt_news

Is there a possibility to create in TYPO3 tt_news list/latest view link to article with #disqus_thread at the end of link i.e.:
Number of commments?
Anyone ever tried to view the comments count in tt_news extension?
Thanks for any help!
Regards,
Adrian
Check tt_news' manual for section Extending tt_news, most probably you can just use itemMarkerArrayFunc fpr creating custom tags, there are some samples in typo3conf/ext/tt_news/res/ folder.
Using it you can just handle some new marker like: ###LINK_TO_DISQUS###
Note, I don't know the Disqus' API, anyway most probably id doesn't require much effort.