Jamroom Logo
User Support Forum
Jamroom Help:
Search artist by letter
rockas



Joined: 15 Mar 2007
Posts: 246

Posted: 06/06/12 22:09 
How i can call a search artist by letter? lets say
A,B,C,D,E,F,G...
you click a letter and you get a list of artist that name starts with that letter?

i add in my artists.tpl


Code

   <div class="table-row">&raquo;&nbsp;
    {* prep our array for looping through and constructing our letter chooser *}
    {jr_array name="alpha" value=$smarty.config.letter_alphabet explode="true" separator=","}
    {foreach from=$alpha item="char"}
      <a href="index.php?t=artists&amp;letter={$char}">{$char}</a>&nbsp;
    {/foreach}
    <a href="index.php?t=artists&amp;letter=0">{$smarty.config.letter_number}</a>&nbsp;
    <a href="index.php?t=artists&amp;letter=@">{$smarty.config.letter_other}</a>
    </div>


but i get a error
the template file "b&iota;&omicron;.tpl" does not exist or is not readable from the skins/ProJam2 directory


_________________
Do not interrupt me when i am talking to myself!
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3018
Location: Tokyo

Posted: 06/07/12 01:27 
You want to add the letter property to your ranking call:
http://www.jamroom.net/Jamroom4_ranking_artist


Quote:
If the "letter" parameter is given, then only Artist Profiles where the Artist Name begins with the letter given will be shown.



Code
{jr_ranking mode="artist" letter=$letter ......}



_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
rockas



Joined: 15 Mar 2007
Posts: 246

Posted: 06/07/12 04:45 
hey ussher thanks for your reply
Didnt get it how to call that in a link.. something like


Code

{$JAMROOM_URL}/ranking.php?mode=artist&amp;quota_id=1&amp;order=1&amp;pagebreak=10&amp;header_template=djs_header.tpl&amp;row_template=djs_row.tpl&amp;footer_template=djs_footer.tpl">Letter A</a>



_________________
Do not interrupt me when i am talking to myself!
Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6418
Location: Tornado Alley!

Posted: 06/07/12 05:10 

rockas:
hey ussher thanks for your reply
Didnt get it how to call that in a link.. something like


Code

{$JAMROOM_URL}/ranking.php?mode=artist&amp;quota_id=1&amp;order=1&amp;pagebreak=10&amp;header_template=djs_header.tpl&amp;row_template=djs_row.tpl&amp;footer_template=djs_footer.tpl">Letter A</a>


It would look something like this:


Quote:
{$JAMROOM_URL}/ranking.php?mode=artist&amp;quota_id=1&amp;order=1&amp;pagebreak=10&amp;letter=a&amp;header_template=djs_header.tpl&amp;row_template=djs_row.tpl&amp;footer_template=djs_footer.tpl">Letter A</a>


Hope this helps,
Douglas


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3018
Location: Tokyo

Posted: 06/07/12 19:02 
Rokas, Take a look at the example sixstring has given above. This is the way to do it directly from the URL.

If you want to include it in a template function then its something like this:
{jr_ranking mode="artist" order="1" show="10" letter="a"}

That will show "1. Order by Artist Name alphabetically" it will show ten of them starting with the letter 'a'

To find this information what i usually do is to use the search box at the top of this page here to search for 'jr_ranking'. That will take me to:
http://www.jamroom.net/Jamroom4_jr_ranking

I know i want to be ranking ARTISTS in this case so i click on the RANKING link in this phrase:

http://www.jamroom.net/Jamroom4_jr_ranking:
relates to one of the list-orders that the ranking.php script accepts. It varies by mode, see Ranking for details.


That will take me to this page:
http://www.jamroom.net/Jamroom4_Ranking_System

From there I locate the 'Artist' link to get all the details specific to the artists ranking calls. That will take me to this page:
http://www.jamroom.net/Jamroom4_ranking_artist

Which will give a list of all the orders that you can use.

Between those 3 pages you have all the info you need on the ranking call, the vars available, all the orders, parameters and examples.

In your code you have the links pointing to locations like this:

Code
<a href="index.php?t=artists&amp;letter=0">


So that will become a url like:
yoursite.com/index.php?t=artists&letter=a

This will mean that in your 'artists.tpl' file you will have a variable {$letter} and in that specific link above you it will be 'a'.

So in your ranking call you can do:
{jr_ranking mode="artist" letter=$letter ......}

Which will become
{jr_ranking mode="artist" letter="a".....}

The ...'s just mean "and any other parameters you care to add."


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
rockas



Joined: 15 Mar 2007
Posts: 246

Posted: 06/07/12 20:43 
Thanx for the info both of you i got it to work exacly how i wanted.
is theres any way to do it work with greek language also?
i test it and it just list me all artists with the "order=1" fuction but not with letter=α etc


_________________
Do not interrupt me when i am talking to myself!
Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8335
Location: Ultrabubble

Posted: 06/08/12 01:11 
I'm not sure if it will work if you haven't sorted out the language encoding, but depending on the skin you are using there may be a letter_alphabet settings in your skin settings.
jrconfig.php?mode=modify_skin_config&skin=Flashback


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
Display posts from previous:   
User Support Forum
Jamroom Help

 
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.