Skip to content

Commit

Permalink
Fix title, remove display of number in back albumart and fix route.php
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljamesscott committed May 14, 2009
1 parent b745535 commit 253e60b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion install.xml
Expand Up @@ -8,7 +8,7 @@
<authorUrl>http://danieljamesscott.org</authorUrl>
<copyright>Copyright Daniel Scott 2009</copyright>
<license>GPL V3 or later</license>
<version>0.5</version>
<version>0.6</version>
<description>Music management component</description>

<install>
Expand Down
2 changes: 0 additions & 2 deletions router.php
Expand Up @@ -52,7 +52,6 @@ function MusicParseRoute($segments)
//Standard routing for articles
if(!isset($item))
{
$vars['view'] = $segments[$count - 2];;
$vars['id'] = $segments[$count - 1];
return $vars;
}
Expand All @@ -63,7 +62,6 @@ function MusicParseRoute($segments)
case 'album' :
{
$vars['id'] = $segments[$count-1];
$vars['view'] = 'member';

} break;
}
Expand Down
12 changes: 6 additions & 6 deletions views/album/tmpl/default.php
@@ -1,10 +1,11 @@
<?php defined( '_JEXEC' ) or die(); ?>
<div class="componentheading<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<?php if ($this->album->name) :
echo $this->params->get('page_title').' - '.$this->album->name;
else :
echo $this->params->get('page_title');
endif; ?>
<?php if ($this->params->def('show_page_title')) {
echo $this->params->get('page_title');
} else {
echo $this->album->name;
}
?>
</div>
<div class="contentpane<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
Expand Down Expand Up @@ -38,7 +39,6 @@
<?php echo nl2br($this->album->description); ?>
</td>
<td align="right">
<?php print $this->params->get('show_albumart_back'); ?>
<?php if ($this->params->get('show_albumart_back')) { ?>
<?php if ($this->album->albumart_back == "") {
print "No back album art available";
Expand Down
21 changes: 13 additions & 8 deletions views/album/view.html.php
Expand Up @@ -62,6 +62,19 @@ function display($tpl = null)
if (is_object( $menu )) {
$menu_params = new JParameter( $menu->params );
$pparams->merge($menu_params);
if (!$menu_params->get('page_title')) {
$pparams->set('page_title', $album->name);
}
} else {
$pparams->set('page_title', $album->name);
}

// Set the page title and pathway
if ($pparams->get('page_title')) {
// Add the album breadcrumbs item
$document->setTitle(JText::_('Music').' - '.$pparams->get('page_title'));
} else {
$document->setTitle(JText::_('Music'));
}

$songs = $model->getSongs( $options );
Expand Down Expand Up @@ -89,14 +102,6 @@ function display($tpl = null)
$album =& JTable::getInstance( 'album' );
}

// Set the page title and pathway
if ($album->name) {
// Add the album breadcrumbs item
$document->setTitle(JText::_('Music').' - '.$album->name);
} else {
$document->setTitle(JText::_('Music'));
}

// table ordering
if ( $filter_order_Dir == 'DESC' ) {
$lists['order_Dir'] = 'ASC';
Expand Down

0 comments on commit 253e60b

Please sign in to comment.