Author Topic: Total Images  (Read 8845 times)

0 Members and 1 Guest are viewing this topic.

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Total Images
« on: January 01, 2009, 05:54:15 PM »
Hi all

On the main page it displays the total images, can it be changed from 1019 to 1,019. :lol:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Total Images
« Reply #1 on: January 01, 2009, 08:03:47 PM »
In includes/page_header.php find:
Code: [Select]
  "total_images" => $total_images,
Replace it with:
Code: [Select]
  "total_images" => number_format($total_images, "", "", ","),
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Total Images
« Reply #2 on: January 01, 2009, 08:11:22 PM »
Thank you man :lol:

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Total Images
« Reply #3 on: January 01, 2009, 08:17:17 PM »
I forgot to ask how do you make it display the same for the total images in each category and sub category :)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Total Images
« Reply #4 on: January 01, 2009, 08:22:41 PM »
in includes/functions.php
Find:
Code: [Select]
      "num_images" => $num_images
Replace it with:
Code: [Select]
      "num_images" => number_format($num_images, "", "", ",")
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Total Images
« Reply #5 on: January 01, 2009, 08:31:43 PM »
I thought it would be something similar, just didn't know what file, thanks alot :lol:

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Total Images
« Reply #6 on: January 04, 2009, 12:22:11 AM »
I noticed a problem I have with the total amount of images displaying in each category. When you click and scroll down to the bottom of the page it says "x images(s) on x page(s)." Now mine says "images(s) on 0 page(s)." And the page navigation doesn't display 8O

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Total Images
« Reply #7 on: January 04, 2009, 12:58:21 AM »
I'm pretty sure the changes I've posted have nothing to do with pagination...perhaps you did some other modifications that affected it.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Total Images
« Reply #8 on: January 04, 2009, 09:59:29 PM »
I haven't done any other changes, on my New Images page the pagination shows fine :lol:

Offline cch

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Total Images
« Reply #9 on: January 05, 2009, 02:29:49 PM »
Hi V@no

I managed to fix the issue but on the pagination it hasn't changed

Code: [Select]
3651 images(s) on 305 page(s). :)

Offline alekinna

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
    • Gallery of cross-stitching
Re: Total Images
« Reply #10 on: January 09, 2009, 05:33:55 PM »
Hi V@no

I managed to fix the issue but on the pagination it hasn't changed

Code: [Select]
3651 images(s) on 305 page(s). :)

I know, cch already resolved this problem.
I will post for other users too.

In the file includes/paging.php

find
Code: [Select]
$this->num_rows_all = $num_rows_all;
add below
Code: [Select]
$this->new_format = number_format($num_rows_all, "", "", ",");
find
Code: [Select]
$replace_array = array(
      $this->num_rows_all,

replace with
Code: [Select]
$replace_array = array(
      $this->new_format,