Archive for July 1st, 2010

Drupal myself and I – Chapter 7: Obvious but Overlooked

The first Obvious yet overlooked thing I just got around to setting up with a module called ‘Comment Notify’

Comment notify is a great little module that I didn’t even think about over the past week and a half of drupal setup but it is such a common sense one that I wonder how it was overlooked.  Especially when considering the way the forum’s are setup.  This module was actually quick and painless to setup.   You just head over to http://drupal.org/project/comment_notify download it, install it and then the configuration is pretty straight forward if you follow the directions.  But without your users will not be able to subscribe to forum threads and with it everyone can be auto-subscribed to their own comments which is great to keep the team communication going full bore.  Something that is so important when you are organizing people around the world

The second Obvious but Overlooked aspect of my setup was the fact that as an admin my view is going to be different than my teams view.  For some things this is a no brainer like admin menu’s and configuration screens, however when I am outside of the administration area of Drupal I just assumed that everyone would be seeing what I am seeing.  Not so much.  After writing a big long instructional article on cataloging submissions and organising assets I had one of my team members inform me that half of the links and buttons I referenced in the article didn’t exist for him.  So I created a quick dummy account, granted it the same perms as the other users and lo’ and behold I had 1/2 of the menu’s than with my admin account.  I just had to go through the roles and permissions setup for the users and grant them all access to the modules that they needed to use but definitely something to check after you spend a week going nuts and setting up a flurry of features.  Double chck that your users have access to them :)

Tags: , , , , , , , , ,

Myself Drupal and Me – Chapter 6.5 and 7: Jquery UI &Recent images

So the 1/2 a chapter is accounted for because of a little upgrade that needed to happen on jquery UI.   You should do this regardless of if you’ve encountered any bugs but I started to receive errors telling me that ui.core.js is missing.  In which case you’ll need to install the latest version of jquery.ui and following these instructions: http://drupal.org/node/376325

Now the next thing on the agenda was that I wanted my team to be able to log in and have a portion of the sidebar dedicated to showing the last 10 images uploaded by anyone else on the team.  I fooled around with a module called featured content, but that went no where.  Next was a module called Views Showcase, which was supposed to show this cool ass showcase highlighting the latest items on a node.  That also didn’t work as the instructions were 3 years old and the views module has changed too much since then.

Now, I’m not sure if I installed a module that made this appear, but suddenly when I went into the blocks config I noticed a ‘latest images’ option there which I promptly configured and dragged into the sidebar.  Viola!  Just like that I now have the latest images on my front page.  Huzza!

PS:  There are two things that you want to make sure of here.  First is that you didn’t install the jquery update module which gets drupal to grab and use the latest version of jqueury.  Even if yo uremove /misc/jquery.js completely this module will override it and you’ll still be stuck with this html error.

The second thing is that you can also look to the /misc/jquery.form.js for a solution.  If it is still going on head over to : http://jquery.malsup.com/form/#download and download the latest version to your server.  Might help

Tags: , , , , ,

Me, Myself and Drupal – Chapter 6: Image uploads, Comment Attachments

If you were thinking that the Drupal excitement was going to let up as we progressed then you are definitely in for a treat because it’s still as troublesome wrangling this CMS to do exactly what I want it to as before.

Because I’ve spent the past 2-3 years working with Dotproject I’ve come to expect certain features in a PMS.  For example, I want my crew to be able to attach WIP’s if they are commenting on a task that they are working on.  This way the conversation can be contained all within the PMS and you dont’ need a second system to talk about the task that you are working on.  Well Drupal doesn’t do this.  The thing with Drupal is that you can only attach images, or files in general to things that create nodes.  Image nodes, pages, books, etc etc.  Well with Storm the way that you update your task is by filing out a Time Tracking sheet or by commenting on it.  The problem is that comments don’t create nodes unto themselves they are tacked onto existing nodes, meaning that uploads and attachments aren’t allowed.  Funny enough the same goes for the Forums.  In an oversight that is almost embarassing the Drupal forums don’t allow you to attach files or images to any replies to an original post, something which all forums have been doing since the dawn of time.   There is however a nice comment attachment module that you can install, although that wasn’t without it’s challenges.

Firstly, for whatever reason the comment attachment module figures that it needs to stick the files in /system/files/images or /system/files .  The problem here of course is that this directory doesn’t exist.  IT is not part of the drupal install at all, no other module creates or needs it, but for some reason the comment attachment module figures this is where files go, when in fact they are being uploaded to /sites/{yoursitename}/files or /sites/default/sites as is specified by drupal.  So I could have gone through the module files and found where the hell the reference to this phantom dir was but instead I just hopped into my server and made a sym link to it.

# cd domain.com/drupal

#mkdir system

#cd system

#ln -s ../sites/{mysitename}/ ./

and viola, all of a sudden the comment uploader module had somewhere to throw it’s files and they all ended up in the same place as the other upload modules in drupal.

So this solved this problem, the module is actually almost 1/2 working now, key word ‘almost’ .  You first need to go into content types and find all of the content types that you want to enable the file uploads for the comments.   The forum is one obvious one, but I just went to every content type that is used frequently.  Posts, books, tasks, etc etc.  You have to configure each one, go down to the comments section and enable file attachments or uploads or whatever it is called.  And Viola!  You should have comment uploads… Key word here is ‘should’ because of course you still don’t.

The attach option now shows up on the comments, and sure enough you can click on the browse button and open a window to find the file that you want to upload, and sure enough you can start the upload process but right when it finishes you will see a beautiful error message saying “html error 0: /comment-upload/js”  .  Awesome eh?  Yea, I thought so too!  So now we figure out what the hell is causing this problem and it turns out that an asshole of a javascript is doing it because if you have NoScript installed in Firefox and you set this page and completely untrusted guess what you can do?  That’s right boys and girls you can upload and attach to your hearts content, which means that some jackass javascript is being a jerk.  Time to find out which one it is!

Now on my page I had the following scripts loading:

<script type="text/javascript" src="/misc/jquery.js?S"></script>
<script type="text/javascript" src="/misc/drupal.js?S"></script>
<script type="text/javascript" defer="defer" src="/modules/admin_menu/admin_menu.js?S"></script>
<script type="text/javascript" src="/modules/insertFrame/insertFrame.js?S"></script>
<script type="text/javascript" src="/modules/rounded_corners/jquery.corner.js?S"></script>
<script type="text/javascript" src="/modules/storm/storm.js?S"></script>
<script type="text/javascript" src="/modules/storm/storminvoice/storminvoice.js?S"></script>
<script type="text/javascript" src="/modules/storm/stormperson/stormperson.js?S"></script>
<script type="text/javascript" src="/modules/storm/stormproject/stormproject.js?S"></script>
<script type="text/javascript" src="/modules/storm/stormtask/stormtask.js?S"></script>
<script type="text/javascript" src="/modules/storm/stormticket/stormticket.js?S"></script>
<script type="text/javascript" src="/modules/storm_dashboard/json2.js?S"></script>
<script type="text/javascript" src="/modules/storm_dashboard/storm_dashboard.js?S"></script>
<script type="text/javascript" src="/misc/collapse.js?S"></script>
<script type="text/javascript" src="/modules/storm_quicktt/storm_quicktt.js?S"></script>
<script type="text/javascript" src="/modules/storm_quicktt/jquery.timers.js?S"></script>
<script type="text/javascript" src="/modules/tableofcontents/jquery.scrollTo-min.js?S"></script>
<script type="text/javascript" src="/modules/tableofcontents/jquery.localscroll-min.js?S"></script>
<script type="text/javascript" src="/modules/tableofcontents/tableofcontents.js?S"></script>
<script type="text/javascript" src="/modules/webfm/modules/webfm_mp3/mp3player/audio-player.js?S"></script>
<script type="text/javascript" src="/modules/fckeditor/fckeditor.utils.js?S"></script>
<script type="text/javascript" src="/misc/textarea.js?S"></script>

Now considering that basically everyone and their brother’s dog is bitching about Jquery fucking up everything it touches I tried renaming /misc/jquery.js to /misc/jquery.js.bak and you’ll never guess what happened next?  My image attachment/uploader module works.  I figured that some jquery is better than none, so I went over to http://docs.jquery.com/Downloading_jQuery , grabbed all of the older versions and started trying each one to see how far back I would have to go to get one that worked.  I simply download them all into my /misc/ directory and renamed them from jquery-1.4.js to jquery.js or whatever the version number was.  I had to go all the way back to version 1.2 before it stopped giving me that lovely error message.  I lost my fancy uploading progress bar but at least it works.

So ya, that has been my fun for today, I now have a fully function forum and PMS in the sense that I am used to.  Scratch those from the list! :)   Now I dive into the wide world of the SVN.  I feel this is going to be the most demanding, and most rewarding setup so far as a well setup SVN involves a fair bit of learning and understanding.  And if I can’t do it well then why bother at all so off I go to learn!

Tags: , , , , , , , ,

Page optimized by WP Minify WordPress Plugin