cmsproducer

Implementing Drupal - Chronicles

This is a collection of documents detailing solutions that can be reached and implemented using the core and contributed modules of Drupal.

WiseOz.com - Drupal Powered Community Website

iThinkworks was looking for "...needing someone who can mentor, guide, advise, and be just plain helpful"

FTP is very risky; use SSH for versatile remote connections

It is amazing that FTP is still widely used and even promoted (by inaction and implication) by most commercial web hosts. Using FTP to send files to your web server, and even having the FTP service running on your web server is equivalent to making banking transactions without SSL enabled - the door is almost wide open and you could be setting yourself up for disaster.

SSH

SSH has been around for a long time and there are now many commercial and freeware tools that enable you to get at least the same functionality as you have always had from your FTP server but without the risk. Notably, you need to generate and use a private/public key pair to make your SSH connection water-tight. Using any SSH capable application such as PUTTY to connect to your remote server, or locally in your Linux machine, you can generate a key pair base don a paraphrase using the following command.

$ ssh-keygen -t rsa

Taking SSH to the next level

There is a small commercial application called SFTPdrive {http://en.wikipedia.org/wiki/SftpDrive} that enables windows and Mac users to configure remote machine-resources to be accessible like network drives mapped to be accessible locally. You do not have to pay for this feature if you have the skill and patience of configuring a tunneling setup with Putty (SSH tunneling), and map drives through the tunnel

Restricting taxonomy listings by author using VIEWS and taxonomy redirect

I have been looking for a maintainable way to limit the taxonomy lists produced by the Drupal taxonomy module by the autor. In a project that seems to categorise nodes by the author to create a paradigm were the user experience is dictated by the profile page that a viewer last visited, restricting taxonomy lists by author supports this UX paradigm.

Requirements
My main requirements was to create a maintainable setup that would not require intervention as new taxonomy terms are created in a given vocabulary.

Solution
The solution that worked for me without much coding is a combination of the Taxonomy Redirect module, and a simple VIEWS query (ofcourse you need to setuup VIEW).

  1. Created a Drupal VIEW and configured it to create a page view with and list nodes as teasers
  2. Created two arguments:Taxonomy ID under a given taxonomy vocabulary that I selected for this exercise, and the UId of the node author
  3. Since in the setup I had, I was storing the UID of the last profile page visited by the site visitor, I was able to easily call that from the session and write it into the VIEW argument using the code
    $args[1]=$SESSION['profile_uid'];
    return $args;
  4. Installed the Taxonomy Redirect Module and pointed it to the path of the above created VIEW with !tid as the first argument in the path (e.g created_view/!tid) the !tid being the first view.
  5. $args[0], the first argument was the taxonomy term ID already in the URL created_view/!tid


This setup ensures that any taxonomy terms created under this vocabulary will present a list of current nodes classified into that erm, but also restricted by a required author.

 

Valid XHTML 1.0 Strict
This site is accepts Oped ID authentication for login
This Website is Built Using Semantic Markup and Cascading Style Sheets (CSS)
Some usage rights are reserved, please contact us for approval before using it