realURL within News System extension - typo3

I would like to have frendly URLs in news single post instead of all those hashtags, procent, question marks etc.
I have tried to follow this article but it doesn't work.
Normal pages have friendly URLs.
I am using Typo3 7.2.0 and News System 3.2.0
Any ideas? Thanks
RESOLVED
This worked TYPO3 news system and RealURL

Of course that sample doesn't work as it's written for tt_news ext. You should use sample from official News' doc instead.
Note that you can skip controller and action parts of URL by adding this to your TS:
plugin.tx_news.settings.link.skipControllerAndAction = 1
In such case you will also need to remove/comment these parts from your realurl_conf:
array(
'GETvar' => 'tx_news_pi1[action]',
),
array(
'GETvar' => 'tx_news_pi1[controller]',
),

Related

Change the backend-view of mask - TYPO3

I try - in TYPO3 8.7.13 with the extension mask 3.1.0 - to build for example a CE with repeating records with fields for names - no problem.
But in the backend I can see only the first field. Is there any way to show both?
https://www.dropbox.com/s/rmsg5qfd51blhrf/mask1.png?dl=0
So there are preview templates they belong to the page view and not edit.
In edit mode you only see the label (this is given in the definition of IRRE in the TYPO3 core).
So you only can change the shown 'label' of the record. That means: using label_alt in the TCA (I recommend to use label_alt_force too):
'ctrl' => [
'label' => 'surname',
'label_alt' => 'givenname,surname',
'label_alt_force' => 1,
],

Typo3 RealUrl: add term to pagination url

I wrote a press release plugin listing several releases using the paginate widget. Using RealUrl the URL of the listing site looks like this: www.mysite.com/press/2/
Is it possible to add another term to the page parameter? So it looks like this: www.mysite.com/press/page-2/
I would also need this for two languages.
This is part of my RealUrl configuration:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
'fixedPostVars' => array(
'127' => array( // Press release overview
array(
'GETvar' => 'tx_press_releaselist[#widget_0][currentPage]',
)
),
)
);
A possible solution would be to use a valueMap. Only downside would be that you would provide every value. So if you expect 100 pages, you need to add those 100 numbers to the realurl configuration.

Additional page property fields in TYPO3 CMS 6.2

What would be the recommended method to add custom page property fields in TYPO3 6.2?
In 4.5 I used TemplaVoila which had its own page module and made it easy to add data records on a page level.
There are several approaches:
The "vanilla" approach:
Create an extension (and with it the file ext_emconf.php) and then create a file ext_tables.sql in the extension root. In it you can put SQL-definitions for the new fields, by defining a CREATE TABLE statement for the pages table:
CREATE TABLE pages(
myNewField int(11) DEFAULT '',
);
This SQL-definition will be merged with existing definitions for the table page.
Then you need to configure the new field in the Table Configuration Array (TCA). You can usually find good examples in existing extensions, for example in realurl. There are two places where you can put these definitions, either in the file ext_tables.php (uncached), or into a php file in the folder Configuration/Tca/Overrides (cached).
This approach sounds like more work than it actually is.
Just use TemplaVoila. It is available for TYPO3 6.2, but its future is uncertain, AFAIK.
Use the fluidtypo3-Ecosystem of extensions, and especially the extension fluidpages. It does what you want, in a similar way to TemplaVoila, but with modern (= fluid-based) technologies.
if you need your own custom content elements, i recommend the extension "DCE" (Dynamic Content Elements).
DCE is really easy to customise and you can create Content elements in some minutes.
Also you can do it like Jost said. Do it with an own extension and put the TCA definition in your extTables.php
As example:
/www/htdocs/website/typo3conf/ext/custom_extension/ext_tables.php
$tmp_itm_extended_columns_pages = array(
'link_class' => array(
'exclude' => 0,
'label' => 'LLL:EXT:itm_extended/Resources/Private/Language/locallang_db.xlf:label.linkClass',
'config' => array(
'type' => 'select',
'items' => array(
array('Nichts', ''),
array('Zahnrad', 'icon-afford', 'EXT:custom_extension/Resources/Public/img/icons/icon_preferences_small.png'),
array('Fabrik', 'icon-factory', 'EXT:custom_extension/Resources/Public/img/icons/icon_factory_small.png'),
array('Computer', 'icon-software', 'EXT:custom_extension/Resources/Public/img/icons/icon_software_small.png'),
array('Person', 'icon-jobs', 'EXT:custom_extension/Resources/Public/img/icons/icon_person_small.png'),
array('Welt', 'icon-world', 'EXT:custom_extension/Resources/Public/img/icons/icon_world_small.png'),
array('Rohre', 'icon-pipe', 'EXT:custom_extension/Resources/Public/img/icons/icon_pipe_small.png'),
),
),
),
);
Then you have to add your new field to the ext_tables.sql
#
# Table structure for table 'pages'
#
CREATE TABLE pages (
link_class text
);

Typo3 override backend classes

It's been a few weeks I work on Typo3 6.2 and I want to know how to override Typo3 Core classes.
In my case, I have to edit the way select html objects are displayed (I want to add optgroup but Typo doesn't allow us to do it). So I edited the file "FormEngine.php" (typo3/sysext/backend/Classes/Form) and now it works.
But this isn't healthy for future upgrade.
Is there a way to override core classes like any other CMS would allow us to do ?
And I haven't been able to find something on the Internet and I think it could be useful.
Thank you :)
Zisiztypo
Instead of modifying source code of CMS you can just declare a field with a user type and then point your custom userFunc
From the ref:
'tx_examples_special' => array (
'exclude' => 0,
'label' => 'LLL:EXT:examples/Resources/Private/Language/locallang_db.xlf:fe_users.tx_examples_special',
'config' => array (
'type' => 'user',
'size' => '30',
'userFunc' => 'Documentation\\Examples\\Userfuncs\\Tca->specialField',
'parameters' => array(
'color' => 'blue'
)
)
),
TIP: Using this approach, you can create ANY type of field you need, it can be i.e. Google Maps selector, set of fields with common dependencies filled by JS, etc, etc.

Wordpress: Post same blog entry to multiple pages

On my Wordpress site, I have the main blog entry page, then I have two sub blog pages. I would like to know if there is a way so that whenever authors submit a post to the main page, that same post is also posted in one of the sub blog pages. I would think that there is a plugin to do this sort of thing. The closest I have come to is this plugin, http://wordpress.org/plugins/duplicate-post/ but it does not seem that this one automates the process.
I may just edit that plugin to do it automatically, but I would like to at least try and see if there is one already out there. Ideally, I would like the plugin to have a selection of which page the blog should be added to on the edit page. Something like Add this post to Blog Page 1 or Blog Page 2 with check boxes by either page. Thanks in advance for any help.
You say you have 2 sub blog pages in which you want to have the option to display any posts taht are submited by authors. I'm thinking at a custom post meta that you can use to filter posts in the sub blog pages this way if the author wants to place the post in blog page 1 it will set the postmeta to blog1 if he wants it in blog page 2 it will set the postmeta to blog2, all you'll have to do then is to filter the posts to include postmeta blog1 in blog page 1 and blog2 in blog page 2.
something like:
$args = array('meta_query' => array(
array(
'key' => 'blogPage',
'value' => 'blog1',
'compare' => '=',
'type' => 'text'
)) // for blog page 1
and
$args = array('meta_query' => array(
array(
'key' => 'blogPage',
'value' => 'blog2',
'compare' => '=',
'type' => 'text'
)) // for blog page 2