I have added a search functionality to my ExpressionEngine site, using the standard Search Module tags. However, I occasionally run into this error message:
You are only allowed to search every 15 seconds.
This only seems to happen when I'm logged out.
I want to decrease the time required between searches. How can I adjust this?
It's a per-group setting (hence why it's only happening when you're logged out). The default for logged out members (the Guests group) is 15 seconds.
You can adjust this value for each group under Members > Member Groups > Edit Group in the control panel.
Related
A useful feature of application monitoring services is sending alerts (e.g. emails) each time a new, unique error/problem/exception occurs (i.e., not for each occurrence). Either only the very first time, or at most once per X time (a day or week or such). This is, for example, possible with Visual Studio App Center. Unfortunately I haven't been able to find any such feature in Application Insights.
For clarification, a "new, unique error/problem/exception" can be thought of as a specific log statement in the code. I'm using Serilog, so all logged traces/exceptions have a MessageTemplate property which may help. But ideally the "problem ID" would be based on the code location, too (since multiple log statements may use the same message template).
The best lead I have found is the ability to send alerts based on a custom analytics query, but I'm not sure if it's possible to write a query that can give a behaviour similar to (if not exactly like) to what I describe above.
Is something similar to the behaviour I describe above possible to achieve with Application Insights? If it's possible through a custom query, how might such a query look?
Just through UI of azure portal, it's hard or impossible to achieve your first requirement: alert only the very first time. But you can try to use app insights rest api to fetch the data, then use code to implement your logic.
There is a similar solution(not exactly like you describe) for alert once per X time. The steps are as below:
1.Nav to azure portal -> you application insights -> Alerts -> new alert rule -> in the Condition, click Add button -> then select "Custom Log Search"
2.In the "search query" textbox, write your query like below:
exceptions
| where xxxx
Note that in the where clause, use some properties to identify the unique error.
3.Then in the "Alert logic", use the following settings:
Based on: Number of results, Operator: Greater than, Threshold value: 0
4.In the "Evaluated based on", set proper value for Period(max value is 2880 minutes) / Frequency(max value is 1440 minutes).
So if you want to trigger alert 1 time per day, you can set Period to 1440 minutes, set Frequency to 1440 minutes. But you also need to note that, if in the next day, there is no such specified error, it will not trigger in the next day.
I'm searching for events at a particular place and also successfully retrieving all the events. But suppose I'm getting about 1500 events as "total_items" and the first page of response shows up the first 10 events.Then how could I reach to the remaining set of events, there isn't any "next page link".
And the most important question that are there any restrictions or upgradation plan for Eventful. Just because I was not able to find the required answers on their web portal. I'm posting it over here.
You are getting 10 events as default page size is 10 .If you want to change page size ,you can change it in your query.
http://api.eventful.com/rest/events/search?l=GREEN+BAY+WEST&page_size=100
In the above query it will return 100 events,you can get 100 events per page maximum.
If you want to go to next page,you can change page_number in your query.
Is it possible to limit the number of channel entries a member can create?
I would like to set a max number per member group.
Thanks
Yes, but it would require writing an extension. The logic would be something like this (assuming you're talking about limiting on the back-end ... from the front-end, if you're using a Safecracker entry form for example, you'd need to take a different approach):
use the sessions_end hook
check to make sure you're in the control panel ($this->EE->input->get('D') == 'cp')
check to make sure you're on the publish screen ($this->EE->input->get('C') ==
'content_publish')
query the database to see how many entries in exp_channel_titles with the channel_id of $this->EE->input->get('channel_id') belong to $this->EE->session->userdata('member_id')
if the result is greater than your allowed maximum, show them an error
That should get you started.
What's a good way to paginate a list that is constantly growing?
For example, a user may open page 2 of some listing, keep looking at it for a while and then open page 3. Meanwhile, new records have been added to the beginning of the list (page 1) and caused page 3 to contain items that could have been on page 2 previously.
Should such a list be paginated from the other end? Then how to deal with the front page and the fact that it would, without special attention, contain TOTAL NUMBER OF ITEMS % PAGE SIZE items (ie. not constant)?
Assuming you have a fixed page size, some specified ordering, and the user is specifying the page they wish to view, I would simply fetch the data accordingly. Trying to do anything more complicated than that will just end up causing you unnecessary headache and confuse the user.
I think the element you're missing here is the ordering. If you specify an ordering then the user will intuitively understand. Also, that's how the majority of pagination is done, so you're not deviating from what you're user really expects.
I'd add a warning to advise the user that new items have come in and allow them to refresh the list. If they choose not to then maintain list in the state it was in when they clicked on the "Page 2" button. You can use a timestamp on the URL to determine which version of the list to serve to which user.
I do not think it's a good idea to page through a growing list. You'd better recalculate items that should be displayed on a page everytime user performs an action.
I currently do some testings on the multipage meeting workspace template to check whether it fit our needs to be the base template for our projects.
As you might know, a multipage meeting workspace is designed to be able to manage several dates within a single workspace and to display either pages that are only related to a certain date or pages that should appear on every date.
If you examine a multipage meeting workspace with SharePoint Designer you can see that there is a library which contains all the pages of the workspace. Pages that are displayed on every date are stored in the root folder, pages that are only displayed on single dates are stored in folders which are named with the according date.
So now we come to my problem. In order to set the permission for a single page that is displayed on each date, I iterate over the page library to find the page I want to change the permissions on. Strangely, the ListItemCollection of the library pretend to contain the number of pages I expected it to contain. But when I then iterate over the collection it only returns the pages that are attached to the actual date. Neither does it return the pages which should be displayed on every date nor the pages for the other dates.
I have already tried to get the pages by using SPSecruity.RunWithElevatedPrivilges() and with impersonation as the system account. I've also tried to get them via a command line application without using any context information. It seems as the behavior, that you can only get the items which are related to a certain date, is also followed by the object model.
So how could I get all pages of a multipages meeting workspace regardless of the actual date???
You can catch an event on workspace creation moment and at the event set permissions programmatically. You may want to know more about event receivers or setting permissions programmatically.
Those pages you mentioned are items added to a list called "Meeting Series"
alt text http://img22.imageshack.us/img22/8963/ss20090528181724.png
It contains following fields:
alt text http://img22.imageshack.us/img22/351/ss20090528181819.png alt text http://img22.imageshack.us/img22/7857/ss20090528181852.png
Example data from 1 item (not in tat order as columns are mentioned):
3 0x001C4383A41E441842A2A27CA249FED28F Meeting Series Recurrence 2009-05-28 18:11:20 2009-05-28 18:11:12 1073741823;#Sistēmas konts 1073741823;#Sistēmas konts 1 1 512 1.0 0 0 Recurrence Recurrence 3 100.000000000000 {A6E54DB5-3A60-464B-A9A0-D314B49C41E8} 3;#test2/Recurrence/Lists/Meeting Series/1_2.000 3;#test2/Recurrence/Lists/Meeting Series 3;#2009-05-28 18:11:20 3;#2009-05-28 18:11:20 3;#0 0x7fffffffffffffff 3;#1_2.000 3;#{6BE299E5-E81F-40A8-80B2-41494DF0353C} 3;# 3;#{965D0DB3-1AE0-4C23-B006-FB4FC1FE1AB7} 1_2.000 3 1_2.000 1_2.000 /test2/Recurrence/Lists/Meeting Series/1_2.000 http://test:10000/test2/Recurrence/Lists/Meeting%20Series/1_2.000 1_2 3;# 1 1 2 {D8839339-6DDA-48A6-B3B7-FBCA58C8B436} 2009-06-03 19:00:00 2009-06-03 19:00:00 (null) (null) (null) 0 1 (null) 0 0 0 2009-05-28 18:10:57 (null) http://test:10000/test2/Lists/Calendar, Kalendārs 2009-06-03 19:00:00
The pages for this kind of events get created only when a user tries to access them. This is by design, and the only solution I found was to try and access the page via the website (or some emulation) and then try to access them by code.
Regarding Flo's Comment, I fount the source for this on Microsoft Sharepoint 2007 Development unleashed (sams, ISBN 0-672-32903-4). on p 101 says:
CAUTION
Obtaining data from recurring meetings
can be tricky. You might encounter
situations in which your code attempts
to access a list item for a meeting
occurrence that has not yet been
provisioned in the Meeting Series
list. To ensure that the individual
instance has been created, you can
make a dummy web request to the
instance’s home page, for example:
http://server/sites/mymeeting/default.aspx?InstanceID=20061012
If you find another way, please post it It will save us lots of effort!!!