Drupal Delta node/block template suggestions - drupal-theming

From reading the documentation, you can dynamically theme Drupal blocks and nodes by adding template files: "page-node-1.tpl" or "block-modulename-2.tpl".
How do i know the delta value(in this case 1 or 2) to create a template file for node or block?
Do these delta values keep changing?
What assigns these delta values and when?

Go to admin/build/block, then move
cursor over any 'configure' link in
the block list.You'll see for
example
'admin/build/block/configure/views/news-block_2'
path. It means this block provided
by 'Views' module and has delta
'news-block_2'
No
Modules

Related

Can CPACK_INSTALL_CMAKE_PROJECTS be used for selective install?

For my application, I created 4 components, and want to 'install' only the applications and their docs. According to https://cmake.org/Wiki/CMake:CPackConfiguration, if in my config file I have the line
set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_CURRENT_BINARY_DIR};${CMAKE_PROJECT_NAME};ALL;/")
then all the four components are installed. If I use the component names instead like
set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_CURRENT_BINARY_DIR};${CMAKE_PROJECT_NAME};apps docs;/")
I receive a package with no component name appended, and it contains the top level requested directory but no files at all. If I provide only one component like
set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_CURRENT_BINARY_DIR};${CMAKE_PROJECT_NAME};apps;/")
the package name does not contain the name of the component, but the files are generated in their right position.
What do I wrong?
EDIT: Just to add more strange things:
For the ALL case 4 files with names install_manifest_+comp name are created. For the second case I have install_manifest_apps docs.txt of zero length, and for the third case I have install_manifest_apps.txt, with the right content.
It seems to me that the macro can only accept one argument which can be either ALL or a component name; this means it cannot be used to install a 2-component system.
Moreover: if I use a component name, make package only produces that one package, without appending the component name, but with the right content. Till now I guessed that make install and make package are independent.
Set multiple values to CPACK_INSTALL_CMAKE_PROJECTS, one for each component you want to include:
set( CPACK_INSTALL_CMAKE_PROJECTS
"${CMAKE_CURRENT_BINARY_DIR};${CMAKE_PROJECT_NAME};apps;/"
"${CMAKE_CURRENT_BINARY_DIR};${CMAKE_PROJECT_NAME};docs;/"
)

Jmeter : Number of active threads

I am using jmeter in elemetery freya (14.04)
I have a jmeter test plan with view results tree
I am trying to generate a csv file in view results tree including the number of active threads field.
It appears to me that the detail is being entered in the result.csv file, but the values representing this attribute has no field name, and hence that detail cannot be used in a graph which I want to create from the result.csv
I have changed JMETER-INSTALL-DIR/bin/jmeter.properties according to https://jmeter-plugins.org/wiki/PluginInstall/#Configure-JMeter
How can I get a result.csv file with a suitable fieldname like "active-threads"
Don't change anything in jmeter.properties file, upgrade to new JMeter version will discard your changes. Use user.properties file instead
The in order to add column names to CSV file add the following property to user.properties file:
jmeter.save.saveservice.print_field_names=true
Assuming good configuration you should be seeing grpThreads and allThreads columns along with the values.
See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of working with them

Prestashop 1.6 custom module how to add custom input and table in Configuration at Back Office

I am trying to create a custom footer module for my site, It is my first time to create a module in prestashop 1.6 and I read about this article
http://doc.prestashop.com/display/PS16/Adding+a+configuration+page
my problem is i cannot fully understand if I need to create a custom table for my module or not
Configuration::updateValue('FOOTERCUSTOM_NAME', $footercustom);
as you can see in this code, the Configuration table is already created and Configuration::updateValue is a default prestashop code
if I wanted to create a input 1 , input 2 and input 3 at our configuration page in module backoffice and it automatically output the data in the database at my hookfooter.
what is the proper way of doing this?
Note that I already succeeded in creating a basic module, my main problem in how to insert data on my database using the configuration in my module
You don't have to a create a custom table. With the Configuration::updateValue method you can store/update values in the ps_configuration table and you can retrieve these values with the Configuration::get and Configuration::getMultiple methods. Values can be removed with the Configuration::deleteByName method.
Example:
Configuration::updateValue('FOOTERCUSTOM_INPUT_1', $input1Stored);
$input1Retrieved = Configuration::get('FOOTERCUSTOM_INPUT_1');
You can refer to this guide as well, still valid
http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module#CreatingaPrestaShopmodule-ThegetContent()method

Single file versioning best practices?

User is selecting rather hefty single XML files via an NSOpenPanel. The application is making moderate changes to the file so I'd like to include an option of creating a backup in a subfolder based on the directory the original file was selected. Creating the new subfolder is no problem but does anybody have a good way to to create a backup of said foo.xml, is there a practice for such thing or is it as simple as creating a duplicate and renaming it foo.back01.xml?
Not sure, how much this Approach will fit with your requirement, but this is what i was doing,
-- Have a directory in the Temporary folder of the System : Assuming once the Application is closed all this files will be deleted,
-- To have the uniqueness in the file, generate file name with following pattern , have a function say [+(NSString *) generateFileNameForExtension:(NSString *)extension Create:(bool)bCreate]
Assuming input is .xml and false , it might give fileName something like this,
AppName128908765445.xml , i.e. [AppName][UTCTimeStamp].[Fileextension]
-- Once you think its done, there could be Function call [self addToDeleteList:(NSString *)fileName] which will add a file to delete list,
-- There would be a function, which shall invoke a timer for 1 minute and every one minute it will read all the files gets added into delete list then delete it.
Will share the code with you if needed...

Getting the data from backend to display it on Front end in X-CART

I am working on a X-Cart Module. I need the backend configuration values to the front end. In admin/configuration file I have created an array which contains the value which I need to use it in adv_search.php which is in the root folder. I don't know how to pass that array to adv_search.php.
Thanks in advance.
It is not quite clear how you store the configuration values. It may be easier to store them in the table xcart_config and access them directly as $config['Option-category']['option_name'] in php files and {$config.Option-category.option_name} in the Smarty-templates.
Or just define an array in module's config.php file and this array will be available everywhere in php-scripts. Look at the modules/UPS_OnLine_Tools/config.php file for example.