Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: simon79 on 22 March 2011, 11:20:22

Title: PHP : Alexandria Library
Post by: simon79 on 22 March 2011, 11:20:22
ITALIAN

Ho installato il componente Biblioteca di Alessandria sul mio Joomla versione 1.15.22.
Per ora, non ho incontrato alcun problema tranne che:

Quando creo una "ricerca per autore" menu ho diversi messaggi di errore che compare quando faccio clic su questo link sul mio sito:

Sotto ho le mie briciole di pane:

Warning: Invalid argument in dotazione per foreach () in / miosito / components / com_abook / models / author.php on line 129

Warning: mysql_num_rows (): argomento fornito non è una risorsa valida di risultato di MySQL in / miosito / libraries / joomla / database / database / mysql.php on line 344

Apparentemente si tratta di un problema di MySQL, ma può mettere a conoscenza di PHP, vengo a chiedere aiuto.

E la presentazione dell '"autore" Ho il messaggio di errore:

Warning: Invalid argument in dotazione per foreach () in / miosito / components / com_abook / views / autore / tmpl / default.php on line 88

Mon site (http://www.livreoccaz.fr/index.php?option=com_abook&view=author&id=1&Itemid=63")

Versione PHP: 5.2.17
Hosting: 1 & 1

Vi ringrazio in anticipo per il vostro aiuto

_________________________________________________

FRENCH :

J'ai installé le composant Alexandria Library sur ma version 1.15.22 de joomla.
Pour le moment, je n'ai pas rencontré de soucis à part celui la :

Quand je crée un menu "recherche par auteur" j'ai plusieurs messages d'erreurs qui apparait quand je clique sur ce lien sur mon site :

En dessous de mon fil d'ariane j'ai :

Warning: Invalid argument supplied for foreach() in /monsite/components/com_abook/models/author.php on line 129

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /monsite/libraries/joomla/database/database/mysql.php on line 344

Apparement ça viendrait d'un problème Mysql, mais mis connaissant peut dans le domaine php, je viens vous demander de l'aide.

Et dans la présentation de l' "Auteur" j'ai le message d'erreur :

Warning: Invalid argument supplied for foreach() in /monsite/components/com_abook/views/author/tmpl/default.php on line 88

Mon site (http://www.livreoccaz.fr/index.php?option=com_abook&view=author&id=1&Itemid=63")

Version de PHP: 5.2.17
Hebergeur : 1&1

Merci d'avance pour votre aide

_________________________________________________


ENGLISH :

I installed the Alexandria Library component on my joomla version 1.15.22.
For now, I have not encountered any trouble except that it:

When I create a menu "author search" I have several error messages that appears when I click on this link on my site:

Below I have my breadcrumb:

Warning: Invalid argument Supplied for foreach () in / mysite / components / com_abook / models / author.php on line 129

Warning: mysql_num_rows (): Supplied argument is Not a valid MySQL result resource in / mysite / libraries / joomla / database / database / mysql.php on line 344

Apparently it comes from a MySQL problem, but can put knowledge in php, I come to ask for help.

And the presentation of the "Author" I have the error message:

Warning: Invalid argument Supplied for foreach () in / mysite / components / com_abook / views / author / tmpl / default.php on line 88

Mon site (http://www.livreoccaz.fr/index.php?option=com_abook&view=author&id=1&Itemid=63")

PHP Version: 5.2.17
Hosting: 1 & 1

Thank you in advance for your help
Title: Re: PHP : Alexandria Library
Post by: dario on 22 March 2011, 12:14:01
Hi simon79, if it's ok for you we can talk in english.
Which version of abook do you have?
The latest version of Alexandria Book Library is 1.1.0 (http://www.alexandriabooklibrary.org/en/downloads/viewcategory/14-alexandria-book-library.html)
Title: Re: PHP : Alexandria Library
Post by: simon79 on 22 March 2011, 14:35:30
Parles-tu Français ?

J'avais la version 1.0.1
J'ai installé la version 1.1.0, mais aucun changement

Title: Re: PHP : Alexandria Library
Post by: simon79 on 22 March 2011, 15:40:30
Dans cette version, un onglet importer/exporter est disponible.
J'ai une bibliothèque sur google livre.
Est-il possible d'exporter cette bibliothèque en csv et de l'importer ensuite sur alexandria book ?
Title: Re: PHP : Alexandria Library
Post by: simon79 on 22 March 2011, 18:42:13
Do you speak French?

I had version 1.0.1
I installed version 1.1.0 but no change




In this version, a tab import / export is available.
I have a library book on google.
Is it possible to export the library to csv and then import it on alexandria book?
Title: Re: PHP : Alexandria Library
Post by: simon79 on 22 March 2011, 22:16:55
Ces vrai que ça sera plus pratique ^^ !

Pour le premier message d'erreur Warning: Invalid argument supplied for foreach() in /homepages/monsite/components/com_abook/models/author.php on line 129

Ligne 120 à 135 :
function getData()
{
// Lets load the data if it doesn't already exist
if (empty( $this->_data ))
{
                        $query = $this->_buildQuery();
                        $this->_data = $this->_getList( $query, $this->getState('limitstart'), $this->getState('limit') );
                }
$k=0;
foreach($this->_data as $libro){
$this->_authorname($libro->id);
$this->_data[$k]->authors=$this->_authorname;
$k=$k+1;
}
return $this->_data;
}


Pour le second message d'erreur : Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /monsite/libraries/joomla/database/database/mysql.php on line 344

Ligne 342 à 345 :
function getNumRows( $cur=null )
{
return mysql_num_rows( $cur ? $cur : $this->_cursor );
}

Pour le troisième message d'erreur : Warning: Invalid argument supplied for foreach() in /monsite/components/com_abook/views/author/tmpl/default.php on line 88

Ligne 81 à 93 :
        <?php
$params = &JComponentHelper::getParams( 'com_abook' );
$imgpath=$params->get( 'img_path' );
        $k = 0;
        $i = 0;
        $n = count( $this->items );
        $rows = &$this->items;
        foreach ($rows as $row) {
                $link           = JRoute::_( 'index.php?option=com_abook&view=book&catid='.$row->catslug.'&id='. $row->slug );
                ?>
                <tr class="sectiontableentry<?php echo $k+1; ?><?php echo $this->escape($this->params->get('pageclass_sfx')); ?>">
<td width="100" height="100">
<?php
Title: Re: PHP : Alexandria Library
Post by: simon79 on 23 March 2011, 23:06:46
Help please
Title: Re: PHP : Alexandria Library
Post by: federica on 24 March 2011, 20:51:10
Hi Simon,
open the file your_site/components/com_abook/models/author.php line 69
change the code from:
. ' FROM jos_abbookauth AS authbook '
. ' JOIN jos_abbook AS book ON authbook.idbook=book.id '
. ' JOIN jos_abcategories AS cat ON cat.id=book.catid '
. ' JOIN jos_abauthor AS author ON author.id=authbook.idauth '


to:
. ' FROM #__abbookauth AS authbook '
. ' JOIN #__abbook AS book ON authbook.idbook=book.id '
. ' JOIN #__abcategories AS cat ON cat.id=book.catid '
. ' JOIN #__abauthor AS author ON author.id=authbook.idauth '


Tell me if this changes have fix the error.

QuoteI have a library book on google.
Is it possible to export the library to csv and then import it on alexandria book?
The CSV files to import must have this fields sequence:
title, subtitle, alias, ideditor, price, pag, user_id, created_by_alias, html, image, file, year, idlocation, idlibrary, vote, numvote, hits, published, qty, isbn, approved, userid, url, url_label, dateinsert, catalogo, checked_out, checked_out_time, access, metakey, metadesc, authors
The field "authors" is a list of comma separated id_author (eg: 1,3,5)
Title: Re: PHP : Alexandria Library
Post by: simon79 on 28 March 2011, 14:16:58
I solved the problem with the joomla forum. I hid the error messages from my system

Problem solved