1order Posted May 30, 2012 Share Posted May 30, 2012 Hello I'm really not sure if anyone may assist in any such manner -however at currently i'm using joomla's music collection component music collection 2.3.0 which allows users to upload their own content via the frontend of the site...however whenever the user try to upload the end result are implode() [function.implode]: Invalid arguments passed in components/com_muscol/views/album/tmpl/default.php on line 193 without the item been uploaded......the code at line 193 of the document is: <strong class="label_detailed_album"><?php echo JText::_( 'Type' ); ?></strong> <span class="value_detailed_album"><?php echo implode(" / ",$this->album->types); ?></span><br />...any such aid would be greatly appreciated. Kind Regards Quote Link to comment https://forums.phpfreaks.com/topic/263379-joomla-music-collection-invalid-arguments-passed-in-components/ Share on other sites More sharing options...
ManiacDan Posted May 30, 2012 Share Posted May 30, 2012 $this->album->types is expected to be an array. It isn't. That's all we can tell you without direct access to your code. Quote Link to comment https://forums.phpfreaks.com/topic/263379-joomla-music-collection-invalid-arguments-passed-in-components/#findComment-1349776 Share on other sites More sharing options...
1order Posted May 30, 2012 Author Share Posted May 30, 2012 Thank you very much for your aid...as you maybe aware...i'm really not at all aware of php encoding of any sort - however, the contents of the file is as follow: defined('_JEXEC') or die('Restricted access'); $user =& JFactory::getUser(); ?> <? if($this->params->get('showletternavigation')){ echo MusColHelper::letter_navigation($this->album->letter); } $itemid = $this->params->get('itemid'); if($itemid != "") $itemid = "&Itemid=" . $itemid; ?> <? echo MusColHelper::edit_button_album($this->album->id); ?> <?php $artist_link = MusColHelper::routeArtist($this->album->artist_id); ?> <div class='cap'> <table border='0' cellpadding='0' cellspacing='0' width='100%'> <tr> <td><h2 class='artista_disc'><a href='<?php echo $artist_link; ?>'> <?php $image_attr = array("title" => $this->album->format_name); $format_image = JHTML::image('images/formats/' . $this->album->icon , $this->album->format_name, $image_attr ); if($this->album->artist2){ $image_attr = array( "title" => $this->album->artist_name ); $image_for_artist = JHTML::image('images/album_extra/artist_name/' . $this->album->artist2 , $this->album->artist_name , $image_attr ); echo $image_for_artist; } else echo $this->album->artist_name; ?> <?php echo $this->album->subartist; ?></a></h2></td> <td align='right'><?php echo $format_image; ?></td> </tr> </table> <h1 class='album_disc'> <?php if($this->album->name2){ $image_attr = array( "title" => $this->album->name ); $image_for_album = JHTML::image('images/album_extra/album_name/' . $this->album->name2 , $this->album->name , $image_attr ); echo $image_for_album; } else echo $this->album->name; ?> <span class='subtitle_disc'><?php echo $this->album->subtitle; ?></span> </h1> <div class='year_disc'> <table border='0' cellpadding='0' cellspacing='0' width='100%'> <tr> <td><?php echo $this->album->year; ?> <? if($this->params->get('showalbum_adminrating', 1)){ ?> <?php echo MusColHelper::show_stars($this->album->points,true); ?> <? } ?> <? if($this->params->get('showalbum_adminrating', 1) && $this->params->get('showalbum_userrating', 1)){ ?> / <? } ?> <? if($this->params->get('showalbum_userrating', 1)){ ?> <?php echo MusColHelper::show_stars($this->average_rating); ?> <span class="num_ratings"><?php echo $this->num_rating ; ?> <?php if( $this->num_rating == 1) echo JText::_('RATING'); else echo JText::_('RATINGS'); ?> </span> <? } ?></td> <td align='right'><?php for($k=0;$k < count($this->album->tags); $k++){ if(isset($this->album->tags[$k]->tag_name)){ $image_attr = array( "title" => JText::_( $this->album->tags[$k]->tag_name ) ); $tag_image = JHTML::image('images/tags/' . $this->album->tags[$k]->icon , JText::_( $this->album->tags[$k]->tag_name ) , $image_attr ); if($this->album->tags[$k]->tag_name != "") echo " ".$tag_image; } } ?></td> </tr> </table> </div> </div> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td valign="top" class="first_col"><div class="first_col_content"> <div class='div_imatge_gran'> <? $image_attr = array( "title" => $this->album->name , "class" => "imatge_gran" ); $image = JHTML::image('images/albums/' . $this->album->image , $this->album->name , $image_attr ); echo $image; ?> </div> <?php if(count( $this->songs )){ ?> <div align="center"> <? if($this->player != "" && ( ( $user->id && $this->params->get('displayplayer') ) || $this->params->get('displayplayer') == 2 )) echo $this->player ; ?> <? if($this->album->album_file != "" && $this->params->get('allowsongdownload')){ if( $user->id || $this->params->get('allowsongdownload') == 2 ){ ?> <a href="<? echo $this->album->album_file; ?>" title="<? echo JText::_('DOWNLOAD_THIS_ALBUM'); ?>"><? echo JHTML::image('components/com_muscol/assets/images/music.png','File'); ?></a> <? } else echo JHTML::image('components/com_muscol/assets/images/music.png','File',array("title" => JText::_("FILE_REGISTERED_USERS"))); } ?> <?php if($this->params->get('allowalbumbuy') && $this->album->buy_link != ""){ ?> <a href="<?php echo $this->album->buy_link; ?>" title="<?php echo JText::_('BUY_THIS_ALBUM'); ?>" target="_blank"><?php echo JHTML::image('components/com_muscol/assets/images/buy.png','Buy'); ?></a> <?php } ?> <br /> <br /> <table border='0' cellpadding='0' cellspacing='0' width="100%"> <?php $j = 0 ; for ($i=0, $n=count( $this->songs ); $i < $n; $i++) { $song = $this->songs[$i]; $song_link = MusColHelper::routeSong($song->id); $file_link = MusColHelper::create_file_link($song); ?> <tr class='tr_song_link tr_song_link<? echo $j; ?>'> <td class='num_song'><?php echo $song->position; ?></td> <td class='nom_artist_song'><? if($song->artist_id != $this->album->artist_id) echo $song->artist_name; ?></td> <td class='nom_song'><a class='song_link' href="<?php echo $song_link; ?>"><?php echo $song->name; ?></a></td> <!--td class='nom_song'><?php if($song->lyrics != ""){ ?><a class='song_link' href="<?php echo $song_link; ?>"><?php echo $song->name; ?></a><?php }else{ echo $song->name;} ?></td--> <td class='time_song'><?php echo MusColHelper::time_to_string($song->length); ?></td> <td class='song_player'><? if( ($user->id && $this->params->get('displayplayer')) || $this->params->get('displayplayer') == 2 ){ echo $song->player; } ?> <? if($song->filename != "" && $this->params->get('allowsongdownload')){ if( $user->id || $this->params->get('allowsongdownload') == 2 ){ ?> <a href="<? echo $file_link; ?>" title="<? echo JText::_('DOWNLOAD_THIS_SONG'); ?>"><? echo JHTML::image('components/com_muscol/assets/images/music.png','File'); ?></a> <? } else echo JHTML::image('components/com_muscol/assets/images/music.png','File',array("title" => JText::_("FILE_REGISTERED_USERS"))); } ?> <?php if($this->params->get('allowsongbuy') && $song->buy_link != ""){ ?> <a href="<?php echo $song->buy_link; ?>" title="<?php echo JText::_('BUY_THIS_SONG'); ?>" target="_blank"><?php echo JHTML::image('components/com_muscol/assets/images/buy.png','Buy'); ?></a> <?php } ?></td> <td class='buy_song'> <? //new plugin access $dispatcher =& JDispatcher::getInstance(); $plugin_ok = JPluginHelper::importPlugin('muscol'); $results = $dispatcher->trigger('onDisplaySongAlbum', array ($song->id)); ?> </td> </tr> <?php $j = 1 - $j; } ?> </table> </div> <br/> <?php } ?> <? if($user->id && $this->params->get('showalbumratings') ){ // show the rating system ?> <? if(!$this->is_rated){ ?> <div class="disc_details"> <h3><? echo JText::_('RATE_THIS_ALBUM'); ?></h3> <div class="album_rating"><? echo MusColHelper::show_stars(0,false,$this->album->id); ?></div> </div> <? } else{ ?> <div class="disc_details"> <h3><? echo JText::_('YOUR_RATING_ON_THIS_ALBUM'); ?></h3> <div class="album_rating"><? echo MusColHelper::show_stars($this->is_rated,false,$this->album->id); ?></div> </div> <? } } ?> <div class="disc_details"> <?php $modules = JModuleHelper::getModules("muscol_album_stats"); $document = &JFactory::getDocument(); $renderer = $document->loadRenderer('module'); $attribs = array(); $attribs['style'] = 'xhtml'; foreach ( @$modules as $mod ) { echo $renderer->render($mod, $attribs); } ?> </div> <? if($this->params->get('showalbumbookmarks', 1) ){ // show the bookmark system ?> <div class="disc_details"> <h3><? echo JText::_('Bookmark'); ?></h3> <div class="album_rating"><? echo MusColHelper::show_bookmarks(); ?></div> </div> <? } ?> </div></td> <td valign="top" class="second_col"><? if($this->params->get('showalbumdetails') ){ // show the album details $genre_link = MusColHelper::get_genre_link($this->album->genre_id); ?> <? //new plugin access $dispatcher =& JDispatcher::getInstance(); $plugin_ok = JPluginHelper::importPlugin('muscol'); $results = $dispatcher->trigger('onDisplayAlbum', array ($this->album->id)); ?> <div class="disc_details disc_data"> <h3><?php echo JText::_('Data'); ?></h3> <? if($this->params->get('showalbum_release', 1) == 1 || ($this->params->get('showalbum_release', 1) == 2 && $this->album->year)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'Released' ); ?></strong> <span class="value_detailed_album"><?php echo MusColHelper::month_name($this->album->month); ?> <?php echo $this->album->year; ?></span><br /> <? } ?> <? if($this->params->get('showalbum_format', 1) == 1 || ($this->params->get('showalbum_format', 1) == 2 && $this->album->format_name)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'Format' ); ?></strong> <span class="value_detailed_album"><?php echo $this->album->format_name; ?></span><br /> <? } ?> <? if($this->params->get('showalbum_types', 1) == 1 || ($this->params->get('showalbum_types', 1) == 2 && !empty($this->album->types))){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'Type' ); ?></strong> <span class="value_detailed_album"><?php echo implode(" / ",$this->album->types); ?></span><br /> <? } ?> <? if($this->params->get('showalbum_added', 1) == 1 || ($this->params->get('showalbum_added', 1) == 2 && $this->album->added)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'ADDED_ON' ); ?></strong> <span class="value_detailed_album"><?php echo JHTML::_('date', $this->album->added, JText::_('DATE_FORMAT_LC1')); ?></span><br /> <? } ?> <? if($this->params->get('showalbum_genre', 1) == 1 || ($this->params->get('showalbum_genre', 1) == 2 && $this->album->genre_name)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'Genre' ); ?></strong> <span class="value_detailed_album"><a href="<?php echo $genre_link; ?>" title="<?php echo $this->album->genre_name; ?>"><?php echo $this->album->genre_name; ?></a></span><br /> <? } ?> <? if($this->params->get('showalbum_price', 1) == 1 || ($this->params->get('showalbum_price', 1) == 2 && $this->album->price != 0)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'Price' ); ?></strong> <span class="value_detailed_album"><?php echo $this->album->price; ?> <? echo $this->currency; ?></span><br /> <? } ?> <? if($this->params->get('showalbum_length', 1) == 1 || ($this->params->get('showalbum_length', 1) == 2 && $this->album->length)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'Length' ); ?></strong> <span class="value_detailed_album"><?php echo MusColHelper::time_to_string($this->album->length); ?></span><br /> <? } ?> <? if($this->params->get('showalbum_ndisc', 1) == 1 || ($this->params->get('showalbum_ndisc', 1) == 2 && $this->album->ndisc)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'N_OF_DISCS' ); ?></strong> <span class="value_detailed_album"><?php echo $this->album->ndisc; ?></span><br /> <? } ?> <? if($this->params->get('showalbum_editiondate', 1) == 1 || ($this->params->get('showalbum_editiondate', 1) == 2 && $this->album->edition_year)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'EDITION_DATE' ); ?></strong> <span class="value_detailed_album"><?php echo MusColHelper::month_name($this->album->edition_month); ?> <?php if($this->album->edition_year != "0000") echo $this->album->edition_year; else echo $this->album->year; ?> </span><br /> <? } ?> <? if($this->params->get('showalbum_editioncountry', 1) == 1 || ($this->params->get('showalbum_editioncountry', 1) == 2 && $this->album->edition_country)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'Country' ); ?></strong> <span class="value_detailed_album"><?php echo $this->album->edition_country; ?></span><br /> <? } ?> <? if($this->params->get('showalbum_label', 1) == 1 || ($this->params->get('showalbum_label', 1) == 2 && $this->album->label)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'Label' ); ?></strong> <span class="value_detailed_album"><?php echo $this->album->label; ?></span><br /> <? } ?> <? if($this->params->get('showalbum_catalog', 1) == 1 || ($this->params->get('showalbum_catalog', 1) == 2 && $this->album->catalog_number)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'CATALOG_NUMBER' ); ?></strong> <span class="value_detailed_album"><?php echo $this->album->catalog_number; ?></span><br /> <? } ?> <? if($this->params->get('showalbum_editiondetails', 1) == 1 || ($this->params->get('showalbum_editiondetails', 1) == 2 && $this->album->edition_details)){ ?> <strong class="label_detailed_album"><?php echo JText::_( 'EDITION_DETAILS' ); ?></strong> <span class="value_detailed_album"><?php echo $this->album->edition_details; ?></span><br /> <? } ?> </div> <div class="disc_data_bottom"></div> <? } ?> <div class="disc_details"> <h3><?php echo JText::_('Review'); ?></h3> <?php echo $this->album->review; ?> </div> <? if($this->params->get('showalbumcomments') ){ // show the comments switch($this->params->get('commentsystem')){ case 'jomcomment': echo $this->jomcomment; break; default: if( $quants = count( $this->comments )){ ?> <div class="comments_title"><? echo JText::_('Comments'). " (". $quants .")"; ?></div> <div class="comments"> <? $k = 0; foreach($this->comments as $comment){ ?> <div class="comment comment_<? echo $k; ?>"> <div class="comment_name"><? echo $comment->username; ?></div> <div class="date"><? echo JHTML::_('date', $comment->date, JText::_('DATE_FORMAT_LC2')); ?></div> <div class="comment_text"><? echo $comment->comment; ?></div> </div> <? $k = 1 - $k; } ?> </div> <? } ?> <? if($user->id){ ?> <div class="post_comment_title"><? echo JText::_('POST_A_COMMENT'); ?></div> <div class="comment_form"> <? $uri =& JFactory::getURI(); ?> <form action="<? echo JRoute::_('index.php'); ?>" method="post"> <textarea name="comment" class="textarea_comment"></textarea> <br /> <input type="submit" value="<? echo JText::_('POST_COMMENT'); ?>" /> <input type="hidden" name="album_id" value="<? echo $this->album->id; ?>" /> <input type="hidden" name="task" value="save_comment" /> <input type="hidden" name="comment_type" value="album" /> <input type="hidden" name="option" value="com_muscol" /> </form> </div> <? } ?> <? break; }?> <? } // end of show comments IF ?> <? //new plugin access $dispatcher =& JDispatcher::getInstance(); $plugin_ok = JPluginHelper::importPlugin('muscol'); $results = $dispatcher->trigger('onCommentsAlbum', array ($this->album->id)); ?> </td> </tr> </table> <?php if(count( $this->compilation )){ ?> <div class="disc_details"> <h3><?php echo JText::_('ITEMS_IN_THIS_COMPILATION'); ?></h3> </div> <? foreach($this->compilation as $this->detail_album){ echo $this->loadTemplate('album'); }?> <br /> <? } ?> <? if($this->params->get('showhits') ){ ?> <div align="center"> <?php echo JHTML::image('components/com_muscol/assets/images/hits.png',JText::_('Hits'), array("title" => JText::_('Hits'))); ?> <span class="num_hits"><? echo $this->album->hits; ?></span> </div> <? } ?> <? if($this->params->get('showalbumchrono') ){ // show the album chronology ?> <?php if($this->prev_album || $this->next_album){ $prev_album_link= MusColHelper::routeAlbum($this->prev_album->id); $next_album_link= MusColHelper::routeAlbum($this->next_album->id); ?> <table cellpadding='0' cellspacing='0' border='0' class='taula_next_album'> <tr> <td class='prev_album'><?php if($this->prev_album){ $image_attr = array( ); $image_prev = MusColHelper::createThumbnail($this->prev_album->image, $this->prev_album->name, $this->params->get('thumb_size_album_1'), $image_attr); ?> <a href="<?php echo $prev_album_link; ?>"><?php echo $image_prev; ?> « <?php echo $this->prev_album->name; ?> </a> <?php } ?></td> <td class='next_album_type'><? echo $this->album->artist_name ." ". $this->album->display_group_name . " " . JText::_("CHRONOLOGY"); ?></td> <td class='next_album'><?php if($this->next_album){ $image_attr = array( ); $image_next = MusColHelper::createThumbnail($this->next_album->image, $this->next_album->name, $this->params->get('thumb_size_album_1'), $image_attr); ?> <a href="<?php echo $next_album_link; ?>"><?php echo $this->next_album->name; ?> » <?php echo $image_next; ?></a> <?php } ?></td> </tr> </table> <? } ?> <? } // end of show chronology IF ?> <div align="center"><? echo MusColHelper::showMusColFooter(); ?></div> Quote Link to comment https://forums.phpfreaks.com/topic/263379-joomla-music-collection-invalid-arguments-passed-in-components/#findComment-1349778 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.