Monthly Archives: May 2014

Gravity Forms – Disable and Remove the “Map It” Link

In the Gravity Forms generated emails, if your form has a “address” field the email notification generated by using something like {all_fields} will have a “Map It” link associated with the address, which will open Google Maps. Add this code to your theme’s functions.php file to disable / remove the “Map It” link from the email notification. // code courtesy of https://techblog.willshouse.com/?p=5249 add_filter(“gform_pre_send_email”, array($this,’gform_pre_send_email’)); function gform_pre_send_email($email) { // attempt to match the link using a regular expression $test = preg_replace(“#\<a [^>]+?\>Map It[^>]+\>#i”, ”, $email[“message”]); // if the result is not empty / blank, use it to replace the original html if(trim($test)) { $email[“message”] = $test; } return $email; } If you want to hide the “map it” link from the HTML that is displayed on a webpage ( if you confirmation has the {all_fields} merge replacement in it ) then you can add some CSS like this: <style> a.map-it-link { display: none; } </style></a>

Posted in Tech Tips, Web Development | Tagged , | 2 Comments

CPanel / WHM – Change “Default Website” Page

You may have noticed that when visiting a CPanel Server ( running WHM ) if you don’t have a site configured for the hostname that you are accessing ( or possibly if you are accessing the server via the IP address ) you will end up seeing the “default website” page, and your browser’s URL will redirect to defaultwebpage.cgi ( or /cgi-sys/defaultwebpage.cgi ) You may have searched your system and ended up finding something like this file: /usr/local/cpanel/cgi-sys/defaultwebpage.cgi However, that’s not just a plain HTML file – it’s a beefy binary cgi script. No editing is going to take place there! (nor should it) You may have also found the file that actually loads / redirects to the cgi script, which lives here: /usr/local/apache/htdocs/index.html However, I would not recommend customizing that file because it will get overwritten during a cPanel upgrade. So, what is the right way? Well it just so happens that in WHM there is a Web Template Editor that is meant for this very purpose: The Web Template Editor allows you to create placeholder web pages. These pages will appear to visitors who navigate to a site on your server that: Has not yet been configured by the domain owner (see the Default Website Page tab) Has moved (see the Account Move tab) Is experiencing a connection or firewall problem (see the Connection Selection tab) Has been suspended (see the Account Suspended tab) Info for the Default Website Template: You are editing the Default Website Template. This … Continue reading

Posted in Tech Tips | Tagged , | 2 Comments

Adium – Use Notification Center

Notification Center support Adium 1.5.4 now supports Mountain Lion’s Notification Center. By default, notifications are shown for a couple of events. You can add and remove notifications in Adium’s “Events” preferences (see our documentation on Events and Visual Notifications for details.) People have asked us how Adium decides between Notification Center and Growl on OS X 10.8 “Mountain Lion” (especially with Growl.app installed) so here is an explanation from our very own Stephen Holt: 1. Growl.app is installed, and the user has configured it to NOT use Notification Center: Notifications work as before. Notification tickets are sent to Growl.app which performs actions and displays notifications as configured by the user 2. Growl.app is installed, and the user has configured it to use Notification Center: Growl.framework detects this state from within the app and notifications are sent directly to NC. Additionally, notification tickets are sent to Growl which performs any associated actions. Growl.app displays nothing. 3. Growl.app is not installed: Growl.framework detects this state from within the app and notifications are sent directly to NC. Nothing else is done. Please note that only Growl.app version 2 or newer can be set to use Notification Center.

Posted in Tech Tips | Tagged | Leave a comment