PHP
Adventure PHP Framework (APF) 1.11 released
The APF team is proud to anounce the new website together with the 1.11 stable release.
Revision 1.11 serves a reworking of the form support on the basis of taglibs. Now generic definition of validators and filters on the basis of the observer pattern is supported and forms can be customised to own needs more easily.
The OR mapper GenericORMapper already added in the release 1.9 was extended with tools to automatically setup and update a database. Now the developer can completely concentrate on the development of the logic of the application since the storage of the objects is completely managed by the mapper.
Part of the performance optimisations of the releases were optimisations in the core of the frameworks and the reworking of the integrated BenchmarkTimer. It now supplies the developer with a better graphic representation of the measurements to find hot-spots within an application. Thus, an application can the optimally prepared for operation.
With appearance of the release 1.11 the support for PHP 4 was announced discontinuation and the compatibility with PHP 5.3 was improved. In the coming version 1.12 lies the focus on the extension of the new form support and the reworking of the configuration component.
Styling the Drupal User Login Block – PHP Code & CSS
This tutorial goes through the steps of one way to create a custom user login block for Drupal. Best is to disable the original login block in the admin/build/block section, start with a new block with custom code, and then style the details with CSS. The requirements for this project are a rounded corner, blue background block with two custom tabs at the top.
1. in admin/build/blocks – click on the “add new block” tab
2. enter the following code:
< ?php global $user; ?>
< ?php if ($user->uid) : ?>
<span class="login_text">Welcome, </span> < ?php print ($user->name); ?> <br />
< ?php print l("Your Account",'user/'.$user->uid); ?> |
< ?php print l("Log-Out","logout"); ?>
< ?php else : ?>
<div id="usertabs">
<span class="utabs1">Log In</span><span class="utabs2"><a href="/user/register">Sign Up!</a></span>
</div>
<div id="umain">
<form action="/user?<?php print drupal_get_destination() ?>" method="post" id="user-login-form">
Username:
<input type="text" maxlength="60" name="name" id="edit-name" size="20" value="" tabindex="1" class="form-text required" />
<br />
Password:
<input type="password" name="pass" id="edit-pass" size="20" tabindex="2" class="form-text required" />
<br />
<span class="utabs3"><a href="/user/password" title="Forgot your password?">Forgot your password?</a></span>
<span><input type="submit" name="op" id="edit-submit" value="Log In" tabindex="3" class="form-submit" />
</span>
<input type="hidden" name="form_id" id="edit-user-login" value="user_login" />
</form>
</div>
< ?php endif; ?>
Read the rest of Styling the Drupal User Login Block – PHP Code & CSS »


