Author Archives: Brad Hull

How To Fix File Permissions for Joomla

Yesterday Geni came to me with an interesting problem: He needed to update user pictures, but was unable to place them inside the member_pics folder. This was because the member_pics folder was a folder that had been created by a user via ssh, not by using joomla. The permissions on the folder were 775, so a non-owner non-group user could only read and execute from the folder.

 

Continue reading

Add Users and Make their Blog Pages

Step 1: Get administrator status within the system, specifically access to the User Manager.

Step 2: Log in to the administrator backend. http://edwards.sdsu.edu/labsite/administrator

Step 3: Go to the user manager, click New. Add in all the relevant information: full name, username, email address, password. Give them the status required to do what they need to, usually Registered or Author. Hit save, not apply.

Step 4: Go to the category manager. Make a new category attached to the lab blog section. Pretty simple. “Joe’s lab blog”, etc. Sort it alphabetically if you want. I did, just for ease of looking through to make sure everyone has a blog page that needs one.

Step 5: Go to Lab Blogs inside the Menus dropdown menu. Add a new one, a Category Blog Layout, and select your category from the menu on the right hand side. Apply then save. Make sure to sort the menu alphabetically. This is what users will see on the right hand side when browsing lab blogs, so this is not an option!

Step 6: Done.

Lab Blogs and Accounts

If you need an account, or you need your own Category to group your posts in, or you need a link on the right side of the Lab Blog page to show all of your posts, you need to talk to me.

GWT Viz Api and Chart Tools API

So, I’ve ben working on my thesis, and I determined that using Cairo Graphics + GWT was really ineffecient, and way too much work. This is largely in part due to my discovery of the Google Chart Tools and, more specifically, the Google Visualization API. Both do pretty much the same thing, they create neat-looking graphs with very little demands on the user. The difference between the two is that Chart Tools create 2D images that you can stick on your website, rendered in less than a second. The Visualization API creates interactive graphs, which is, for me, 50 times better.

Continue reading

Dropdown Menus in Joomla

So, I did this maybe a week or two weeks ago, but it was a great victory for science and metagenomics, and I figured I’d post it here. I finally got dropdown menus working in Joomla, guys! Yayyyyyyy. If you go to phantome.org and mouse over the tools menu bar, you’ll get the condensed effort of my AWESOME work. Really, all it boils down to was I needed to click a single button.

Building dropdown menus, or “submenus” in Joomla is not terribly advanced. You make an item in whatever menu you’re working on, in this case the main menu. But instead of its parent being “Top” you make the parent an already existing item in the menu, in this case “Tools”.

However, unless you use my SECRET TRICK, the menu will only ever appear if you’re on the “Tools” page already. Which is dumb. People don’t want a menu for what they’re already looking at. So after a few hours of googling, downloading extensions and modules I didn’t need, and then a lot of clicking, I found the answer!

Edit the module for your menu, in my specific case I go to Extensions->Module Manager-> Main Menu in the administrator backend. Then you click the simple little box labeled “Always Show Sub-menu Items”, and save your changes. Voila! Success, and awesome. You now have infinite dropdown power. You can have dropdown menus, you can have dropdown menus inside those dropdown menus. Those menus can then shack up and raise little menus of their own. You can have nothing but menus, if you wanted. Infinite menus, dropping down.

Joomla is pretty cool, provided you step into a ring and box with it for like, nine hours.

man fsck this

As a few of you probably noticed, pipeline1, also known as seed.sdsu.edu, has been down at least since wednesday or thursday of last week. One of the drives was having “problems”, we’ll say, that were forcing pipe1 to be unable to boot. The actual boot drive wasn’t the issue. The second drive was the issue. It was formatted with an lvm2 filesystem. Also known as “logical partitions”. I guess it’s one way to get multiple partitions onto one drive. The catch is that it makes it really difficult to fsck it if there’s problems. After spending quite a while on it, here’s what I’ve done to get it fixed.

1: Boot off of an ubuntu install disc. It gives me graphical windows, a terminal, and easy root access. Tools used: Applications->Accessories->Terminal

2: I had to install lvdisplay, part of the lvm2 package, to get a look at our logical partitions, but I’ll tell you what they are so you don’t have to do that. Our two logical partitions are /dev/VolGroup00/LogVol00 and /dev/VolGroup00/LogVol01.

3: Here is the SECRET TRICK. If you try to fsck either of those, it’ll give you an error. First it will tell you that no such file exists, and second it will tell you that it tried anyways, and there’s a bad super block. The second statement is misleading, concentrate on the first. So what I did was go to /dev/VolGroup00, and take a look at the two partitions. Both of them were symlinks! *gasp*

4: Those links pointed to the REAL partitions. /dev/mapper/VolGroup00-LogVol00 and /dev/mapper/VolGroup00-LogVol01.

5: I ran fsck on the problem volume (volume 00) and lo and behold, success! All the orphaned inodes and corrupt linked lists are finding their parents and…being trimmed? I don’t know. Suffice to say fsck is currently running and hopefully pipe1 will be back up soon.

SEED Facelift

The new project I’m working on is a facelift for the TBLASTX results that are displayed on the Phage SEED here at edwardslab. The current one is functional but a little bit hard to read. Also it’s not very easy on the eyes, in my opinion. So I have taken up the charge of giving it a so-called facelift.

The code for the SeedViewer is all .cgi, so I can use web-friendly scripting language I want, I’ve chosen Perl to be consistent with the rest of the SEED’s programming.

I haven’t chosen a graphics library because I’m not sure what I want, and I haven’t done enough research into pros and cons. Or enough research period.

I am becoming skilled in Perl and am coding the framework as I spin my wheels with regards to the graphics.

Current graphics choices are: GD graphics library (simple, easy, on-demand .jpg/.png generation), Flash (popular, high-power, highest quality, interactive), Cairo (Pros/Cons not researched YET).

One big question I have is that the data I need is stored on Octopussy and updated regularly. I’m unsure whether I want to just open a pipe up to Octopussy, read the file, then copy it to a local data structure in memory, or copy the files over regularly via a daemon or script, and just make sure that I’m cleaning up after myself so I don’t blow up the server. There are also probably third or fourth options. If you think of anything, let me know. The first sounds slow and hard on memory, but local storage-efficient. The second requires me to write a daemon or script that then spends a LONG time copying files from one server to another. I’m not sure that’s the best way of doing things.

 

Networking Long Distance (It’s a Really Bad Idea)

Okay, guys.

If you were working in the lab on monday the 15th, somewhere around 5 or 6PM, then you noticed at somepoint that everything related to edwards.sdsu.edu stopped working. That’s the SEED, all the websites, everything.

Yeah, that was my fault. I’m sorry!

Rob has had me working on getting DHCP working on the new server, such that we feed internet in through one ethernet port (eth0), and it subdivides it out to all the OTHER servers, which are connected on another ethernet card (eth1). Ubuntu does NOT provide good documentation for dhcp. If you know about servers or about DHCP to begin with, it’s all you need. But I’m going to admit, I knew nothing. Nothing nothing nothing. So I followed their advice to the letter, and managed to do everything wrong.

Summary: I defined eth0 as our router, on a fixed IP. (Please remember that we’re currently feeding internet IN and OUT through that.) I also defined a wireless network with two sub domains inside of it, one pointing to eth1, and the other pointing to nothing. (An important thing to note, we don’t even HAVE a wireless card.)

So I logged in monday remotely, I wasn’t able to make it to campus, it was the only day all week I wasn’t going to be in the lab, and was like, “I am confident this will work! *Networking Restart*” Shortly after, the server disappeared from the world as we know it because I had just told it to stop using eth0 for internet. Panic ensued, Rob had to stop everything he was doing to go clean up my mess because I wasn’t even on campus, and I felt terrible. But I had kept the original configuration files for EVERY file I edited, and disaster was averted via those.

So now it is Tuesday. I’m in the lab, and I have started from step zero to configure dhcp. If you take all the information Ubuntu gives you and take it out of context, only apply it to eth1 with a bit of intuitive logic, you get our current situation: which is that DHCP works! I have posted detailed information on the labwiki.

This blog post is here to admit my mistakes, and impart a very important lesson to anyone who reads this: For the love of god, always save the originals of any file you edit, and NEVER change server configuration files if you are not next to the server.

The end.

Biobike Tooltips

Progress is being made, guys, I promise.

Here is the current issue: I’ve identified how the menus are made. Specifically the “Function menus” which contain the stuff you actually want tooltips for. They belong to a class called “dynamic palette menus” because they are built beforehand from a list stored server-side in biobike. At the server compile it reads this list and generates a menu item for each function. This seems like a fairly hairline difference between a “hard-coded” menu item. I guess the only difference being that if you make a new function, all you have to do is update that list with the function name and recompile the server and it will make a new menu item for it.

Either way, there’s a set of even more dynamic than the previously-mentioned dynamic menus. These are the ones I like to call the truly dynamic menus: the User Favorites menu. This pays attention to what functions you as the user are employing, and it puts your top five most used in a constantly-updating little menu box.

In order to get tooltips to show up on biobike, the question presents itself: Do I want to take a static approach, or a more dynamic approach? I think in the end the underlying changes will be the same. I, or hopefully someone more knowledgeable in Biology, will either have to go through and add a “Tooltip” variable to the definitions of each function in biobike, which is a string containing said tooltip, or a file that lisp reads to create an array holding all available tooltips, matched against all currently existing functions.

Actually making the tooltips appear is going to be easier than figuring out how to get the tooltips in there. Also, the decision isn’t technically mine alone. Since I’m not the only person looking at and maintaining this program, we’ve got a little bit of interoffice communication/collaboration going on!

Edit:I’ve discovered that every function, as it is defined, has a SUMMARY field that contans a string with EXACTLY what we wanted to show up in the tooltip. Why isn’t this anywhere in biobike already? I’m not sure. I’m really confused about it.