limit AND if no_results problem
Posted: 05 December 2007 06:18 PM   [ Ignore ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  118
Joined  2005-09-13

Hey guys, I got this:

{exp:favorites:entries weblog="photos" limit="3" username="{embed:the_user}"}
{if no_results}
 
<p>No favourites foundPourquoi?</p>
{/if}

 
<class="userBox left topthumbs" href="{path=views/details}{entry_id}" style="background-image:url(/phpthumb/phpThumb.php?src={imagefile}&zc;=T&w;=65);position:relative">
 <
div style="height: 1.2em; font-size:75%" class="photoTexts">{title}</div>
 </
a>

{/exp:favorites:entries}

And it’s giving me only 2 entries, yet this:

{exp:favorites:entries weblog="photos" limit="99" username="{username}"}

      
      {if no_results}
       
<p>No favourites foundPourquoi?</p>
      
{/if}
           
      {if no_results}
       
<p>{screen_name} hasn't marked any photos as favourites.</p>
      {/if}
   
      <div class="photocell" style="float:left;width:150px;height: 150px;padding:0px;margin:10px 5px;text-align:center;background:url(/phpthumb/phpThumb.php?src={imagefile}&zc;=T&w;=150);">

        
     {/exp:favorites:entries}

Returns all 8 entries that I’ve marked as favourites. I’m pretty sure it’s not because I’m misspelling my labels (the Canadian way).

Also note that in the example directly above I have the if no_results listed twice. This is because it won’t work if I have only one, and in this case it recognizes only the second one. What’s up with that?

Profile
 
 
Posted: 06 December 2007 10:13 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2733
Joined  2006-10-18

What’s the context you are displaying and linking to these as?
What do your URL’s look like?

Is it supposed to be for anyone to see which member Favorited’ed what? Or for that member to just view their own?

 Signature 
Profile
 
 
Posted: 06 December 2007 10:48 PM   [ Ignore ]   [ # 2 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  118
Joined  2005-09-13

Essentially both. That’s why I’m feeding the tags the username, which I’m controlling through other means. If there’s a URL component that could be messing things up then is there a dynamic="off" parameter? Didn’t see one. Example URLs would include:
http://www.stylastic.com/fashion/profile/ (won’t work unless you log in)
or
http://www.stylastic.com/fashion/profile/user/tyler
or
http://www.stylastic.com/fashion/profile/favs/user/tyler

Hmm, just noticing that on those last two my favourites aren’t showing up at all.... not good. Looking into it.

Profile
 
 
Posted: 06 December 2007 10:51 PM   [ Ignore ]   [ # 3 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  118
Joined  2005-09-13

So my favourites definitely aren’t showing up when I’m not logged in. Are they, by default, marked as private favourites? And if so, how can I change that?

Profile
 
 
   
 
 
‹‹ Error in upgrading      Possible bug found... ››