typo3,constants , Where are TYPO3 constants from constant editor stored?

Where are TYPO3 constants from constant editor stored?


Tag: typo3,constants

In Typo3 Backend -> Template -> Constants there is a constant editor.
Where does TYPO3 saving the constants?

Tried an fgrep -ri for an existing pattern, in case of saving to filesystem - no matches.
Tried an MySQL search for an existing pattern, in case of saving to DB - no matches.

Using V6.2 at the moment, but should be indifferent.


The constants set in the constant editor are stored in TypoScript syntax in the field constants of the table sys_template.


Android Constants

I am working on some old code that we pulled from a decompiled APK (no one has the code base anymore, just the APK from our developer account). There is a line of code in it: localAlarmManager.setRepeating(3, 10000L + SystemClock.elapsedRealtime(), 25200000L, localPendingIntent); What are the Android constants that would be...

Ruby on Rails - Source a file and save ENV variable as global

I have an API key which I've saved to /home/user/api/keys that I would like to save as a global variable in my Rails app. I thought this would work, this is my config/initializers/my_constants.rb: `source "/home/user/api/keys"` API_PASS = ENV["API_PASSWORD"] And this is /home/user/api/keys (without the real value, obviously): #!/bin/bash export API_PASSWORD="--------"...

Swift constant that depends on another constant

I'm attempting to create a constant that depends on another in the following way: class Thingy { let paddingConstant = 13.0 let paddingDict = ["padding": paddingConstant] } The bottom line gives me an error "Thingy.Type does not have a member named 'paddingConstant'". Is it possible to declare a constant that...

Powering a Math constant in Julia is slow

I'm pretty sure this has to be a bug... Ok, so basically, when I pass a Math Constant type to the power (^) function and iterate it several times... The loop is really slow and uses a lot of memory allocation. The example is trivial as it doesnt produce any...

Routes for TYPO3 Neos plugin

I'm trying to define routes for my plugin. Everything is working as it should, because I got pretty URL on output, but unfortunately while I'm trying to access it I get an 404 error with message: #1303209195: No controller could be resolved which would match your request. Package key: "",...

TYPO3-Upgrade 4.5 to 6.2: namespaces

I'm updating an old TYPO3 to latest verison 6.2.12. As I do so I replace deprecated classes with the proper namespaces. E.g. t3lib_div to \TYPO3\CMS\Core\Utility\GeneralUtility or t3lib_extmgm to \TYPO3\CMS\Core\Utility\ExtensionManagementUtility. But I cant find the proper namespaced class for t3lib_svbase. Any suggestions? . And I absolutely have no clue what I...

Declare a php constant within a php variable

I have the following code: <?php $background_holder = echo get_bloginfo('template_directory');'/images/banner.jpg';?> background-image: url("<?php echo get_theme_mod('header_background_image', $background_holder;); ?>"); I'm trying to set a constant for the $background_holder and then add it to the background image variable. I'm sure I've just written something slightly wrong, but currently this does nothing....

Why final Byte as a case in switch statement doesn't compile?

byte a = 125; final byte b = 2; final Byte c = 3; switch (a) { case b: // works fine break; case c: // Constant Expression required break; } Since cis a final variable, isn't it a compile time constant and hence a valid case label?...

Hide typo3 content elements for specific user(groups)

I want to "hide/deactivate" the table element for specific users/usergroups in the typo3 BE. Or to be more clear: I want to ONLY allow it to ONE specific user (admin). How can i do that? NOTE: At the moment the table element is deactivated in the global TS-config via tt_content...

Constants in C: declaration separate from definition

All C code: Why is this allowed: int main() { const int *i; int j=2; i=&j; } But not this: int main() { const int i; int j=2; i=j; } Is there a way to declare a local constant variable and then define it elsewhere within the scope? The first...

How to disable cache for a image carousel in TYPO3

My TYPO3 extension has a lib that generates random 5 images from the total stock, for example out of the 100 images. This is done randomly every time the page is loaded. Only default the TYPO3 cache is enabled so every time the same 5 images are showed. As the...

TYPO3 Solr extension and facets

I have a small question about TYPO3 solr facets.At present in my website I have 6 different indexing configuration available. Two of them are custom extension table's and one is tt_news and rest of the 3 are pages table with some custom condition. I managed to add this using additionalWhereClause...

Swift optional values during initialization preventing default initializer inheritance

In Swift: 1) If you provide a default value for all of the stored properties in a class, then you inherit the default initializer, ie - init(). -- AND -- 2) A property of any optional type defaults to the value of nil, ie - var shouldBeNill: String? //should initially...

How to assign variable in fluid?

I want viewhelper that can be helpful to assign variable in fluid, I dont want variable to be passed from controller.

Show Typo3 FlexForm checkbox items inline

Would it be possible to show the checkboxes inline, so behind each other with a FlexForm? I'm now using the following code, but this shows every setting in a vertical list. <settings.ownchoice_for_sale> <TCEforms> <label>For sale</label> <config> <type>check</type> </config> </TCEforms> </settings.ownchoice_for_sale> <settings.ownchoice_reserved> <TCEforms> <label>Reserved</label> <config> <type>check</type> </config>...

How to get Query object to felogin repository?

i need Query object of TYPO3\CMS\Felogin\Controller\FrontendLoginController in my extention repository so i can create my own query conditions.

what is the difference between constant variables and final variables in java? [duplicate]

This question already has an answer here: Difference between Static and final? 8 answers Please help me understand the difference between the constant variables and final variables in Java .I am a bit confused with it....

TYPO3 Extbase build own Sitemap

There are a lot of sitemap Generators for TYPO3 in the TER available. But none of them can handle Sites created by Extbase, which are not shown in the TYPO3 page tree. Edit Thanks to biesior, detailed informations: Unconventional I switch in TypoScript the GET Parameter for my Extbase extension[globalVar...

How does my frontend usergroup list get lost between Extbase action controller and Fluid template partial in TYPO3 6.2?

I'm using TYPO3 CMS 6.2.12 and Extension Builder 6.2.0 to model a Report class and build an extension to manage it. One of the domain driven design requirements is that a report author be a logged-in front end user. A second requirement is that the author choose a single group...

Why isn't a final variable always a constant expression?

In the below code: final int a; a=2; byte b=a; // error: possible loss of precision Why do I get this error? Isn't a final variable compile time constant expression and hence implicitly narrowed to byte during the assignment? In other words isn't the above code equivalent to: final int...

Why does this code works well? It changes the Constant storage area string;

this is a simple linux kernel module code to reverse a string which should Oops after insmod,but it works well,why? #include <linux/init.h> #include <linux/module.h> #include <linux/kernel.h> static char *words = "words"; static int __init words_init(void) { printk(KERN_INFO "debug info\n"); int len = strlen(words); int k; for ( k = 0;...

How to use Hook “processDatamap_postProcFieldArray” in TYPO3 6.x

Use case: When saving an object (in backend, maybe in frontend too later) I want to manipulate values before saving to database. Problem: The file seems to get included (shows an error on save if I choose a wrong file path) but the function does not seem to be executed...

How can a constant be defined without using a literal?

I'm struggling to understand how a constant can be defined without using a literal. Does final int A = 1 + 1 count?

Replace URLs in Typo3 DB

So I have a Site created with Typo3. I also have a domain which is linked to the folder of the Typo3 Installation. www.example.org I created a Subdomain and linked it to the same folder and used the Main Domain for something else. But now everything on the Subdomain still...

Using eval() to check if global variable isset

I am trying to check defined variables based on passing a single portion of the variable. (The rest of the variable is static and all other portions of it are the same), so I made a test to find out if this is possible. It does not work, but perhaps...

tt_news single view with static news_id

I am using Typo3 Version 6.2 with the plugin tt_news. All I want to do is: Have a simple page on my website On that page I want to have a tt_news single view the news_id of this view should be static (set by me) and NOT by GET variables...

typo3 flow persist updated relation

I have an issue TYPO3 Flow updating my relations. Am I wrong, that Flow should update changed relations automatically, so I don't have to update the related entities with the respective repository? Example 1: I have a model "Project" with multiple "Job" childs on attribute "jobs". If I do: $project->setJobs($collectionOfJobs);...

typo3 templavoila check current language

Hi i have 4 languages in my typo. Here is my main configuration for them: #LANGS config.linkVars=L config.defaultGetVars.L = 0 config.sys_language_overlay = hideNonTranslated [globalVar = GP:L = 3] config.sys_language_uid = 3 config.language = en config.locale_all = en_EN config.htmlTag_langKey = en plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 3 [globalVar = GP:L = 2] config.sys_language_uid =...

Read constants from command line as global variables

In my program I have defined a header constants.h where I define constants that will be used in my program, which contains multiple classes. No I would like to read the constants from the command line and initialize these constants such that they can be used in the same way...

userfunc condition for detecting mobile device

Since TYPO3 7 the condition 'device' and 'useragent' are deprecated. No I'm looking for a userFunc to use as a condition for detecting mobile devices. My aim is to hide or to show some special pages on mobile devices. I used the extension 'contexts_wurfl' for a while but I guess...

How to get typo3 settings in the utility files?

plugin.tx_xxx { setting { storagePid = 23 } } I want this typo3 settings in utility file. Please help me....

htaccess and authentication for multiple domains

I am running a mutlisite TYPO3-Site. For the pre-live process, I want to add a htaccess with a htpasswd for 3 / 4 sites. How can I configure the htaccess-file to trigger the authentication only for specific urls? For example: http://example.org shouldn't get a password-protection, while http://example2.org should. Both sites...

Swift: Declaring a constant in a subclass but still have a reference to it in the superclass?

Let's say you had the class Apple with several subclasses. class Apple { let color = "" } class redDelicious :Apple { let color = "Red" } class grannySmith :Apple { let color = "Green" } func eatApple (appleToEat: Apple) { if appleToEat.color == "Red" { //do something } else...

Notice: Undefined index: $error in C:\wamp\www\btb_sandbox\upload_2.php on line 35 [duplicate]

This question already has an answer here: Reference - What does this error mean in PHP? 28 answers I'm having this kind of Error stated below, I don't understand completely about it. If I press upload button without selecting files! Notice: Undefined index: $error in C:\wamp\www\btb_sandbox\upload_2.php on line 35...

Language detection not working in Typo3 6.2.12

I've a website which has 2 languages: German (de) as default and English (en) as translated. I am trying to implement language detection functionality in the website using the extension "rlmp_language_detection" version 7.0.0. What I want to achieve is, for the countries Austria (at), Switzerland (ch) and Germany (de), the...

Is there any way of protecting a variable for being modified at runtime in C?

I was wondering if there is any way of protecting a variable for being modified once initialized (something like "constantize" a variable at runtime ). For example: #include <stdio.h> #include <stdlib.h> int main(void) { int v, op; scanf( "%d", &op ); if( op == 0 ) v = 1; else...

Can I declare only specific elements of an array as constant? (C/C++/Fortran)

Scenario: I pass e.g. a 2D matrix as argument in a function and I would like to be able to read and change all the elements, BUT I would like to prevent any accidental writting in let's say the last column. So I would like somehow to tell the compiler...

File url [tmp_name] after upload via Typo3 backend

I'm building a typo3 extension and in a backend plugin I want to build a image upload form. I seem not to get the correct $_Files url. The following fluid form is used: <f:form action="customerSliderImages" id="customerSliderImages"> <f:form.upload name="custSlider[sliderimage]" /> <f:form.submit value="Upload" /> </f:form> I want to have the [name] and...

Typoscript add class to the first element using stdWrap

I have a custom requirement to display an image slider using TypoScript. The images are taken from default tt_content image content element. I've added the following TypoScript code to implement this; lib.homeslider = COA lib.homeslider { 10 = CONTENT 10 { table = tt_content select { where = colPos =...

Where are TYPO3 constants from constant editor stored?

In Typo3 Backend -> Template -> Constants there is a constant editor. Where does TYPO3 saving the constants? Tried an fgrep -ri for an existing pattern, in case of saving to filesystem - no matches. Tried an MySQL search for an existing pattern, in case of saving to DB -...

How to use constant powers of 2 readable in c++?

I need several integer constants with 2^n and 2^n - 1 in my GNU c++ code. What is a good practise to keep the code readable? The code uses decimal values at the moment 4294967296 and 65536 which is hard to debug in future. 2^12 is not implemented in standard...

Using FAL in Extbase correctly

Domain model class Image extends AbstractContent { /** * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference */ protected $file; /** * Gets the image file * * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference */ public function getFile() { return $this->file; } /** * Sets the image file * * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $file * @return void */ public function setFile($file)...

How to check to see if a function in R is a constant function?

An R function is passed to me, which is defined on some interval of the Real Line and returns a numeric value. Is there a way to check to see if the function is constant? Example functions: f1<-function(x) {11} f2<-function(x) {x+2} f3<-function(x) {1+1} f4<-function(x) {return(3)} I am looking for a...

Can the constants be defined inside a model file of a framework in PHP?

I'm using PHPFox framework. I've to define two constants which would be used only by two functions present within that model class file. So can I define the constants at the beginning of this model class file or would it cause any issue or is it against the coding standards?...

Array of constant pointers to functions

I want to make an array of constant pointers to functions. Something like this: #include <stdio.h> #include <stdlib.h> int f( int x); int g( int x ); const int ( *pf[ ] )( int x ) = { f, g }; int main(void) { int i, x = 4, nf...

How to access a variable from a H file

I'm defining some variables in a Constants.h file. #ifndef Constants_h #define Constants_h static NSString *SERVER_IMG_URL = @"http://localhost/img"; ... If I import Constants.h in a M file. How I can access to SERVER_IMG_URL?? I want to use it, to not repeat the url in all files, only call this variable. Because,...

Typo3 6.2: “Could not find a suitable type converter for ”String“ ” exeption after update

Typo3 was from a very old version updated to Typo3 6.2. The most things are working now, but I have one own written extension that give me the following error: Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1297759968: Exception while property mapping at property path "":Could not find a suitable...

Interface constant declaration example in Java's SDK

Is there an example of an Interface in Java's built-in library (JDK) that contains a constant field? From the documentation, constant declaration can be defined in interfaces, but I can't remember seeing such. public interface OperateCar { // constant declarations, if any ... } ...

google sitemap for tx_news records with dd_googlesitemap_dmf (or alternative)

I try to let typo3 generate a sitemap for all the news records. For that I tried the dd_googlesitemap_dmf extention. The dd_googlesitemap works (it creates a sitemap for all the typo3 pages - but not for extensions). I filled in the basic infos into the configuration and called the url...