I want these window functions be allowed globally and not with every session or query. How do I set them up? I need them to be run in materialized views on background, is this yet working? I've set one materialized view with them and it is not filling up, but side "insert into" query with the allow flag =1 fills it. So it has to be allowed globally as I understand. Please advise. Thanks.
$ cat /etc/clickhouse-server/users.d/allow_experimental_window_functions.xml
<?xml version="1.0"?>
<yandex>
<profiles>
<default>
<allow_experimental_window_functions>1</allow_experimental_window_functions>
</default>
</profiles>
</yandex>
Related
I made eclipse plugin and it has marker view.
the view has 'configuration contents' which is marker filter configuration.
in the filter configuration, 'show all items' are checked by default, but I want to uncheck this option and to check my customized option.
how could do this? please help!!
Thank you so much!
Because the internal bits are not exported, it is very impractical to implement this in code, but you can use some obscure configuration tricks to inject a "user-defined" problems pane filter into your custom problems view.
Create a custom marker view (http://goo.gl/zpf9CO). Record your view ID.
If you don't already have one, create a "preferenceCustomization" element in your product definition in plugin.xml.
<extension id="product" point="org.eclipse.core.runtime.products">
<product application="com.example.product.application" name="App">
<property name="appName" value="My App"/>
<property name="preferenceCustomization" value="plugin_customization.ini"/>
<property name="applicationXMI" value="com.example.product.application/Application.e4xmi"/>
<property name="applicationCSS" value="platform:/plugin/com.example.product.application.branding/css/default.css"/>
</product>
</extension>
Add the following key to your plugin_customization.ini file (assuming view ID is "com.example.product.application.view.problems". The key should look like it is unnaturally smooshed together, and the whole thing should be on one line):
org.eclipse.ui.ide/org.eclipse.ui.internal.views.markers.CachedMarkerBuildercom.example.product.application.view.problems=<?xml version="1.0" encoding="UTF-8"?><prefs markerLimitEnabled="false"><filterGroup scope="3" enabled="true"></filterGroup></prefs>
Modify the entry based on desired traits.
markerLimitEnabled is "true" if you would like a number limit to apply to the number of markers, or "false" otherwise.
markerLimit sets the maximum number of markers to show. It is ignored if markerLimitEnabled is false.
scope sets which resources' problems, based on current selection, will be displayed. This is an integer.
A value of 0 (zero) will show all problems from all workspace resources.
A value of 1 (one) will show problems for the selected resource.
A value of 2 (two) will show problems for the selected resource and its descendants.
A value of 3 (three) will show problems for all resources within the selected resources' projects.
A value of 4 (four) will show problems for all resources within the current working set.
enabled is "true" if you wish it to apply to the problems pane by default. "false" if you do not wish this.
Child elements of filterGroup elements are useful for specifying which columns to display, and (possibly) their column widths, but I have not delved into this aspect.
For more information, check out the Eclipse source code of MarkerFieldFilterGroup (especially loadSettings()) and MarkerContentGenerator (especially loadFilterSettings()).
if getChildHtml('product_type_data') ?> maps directly to catalog/product/view/type/simple.phtml by default, how do I map to my own file? If I wanted to create a file that would produce a small image to place on the product page, right under "availability" how would I tell magento to map to where I have put the file? From what I understand getChildHtml('product_type_data') ?> defaults to the file path: catalog/product/view/type/simple.phtml so how can I customize the magento defaults and tell it to map to my custom files i've created?
Could I do something like getChildHtml('etc/etc/my-file.phtml') ?>
Essentially, what I am trying to do is add a small image under "availability" of my site (ex: http://climbhigh.com/climbing/climbing-ropes/petzl-dragonfly-rope-8-2mm.html) that says free shipping. Just trying to find the best way to do it.
I hope I have explained this well enough, if not, please let me know and I will try to explain more. Any help or guidance would be awesome. Thanks.
The code getChildHtml('product_type_data') doesn't always map directly to the template file catalog/product/view/type/simple.phtml. It only maps to that file if the layout handle PRODUCT_TYPE_simple is loaded, i.e. if the current product is a simple product. In order to change the template to be a different one you need to update the template attribute in the layout. At it's most simple this can be achieved by editing app/design/frontend/base/layout/catalog.xml and changing the template attribute.
<block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="your/new/path.phtml">
Of course editing core files is a bad idea, so you should make a quick search for how to correctly add layout updates via either local.xml or customer layout update files.
I ended up figuring out what I needed to do. I simply wanted to add a small image to my product detail page that highlight a free shipping option. All I had to do was create a static block in the admin panel of magento and go into catalog>product>view.phtml file and insert:
getLayout()->createBlock('cms/block')->setBlockId('your_block_id')->toHtml(); ?>
it worked like a charm!
thanks for the help Crags
a simple question.
In magento, when going to System / Configuration there are some main tabs in left navigation.
General, Catalog, Customer, Sales, Advanced, etc.
I wonder what xml set the order for those? I would love to have Advanced somewhere on top.
Looking at the Mage/Core/etc/system.xml file, I see this near the top:
<config>
<tabs>
<general translate="label" module="core">
<label>General</label>
<sort_order>100</sort_order>
</general>
<service translate="label" module="core">
<label>Services</label>
<sort_order>99999</sort_order>
</service>
<advanced translate="label" module="core">
<label>Advanced</label>
<sort_order>999999</sort_order>
</advanced>
</tabs>
...
</config>
I'm guessing (but haven't verified) that changing the sort_order parameter in this file will change that order for you.
Hope that helps!
Thanks,
Joe
So What I have found is when some Magento extensions are installed they will have etc/system.xml file with the line in it
<sort_order>100</sort_order>.
This will compete with the same line in Mage/Core/etc/system.xml, so the configuration menu under system will be out of order compared to the fresh install order.
The problem is locating and editing all of these XML files. They will all be structured like /etc/system.xml, but it is too easy to mistake the wrong file and loose track if the wrong file gets mangled (been there, done that).What I did was set up a text search for on specific thing all these files have in common that would not be similar in other /etc/system.xml files. This would be the <label>General</label> portion of the XML file. However using the header title may lead to more confusion so I picked the first or second sub menu name. For example on of my extensions is TBT Corp Extension's "Enhanced Product Grid", so the gave me the search <label>Enhanced Product Grid</label>. The point being I used text that unique to the extension and not in common with other labels.
This gave me the right /etc/system.xml in /app/code/community/TBT/Enhancedgrid/etc where I found this;
<tabs>
<tbtall translate="label" module="enhancedgrid">
<label>TBT Corp Extensions</label>
<sort_order>100</sort_order>
</tbtall>
</tabs>
As you can see with the sort order of 100 it will end up near the top of the sort order, so changing it to 300 or greater (301, 400, 401) put things back in order. Doing this systematically throughout my site gave me what I want. I had many of these to do, so perhaps my next step would be a second search and do a command line to make an immutable file chattr +i filename to add immutable (a minus to undo immutable), so some update will leave them as is or give an install error?
In final some of the extensions had multiple labels under their Title so some had to be found and sorted be the extensions group Title. Also I had to go back to /app/code/core/Mage/ModuleName and since "General started at '100' and "Catalog" started at '200' and "Customers" started at 300' and so forth, I change them respectively to '100', '102', '103' down the line to put them first. So/app/code/core/Mage/Sales/etc/system.xml I put is at '104' so it was closer to the original order upon install. Very IMPORTANT would to save a backup right in you folders, but do it like system.xml.backup and not like backup.system.xml otherwise Magento will load anything ending in ".xml"
My hope is this not only helps but somewhat of a short guide!
You need to set these on a per attribute-set basis by dragging the folders up and down in the attribute-set-manager (in products menu of admin).
There are two ways of editing the tabs on the product edit page, the first few tabs are managed by the attribute group order (as Mathew pointed out). The second bunch of tabs are added directly in the code via adding a tab in the block.
So there are two ways of modifying those tabs.
Change the order of the attribute groups within the attribute set (using the GUI)
Extend the Tab block, Core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php, and manually change the order of the tabs.
Within the block you can add your own custom tabs as well using $this->addTab()
Is it possible in Magento to conditionally add blocks into a layout xml file?
Im thinking along the lines of having an admin config option checkbox - if checked then a block needs to be added to the page and vice versa if not checked.
I could think of a way of doing this via code but not the actualy layout file system itself.
The ifconfig paramater can be used to conditionally call an action method
<action method="someBlockMethod" ifconfig="path/to/config"><param1>value</param></action>
The path/to/config path is passed to Mage::getStoreConfigFlag() to return a boolean.
I'd try using this in combination with the insert method
<action method="insert" ifconfig="path/to/config"><param>block_name</param></action>
The block with the name or alias of block_name will need to be already inserted into the layout object by other PHP or XML, so you may need to take additional steps to unset it from its original blocks after inserting it into your new block.
you can try this (i haven't tried it myself):
<action ifconfig='your/extension/active'
Here is what I think about Magento (plz correct me if I am wrong )
1)Each module has its own layout.xml stored in /interface/theme/layouts/ folder.
2)Magento loads all these layouts for current theme and creates a big xml file.
Now what I am confused at .
a)If magento loads /default/default/ (interface & theme) then why all the templates & layouts are inside base/default/ ??
b)what if I create my module name “page” inside my namespace “Jason” i.e Jason_Page , now what will happen to blocks in layout files which are named
c)Since all the layouts are loaded and merged into one big xml file , then what happen to all those reference blocks which have same name attribute and are inside “Default” handle tag ?
e.g
d)what is Local.xml layout for and its use ??
e)wats the relation ship between a module name foo , and its layout name foo.xml ?
What will happen to layout.xml if two modules with same name exist in diff namespace ?
Thanks in advance .
1) Each module can choose to define layout files that go into the /interface/theme/layouts/ folder. You can accomplish this by specifying the layouts in your module's config.xml file like this:
<frontend>
<layout>
<updates>
<jason_page>
<file>jasonpage.xml</file>
</jason_page>
</updates>
</layout>
</frontend>
2) Yes.
a) Magento's interface is built using descendency. Templates and layouts are first taken from your chosen interface and theme, and if not found there, will be taken from base. This allows you to define only those things that change from the base when creating a new them.
b) If you create a new module with blocks, you will specify the classpath for those blocks in your config.xml:
<global>
<blocks>
<jason_page>
<class>Jason_Page_Block</class>
</jason_page>
</blocks>
</global>
This will define the tag jason_page to refer to your blocks. Then, when defining a layout, you will reference your blocks as:
<block type='jason_page/blockname' as='blockname' name='blockname' />
And your blocks will be named as: Jason_Page_Block_Blockname in /app/code/local/Jason/Page/Block/Blockname.php
c) Each time you use a <reference> tag and add some child blocks, they are added to the large tree as you say. Make sure to use different name/as tags for the blocks, and you'll be fine. If the name is identical, you will probably cause errors.
d) local.xml (in app/etc) defines some configuration parameters for your site, such as database connection information and encryption keys. it doesn't have to do with layouts.
d part 2) Since you define your layout files, including their names, it's up to you to not cause collisions. Choosing a module name more unique than Page would go far here. If you do have a module with the same name as a default module (e.g. Page), prefix the file with your namespace when declaring it in your config.xml file.
Hope that helps!
Thanks,
Joe
Just to add to Joe's answer, you can have interface/theme/layout/local.xml file, and it will be loaded after all other core and module layout XML files.
Use this file for local theme customizations.
I just recently wrote a post about how to use static blocks. Here is the meat of it:
Step One: Create Static Block in Your Magento Admin
Magento Admin Panel—>Static Blocks—>Add New Block
1) Name your Static Block, in this case Custom footer Links
2) Label the Identifier (This is the link you will use to call the block later) in this case, custom-footer-links
3) Choose what store view you would like it to render in
4) Set Status to Enabled
2)Now for the fun part! Add your navigation links to the block. Make sure to use to make them match your sites color and theme.
Step Two: Inserting Code to Call the Static Block
This part is going to require you to FTP into your Magento site and modify footer.phtml
app—>design—>frontend—->default—>(your template)—>template—>page—>footer.phtml
Find where in the footer you want your navigation links to display and insert:
getLayout()->createBlock(‘cms/block’)->setBlockId(‘custom-footer-links’)->toHtml(); ?>
Now most of the time the Static block should display just fine but in some cases you are going to have do some extra steps to have the block display.
1) Instead of inserting:
getLayout()->createBlock(‘cms/block’)->setBlockId(‘custom-footer-links’)->toHtml(); ?>
Use:
custom-footer-links
2)Modify catalog.xml
app—>design—>frontend—>default—>f002—>layout—>catalog.xml
Add under
custom-footer-links