ViRulent
ViRulent
Offline
0
I'd like to edit this module so it becomes "recently added VIDEOS" (I only want to show songs that have a youtube video associated with)

I try to add this line, but it didn't work.

/modules/mod_muscol_recently_added_songs/tmpl/default.php

http://img856.imageshack.us/img856/9539/recentvideos.png

A little help here germi please ?
Responses (8)
  • Accepted Answer

    Saturday, May 19 2012, 09:48 AM - #Permalink
    0
    well the thing is you don't have to change code on the default.php, but actually on the helper.php file. on the MySQL query, you have to set the

    video != ""

    thing.
    The reply is currently minimized Show
  • Accepted Answer

    ViRulent
    ViRulent
    Offline
    Wednesday, June 06 2012, 01:12 AM - #Permalink
    0
    I tried a lot of different lines in the helper.php file, but I didn't manage to make it work...

    Could you help me out with the line of code please ? :)

    That's the last feature I have to finish so my website will be done and perfect !

    http://www.disqc.com
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, June 06 2012, 09:47 AM - #Permalink
    0
    what have you tried so far?
    The reply is currently minimized Show
  • Accepted Answer

    ViRulent
    ViRulent
    Offline
    Saturday, June 09 2012, 09:48 AM - #Permalink
    0
    http://img201.imageshack.us/img201/893/61962058.jpg

    I try this code at almost every line position so I guess it is not the good code ?

    I am not a programmer, I can just customize a little...
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 11 2012, 06:48 PM - #Permalink
    0
    I can see you are not a programmer.. ;) what you did is not at all what you have to do.

    you need to change the MySQL query!! not the PHP code. you need to add a

    AND s.video != ""

    clause
    The reply is currently minimized Show
  • Accepted Answer

    ViRulent
    ViRulent
    Offline
    Saturday, June 16 2012, 04:35 PM - #Permalink
    0
    This :
    http://img708.imageshack.us/img708/7290/andsvideo1.jpg

    Gives me this :
    Catchable fatal error: Object of class JDatabaseMySQL could not be converted to string in /****/public_html/modules/mod_muscol_recently_added_songs/helper.php on line 44

    I don't know how to make it work, but it shouldn't be that difficult to switch from "Every songs" to "Only songs with videos"... What do you think ?
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, June 17 2012, 05:29 PM - #Permalink
    0
    no... look, no offence, but clearly you don't know what you're doing ;) you are not a MySQL coder, you have never worked with it before.. right? ;)
    put this in line 28:

    $where_clause[] = ' s.video != "" ';
    The reply is currently minimized Show
  • Accepted Answer

    ViRulent
    ViRulent
    Offline
    Sunday, June 17 2012, 07:15 PM - #Permalink
    0
    no offence taken lol ! I know HTML and a little PHP, but that's it... no MySQL at all...

    It works perfectly now, thank you very much :)

    I'm glad to have this new module !
    The reply is currently minimized Show
Your Reply