Core hacking tip for XHTML strict compliance

Locked
MattyR
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Aug 26, 2006 8:21 am

Core hacking tip for XHTML strict compliance

Post by MattyR » Sat Aug 26, 2006 8:47 am

Just wanted to give folks a heads up if you're trying to go the mile for strict compliance - in the rendering output, you don't really have to get rid of all the tables. You will, however, have to do some core hacking to remove extra rendered XHTML output. For example, any td "width", div "aligns", and especially image "border", "name", and "align". The fix to the image attributes can be done by editing one line in includes/joomla.php. In my editor, it was line 4961, in the function ImageCheck for class mosAdminMenus.

The line that needs to be edited looks like this:

$image = '';


For compliance, change it to


$image = '';


Next, edit function botVoting in mosvote.php in your mambots/content directory to


function botVoting( &$row, &$params, $page=0 ) {
global $Itemid, $task;

$id = $row->id;
$option = 'com_content';

$html = '';
if ($params->get( 'rating' ) && !$params->get( 'popup' )){
$html .= '';
$html .= '';
$img = '';

// look for images in template if available
$starImageOn = mosAdminMenus::ImageCheck( 'rating_star.png', '/images/M_images/' );
$starImageOff = mosAdminMenus::ImageCheck( 'rating_star_blank.png', '/images/M_images/' );

for ($i=0; $i rating; $i++) {
$img .= $starImageOn;
}
for ($i=$row->rating; $i rating_count );
$url = @$_SERVER['REQUEST_URI'];
$url = ampReplace( $url );

if (!$params->get( 'intro_only' ) && $task != "blogsection") {
$html .= '';
$html .= _VOTE_POOR;
$html .= '';
$html .= '';
$html .= '';
$html .= '';
$html .= '';
$html .= _VOTE_BEST;
$html .= ' ';
$html .= '';
$html .= '';
$html .= '';
$html .= '';
$html .= '';
$html .= '';
$html .= '';
}
$html .= '';
$html .= '';
}
return $html;
}


To fix the width attributes, you'll have to do a lot of editing to content.html.php from your components/com_content/ directory. Also, remove the width reference in line 1151 in content.php, same folder.


You'll also need to change the footer generator code (i put the license /copyright in statically) to remove a div "align."

Best of luck!
~MattyR
Last edited by MattyR on Sat Aug 26, 2006 9:06 am, edited 1 time in total.

joo-joo-mla
Joomla! Intern
Joomla! Intern
Posts: 82
Joined: Thu Sep 07, 2006 9:35 am

Re: Core hacking tip for XHTML strict compliance

Post by joo-joo-mla » Thu Oct 26, 2006 11:05 pm

Hi,

this argoment is VERY IMPORTANT FOR MY WORK.

Thanx for these strict tips. Can i ask you other core hacking?


THANX A LOT  ;)

MattyR
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Aug 26, 2006 8:21 am

Re: Core hacking tip for XHTML strict compliance

Post by MattyR » Fri Oct 27, 2006 1:53 am

feel free - numatty@gmail.com


Locked

Return to “Design and Accessibility - Archived”