How to get Typoscript Setup parameters into an extension's PHP code, or how to send Typoscript parameters to PHP code, or passing parameters to PHP code.
Here is an example of Typoscript in the 'Setup:' portion of the 'Template' back-end module for a page that implements the pillarstore extension plugin:
plugin.tx_pillarstore_pi1{
approvalCode = 0
orderFormPID = 100
orderStoragePID = 200
addEditUserAccountPID = 300
contactUsPID = 400
memberGroup = 10
emailFromName = PillarLogic, LLC
emailFromAddress = email@mycompany.com
paymentAddress1 = My Company Name
paymentAddress2 = 123 Sesame St.
paymentAddress3 = Anytown, WI 55555
}
And here is the PHP code in the pillarstore extension plugin file class.tx_pillarstore_pi1.php that gets the values from the Typoscript Setup:
// TYPOSCRIPT SETUP PARAMETERS
// These values are passed in from the Typoscript Setup
// and should not be changed during script execution.
$approvalCode = strval($conf['approvalCode']);
$orderFormPID = $conf['orderFormPID'];
$orderStoragePID = $conf['orderStoragePID'];
$addEditUserAccountPID = $conf['addEditUserAccountPID'];
$contactUsPID = $conf['contactUsPID'];
$memberGroup = $conf['memberGroup'];
$emailFromName = $conf['emailFromName'];
$emailFromAddress = $conf['emailFromAddress'];
$paymentAddress1 = $conf['paymentAddress1'];
$paymentAddress2 = $conf['paymentAddress2'];
$paymentAddress3 = $conf['paymentAddress3'];
// END OF: TYPOSCRIPT SETUP PARAMETERS
This is assuming use of the WEC starter package.
web server:
local copy:
server copy:
.htaccess file example (the last two lines are for strict https):
RewriteEngine On
RewriteBase /
RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|favicon\.ico)/ - [L]
RewriteRule ^/typo3$ typo3/index_re.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
The Typo3 front-end indexing can be seen in the back-end with the 'Info' module. Select the Info module then click on a page to see its indexing. There some select boxes on the right, and the top one needs to be set to 'Indexed Search.' To see as much as possible at one time, click on a Web site root page and select the 'Words and Content' view & 'Infinite'.
To re-index all pages immediately, clear the indexing by selecting the 'Technical Details' view and clicking the trash-can icon next to 'phash'. To re-index, LOG OUT OF THE BACK-END and visit each page in the front-end that needs to be indexed. They will index immediately.
Individual pages can also be re-indexed, first by selecting the page, then clicking the trash-can icon next to that particular section, then LOGGING OUT OF THE BACK-END and visiting those particular pages in the front-end. They will index immediately.
Otherwise there is a minimum wait time before a page will be automatically re-indexed, which is specified in the settings of the 'Indexed Search Engine' extension plugin. The settings can be changed by going into the 'Extension Manager' back-end module and selecting the plugin.
There are four places in my usage of the mm_forum extension where I wanted to change the date format: The 'last ten topics' date, the 'last edited' date, the 'registered since' date, and the 'last post' date. I found four things that I needed to modify: