tx_news article in restricted area can be accessed via url - typo3

I have tx_news installed with TYPO3 8.7. I use the plugin two times, one in a restricted area and the other one in a public area.
I noticed that if I paste a speaking url path segment of an article in the restricted area into the url of the detail page of the public area, the article will be shown without any restrictions.
Example:
The public url of an article is
https://example.com/news/artikel/my_public_article
If I replace now /my_public_article with the speaking url path segment of the restricted article like
https://example.com/news/artikel/my_restricted_article
the article will be shown.
How can I avoid that?
I already set the starting point of the plugin on my public detail page to the public records folder and set recursive to 0.

You can set the following TypoScript:
plugin.tx_news.settings.detail.checkPidOfNewsRecord = 1
From the news documentation:
If set, the detail view checks the incoming news record against the defined starting point(s). If those don’t match, the news record won’t be displayed.

Possible solutions: Set access rights per news record or filter by category in detail view in fluid template (if user is logged in then show record content).

Related

Blog-like single element pages with TYPO3 / TemplaVoila

I have a blog-like part of an page using TYPO3 / TemplaVoila. There are articles that should show up summarized on a single page, but have their own pages / URLs each one too.
However, having the editors add a page AND a flexible content element for each entry is complicated.
So is it possible by some typoscript to have a page, showing a single content element from some other page, sporting a proper URL without having to setup an extra page for each element?
What you want is doable without TV and with other records than tt_content.
e.g.: ext:news does it: the content are news records, which are shown with plugins in list- and detail-mode.
Of course you can reinvent the complete logic of such an extension so you can do it with tt_content records, which could be stored in the usual way scattered on multiple pages.
But the logic is clearer if there only is one page (or very few pages which represent some categorization) where special records are stored.
Plugins would be configured to show only selected records (from one category, which are marked top, which are current, ...) and you have one page (one for all and not for each news one) where the records are shown in detail.
Also each has it's own URL, either with URL-parameter (by default) or you configure realurl (or similar) to build a "real url" from news title (and uid).

tx_news direct link to news entry

it is possible to have a direct path to a special news entry?
example:
my link is: http://www.domain.de/start/topnewsdetail/news/really-long-name-of-news-entry.html
and it would be nice to have
http://www.domain.de/newsEntry.html.
Can someone give a hint?
it is a little bit complicated if you want a general automatic solution.
you can do it by hand if you insert pages of type 'external url' where you insert the long path as external url.
with realurl you have problems as realurl at least will use one path segment for the page with the detail view before the last segment which is for identifying the news record. AFAIK coolurl can ommit the path segemnt for the page.
on the other hand: make sure the news identification (title, subtitle?) is unique and does not collide with pathes for normal pages.
at last you can use .htaccess rewrites, but that needs to differentiate between short urls for news and short urls for top-level pages. So those urls will show the page, those urls are not generated inside of TYPO3 and so nowhere used (except manual)
this EXT. adds a custom link to records like system category or news:
https://typo3.org/extensions/repository/view/recordlink
It'S deployed for TYPO3 6.2 but perhabs it'S helpful to create an own EXT.?

typo3 tt_news - single view, 2 domains and one storage folder all news are visible in both 2 domains

problem description:
i have two domains on one typo3 installation
i have one folder (general record storage page) with tt_news records for both 2 domains
i have two pages with tt_news single view one for each domain
each single view plugin is configured to show news only from selected category.
problem:
each news is available on both domains.
example:
1. domain1.com/news/title-news-foo.html
2. domain2.com/newsfromdomain2/title-news-foo.html
ex 1, its ok, news is assigned to category from this domain
ex 2, its wrong, this news should not be displayed here becouse it`s displyaed on domain1.com
It looks that in single view typo3 is not considering Categry mode selection.
So how to resolve this issue, without separing news to indepenedent GRSP ?
I would suggest you split it up into seperate storage folders
This make things a lot easier. It also sounds you are not using the category mode what it is meant for.
Suggestion:
-GRSP
-- NEWS DOMAIN A
-- NEWS DOMAIN B
In the views on both domains set the correct storage folder.

How to add a movie in a typo3 news article

I'm using typo3 6.2.4 with the news extension to show some articles om my website. In one of the articles I want to add a youtube movie within a iframe. But it is not allowed to add html code. Does any one know how to solve this?
If you're talking about EXT:news, you can enable "Content element relations" in the extension configuration (in the Extension Manager). Then you can use every Content Element type as part of the News item, so you can add a HTML element or a Media element to display it.
By the way, if you host your video yourself, EXT:news accepts it as a media item as if it were a picture.

How to differentiate the homepage structure from the category page structure in WordPress template?

I am very news in WordPress world and I am finding some difficulties with creation of a personal template.
I want implement a blog like this one (that is do using WordPress): http://viralpatel.net/blogs/
My blog have to be simplest and there must be only two coluns: one for the last posts and one for the more visited post
So I am started from an existing template (named Coogee) and I have divided the content area (the index.php file) into two columns: the first one that show the new posts and the second one that show the most read posts.
I have implement this features with some lines of code that I have put in my columns as show here:
http://bacsoftwareconsulting.com/blog/index.php/wordpress-cat/how-to-display-most-viewed-posts-in-wordpress-without-a-plugin/
Ok, now the homepage look good for my intents but I am having some problem in the categories page.
For example if you click on the "generic" link on Categorie menù in the side bare you obtain this page: http://scorejava.com/wordpress351/?cat=2
In teory this page have to show ONLY the articles that have "generic" as setted category but this is not true, infact in the left column are correctly showed the articles having "generic" category setted but in the right column still remain the last 5 posted articles...
And now I have a question...seems that WordPress use this index.php file as template of the content area of all page (except the one that displays a single article that uses **single.php file)
This is not good for me because I want that a category page show only one big column with the last articles of the current category, as here: http://viralpatel.net/blogs/category/spring/spring3-mvc-framework/
As you can see in this blog there is more columns in the homepage but only one column for the category page
I would know if:
**Exist a way to define an other structure (different from the index.php file used for the homepage articles content) for the catecories page?
If I can't use an other structure for the categories page and consequently I have to use the same index.php file also per the categories content page....there is a way to show the second column only if the visitor is in the homepage and don't show it if he is in a category page (do not show it if the visitor is in a pge like: http://scorejava.com/wordpress351/?cat=2
Or do you have some other solutions?
Tnx
Andrea
If wordpress code cannot find a category.php then it will use the index.php file.
index.php is like the fallback file.
The hierarchy structure for the categories go like
1> category-slug.php (Note: available with Version 2.9)
2> category-ID.php
3> category.php
4> archive.php
5> index.php
That is, if you do not have a category-slug.php (lets say category-news.php), WordPress will check for a category-ID.php (like category-6.php), and so on.
So i would suggest you create a category-slug.php file (where slug will be your category's slug).
for more info check out this link.
http://codex.wordpress.org/Category_Templates