Fork me on GitHub

pe_pplog demo page

Main menu

Redesigning forms

No comments
The forms in the pplog were in table format. This is actually bad design practice as it means a lot of unused white space and forms resizing badly to smaller screens.
See this example:


I redesigned them using the <legend>, <p> and <label> tags, which does not onlz have the advantage of using the space more efficiently and resizing nicely


but also makes the forms accessible for people using screen readers. I decided to get rid of the captcha, as it was easy for a spambot to circumvent and decided to give the possibility to prompt for random questions instead. I also added a honeypot to fool spambots. These measures should be effective against robots, the only thing helping against trolls is using the security question as a password.

While I was at it I added some bells and whistles to the new/edit entry forms:


Now when checking and unchecking "isHTML" the bbcode buttons disappear and reappear and existing categories are in a select box



Some issues

2 Comments
The notes plugin and it's implementation have a few issues:

  • When writing a new note it did not show the note after submitting, but the entry with the same file number.

  • When deleting a note the comments belonging for the post with the same file name also got deleted


  • Comments issue

  • Sometimes comments get posted twice


  • Other things

  • The bbcode is in an unusual form, needs standardization

  • The code is messy, lot's of duplicated code


  • I'm at the moment working on the above and even adding some more enhancements, such as comment preview, having galleries created via bbcode instead of relying on an extra plugin and maybe offering other options (such as markup) instead of bbcode. Also some css/html changes to allow for more different themes.
    Look at http://github.com/efiabruni to see the latest developments

    Posted on - Categories: bugs changes


    Roadmap

    No comments
    In a few days a friend comes to visit and I want to release the (probably last) version of the blog before then. Upcoming changes:

    css based lightboxes (no more prettyPhoto, see the example with backgrounds)
    New plugin: ability to take notes (this was something I always wanted to add, because I am a slow writer)
    Changes to sending mail (see previous post)
    Possibility to add smilies with one click (to test write a comment :)).
    Adding the upload plugin
    Having the background pictures in a less ridiculous size.
    Posted on - Categories: changes


    Help with the mail, please!

    1 Comment
    Fixing the contact script.

    I got a lot of comments from people like me, who don't have sendmail installed.

    In the current version mail is send with the following code:


    open (MAIL,"|/usr/lib/sendmail -t");
    print MAIL "To: $config_sendMailWithNewCommentMail\n";
    print MAIL "From: $email, \t $author \n";
    print MAIL "Subject: $title\n\n";
    print MAIL "$message ";
    close(MAIL);



    Obviously this only works for people who have sendmail installed at /usr/lib/sendmail. In the new version I want to the user to be able to choose which program to use in the config file:

    @config_sendMailWithNewCommentMail
    =('/usr/lib/sendmail -t','example@email.com');

    Thus the code becomes:
    open (MAIL,"|$config_sendMailWithNewCommentMail[0]");
    print MAIL "To: $config_sendMailWithNewCommentMail[1]\n";
    print MAIL "From: $email, \t $author \n";
    print MAIL "Subject: $title\n\n";
    print MAIL "$message ";
    close(MAIL);


    I don't have sendmail or the like installed, so if any one can tell me if this makes sense, that would be nice.
    I added the option for people like me to have the messages stored locally and read inside the admin page of the blog, by putting 'local' instead of a path.
    Posted on - Categories: changes


    Language support

    No comments
    As you can see in the main menu it is possible to choose a language (cookies need to be enabled).
    This is not going to be a feature, it is a way for me to test (and demonstrate) localisation of the blog. There will be a proper German and English version (with documentation being in either language) and Spanish localisation available, as well as an incomplete Greek one (taken from the translation of the original PPLOG done by koulaxizis.
    There will also be the possibility to add a custom translation if one wishes so.

    I'm still busy with spellchecking and correction of the Spanish translation. Please inform me of any mistakes you might find...

    The localisation does not depend on any additional modules or programs, I quickly abandoned the idea of gettext and the like and relied instead on a simple hash in the pe_Config.pl file, such as:

    our%locale;
    
    $locale {"EN"} = {
    menu => "Main Menu",
    ...
    };
    $locale {"DE"} = {
    menu => "Hauptmenu",
    ...
    }


    setting the language with our $lang=...
    This means I replaced all text in the blog with:
    $locale{$lang}->{key}

    I wonder what this says about me...

    Anyway, here is what I threw together for the "set language" button and the "set style" button.
    After the "do RSS section":

    	my $style = cookie('style');
    
    my $language = cookie ('lang');

    $config_currentStyleSheet = $style if defined $style;
    $lang = $language if defined $language;

    if (r('style') ne ''){
    my $style = r('style').".css";
    my $cookie = cookie (-name => 'style', value => $style);
    $config_currentStyleSheet = $style;
    print header (-charset => qw(utf-8), -cookie => $cookie);
    }
    elsif (r('lang') ne ''){
    $lang = r('lang');
    my $cookie = cookie (-name => 'lang', value => $lang);
    print header (-charset => qw(utf-8), -cookie => $cookie);
    }
    else {print header(-charset => qw(utf-8));}


    Menu entries:
    print '<ul class="menu"><li><a class="menu" href="#">Set Style »</a><ul class="drop">
    
    <li><a href="?style=style">Default</a></li>
    <li><a href="?style=darkgrey">Dark Grey</a></li>
    </ul></li></ul>';

    print '<ul class="menu"><li><a class="menu" href="#">Set Language »</a><ul class="drop">';
    foreach (keys%locale){
    print '<li><a href="?lang='.$_.'">'.$_.'</a></li>';
    }
    print '</ul></li></ul>';


    fun!



    Pages: [1] [2]