Nah, Lockharts strange competence can't be because of the diary. The books were enchanted before they were sold to the students, Malfoy brought the diary to the bookstore on the day lockhart was there signing his books. It's interesting though, a skilled Gilderoy?