FAP SUPPORT - Recent & Random Picture Block...showing The Same Pic


Subject: FAP SUPPORT - Recent & Random Picture Block...showing The Same Pic
Is there a code edit to ensure the recent and random pics aren't the same on the portal page?

Here is my code:

Code: [Download] [Hide]
  1. <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">  
  2. <tr>  
  3. <th class="thTop" colspan="9" height="25"><center><span class="genmed"><b><font color="orange">Pictures From Our Members' Albums</font></b></span></center></th>  
  4. </tr>  
  5. <tr>  
  6. <td width="100%">  
  7. <table class="forumline" width="100%" align="center" cellspacing="1" cellpadding="2" border="1">  
  8. <tr>  
  9. <td class="catHead" height="25" nowrap="nowrap"><b><center>{L_RECENT_PUBLIC_PICS}</center></b></td>  
  10. <td class="catHead" height="25" nowrap="nowrap"><b><center>{L_RAND_PICS}</center></b></td>  
  11. </tr>  
  12. <tr>  
  13. <!-- BEGIN recent_pics_block -->  
  14. <!-- BEGIN no_pics -->  
  15. <td class="row1" align="center" width="50%"><span class="gen">{L_NO_PICS}</span>  
  16. </td>  
  17. <!-- END no_pics -->  
  18. <!-- BEGIN recent_pics -->  
  19. <!-- BEGIN recent_col -->  
  20. <td colspan="{S_COLS}" align="center" width="50%">  
  21. <div class="picshadow"><div class="picframe">  
  22. <a href="{recent_pics_block.recent_pics.recent_col.U_PIC}" {TARGET_BLANK}><img src="{recent_pics_block.recent_pics.recent_col.THUMBNAIL}" {THUMB_SIZE} border="0" alt="{recent_pics_block.recent_pics.recent_col.DESC}" title="{recent_pics_block.recent_pics.recent_col.DESC}" vspace="10" /></a>  
  23. </div></div></br>  
  24. <!-- END recent_col -->  
  25. <!-- BEGIN recent_detail -->  
  26. <div class="row2" align="center"><span class="gensmall">  
  27. {L_POSTER}: {recent_pics_block.recent_pics.recent_detail.POSTER}<br />  
  28. {L_PIC_TITLE}: {recent_pics_block.recent_pics.recent_detail.TITLE}<br />  
  29. <!-- BEGIN hide_code -->  
  30. {L_PIC_ID}: {recent_pics_block.recent_pics.recent_detail.PIC_ID}<br />  
  31. {L_POSTED}: {recent_pics_block.recent_pics.recent_detail.TIME}<br />  
  32. {L_VIEW}: {recent_pics_block.recent_pics.recent_detail.VIEW}<br />  
  33. <!-- END hide_code -->  
  34. {recent_pics_block.recent_pics.recent_detail.RATING}  
  35. {recent_pics_block.recent_pics.recent_detail.COMMENTS}  
  36. {recent_pics_block.recent_pics.recent_detail.IP}</span>  
  37. </div>  
  38. </td>  
  39. <!-- END recent_detail -->  
  40. <!-- END recent_pics -->  
  41. <!-- END recent_pics_block -->  
  42. <!-- BEGIN random_pics_block -->  
  43. <!-- BEGIN no_pics -->  
  44. <td class="row1" align="center" width="50%"><span class="gen">{L_NO_PICS}</span>  
  45. </td>  
  46. <!-- END no_pics -->  
  47. <!-- BEGIN rand_pics -->  
  48. <!-- BEGIN rand_col -->  
  49. <td colspan="{S_COLS}" align="center">  
  50. <div class="picshadow" width="50%"><div class="picframe">  
  51. <a href="{random_pics_block.rand_pics.rand_col.U_PIC}" {TARGET_BLANK}><img src="{random_pics_block.rand_pics.rand_col.THUMBNAIL}" {THUMB_SIZE} border="0" alt="{random_pics_block.rand_pics.rand_col.DESC}" title="{random_pics_block.rand_pics.rand_col.DESC}" vspace="10" /></a>  
  52. </div></div></br>  
  53. <!-- END rand_col -->  
  54. <!-- BEGIN rand_detail -->  
  55. <div class="row2" align="center"><span class="gensmall">  
  56. {L_POSTER}: {random_pics_block.rand_pics.rand_detail.POSTER}<br />  
  57. {L_PIC_TITLE}: {random_pics_block.rand_pics.rand_detail.TITLE}<br />  
  58. <!-- BEGIN hide_code -->  
  59. {L_PIC_ID}: {random_pics_block.rand_pics.rand_detail.PIC_ID}<br />  
  60. {L_POSTED}: {random_pics_block.rand_pics.rand_detail.TIME}<br />  
  61. {L_VIEW}: {random_pics_block.rand_pics.rand_detail.VIEW}<br />  
  62. <!-- END hide_code -->  
  63. {random_pics_block.rand_pics.rand_detail.RATING}  
  64. {random_pics_block.rand_pics.rand_detail.COMMENTS}  
  65. {random_pics_block.rand_pics.rand_detail.IP}</span>  
  66. </div>  
  67. </td>  
  68. <!-- END rand_detail -->  
  69. <!-- END rand_pics -->  
  70. <!-- END random_pics_block -->  
  71. </tr>  
  72. </table>  
  73. </td>  
  74. </tr>  
  75. </table> 

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
I don't notice anything above that would cause that problem.

I assume you have refreshed the page a few times to be certain it wasn't showing the same pic just by chance.

What php code are you using ?

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
I think I wasn't clear. It was showing the same pic by chance, but I'd like something in the code that says if the random = the recent, choose a new random.

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
Ok, I understand now .... again "What php code are you using ?"

I don't think this is possible using full_album_pack_pictures_blocks_1_0_0
but may be possible using full_album_pack_portal_block_1_0_1

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
I am using FAP 1.4.0 for CH

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
Were there any final thoughts on how to ensure that the random pic will not be the same as the most recent pic?

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
Since they are random, it is not straightforward... the SQL for the random script should be rewritten to exclude pics parsed by the recent block.

I think is not a major issue if you have many pics in your album, it's only a matter of probability. :roll:

Subject: Re: Recent & Random Picture Block...showing The Same Pic
I was thinking another thing... can you provide me a link to the page with this error please?

Subject: Re: Recent & Random Picture Block...showing The Same Pic
Link

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
Could it be that you only have one pic ? So it must be the same ;-)

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
No. : ) But it is true that because there are so few that it is more likely that they will duplicate. It's not the end of the world. As more pics get added this will stop happening.

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
ignorantnewguy wrote: [View Post]
No. : ) But it is true that because there are so few that it is more likely that they will duplicate. It's not the end of the world. As more pics get added this will stop happening.


My thoughts exactly, but if you were using the code from the contrib's FAP Portal Block, it should not be difficult.....otherwise I think you are SOL.

Profile PM  
Subject: Re: Recent & Random Picture Block...showing The Same Pic
Artie wrote: [View Post]
My thoughts exactly, but if you were using the code from the contrib's FAP Portal Block, it should not be difficult.....otherwise I think you are SOL.

 
Off Topic
:
Artie you are always teaching me something new... what SOL means? :shock:


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 7.4458s (PHP: 0% SQL: 100%)
SQL queries: 13 - Debug Off - GZIP Enabled