Bitrix component and module customisation - customization

I am working with Bitrix24. I want to customise the component and module of Bitrix24.
But I didn't have the standard documentation for this.
Some one help me for the same,how we can work with local folder for customise component and module etc.

If you need to change logic of component you may do through this way:
create the local folder in your documet_root path
create components folder in the local folder
create bitrix folder in the components folder
copy component folder from /bitrix/components/bitrix to
/local/components/bitrix
edit logic in the component.php file (or in class.php file if
component using new bitrix core - D7) in the copied folder
If you need to change only the view, this is another way:
Instead of creating the /local/components/bitrix you have to
create /local/templates/.default/ folder
Copy there only the .default template of a needed component
Edit template.php file
With the second way, you also may change (or rich it) some data in final $arResult array provided for the template.php, just create result_modifier.php file in the template directory.
You can find this and other information in the free course Bitrix Framework, pay attention to this link, it will be very helpful

Related

Is it possible to modify the templates used during creation of a C++ class by the Unreal Editor's Class Wizard?

I am starting a new project and it will require the creation of many C++ classes. In order to keep the project organized I created coded standards that will keep methods and member variables organized using regions, nothing too complex. However, I do not want to have to modify every new class I make adding the separators(regions) by hand or have to copy paste from another file.
In unity it is possible to modify the template used in the creation of a new script, but i am having trouble finding the same information for the Unreal Engine. I am not using source and if it is required to do so I will probably just copy paste it for every class.
I tried searching online for information on the subject, but the results were less than useful.
You can modify, create, and delete templates in Unreal Engine. Since you are not using Unreal Engine source, the templates are all located in the C:\Program Files\Epic Games\UE_{version}\Templates directory. If you are using Unreal Engine source, then the location will instead be {engine-location}\Templates. In these directories, you can modify the configs, the content, and the source code of each template. And of course, you can create new templates and delete existing ones.
If you do create a new template, then make sure that you do the following steps:
Move the project that you want to make a template out of to one of the Templates folders mentioned above depending on the verison of Unreal Engine you have (source vs non-source).
Update the ProjectName variable in your template's Config\DefaultGame.ini file.
Copy any of the existing templates' Config\TemplateDefs.ini file to your template's Config folder.
Modify the copied TemplateDefs.ini file, specifically the LocalizedDisplayNames and LocalizedDescriptions variables. These are the name and description of your template that show when the template is selected while trying to make a new project in Unreal Engine. Note that you may have to modify the other parts of the TemplateDefs.ini file depending on your project/template.
Lastly, add pictures in your new template's Media folder. Add one picture named {new-template-name}.png, which will be the icon of the template and another picture named {new-template-name}_Preview.png, which will be be the preview of the template that appears alongside the name and description after one clicks on the template icon while trying to make a new project.
For more information, check out these resources:
https://docs.unrealengine.com/en-US/Engine/Basics/Projects/CreatingTemplates/index.html
https://www.youtube.com/watch?v=MYM7iSh-uac

Testbox 2.1 - Skip an entire directory or CFC file

We want to create a HelperUtility.cfc with common methods for our tests to use. If we put the file in /tests/lib/HelperUtility.cfc, can we tell TestBox, don't try running any tests in /tests/lib? If not, can we add something to the component tag to skip the entire file, rather than adding skip to all the methods in the component individually?
There's no way to do that unfortunately.
I have tried to skip some manual mocks that were created inside a tests/mock folder, but you cannot configure TestBox at runtime to skip a specific folder if you decide to run the tests for a parent folder.
The only work around that worked for me was to create a specs subfolder in the parent tests and then call the testbox runner with a directory argument of the specs...
For example: http://localhost:8500/testbox/system/runners/HTMLRunner.cfm?directory=tests.specs

Set screenshot path from default project location to different folder location

I have a suite which has 50 test cases. When I execute my suite, I get all the failed screenshots listed in the project's folder. I want to point and store those screenshots to a different directory with the name of the test case. I wanted it to be a one time setup than doing it explicitly for every test cases.
There's quite a few ways to change the screenshots default directory.
One way is to set the screenshot_root_directory argument when importing Selenium2Library. See the importing section of Selenium2Library's documentation, and importing libraries in the user guide.
Another way is to use the Set Screenshot Directory keyword, which will do pretty much the same thing as specifying a path when importing the library. Though, using this keyword you can set the path to a new one whenever you like. For example, you could make it so that each test case could have it's own screenshot directory using this keyword. According to your question, this may be the best solution.
And finally, you may also post-process screenshots using an external tool, or even a listener, that would move all screenshots to another directory. Previously mentioned solutions are in most cases much better, but you still may want to do this in some cases, where say, the directory where you want screenshots to be saved would be created only after the tests have finished executing.
I suggest you to do the follow:
For new directory, you should put the following immediately after where you open a browser such:
Open Browser ${URL} chrome
Set screenshot directory ${OUTPUT FILE}${/}..${/}${TEST_NAME}${/}
For replace the screenshot name from the default to your own name, create the following keyword:
sc
Capture page screenshot filename=${SUITE_NAME}-{index}.png
Then, create another keyword and run it on Setup's test case:
Register Keyword To Run On Failure sc
In the above example, I created a new folder with the test case name, which create a screenshot (in case of failure) with the name of suite project name (instead of 'selenium-screenshot-1.png').

Laravel Admin Directory

I am trying to separate my admin code from my public code, I want to create 2 different directories in my app folder and resources folder, 1 directory named backend which contains all my admin code and another named frontend which contains public related code.
Each directory will have their own separate controllers.
Basically something like this:
-App
--frontend
--backend
-resources
--views
---frontend
---backend.
If there is a better way to do this i would also like to know.
By default you composer.json is autoload all in app. So you can make the structure which you described above.
Frontend and backend separating usually used for Controllers, in this case you need to make a correct namespace.
With views you would'n have any porblems. Just make a correct path when you calling your views.
For example:
view(frontend/index); // you can use dot instead of /

Magento programmatically appending code to template pages

I am developing a Magento extension and would like to run some jQuery script in the footer of the html template.
I have manually edited page.xml layout file to load my jQuery source and manually edited the footer.phtml template file to test my code, but I now want to package it up into an extension. The question is how to do this within my extension configuration, to tell magento to load the new jQuery source library in the header, and to append code somewhere in the footer (or anywhere) in the magento generated theme html.
Create a custom Magento Module
Use this module to add a customer Package Layout Update XML File
Use this Package Layout Update XML files to add a javascript src link to a (CDN?) jQuery, and add a custom block to the before_body_end block
Use this custom block to output your needed Javascript code
Use Magento Connect System->Magento Connect->Package Extensions to package up your customer Magento Module file, as well as any other files on the system you used (phtml template, jQuery files if not using a CDN, etc) into an Extension.
Wouldn't it be easier to use a static block? This way the client or yourself could update the jQuery right in the admin area without going into code. You could also add logic with multiple blocks if you needed. You can display a static block in a template like so:
<?php echo $this->getChildHtml('staticblockname') ?>
Otherwise you might want to read this tutorial on creating a module (which you call an extension): http://magento4u.wordpress.com/2009/06/08/create-new-module-helloworld-in-magento/