new custom Drupal 7 trigger to ban ip - triggers

I want to make a new custom system Drupal 7 trigger to ban the ip of a non-member who trues to access site content that does not exist and gets a "access denied"or "page not found"
The ban ip action is already available as a user action - but not for a dblog entry or attempts to access by non-authenticated (a.k.a non-member) users
I have looked at the custom trigger code available but i do not see (or know how to) how to use it trigger on attempts to access non-existent nodes
Any pointers would be greatly appreciated

I found that there is a new module for that => https://www.drupal.org/project/tarpit - for Drupal 7

Related

TYPO3 tt_products: send a tracking email on status change to admin as well as user

I use tt_products 2.7.18 on TYPO3 6.2.25.
I configured orderEmail_to to the admins email address.
When an order is placed the customer and the admin gets a respective email - as expected.
But when I change the tracking status, only the customer gets an email.
The manual does not tell me how to configure and I'm starting to question the possibility altogether.
Can anyone tell me if and how to configure?
Thanks in advance.
plugin.tt_products {
...
orderEmail_to = admin#emaildomain.com
...
}
It is correct to set the orderEmail_to. You should check in the TypoScript Object Browser (backend module Template) that this setup is applied on your tracking page id, where in this example I have given "admin#emaildomain.com" as the admin's email address.
Only the tracking status numbers between 50 and 59 will send a notification email to the customer.
tt_products 2.7.27 is already available. Maybe your version 2.7.18 is already outdated.

ServiceNow REST API with Table name for Alert

I have gone through the below link to know about Table REST API of ServiceNow:
https://express.servicenow.com/support/documentation/r_TableAPIGETRecordMethod/
My requirement is to obtain all the record from Alert table
using Table REST API i.e. 'GET /api/nowv1/table/(tableName)'.
Now my question is , what will be the name of the (tablename) for Alert in the API itself to get the alerts which are already created in the table and can be seen using via "manage the alert life cycle feature" by navigating "Event Management > Active Alerts" (See : http://wiki.servicenow.com/index.php?title=Managing_Alerts#Managing_the_Alert_Life_Cycle) ?
If you're an administrator, you can get the table name from the table label (e.g. "Alert") by going to the sys_db_object table (via "Tables" entry in the left nav).
Just search for the row with the label you want, and the table name will be the name of that row.
As any other user, you can just open any record in the table in a new tab/window (i.e. outside of the usual frameset) and look at the URL.
For your case, I opened "All Alerts", then opened an arbitrary record, which took me to this url suffix:
/em_alert.do?sys_id=df7a6f00d72321008de76ccf6e610322
This tells us that the table name for "All Alerts" is em_alert
I got the answer.
In order to work with servicenow event/alert, you need to plugin the Event Management module in your PaaS developer instance, if you are new in ServiceNow.
This link (https://developer.servicenow.com/app.do#!/home ) is for applying for new developer instance. First you need to register and then you will be getting the instance. Once you have the instance allocated, you are provissioned to add "Event Management" plugin and then your developer instance (so far free) is a place for you to learn about ServiceNow Event Management system for doing research & development on event/alert table API etc. Note : The developer instance may not support real monitoring features e.g. : (1) detect an event; (2) send an alert of an event;
The API for getting alert info will be :
GET https://.service-now.com/api/now/v1/table/em_alert with basicauth credential
regards
SK

Drupal - need redirect to specified page when node is deleted

I'm using the pathologic module, and currently when a node is deleted users will get a 404 error. I want to set up a Rule such that when ANY node is deleted, a redirect is put in place to send users looking for that path to the HOME page.
Do I need Rules for this, and if so, what is the best method? I haven't been able to successfully get this to work so far because of the interaction between the nid and the pathologic-created redirect. Many of my users have been sent URLs in email, etc. and I don't want them to get a 404.
Thanks in advance!
One soulition could be for you:
install https://www.drupal.org/project/hook_post_action module
write your own module in which you implement hook_node_postdelete($node) in which you set a drupal_goto()

Need help with Zend Framework dynamic Namespaces

I want to make my system redirect unknown requests such as
www.address.com/a_company
to the adress
www.address.com/companies/company/ and display the company a_company if it exists in the database, otherwise throw the user to a 404 not found page.
So in detail, I want to make namespace that is as the first example dynamically, if the company exist in the database, I have no problem connecting to the database and retrieving information or finding a way to parse a company name, I just need help how to make my system check and run a function every time the address doesn't exist and show the second page (/companies/company/)..
I am using an Acl as well, but I think it should be fine if the page is /companies/company and then possibly add /?c=a_company or similar.
Thank you.
/Marcus
simply create a front controller plugin which checks the request params agains the database before the request is dispatched.

Drupal email users

I'm using Drupal 6.16: When a user creates an account on my site I have them select a category (ie children, youth, adult, etc). This is done with the select list box using the content_profile module. I have a content type that posts an announcement. In this content type is a check box that says 'email group'. Right now it does nothing, but what I would like for it to do is e-mail all the users that are associated with the group they chose when signing up for their account. If this will require extra code please be specific as I am not a strong php programmer.
Thanks for the help!!
msindle
There might be some module that do it exactly, but I don't think so.
I would have done it using few building blocks:
Retrieve the list of emails using Views - define a view that gives you the addresses according to a given group argument.
Use Rules module that will send an email notification after node is created.
Combine the two (this is the hard part) - insert the values from the view as the recipients for the email. You might be able to do it using PHP inside the Rule definition, plus view execution.
Try to accomplish it, and if you get into troubles, you are welcome to contact me via shushu.i#gmail.com
I would try http://drupal.org/project/subscriptions module + http://drupal.org/project/messaging module. You can set preferences for automatic subscribing to content type. Maybe Rules module can subscribe users automatically after creating or updating content_profile. Or maybe Rules can flag users after creating or updating content_profile and Subscription module could autosubscribe flagged users.