set a storagePid of pw_comments - typo3

Is it possible to set a storage PID where pw_comments also looks for comments instead only on the page where pw_comments is inserted?
Setting persistence.storagePid in Typoscript didn't help...
Background: I'm migrating comments from another extension to pw_comments but there the comments are stored mostly all in one folder. All the comments are belonging to news records. To figure out for any comment, which is the detail page where the news will be displayed, seems quite difficult.

It's possible to set/override the Storage Page where pw_comment should look for comments:
plugin.tx_pwcomments.settings.storagePid = 123
A possibility to look in several folders is not given.

you can use the EntryUid setting of pw_comments. Usually pw_comments works on page base.
But for EXT:news e.g. the detail page of any news is always the same and comments are stored in same folder/pid.
This option allows you to define a GET parameter (e.g. tx_news_pi1[news]) to be respected as separator for comments in same sys_folder.
So each time you are on news with e.g. uid=1, you just get the comments, because in comment record the field "entry_uid" has the value "1".
Here you'll find an example of how to configure typoscript: https://forge.typo3.org/projects/extension-pw_comments/wiki#How-to-use-pw_comments-with-other-extensions
Because the GET parameter is configurable, you can use pw_comments with any TYPO3 extension. Limitation: just one plugin per page.

Related

How can I avoid duplicate content with TYPO3 v9 when having a news entry with multiple categories

I am working on a TYPO3 v10 LTS website with integration of the news extension v8.3.0. Many news are assigned to multiple categories and they are displayed on different detail pages according to their assigned categories. Now I would like to define one categories as master and use this category for the generation of canonical links to avoid duplicate content problems. On an older version of the website (TYPO3 v7 LTS) I used the solution explained here: https://www.typo3.net/forum/thematik/zeige/thema/116056/
I'm not so experienced with TYPO3 v9/v10 LTS yet, but I think that there must be a solution with routeEnhancers.
Any hints are welcome.
You need no route enhancer, just use the basic configuration of EXT:news.
one solution would be: for detail-view (show) always use one page. in this way each news will have a unique url. (problem: you can't ´return´ to the former list view with a hard link[1], as you don't know from which list you came)
2nd: configure a show-page with your news-categories: this page will be preferred for detail view (it always will be the first category) and each news will always be shown on this category detail page. (no ´return´ to the original list as above)
[1] you can't use a page as link target, but you can use javascript:history.back()

How can i edit an existing Typo3 Extension (Backend Configuration Page)?

i want to edit an existing Typo3 Backend configuration page.
I want to edit a configuration page like this here:
Where can i edit the extensions backend?
To be more clear: where can i change the edit page that an editor can use to change content.
Can someone give me a hint to the right directory or file in generall?
I'm using Typo3-7.6
Thanks
Sorry, can't manage to put all questions in an unformatted comment.
there are a lot of questions, as you are not clear what you want. Maybe that is a problem of the correct words, the vocabluary, but in TYPO3 we have some fix terms for specific object. And I think you do not handle these terms according to the TYPO3 community.
let's define some terms:
first the concept of TYPO3:
all data is stored in record of differnt database tables. All records are organized with some fields and teh main field is uid, the unique ID.
the main table is pages according to the folders of your disk. those folders can contain other records (like files). (nearly) each record in TYPO3 has a relation to a pagesrecord ina field named pid. even pagesrecords have this field and so they build a tree of pages and subpages.
There is one special page, which is no real page: the page with the ' uid' zero. As there is no real pagesrecord with the uidzero, there are other records with are stored in that page by having a pid zero. for example the start of your page tree is anchored in page zero, or global records like languages, user, storages.
Aside of being the anchor to other records, the pagesrecords have information themself. (page name, kind of page, a teaser image, SEO-information, visibility, accessibility, ...)
your screenshot looks like a content record (normaly in the table tt_content), in the lower right corner there you can see the table name and the uidthe the currently edited record.
'Backend': with backend we name the view to the data where an editor can change the content of the website. The real website is the frontend. This can be seen by everyone without the need to login in the backend (you might have access-restriccted areas of your website which need a login, but that still is 'frontend' as there is no option to edit content.
in the backend the editor might be restricted what he can access and what he can modify. An adminuser has no restriction (up until version 9 where the role of a maintainer occured to manage more general and basic options)
so we have not a single 'backend configuration page' but multiple places where we could configure special aspects of the website.
also there is no special 'extension backend'. we have global extension configuration and records belonging to an extension. (And an extension can enhance existing records with additional fields.)
Please be more specific what you want to change

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.

How to manually order Typo3 news articles in the list view?

I am using the news plugin to simulate the classic page content elements but with previews. Now I would like to be able to manually set the order of the articles just as I would in the page module for the standard elements. But there seems to be no such option in the list module. How would I achieve such functionality?
There is an extension that adds a sorting field to tt_news so you can order the news entries in the list view. It has not been maintained for quite some time, but since it works on TCA and FlexForm level, it should still work with never versions. Check it out:
http://typo3.org/extensions/repository/view/mpossnewssorting

Converting content pages to tt_news (Typo3)

On a website, I have a section where I put a new page every week. I'd like to convert this to a system using tt_news. How do you suggest me to import the pages (more than 100 pages) to tt_news? Can I do it using a simple SQL query, or should I write a custom PHP script to perform the importation? Is there already an extension that exists that could help me performing this task?
It doesn't really matter to me if I simply build news liked to existing pages, or if I transfer the content of the page to the content of the news. It would be great if I can convert the page title to the news publish date, but I could use the page publishing date as well.
What do you suggest for performing this task?
I would do it via SQL as you mentioned already. Could get tricky if you have multiple content-elements per page that needs to be merged into one tt_news-dataset.
You could also install an extension, that links tt_content-elements with tt_news-records. This way you only have to insert the tt_news-records by traversing the pages and link the content per page to the new tt_news-record. Here are some extension, that link tt_news with content-elements:
ttnews_irre
aba_ttnews_content_con
Here is also an extension that could be worth a look: content2news.
Hope this is useful to you.
Best regards,
Peter