Tag: trick

Using Mantis with a reduced mail() function

Mantis is a free web-based bug tracker. As most web trackers, it uses e-mail to notify testers and developers about the evolutions of issues they have reported or they just follow. For that purpose, Mantis uses Codeworx PHP Mailer class that gives you the opportunity to use the PHP mail() function, sendmail or a SMTP server to send those e-mails.

The use of the PHP mail() function is the default option. Unfortunately, some web hosting companies limits the PHP mail() function by forbidding the use of the 4th and 5th (optional) parameters. The result is that you can’t use the e-mail functionality of PHP mailer / Mantis because they use the 4th parameter.

The solution is to edit the file class.phpmailer.php in the directory mantis-dir/core/phpmailer/. Inside the file, look for the two lines containing the string “@mail” and replace the 4th argument by the e-mail address where the e-mail will be sent from. Example:

   $rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
         "From: \"mybugs - Mantis bug tracker\" <me@domaine.tld>");
}
else
   $rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
         "From: \"mybugs - Mantis bug tracker\" <me@domaine.tld>");

Now you have a fully functional bug tracker 🙂

JoVE and (self-)archiving?

In my previous post, I was glad to see that the Journal of Visualized Experiments (JoVE) was now indexed by PubMed. I then spent some time watching some very interesting videos. And I realized that something is missing …

In my mind, I thought that third-party archiving (like arXiv or self-archiving) was one of the mandatory requirements for Open Access journals … and I was wrong. It seems JoVE is not giving the (technical) possibility to download the publication from their website (all what you can download is the abstract in text version). Now that this publication is a video and not a text/PDF version, it’s a problem for me (who cares?) and the Open Access movement (imho).

“Classical” Open Access journals are “just” an evolution of traditional, Closed Access journals (or rather a return to the original transmission form of scientific papers): usually, you can read the paper on the journal website but you can also download it and print it if you want (for offline reading or if you still prefer articles on paper). The problem with videos is that you can’t print them. Is it a sufficient reason to forbid the download of these videos?

Fortunately, there is a technical trick to allow you to download the video (it will still be in Flash 9 format but this problem is currently out of our scope). Once you are on the page of the interesting video (example), view its source code (Ctrl+U in Firefox) and look for the string “xml_file_name”. You can now copy the value of this variable and you can stop before the first “%26” you encounter ; for our example, we’ll copy this: “http://www.jove.com/projects/VideoChapterXML/default.aspx?VideoID=211&#8221;. Enter this in your address bar and you’ll get another (XML) file (hence the name). Now on the first line, you’ll get the URL of your video in Flash format (flv); in our example: “http://source.jove.com/164.flv&#8221;.

In the future I wonder if JoVE will include a link to download its videos or it will obfuscate its source code in order to forbid further download.