1 of 2
1
orderby rating_avg
Posted: 01 July 2007 09:32 AM   [ Ignore ]
Newbie
Rank
Total Posts:  12
Joined  2007-06-01

in want to select entries based on rating? who is that possible?
i tried this

{exp:weblog:entries weblog="my_weblog" oderby="ratign_avg" limit="15"}

Content

{
/exp:weblog:entries}

is this possible? how ? please reply quickly......

Profile
 
 
Posted: 01 July 2007 01:13 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  5
Joined  2006-06-25

You have misspelt rating_avg - if you copied and pasted the above post from your page then this is probably causing the error

Profile
 
 
Posted: 01 July 2007 02:07 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  12
Joined  2007-06-01

no no .... i mistyped it here but my code is got orderby and rating_avg both right.......... can any you tell me what is the trick......

Profile
 
 
Posted: 01 July 2007 11:56 PM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  5
Joined  2006-06-25

Well i have only just received this module but I think to order by a custom field you need to edit the mod.weblog.php file and install the extension hook inside the extensions folder - that is about all I can suggest - good luck though

Profile
 
 
Posted: 02 July 2007 12:04 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  12
Joined  2007-06-01

Some who knows what exactly to do please help me in details i am using ee 1.5.2

Profile
 
 
Posted: 02 July 2007 12:15 AM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  5
Joined  2006-06-25

There is a readme file contained in the extensions folder within the module pack - have you read through this? It tells you exactly what to do in order to display by custom fields

Profile
 
 
Posted: 02 July 2007 12:32 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  12
Joined  2007-06-01

i will try that ................ thanx

Profile
 
 
Posted: 02 July 2007 12:42 AM   [ Ignore ]   [ # 7 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  336
Joined  2005-07-09

OK, let’s take a look at cour code

{exp:weblog:entries weblog="my_weblog" oderby="ratign_avg" limit="15"}
Content
{
/exp:weblog:entries}

Even with the spelling error taken into account (thanks for catching that one, joelene), you are not using the rating module at all: you are, in fact, trying to use a parameter in the exp:weblog module. I am little unclear what exactly you are trying to achieve, but if you want to simply order by rating, from higest to lowest, you could try something like this:

{exp:rating:rankings form_name="formname" precision="1" thousands="," fractions="." limit="15" }

Let us know if you had something else in mind. A good look at the docs should make this much clearer to you.

 Signature 

Ingmar Greil

Profile
 
 
Posted: 02 July 2007 12:57 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  12
Joined  2007-06-01

here is my original code from my page

<?php
if('{segment_4}'=="view_count")
        
$sorting_criteria="view_count_one";
else if(
'{segment_4}'=="rating")
        
$sorting_criteria="rating_avg";
else
        
$sorting_criteria="entry_date";
?>

</tr></table>
</
div>

<
div>

{exp:weblog:entries weblog="content" limit ="5" username='{segment_3}'  orderby="<?php echo 'view_count_one'; ?>"}
       {if no_results}
                
<div class="generalWindow">There is no post from this user <br /> <br /> <br /></div>
       
{/if}
              {embed
="site/list_entry" cur_unique_id="{unique_id}" cur_url_title="{url_title}" cur_title="{title}" cur_description="{description}" cur_entry_id="{entry_id}"}
  

<?php
echo "{paginate} <p> Page {current_page} of {total_pages} pages {pagination_links}</p> {/paginate}";
?>
    

    
{
/exp:weblog:entries}

you can look at this page http://www.guerrillapost.com/ee/index.php/site/user_post/admin/

in this page i am trying to show post of user as {segment_3} and sorting criteria as {segment_4} ...... if {segment_4} is empty it sorts by entry_date now my
sorting is okay with entry_date and view_count_one (you know with exp:weblog:entries tag) but i want to do it for rating_avg too............

let me know i am clear is there any other confusion.........

Profile
 
 
Posted: 02 July 2007 01:03 AM   [ Ignore ]   [ # 9 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  336
Joined  2005-07-09

I am sorry, but it’s not going to work like that. If you want to make use of the Rating module, you must use its tags, and not the weblog module. The weblog module can sort by date, or view_count_one, but not rating_avg, so you will have to break this up somehow.

 Signature 

Ingmar Greil

Profile
 
 
Posted: 02 July 2007 01:09 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  12
Joined  2007-06-01

i want to know the the trick to break this up............. that’s what a am talking about............ can you help?

Profile
 
 
Posted: 02 July 2007 01:21 AM   [ Ignore ]   [ # 11 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  336
Joined  2005-07-09

Well, something like this, perhaps:

{if segment_4 == "view_count"}
  {exp
:weblog:entries weblog="content" limit ="5" username='{segment_3}'  orderby="'view_count_one"}
    
...
  
{/exp:weblog:entries}

{if
:elseif segment_4 == "rating"}
  {exp
:rating:rankings form_name="formname" precision="1" thousands="," fractions="." limit="15" }
    
...
  
{/exp:rating:rankings}

{if
:else}
  {exp
:weblog:entries weblog="content" limit ="5" username='{segment_3}'  orderby="'entry_date"}
    
...
  
{/exp:weblog:entries}
{
/if}

 Signature 

Ingmar Greil

Profile
 
 
Posted: 02 July 2007 01:42 AM   [ Ignore ]   [ # 12 ]
Newbie
Rank
Total Posts:  12
Joined  2007-06-01

thank you very much. that will help i think

Profile
 
 
Posted: 14 July 2007 03:06 PM   [ Ignore ]   [ # 13 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  119
Joined  2005-09-13

Hey Ingmar,
I was trying to do something similar, but because the exp:rating:rankings tag doesn’t parse related entries I’m back to trying the extension. FYI, that would be a case where the exp:weblog:entries would be used over the exp:rating:rankings.

Profile
 
 
Posted: 15 July 2007 04:06 AM   [ Ignore ]   [ # 14 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  336
Joined  2005-07-09

Which extension would that be? It’s true though, Tag 1.1.6 does not handle related entries natively.

 Signature 

Ingmar Greil

Profile
 
 
Posted: 15 July 2007 09:51 AM   [ Ignore ]   [ # 15 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Tag 2.0, to be released soon, handles related entries.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
   
1 of 2
1