What is it? [[++[[*context_key]].yaKey]] (ModX) - seo

I need to change value of SEO-goals (onclick) on the multi domain website. And I found this thing on the project server(MODX): onclick="yaCounter[[++[[*context_key]].yaKey]].reachGoal('something'); return true;" And if I change this text it changes everÿwhere. What is the best solution to make it works?

[[++[[*context_key]].yaKey]] - this is tricky solution for multidomain sites. First modx set [[*context_key]] and for web context this means you get - [[++web.yaKey]], and then modx get web.yaKey system setting and set it to the page. So - you need to create system setting for every context with the name "context_key.yaKey".

Related

Set Internet-Explorer Homepage "once" via GPO

I want to set a Homepage via GPO. I know this can be done in
Preferences\Control Panel Settings\Internet Settings
The problem is that if I change the standard Homepage there it will always set it to that page after every logon, regardless if the user changes the homepage in the meantime.
I however want that it is only set once (i.e. google.com) and if the users changes it (i.e. to bing.com) it should stay on bing.
Can you tell me how this can be done?
Edit:
https://technet.microsoft.com/en-us/library/jj822332.aspx
"Group Policy preferences. You can use Group Policy preference settings to configure options that users can change later."
This is actually what I want to do. I set a preference and then the user can change it to something else later. However - setting it works fine, changing it too but after logout/login it is back to where it was before.
if I change the standard Homepage there it will always set it to that page ...
I however want that it is only set once
Can you tell me how this can be done?
Not at all. What you want to do is self-contradictional.
"Standard XYZ" means that XYZ will be done every time, and "XYZ only once" is the exact opposite.
I found the solution - it's surprising how difficult it was to find by googling. In the end I just stumbled over it by checking the policies again.

Setting a default element in SOAPUI

I've been using SOAPUI a lot lately and noticed that there are some elements I want to set for all request, such as an API key, or a date range.
Is there a way to automatically do this?
example: Every request begins with:
?
Is there a way to automatically fill in the api key for every request?
thanks.
I think the answer is No.
But you can try playing with defining properties. You can set properties at project level and then use the property everywhere you need.
It is not automated - you have to use the property correctly everywhere you need it.
In the project tree on the left you see all your WSDLs and its operations. Right click on an operation and choose New request.
Open the new request and set the default properties you want. Now you have two possibilities.
Add to TestCase
Right click on the request and choose that option. Then you can choose the TestCase to which you want to add the request.
Copy to TestRequests
Right click on the request and choose that option. Now you can choose existing TestRequests to which you want to add the values of the given request. I haven't used that option till now. You have to try if it works as expected.

Rails create static page from dynamic page

This seems like it should not be that hard but I am trying to figure out how to create a 'snapshot' or 'locked' view from one on my views. This view currently is dynamic but I want to lock it so that any changes I make will not propagate until I want them too.
This would be a front facing page that should not get updated until I choose to update it such as by timestamping a field like updated_lock or something to that effect.
Any ideas?
Thanks,
BR
You might try caches_action in your controller. It will create the static version and save it. You could either create it in dev and checkin, or have it generated in production. You'd need to fine a way to delete it in production if it's not checked in. Requires caching to be turned on.
If you are OK with checking it in - you can always save from the browser.
Basically - if there is a file in public at the same location as the view, it will be served instead of the dynamic one.

How to change dojo locale after dojo loaded?

We need set locale in data-dojo-config before dojo loaded so that dojo.i18n will work with this locale. Is there any workaround that we can change this locale in dojo/_base/config after dojo loaded so that any further dojo.i18n call will work with this new locale?
I have a single page application, by carefully design, I already be able to recreate all my UI widgets dynamically anytime. I want to add a Select somewhere so that user can change languages on the fly. Currently the only solution I have is put a queryString locale='newLocale' at Url and force browser refresh. That works but everything User have done lost and with a fresh start. That's not what I want.
Any idea? I don't afraid some changes of dojo to make this happen since my application will be built as a single layer and deploy to customers.
According to dojo's documentation, you cannot change the locale once it's loaded. See this page from their documentation, the relevant line is:
Once Dojo is loaded, it is not possible to change the locale for the
page.
Your description of adding a new parameter is what I've done in this situation, you can specify the locale property on the dojoConfig object to override the default locale.
EDIT: There is an open bug for this use case, see https://bugs.dojotoolkit.org/ticket/17196. In that ticket there also appears to be a workaround that basically involves manually loading the resource file of the language you want to use and updating any text.
So, adapting their example (http://jsbin.com/aquviq/1/edit), this would run after you initiate a change locale action:
require(['dojo/i18n!dojo/nls/' + resourceModuleWithLocale], function (resource) {
/* in here, you must set all of the text manually to the values in the resource object */
});
It still seems like a lot of work, but I suppose that's one possible way to accomplish this.

Yii-User and Yii-eauth integration

I am trying to put together an application using yii-user and yii-eauth extensions but I am coming up short. When I create a new webapp and install eauth I can get it to work fine so I know that I am not doing anything wrong on that end. I think the problem lies with my urls. This is a demo of what it is supposed to be like: http://nodge.ru/yii-eauth/demo/login. When someone clicks on say google it should bring you to the google sign in page but on my application I am getting a 404 error that states "The system is unable to find the requested action "login"." The url for this is user/user/login/service/google_oauth whereas the url should read user/login/service/google_oauth. Upon typing this into the browser manually I am redirected to the right page.
So I took a look into the EAuthWidget.php class to see if I could find out where it was getting that extra "user" from but I could not figure it out. I think it may have something to do with the fact that I have this in the user module which is in the /modules/user directory in my webapp. I also tried to use the URLManager to point to the right address but with no luck.
Does anyone have any similar experiences setting this up? Or any suggestions?
You just need to change the widget initialization code in your view(namely change the action property of the widget), somewhat like this:
<h2>Do you already have an account on one of these sites? Click the logo to log in with it here:</h2>
<?php
$this->widget('ext.eauth.EAuthWidget', array('action' => 'login'));
?>
Just to add, keep in mind that this action depends on which view you are including this widget, if the view is protected/views/site/login.php (which is yii's default site login view) then action should be able to go to the yii-user module's login action, so it'll be : 'action'=>'/user/login' , however if you are including this widget in yii-user's protected/modules/user/views/user/login.php then the action will be 'login' as already mentioned.