pagination error bug
Posted: 01 February 2010 05:14 PM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  88
Joined  2006-10-18

The code below works perfectly - except when there is pagination then instead of showing the group id of the user specified in the URL it specifys the group id of the logged-in user.

http://site.com/index.php/j2/account/24   - shows proper group id


http://site.com/index.php/j2/account/24/P25/  - shows incorrect group id

<?
 
$segment_3 
"{segment_3}";

if( 
substr($segment_3,0,1)=="C" )

{


?>

{exp
:user:stats member_id="{segment_4}"  

{embed
=class/includes_account_category_8 author_id="{member_id}"}

<?

}

else

{

?>

{exp
:user:stats member_id="{segment_3}"  
{if group_id 
== "8"}
{embed
=class/includes_account_8 author_id="{member_id}"}
{if
:else}
{embed
=class/includes_account_5 author_id="{member_id}"}
{
/if}


<?

}

?>

{
/exp:user:stats} 
Profile
 
 
Posted: 01 February 2010 05:53 PM   [ Ignore ]   [ # 1 ]
Jr. Member
RankRank
Total Posts:  88
Joined  2006-10-18

To simplify the code a bit and removing the extras,  this screws up during pagination:

{exp:user:stats member_id="{segment_3}"  

{if group_id 
== "8"}
{embed
=classifieds/includes_account_8 author_id="{member_id}"}
{if
:else}
{embed
=classifieds/includes_account_5 author_id="{member_id}"}
{
/if}

{
/exp:user:stats} 
Profile
 
 
Posted: 02 February 2010 08:18 AM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  88
Joined  2006-10-18

UPDATE:  I’m not using this process anymore, so you don’t need to help me with this one.

Thanks

Profile