Modification genre de album -> song

exlineo
exlineo
Offline
0
Bonjour à tous,
J'aimerai déplacer le champ "genre" de album vers song.

Je voudrai être sûre que cela fonctionne. Peut- on vérifier ensemble?

étapes :
dans la base de données :
- dans la table "jos_muscol_albums" supprimer le champs "genre_id"
- dans la table "jos_muscol_songs" ajouter le champs "genre_id"

Les fichiers :
- dans adminitrator/component/com_muscol/model/album
Faut-il commenter "
$this->_genres_data= null;
" ??
- dans adminitrator/component/com_muscol/model/song
$this->_genres_data= null;
est déjà présent !

- dans adminitrator/component/com_muscol/views/album/form.php
J'ai commenté "
:

show_genre_tree($this->genres,0); ?>

"
ligne 71
- dans adminitrator/component/com_muscol/views/song/form.php
je voulais coller le code cdu dessus, mais il est déjà présent.
Cependant, je ne vois pas apparaitre le champs "genre" dans l'onglet "add song".

ai-je raté une étape ??
Toute aide est bienvenue
Responses (10)
  • Accepted Answer

    Tuesday, September 13 2011, 04:10 PM - #Permalink
    0
    :S :S sorry we don't speak french.. can you post in english? :)

    it's more complicated to do what you intend to... you need modifying many files..!
    The reply is currently minimized Show
  • Accepted Answer

    exlineo
    exlineo
    Offline
    Tuesday, September 20 2011, 10:25 AM - #Permalink
    0
    Translation
    Hi,
    I'd like to show the "gender" on songs instead of albums.
    I've done :


    In the database :
    - table "jos_muscol_albums" delete "genre_id" field
    - table "jos_muscol_songs" add "genre_id" field

    Files :
    - In adminitrator/component/com_muscol/model/album
    Do i need to comment "
    Code:
    $this->_genres_data= null;
    " ??

    - in adminitrator/component/com_muscol/model/song
    Code:
    $this->_genres_data= null;
    is present yet !

    - in adminitrator/component/com_muscol/views/album/form.php
    I've comment "


    show_genre_tree($this->genres,0); ?>

    "
    line 71
    - in adminitrator/component/com_muscol/views/song/form.php
    I wanted to past the code beside but it seems to be present yet.
    Also, i can't see "gender field" in the "add song" tab

    I must have miss something.
    Help wellcome :)


    Toute aide est bienvenue
    The reply is currently minimized Show
  • Accepted Answer

    Friday, September 23 2011, 03:04 PM - #Permalink
    0
    I don't understand.. songs have already genre_id field! you don't need to add it, it's already there!
    The reply is currently minimized Show
  • Accepted Answer

    exlineo
    exlineo
    Offline
    Monday, September 26 2011, 02:08 PM - #Permalink
    0
    Hi Germi, thanks replying.
    i've seen that il already exist, but i need to :

    1 - show it up in the administrator form (when you add album on the song tab and in a select field), like this i'll be able to modify son gender from there.

    2 - add song->genre in the album view in front office.
    The reply is currently minimized Show
  • Accepted Answer

    exlineo
    exlineo
    Offline
    Wednesday, September 28 2011, 10:01 AM - #Permalink
    0
    Hi everybody,

    I've succeed to display the select field for genre on admin side, but i can find the sql update request. :(

    Coul'd anyone tell me where i could find it please ?
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, September 28 2011, 10:49 AM - #Permalink
    0
    you DON'T need to edit eny update request. if the field is present, the joomla database object automaticaly updates it..! (you DONT create the update request, joomla creates it for you...)

    in any case, look at the /models/album.php file, when the store() function calls all the SONGS.
    The reply is currently minimized Show
  • Accepted Answer

    exlineo
    exlineo
    Offline
    Wednesday, September 28 2011, 02:49 PM - #Permalink
    0
    Hi Germi, unfortunatly, database don't update;

    Here is the test file :

    administrator\\components\\com_muscol\\views\\album\\tmpl

    Maybe my select is no good :




    0) {
    mysql_data_seek($genres, 0);
    $row_genres = mysql_fetch_assoc($genres);
    }
    ?>


    i've tried also whith:


    " size="1" id="genre_id_genre_id; ?>">
    Choisir
    " genre_id == NULL)) {echo "selected=\"selected\"";} ?>>genre_name; ?>


    But this code return an empty select [file name=formtest.zip size=4538]http://www.joomlamusicsolutions.com/images/fbfiles/files/formtest.zip[/file]
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 29 2011, 11:03 AM - #Permalink
    0
    you don't need to perform any mysql query yourself...
    I cannot take a look at the code and fix it for you...! we charge for this kind of services!! :) we can make some small custom job for you if you want!!
    The reply is currently minimized Show
  • Accepted Answer

    exlineo
    exlineo
    Offline
    Thursday, September 29 2011, 03:17 PM - #Permalink
    0
    Hi Germi,
    Thanks for replying.
    I'll whith the Boss.
    Would you tell me much about the price for this and the add of 2 or 3 related fields ??


    Thanks
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, September 29 2011, 03:28 PM - #Permalink
    0
    for quotes please contact us on the Custome Service form :)
    anyway, for adding new fields, I don't think it will be much, it's not a big job! :)
    The reply is currently minimized Show
Your Reply