Skip to main content

Posts

Showing posts from 2013

Something about LaTeX...

Currently I am writing a paper in LaTeX, using Eclipse as an editor and jura as the document type. The paper is restricted to 20 pages, and both the page format and the tracking, as well as the line spacing, are defined and cannot be played with. I spent some time fiddling with the jura files to get more space, and I came across some interesting possibilities (at least I think they are). As I found nothing on them on the internet I thought I'd share it with you, even though this might be very specific to the _old_ jura package which still had the alphanum.sty file (just found out that there is a newer version of the jura package which even has comments, the alphanum.sty is included in the jura file - you can obtain it here - the regular jura package is part of the texlive and miktex distributions). As a result of my research, I found out how to achieve so called runin headings: old: A.I.1.b. This heading likes to stay in the text and this is the content. It used to st

Joomla! 2.5 / Apache: File Downloads, docx etc.

I let my users upload files and link to them in their articles. As I want to force them to download the files directly (and don't want them to view it in the browser), I am using a file called download.php which I include in the URLs. Thus, instead of " /myfolder/myfiles/myfile.pdf " the href attribute of the link will be like " download.php?filename=/myfolder/myfiles/myfile.pdf ". In download.php I declare headers and do some things about the filename. It was always working fine for pdf or doc files, but there seemed to be something wrong with the "new" file formats of Office (docx, ppsx etc.) - if a user clicked on that file, it would be downloaded, but could not be opened (the message said something like "cannot read file"). A comparison of the original file and the downloaded file showed no difference except for one character which was not even visible. Fun fact: OpenOffice could open the file without any problems... Lots of pages su

Joomla! 2.5: Finally - A Soulution For Applying Changes (Front End Editing)

This is about (front end) creating / editing an article. I have been looking for a way to save (apply changes) in Joomla's front end for a really long time. What I needed was just a button which would let me save changes without redirecting somewhere else... Recently I came across this page . I applied all suggested changes to my page, and it works! On the downside you need to edit Joomla core files, and the changes made to them will probably be lost after the next update...

Joomla! 2.5: Another LDAP (?) Issue

This one was really driving me crazy. Really. But we can't blame LDAP for that, at least I don't think so... We have a LDAP authentication set up which is working really well. Except when a user enters a wrong password - then he just gets a blank page. The same is the case for articles with a user restriction (user need to be logged in to view the article) - again, just a blank page. Turns out the blank page is not as blank as it seems - the source is there, including a nice error message. And a line somewhere in the head saying html{display:none;} A lot of research took me to this page , and I decided to try the following, out of some instinct: "Comment out line 823 (or thereabouts) in: libraries> joomla > html > html> behavior.php $document->addStyleDeclaration('html { display:none }'); To comment out, just add 2 slashes "//" in front of the line." Works like a charm. I am afraid the change will be undone by the next

Recover Joomla PhpMyAdmin MySQL Database

This morning I found myself confronted with a new problem: Our server crashed, we had to set it up again - from scratch. Fortunately, we did have some backups - the Joomla! files, and the mysql folder (on Linux: /var/lib/mysql). (We are using a Linux server with mysql and phpmyadmin.) I then tried to recover our database. What I thought: Just copy the contents from the database backup folder (mysql/joomla) to the mysql folder on the server and everything should be fine. That was what they said on the internet, too. Turns out there were only .frm files in that folder, no .myd etc. Turns out that .frm only contains the table structure. But where is my data? Everything's not lost. I found a huge file in the mysql backup folder, called ibdata1. So what you need to do now is (instructions are for Linux): - Stop your mysql service   sudo stop mysql - Copy that ibdata1 file to the /var/lib/mysql folder (consider making a backup of the existing ibdata1 file)   cd /var/lib/