*

Vink

  • *****
  • 329
    • NedDate.nl
Total pictures
« on: November 20, 2014, 07:31:38 PM »
Hi!
Is there the posiblity to show the total amount of pictures all the members has together?
I know there is the {$weeksnaps} but is there a totalsnaps?

regards
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91

*

Vink

  • *****
  • 329
    • NedDate.nl
Re: Total pictures
« Reply #1 on: November 24, 2014, 06:30:53 PM »
nobody? :)
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91

*

Pharg

  • *****
  • 2,060
  • osDate Version: osDate Evo v1.0
Re: Total pictures
« Reply #2 on: November 24, 2014, 09:08:18 PM »
Hi!
Is there the posiblity to show the total amount of pictures all the members has together?
I know there is the {$weeksnaps} but is there a totalsnaps?

regards

Hi Vink,

Do you want to display all a members photo's somewhere?
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDate v2.7 & osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Vink

  • *****
  • 329
    • NedDate.nl
Re: Total pictures
« Reply #3 on: November 24, 2014, 09:38:26 PM »
Hi Pharg,

Yes that is the idea. I think its cool to say on the FrontPage or at the landingpage.. we have 2205 members with totaly 1744 pictures.
It das not have the Album pictures included but it would be nice.
I can't find or create the database query for this..
 
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91

*

Pharg

  • *****
  • 2,060
  • osDate Version: osDate Evo v1.0
Re: Total pictures
« Reply #4 on: November 24, 2014, 11:04:59 PM »
Hi Vink,

I think the answer your looking for is in the admin stats, I am looking at it now to see the code needed.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDate v2.7 & osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Pharg

  • *****
  • 2,060
  • osDate Version: osDate Evo v1.0
Re: Total pictures
« Reply #5 on: November 25, 2014, 01:44:01 AM »
Hi Pharg,

Yes that is the idea. I think its cool to say on the FrontPage or at the landingpage.. we have 2205 members with totaly 1744 pictures.
It das not have the Album pictures included but it would be nice.
I can't find or create the database query for this..
 
Hi Vink,

I managed to get this sorted for you :)

In the init.php on line 636 directly under weeksnaps add:
Code: [Select]
$t->assign( 'totalsnaps', $osDB->getOne( 'select count(*) from ! where active = ? ', array( USER_SNAP_TABLE, strtotime("") ) ) );
Then in the stats_lines.tpl line 44 add:
Code: [Select]
<tr >
<td >
{lang mkey='totalsnaps'}
</td>
<td align="right">
{$totalsnaps}
</td>
</tr>

Then in lang_main on line 754 directly after weeksnaps add:
Code: [Select]
$lang['totalsnaps'] = 'Total Pictures:';
Save and reload the language file in your admin.

Check the Stats on the main page now and it will show all active photo's

Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDate v2.7 & osDateEvo v1.0 | PHP: 5.3.42 & PHP: 5.6.18 | MySQL: 5.5.35

*

Vink

  • *****
  • 329
    • NedDate.nl
Re: Total pictures
« Reply #6 on: November 25, 2014, 10:00:35 AM »
Hi Pharg,

Many thanks for this! works like a charm  ;D
Totaly forgot the ini file to look in.
I owe you one   :D
Regards
Vink
osDate 2.19a | PHP 5.3.8 | MySQL  5.0.91