Showing posts with label modules. Show all posts
Showing posts with label modules. Show all posts

Thursday, August 7, 2014

Backup and Migrate - Restore 1 Table

Well I never thought about trying this before, and there was no reason why it wouldn't work, but restoring a single table into a Drupal website using the Backup and Migrate module worked like a charm!

Scenario

I'm using the IP Ranges module on several websites across several servers. Most of the time the websites have content that is specific to certain geographic regions or countries, so getting hit a ton by China, Russia, or Brazil isn't desirable.

Also, adding the IP Ranges entries to each website (or even a new one) is tedious.

Enter Backup and Migrate

On one site, I do all of my manual entries using the IP Ranges interface. Then I can do a backup of the IP Ranges table from this site. The backup will contain info for just IP_RANGES and nothing else. I do not want to break my other sites. I have a Settings Profile for IP Ranges and then I do a manual backup.

On another site, do a restore using that backup file. But wait.....read below.

One Gotcha!

The backup contains a "DROP TABLE IF EXISTS" statement for ip_ranges. Now the script should be fairly quick, but dropping the table while the module is enabled can cause issues for the site if someone visits.

What I like to do is replace the statement in the script with "TRUNCATE" giving: TRUNCATE `ip_ranges`;

double check the rest of the script to make sure you haven't accidentally included other stuff.

Then run the script through the rest of the sites!


I'd rather use Firewall rules, but I need to do more research on that. I've broken access to sites before because I've entered the wrong Firewall rule. :P

Tuesday, November 20, 2012

Drupal User Admin module stack

Here's a stack of modules that I like which help a non-administrator manage their own users.

Administer Users By Role:  http://drupal.org/project/administerusersbyrole
Role Delegation:  http://drupal.org/project/role_delegation
Login One Time:  http://drupal.org/project/login_one_time
No Current Password:  http://drupal.org/project/nocurrent_pass

Once installed and enabled, I create a role ("site-owner" for example) and assign it the various permissions.
A few more little tricks and now the Site-Owner can create or cancel users, assign various roles, and send them a One Time Login link if needed.

One caveat I need to investigate...the Administrators (e.g., User 1) are still shown on the list of users (admin/people) and certain roles can be added or removed, but the Administrator role can't be removed and the Admin account can't be edited or canceled.  Really the Site Owner can't do anything harmful to the Admin, but I'd prefer that account wasn't shown at all in the list.  I need a module that will only show the users whose role is less than or equal to the current role.

Friday, December 16, 2011

My current sites/all/modules

My current "modules" folder and what it contains:

  • civicrm
  • contrib
  • custom
  • shortsitename_features
I kind of like that.  Nice and sweet.  There's a bunch of modules under "contrib" of course, a few under custom (but growing) and a few under shortsitename_features  (but growing).

Thursday, October 22, 2009

Drupal blog in BrowSweat

I decided for my site BrowSweat.com to use the Drupal blog along with the Blog API. This allows me to publish to my blog with an external editor if I choose, and then upload it.
The blog works great and is something I plan on continuing to use.

The reason I started using it was to publish announcement or notifications to users regarding minor things. Major announcements will still be made through the Newsletter. For two reasons: 1) Half or more of the users signing up for an account, opted out of the newsletter; therefore, how could they get notifications. 2) It seemed like overkill to send out a newsletter for minor things, such as changes in the image layout or readability, but I want users to know the site is actively being worked on and it is growing.

The only issue I have had so far is the uploading of images through an external blog writer (using the blog API). The image is uploaded to an odd folder and then doesn't show up in the blog entry. I also seem to have a problem with tagging the entry externally. I plan on investigating these issues and seeing what it comes of it.

Next on the road...for BrowSweat.com subscription services using Ubercart.
For Sugar-Pine.com, banner block or rotating banner images.

Monday, August 31, 2009

Drupal User Group Meeting in Ames, IA

I FINALLY went to my first user group meeting!!! Of course I was late…I’m almost always late. The construction I ran into didn’t help with the 2 hour drive, but I’m glad I got there and back in one piece.

Tonight we discussed SEO and some of the various techniques and tools that you can use for your Drupal site. Some modules include:

Module About
SEO Checklist Not a module that adds anything which your users can see; it’s for Administrative purposes only because it’s a checklist of actions for SEO. Also holds the date of when the action is done.
XML Sitemap Generates a sitemap.xml based on your content; Can submit sitemap to search engines (Google, Yahoo, Bing)
Content Optimizer Not sure on this one. Still at Release Candidate, but may be good to keep an eye on. This one looks at the content and suggests actions to take to optimize content based on a suggested search term.
Meta Tags (nodewords) Displays form elements to add meta content (description, keywords) for a node.
Page Title Allows changing of Page Title
??? Am I forgetting something? Let me think.

Also, check out the AdWords keywords tools. Cool to help you generate keywords for your site.

Nice to meet everyone at the Ames, IA Drupal User Group Meeting. Hope to see you all again soon!

Tuesday, July 14, 2009

Launch of new site BrowSweat.com

I’ve launched BrowSweat.com and it is ready to start using.

Modules that I used in developing this include:
  • CAPTCHA
    • reCAPTCHA – web service to use advanced CAPTCHA
  • CCK
  • Mailing/Contact Modules
    • Contact User Anon – (CAPTCHA enabled) Allows Anonymous users to contact registered users (as long as they provide an e-mail)
    • Mime Mail
    • SimpleNews – For newsletters
    • Tell A Friend
    • User Register Notify – Admin gets emailed when a new user registers
  • Content Profile – profiles using CCK so users can add images to their “Portfolio”
  • Imaging Modules
    • FileField
    • ImageCache
    • ImageField – combined with CCK and Content Profiles to give users a “Portfolio”.
There is also a custom theme based on Zen. This included implementing Printing the Description (or Title) Below the Image post so that Image Descriptions are displayed below the image.

Wednesday, July 8, 2009

CAPTCHA

I like this module quit a bit!  I like how easy it is to add CAPTCHA to a form through the administrative features.  Just make sure you have the checkbox “Add CAPTCHA administration links to forms” turned on.  It’s pretty sweet.

The one issue I can say about it is that there are times when even I can’t read what the CAPTCHA says.  I just do a refresh on it to get a new one…no problem.