hi,
As the subject explains i want to know if it is possible to write the code of the cb_login module WITHOUT spaghetti-code.
I'm using
www.qualidator.com
to see if my site is high-quality coded or not. On the look-up i've recognised that i got the error of using spaghetti-code.
These code was generated by the cb_login module and i started rewriting it.
This code is attachet to this thread (but not finished).
The CSS-File has to be included in your template-index.php.
I've only tested it in flat-view and the avatar-image is ALWAYS on the left site (if you choose to show the avatar-image).
I want to know if it is possible to avoid spaghetti-code in the future because it is no big deal to extract "style"-tags into an extra CSS-File!
An other problem is that the "width"- and "height"-tags for the images on line 654 and 659 are not valid. In this code:
[code:1]
$txtusername = '<label for="mod_login_username'.$class_sfx.'">'
. ( $show_username_pass_icons >= 1 ? '<img src="' . $urlImgPath . 'username.png" class="image_1" alt="' . $userNameText . '" /> ' : '' )
. ( $show_username_pass_icons <= 1 ? $userNameText : '' )
. '</label>'
;
$txtpassword = '<label for="mod_login_password'.$class_sfx.'">'
. ( $show_username_pass_icons >= 1 ? '<img src="' . $urlImgPath . 'password.png" class="image_1" alt="' . _UE_PASS . '" /> ' : '' )
. ( $show_username_pass_icons <= 1 ? _UE_PASS : '' )
. '</label>'
;
[/code:1]
I will be very happy if this will be fixed in the future releases. I love the CommunityBuilder and it's power but i miss valid code.
Otherwise you guys do a great job!
Sorry for my bad english!
Greats
Sascha Hofmann
Attachment cb_login_nospaghetti.zip not found
Post edited by: klopsknoedel, at: 2009/06/13 14:23