tidystorm

random techno-gab

Adobe Premiere Elements editing for beginners

I had a webinar in wmv format I wanted to publish that contained two minutes of silence in the middle. Not good.

I couldn’t find any straightforward instructions for dummies on how to fix it. So I figured it out the hard way, and now I’m writing the steps here.

  1. Open Adobe Premiere Elements 9
  2. Open new project
  3. Name your new project
  4. Click OK
  5. File–>Get Media From–>Files or Folders
  6. Browse to the file and click open
  7. Click sceneline if it’s not selected
  8. Drag the file’s screen shot to the first box in sceneline
  9. Move the timer to where you want to cut
  10. Click on the scissors (“split clip”)
  11. Move the timer to the next place you want to cut
  12. Click on the scissors (“split clip”)
  13. Looking at the scenes, there should be three. The one in the middle is the one you want to delete. Right click it and choose “delete scene and its objects.”
  14. Now you want to “share.” Look on the right of the screen for the share tab and click on it
  15. Choose “computer export files for viewing on computers”
  16. I scrolled down to “windows media files” so I would get wmv
  17. Click “save.”
  18. Now wait. It can take a long time

How to add a database to backupmachine

I use lunarpages as my host. I’ve had to derive over time how to add databases to Backup Machine.

Here are the steps:

  1. Click on “add MYSQL database”
  2. For the database server, fill in the host name or the IP, not localhost. Find the IP on Cpanel (or probably LPCP)
  3. Fill in the database name
  4. Fill in user name. (You first have to create a user name in PHPMYADMIN. I suggest creating a username specifically for backupmachine.com)
  5. The password is whatever you assigned to the user name you just created.

Notes:
If you run into an error, take note of the error message because backupmachine will tell you their IP address in the error message. Then go into Remote MYSQL on CPanel (or probably LPCP) and put backupmachine’s IP address in. Then try again.

In LPCP you can add the IP address on the same page and at the same time as creating the user.

If LPCP assigns your user with an “@” appendage, remove that part of the user name when you type into backupmachine.

If all else fails, add a wildcard to as the Access Host in Remote Database Access Hosts. The wild card is a lone percent sign.

How to use WordPress as a CMS

I learned from ugly experience that to use WordPress as a CMS, it needs to be installed in the root. Maybe there’s a way around that, but I don’t know what it is. So install in the root.

Then, google “create a static front page in wordpress” and follow the instructions.

I use the Ashford theme, which is built for CMS, and has good support.

Drupal 7 Create a sub-theme based on Bartik

I have copied this great information from opensourcecms.pro

Assume you want to customize the default Bartik theme bundled with Drupal 7. Since you know it is a bad idea to alter the core files, you are going to create a new sub-theme based on Bartik and make your modifications there.
Step 1: Create a copy
First, copy the directory /themes/bartik
Step 2: Rename the directory
Paste the base theme directory into the directory /sites/all/themes and rename it as you see fit. For purposes of our example, we’ll call it newsub. In other words, you should now have a complete set of themes files located at /sites/all/themes/newsub
Step 3: Delete unwanted files
The sub-theme will inherit almost everything from the base theme. (The exceptions are the .info file and the site logo image file.) Given that inheritance is the norm, you should eliminate everything from the sub-theme that you don’t plan to change. In other words, if you don’t plan to modify a particular file, delete it from the sub-theme’s directory.
Most people will want to consider keeping one or more of the templates and the template.php file, but this depends on your plans. If you intend to customize any of the existing templates, or create template suggestions, keep the relevant templates. If you want to modify any of the themable functions or create new ones, you will need the template.php file.
Open up your newsub directory and delete everything you don’t need. No matter what you plan to do, you should keep the .info file — your sub-theme has to have a .info file — and keep the /css and /templates directory, though you can delete the contents if you don’t plan to modify them.
Step 4: Update the theme name throughout
Next, let’s update the theme name inside all the files we’ve kept. We need to change every occurrence of “bartik” to “newsub.” If you’ve got a code editor, you can run a find/replace to get this done, if not, you’ll need to crack open each file and do this.
Step 5: Create your stylesheet
Next, let’s create a new .css file. This is a requirement for a valid sub-theme; you need at least one stylesheet. Create an empty file, name it newsub.css and put it in the /css directory.
Step 6: Update .info
Make sure your .info is now called newsub.info. Next, open up the file and perform the following operations on the contents:
1. Make sure the name field has been updated to reflect the name of the sub-theme.
2. Update the description line as you see fit – this information will appear inside the Theme Manager as a description for the theme.
3. Delete the lines for package and version.
4. Add a new line: base theme = bartik
5. Declare our new stylesheet by adding this line: stylesheets[all][] = css/newsub.css
6. Delete all other stylesheet declarations.
7. Save the file.
Note that sub-themes do not inherit custom regions from the parent theme. Therefore if you want to use any custom regions in the base theme, you will need to re-specify them in the sub-theme’s .info file. In the example we’ve just worked through, we’ve simply copied the Bartik .info file, so we already have the entire list of custom regions in the newsub.info file.
That’s all there is to it! At this stage you have a new, fully functional theme. If all has gone according to plan, your NewSub theme can now been seen inside the Disabled Themes section of your site’s Theme Manager.
Additional Tips – Overriding Templates
• If you wish to modify any of the templates included in the Bartik base theme, simply copy them over to your directory /newsub/templates and make your changes
• If you want to override other core templates, copy the original template and place it in /newsub/templates
• If you want to add a template suggestion, place the base template in /newsub/templates and create your new suggestion in the same directory
Additional Tips – Overriding Styles
• If you want to override a specific style, simply place the selector in /css/newsub.css
• If you want to override an entire stylesheet from the base theme, place a file of the same name in the /newsub/css directory.
Additional Tips – Overriding functions
• If you want to override an existing function, copy it into /newsub/template.php and change the name to match your new sub-theme.
Where to go to Learn More
• Sub-theme strcture and inheritance, http://drupal.org/node/225125 (note this has yet to be updated for Drupal 7, but is valid)
• Structure of the .info file, http://drupal.org/node/171205
• Overriding themable output, http://drupal.org/node/341628 (note this has yet to be updated for Drupal 7, but is valid)
• Using Base Themes, http://drupal.org/node/980434

Drupal 7 multisite step by step tutorial

I had a first site called FIRSTSITE.com.
I wanted to add another site called SECONDSITE.com.
I wanted the second site to render as a separate website, and I wanted the two sites to share my Drupal 7 installation.

I couldn’t find a guide for Drupal 7 multisite, so now that I’ve figured it out from a pastiche of advice, I’m documenting it.

This post is not about updating a multisite from Drupal 6 to Drupal 7. I am a Drupal noob with Drupal 7. It assumes Lunarpages VPS Hosting but that may not matter.

  1. Install Drupal 7 for FIRSTSITE.com. (I had already done that earlier.)
  2. Create a new MySQL database and user. They will be used for the new site SECONDSITE.com.
  3. Configure SECONDSITE.com to point to the FIRSTSITE.com servers. In my case, I did that with Network Solutions, and I documented it here The change can take a day or two to complete.
  4. Park SECONDSITE.com to FIRSTSITE.com. How to do it in Cpanel is here. I did it in LPCP (a control panel available when you have Lunarpages hosting.)
  5. Create a directory /sites/SECONDSITE.com/ inside your main Drupal folder.
  6. Copy the default.settings.php file (found in drupal/sites/default/) to /sites/SECONDSITE.com/ and rename it to settings.php
  7. Change its permissions to 666 (make it changeable by everyone)
  8. Make a new directory under /drupal/sites/SECONDSITE.com/ and name it “files”, then change permissions of it to 777.
  9. Navigate to http://SECONDSITE.com/install.php, and complete a new installation for SECONDSITE.com with the Mysql details from earlier.

Reference:
# cp drupal/sites/default/default.settings.php drupal/sites/SECONDSITE.php
# chmod 666 drupal/sites/SECONDSITE.com/settings.php
# mkdir drupal/sites/SECONDSITE.com/files
# chmod 777 drupal/sites/SECONDSITE.com/files

How to FTP in SSH

This post is my own procedure for transferring files from one server to another using SSH so that I don’t have to download, and then upload again. (I used mput)

I’m sure there’s an easier way to do this, but I’m an SSH noob, so I worked out a procedure like a monkey with a typewriter, and it works, so there you go.

Background:

I can back up to three places. The first is on the existing server. That’s simply done from LPCP. But that is vulnerable if the server crashes. I can also then download to my hard drive. Thirdly, I can move the backup to the 1GB extra space given to me by lunarpages. That can only be accessed by FTP, and not by HTTP.

The server is MYEXTRASERVER.com

However, as the site grows, the downloads and uploads will take a long time. So instead I can get into my VPS by way of SSH using Putty, and then establish an ftp session to get to MYEXTRASERVER.

Here is the procedure that Lunarpages gave me (with a few enhancements from me):

  1. get into the current directory of local where the files are that I want to move
  2. ftp host_name
  3. you will be asked for user and password
  4. use ls command to see list of files
  5. get into the directory where I want to move to
  6. put command to upload a file (put local-file [remote-file ])
  7. get to download a file

Here’s some excerpts from an actuall SSH session in which I followed the procedure. The purpose of this session in SSH is to get into MYMAINSERVER.com and then ftp to my backup location at MYEXTRASERVER.com

Run putty to open an SSH session in MYMAINSERVER.com

cd public_html
cd lm_backup_migrate
cd backup_migrate
cd manual
ftp MYEXTRASERVER.com
ftp> cd LINDABACKUPS
ftp> cd lm_backup_migrate_module
ftp> cd manual
ftp> mput *
y
y

This is where I hit break to disconnect from MYEXTRASERVER.com

cd ..
cd scheduled
ftp MYEXTRASERVER.com
ftp> cd LINDABACKUPS
ftp> cd lm_backup_migrate_module
ftp> cd scheduled
ftp> mput *
y
y
y
y
y
ftp>

Drupal 7 How to replace a module with dependencies

Today I had to replace ctools, as I was using an alpha version that was generating ajax errors. Instead I wanted the more stable dev module.

But I found the task a bit daunting, as ctools has many dependencies. Happily I found some instruction, which of course can be applied to other modules as well:

  1. REMOVE the ctools folder from sites/all/modules. Keep a copy. (What I did was move it up a directory.)
  2. Go to Drupal admin/modules and DISABLE every contributed module. DO NOT UNINSTALL.
  3. REPLACE the ctools folder on the server. (Unzip on my hard drive, then upload to sites/all/modules.)
  4. Go to Drupal admin/modules. Hopefully it will now display, since you’ve removed the overhead of other modules. ENABLE each of the modules you disabled in step 2.
  5. Remove the old ctools folder that you moved up a directory.
  6. Run the Drupal update script
  7. Run Drupal Reports to make sure all is well.

Lunarpages how to get to the apf config file

Edit the apf config file

APF is the firewall given to VPS customers with “Managed Hosting Intense.”

  1. Get into the root (su -)
  2. cd /etc/apf
  3. nano conf.apf

Use the firewall

Code:
Usage /usr/local/sbin/apf [OPTION]

OPTIONS are as below

-s|–start ……………………. load firewall policies
-r|–restart ………………….. flush & load firewall
-f|–flush|–stop ……………… flush firewall
-l|–list …………………….. list chain rules
-st|–status ………………….. firewall status
-a HOST CMT|–allow HOST COMMENT … add host (IP/FQDN) to allow_hosts.rules and immediately load new rule into firewall
-d HOST CMT|–deny HOST COMMENT …. add host (IP/FQDN) to deny_hosts.rules and
immediately load new rule into firewall

As an example, if you would like to deny an IP from accessing your sites, execute,

apf -d 123.123.123.123


Installation Details

Install path: /etc/apf/
Config path: /etc/apf/conf.apf
Executable path: /usr/local/sbin/apf
AntiDos install path: /etc/apf/ad/
AntiDos config path: /etc/apf/ad/conf.antidos
DShield Client Parser: /etc/apf/extras/dshield/

Solved — Clean URL’s in Drupal 7 on Lunarpages VPS

The Problem

I have a new hosting account which is Xen Cloud VPS on Lunarpages. (Cloud Hosting is considered by Lunarpages to be a type of VPS hosting.)

I have a new installation of Drupal 7 on this VPS hosting setup, and couldn’t get Clean URL’s working.

Specifically, the problem was that Clean URL’s had no checkbox in Drupal 7. I learned from the drupal.org forums that “no checkie, no cleanie” but none of the solutions offered worked for me.

What I tried but no joy

1. Made sure that I had copied over Drupal’s default .htaccess
2. Made sure that my host company, Lunarpages, had mod_rewrite enabled
3. Tried updating my apache config file (httpd.conf), but I didn’t really know how to do it

My suspicion

Then I started to suspect that my .htaccess file was being ignored, so I put a 301 redirect in it to test it. Lo and behold, my .htaccess file was not being used. There was no redirect.

Then I opened a ticket with Lunarpages

My ticket said, “Do I need to configure something in the apache config file? I already tried AllowOverride All in the config file, but I may not have done it correctly–it didn’t work. So I restored the original config file. (The htaccess is for Drupal. It is supposed to allow me to get “clean urls” using mod_rewrite, but I think I’m overlooking something.)”

The solution

Lunarpages found the problem and fixed it. The tech at Lunarpages said this “AllowOverride All was missing from your VirtualHost, however this option should be placed between directives. As such httpd.conf and .htaccess has been updated, and the 301 Redirect is working as expected.”