Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization:
If statement to check if there is a lofi song in ranking
cmaguire



Joined: 22 Apr 2004
Posts: 705

Posted: 03/23/05 10:21 
OK let me reword. Can we have some song variables available in band to check for this in a future release??

The problem with using the song ranking for this is that it will work for random which I am going to implement as a start now but will not work for alphabetical, newest or oldest as it checks those variables against the song and not the band. I.e. if your looking for a band with the letter a and you use the song ranking and parse in the artist header row and footer files it gives a bunch of random alphabetical bands because they obviously have a song that begins with A.

Having some song variables included in the band portion will help me out greatly and others as I will post how to achieve this here once I have it done.

Basically in essence what it will do is check if there is a hifi or lofi song available and if so demonstrate a play all now link so people can play songs right from the artist ranking.

Let me know.

Chris

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 03/23/05 10:41 

cmaguire:
OK let me reword. Can we have some song variables available in band to check for this in a future release??


Unfortunately this won't work - what if an artist has 50 songs? 10 songs? the "band" order is grouped by band_id (so each artist shows up once), and Jamroom would have no way to know which song by the artist you are interested in checking...


Quote:

The problem with using the song ranking for this is that it will work for random which I am going to implement as a start now but will not work for alphabetical, newest or oldest as it checks those variables against the song and not the band.


That's correct - these would relate to the song, not the band.


Quote:

I.e. if your looking for a band with the letter a and you use the song ranking and parse in the artist header row and footer files it gives a bunch of random alphabetical bands because they obviously have a song that begins with A.

Having some song variables included in the band portion will help me out greatly and others as I will post how to achieve this here once I have it done.


What you'll want to do then, is NOT use the band mode, but instead use the "spotlight" mode with the "show=" number to get more than 1 spotlight artists returned. That will give you access to the band information, as well as the information for the TOP song by that artist.

Note that doing this in the "band" mode is not possible.


Quote:

Basically in essence what it will do is check if there is a hifi or lofi song available and if so demonstrate a play all now link so people can play songs right from the artist ranking.

Let me know.

Chris


You'll need to use the spotlight or song mode - what you're looking to do is not possible in the band mode.

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
cmaguire



Joined: 22 Apr 2004
Posts: 705

Posted: 03/23/05 13:48 
I got this working in song mode like you suggested for random:

http://www.altsounds.com/artists.html

Would be cool if I could figure out a way to do this on the alphabetical and, just to reconfirm Brian this is for Playall hifi or lofi so it wouldn't matter the amount of songs just need to check there is at least one!

Let me know if you have any ideas.

Chris

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 03/23/05 14:09 

cmaguire:
I got this working in song mode like you suggested for random:

http://www.altsounds.com/artists.html

Would be cool if I could figure out a way to do this on the alphabetical and, just to reconfirm Brian this is for Playall hifi or lofi so it wouldn't matter the amount of songs just need to check there is at least one!

Let me know if you have any ideas.

Chris


Use spotlight mode, like I mention above. that should do exactly what you want.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
cmaguire



Joined: 22 Apr 2004
Posts: 705

Posted: 03/23/05 14:18 
You can spotlight by specifying a letter?? So it would work for alphabetical?? If so, you've sold my problem Very Happy.

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 03/23/05 14:23 

cmaguire:
You can spotlight by specifying a letter?? So it would work for alphabetical?? If so, you've sold my problem Very Happy.


You can't go by letter Sad sorry about that! What you could do though is put a "test" in your Smarty template for spotlight row that does something like:

{if strtolower(substr("{$BAND_NAME}",0,1)) == 'a'}
... show it...
{/if}

And just set your "limit" really high Wink Its definately a hack though...

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
cmaguire



Joined: 22 Apr 2004
Posts: 705

Posted: 03/23/05 16:32 
An extension of the previous question. How can I do the if statement check with newsearch.php. I tried the code suggested previously but that just gives me "-" all down the page with no links to play.

What is the if statement to use in the song portion of newsearch.php??

Thanks

Chris

Back to top
cmaguire



Joined: 22 Apr 2004
Posts: 705

Posted: 03/23/05 16:34 
Just read further and I see what to do. No need for help.

Thanks

Chris

Back to top
cmaguire



Joined: 22 Apr 2004
Posts: 705

Posted: 03/23/05 16:45 
Actually no I do need help. How do I set the new search songs up like the songs ranking where an if statement is used to check for something and if present you can show your play image, if not then we could have a "-" the code provided here earlier doesn't work.

Chris

Back to top
djmerlyn
Jamroom Ustad


Joined: 18 Dec 2003
Posts: 13497
Location: Behind You

Posted: 03/23/05 16:56 
I think this will work~


Code
{if $SONG_LOFI_EXTENSION > ""}
        <a href="{$SONG_LOFI_PLAY_URL}"><img src="{$JAMROOM_URL}/templates/newchart/images/play_lofi.gif" alt="play lofi" border="0"></a>
        {else}
        -
        {/if}



_________________
Pro JR Hosting, now 50% off!
-100% Guaranteed

"more server and network power than any host, dedicated to your jamroom site"
Back to top
cmaguire



Joined: 22 Apr 2004
Posts: 705

Posted: 03/23/05 17:09 
Genius DJ!!! Thanks bud Wink

Back to top
cmaguire



Joined: 22 Apr 2004
Posts: 705

Posted: 03/23/05 17:16 
Alright one more for you then. Any idea whether or not the code for play all in the charts will work in the song search??

Let me know

Chris

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 03/23/05 18:22 

cmaguire:
Alright one more for you then. Any idea whether or not the code for play all in the charts will work in the song search??

Let me know

Chris


Its not supported in the search - here is the list of currently supported template variables for use in the SONG mode:

http://www.jamroom.net/docs/doku.php?id=guides:search_song_variables

sorry!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization

< Previous12
 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.