The online racing simulator
HTML/W3C validation help [web design]
(5 posts, started )
#1 - CSU1
HTML/W3C validation help [web design]
I've finally whittled my way down to three W3C errors and am damned if I'm stopping at 3!
...would appreciate some advice if anyone cares to jump in

GeoUrl: Cause of errors 1 & 2
For some reason the meta keyword that GeoUrl uses (Dc.title) is not recognized by the powers that be, is there a way to get this to validate?

HTML5 dl attribute:
As per the W3C validation results it seems I'm missing child <dd> elements somewhere, here is the related code:

<?php 
 
<!-- Aside -->
if ((
$params->get('show_author')) or ($params->get('show_category')) or ($params->get('show_create_date')) or ($params->get('show_publish_date')) or ($params->get('show_parent_category'))
          or (
$params->get('show_print_icon')) or ($params->get('show_email_icon')) or ($canEdit)
          ) : 
  <
aside class="article-aside clearfix">

  if ((
$params->get('show_author')) or ($params->get('show_category')) or ($params->get('show_create_date')) or ($params->get('show_publish_date')) or ($params->get('show_parent_category'))) : 
  <
dl class="article-info pull-left">
  <
dt class="article-info-term"> echo JText::_('COM_CONTENT_ARTICLE_INFO'); </dt>
  
    if (
$params->get('show_author') && !empty($this->item->author)) : 
    <
dd class="createdby">
      
$author =  $this->item->author
      
$author = ($this->item->created_by_alias $this->item->created_by_alias $author);

        if (!empty(
$this->item->contactid ) &&  $params->get('link_author') == true):
              echo 
JText::sprintf('COM_CONTENT_WRITTEN_BY' ,
          
'<span>'.JHtml::_('link',JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid),$author).'</span>'); 
        else :
          echo 
JText::sprintf('COM_CONTENT_WRITTEN_BY''<span>'.$author.'</span>'); 
        endif; 
    </
dd>
    endif; 
?>

HTML output of above code
Quote : <!-- Aside -->
<aside class="article-aside clearfix">

<dl class="article-info pull-left">
<dt class="article-info-term">Details</dt>





</dl>

I think the first two problems are not fixable since that meta tag just does not actually exist.

The last problem speaks for itself. a <dl> needs a <dt> and <dd>.

Example:

<dl>
<dt>LFS</dt>
<dd>Online racing simulator</dd>
<dt>NFS</dt>
<dd>Arcade game</dd>
</dl>

edit: I see you do have a <dd> in the code but it's not working.

I'm not familiar with GeoUrl, so you should check this if statement since it's not working it seems

if ($params->get('show_author') && !empty($this->item->author)) :

Is it some kind of CMS? Are you sure you're showing the author, and if it's filled in? I'm just grasping here.
#3 - CSU1
...hummm...it looks like in the parameters if Author is set to 'hidden' no <dd> is created

I cant write code, how do I say if params show author=no else --> empty <dd></dd>



E;
yes it's joomla and I don't want the author shown for aesthetic reasons

E;

where it sayes <dd class="createdby"> should that not encapsulate the line before it (<?php if ($params->get('show_author') && !empty($this->item->author)) : ?>)
this way if show author is false an empty <dd> is produced - really dunno neither
???
I'm not really sure how this works, but this should do what you want. Not sure if it's a neat fix though, or if it works at all since it's not regular PHP.


<?php if ($params->get('show_author') && !empty($this->item->author)) : ?>
<dd class="createdby">
<?php $author = $this->item->author; ?>
<?php $author = ($this->item->created_by_alias ? $this->item->created_by_alias : $author);?>

<?php if (!empty($this->item->contactid ) && $params->get('link_author') == true):?>
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY' ,
'<span>'.JHtml::_('link',JRoute::_('index.php?option=com_contact&view=contact&id='.$this->item->contactid),$author).'</span>'); ?>
<?php else :?>
<?php echo JText::sprintf('COM_CONTENT_WRITTEN_BY', '<span>'.$author.'</span>'); ?>
<?php endif; ?>
</dd>
<?php else :?>
<dd class="createdby"></dd>
<?php endif; ?>

Quote from CSU1 :where it sayes <dd class="createdby"> should that not encapsulate the line before it (<?php if ($params->get('show_author') && !empty($this->item->author)) : ?>)???

That would also do the job I guess. Don't forget to also move the closing </dd> as well to keep it valid.

Edit: If you don't want to show the user at all you could better just get rid of the <dl> since it's not mean for what you want to do with it.
-
(Bose321) DELETED by Bose321 : double
#5 - CSU1
I moved the class before the <php if> line and it created an empty <dd> as opposed to creating nothing....stupid

fixed, thanks...I guess I'll have to live with two validation errors...whats that Meatloaf sayes?

HTML/W3C validation help [web design]
(5 posts, started )
FGED GREDG RDFGDR GSFDG