Author Topic: Please, need total new images count.  (Read 39122 times)

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Please, need total new images count.
« Reply #15 on: November 28, 2005, 05:09:36 PM »
@ ivan

die folgende Codezeile setze noch unter den Code von Loda :

Code: [Select]
$lang_total_new = $lang['lang_total_new'];
$site_template->register_vars("lang_total_new", $lang_total_new);
unset($lang_total_new);
in /lang/<your_lang>/main.php :
Code: [Select]
$lang['total_new'] = "Neue Bilder :";

mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Please, need total new images count.
« Reply #16 on: November 28, 2005, 06:07:57 PM »
{total_images} - bringt jeweils die Anzahl aller Bilder, die ich abhänging von meinem Status (Admin, User, Guest) incl. der Bild-Zugriffsoptionen aus dem ACP auf der Website sehen kann. Diesen Count würde ich im Template so verwenden:
Code: [Select]

<b>Bilder für dich : {total_images}</b>

Für den Count aller Bilder der Website, unabhängig vom Status, kann man folgendes verwenden :
Code: [Select]
$sql = "SELECT COUNT(*) AS all_total_images FROM ".IMAGES_TABLE." WHERE image_active = 1";
$row = $site_db->query_firstrow($sql);
$all_total_images = $row['all_total_images'];
$lang_all_total_images = $lang['all_total_images'];
$site_template->register_vars("all_total_images", $all_total_images);
$site_template->register_vars("lang_all_total_images", $lang_all_total_images);
unset($all_total_images);
unset($lang_all_total_images);

in /lang/<your_lang>/main.php :
Code: [Select]
$lang['all_total_images'] = "Bilder gesamt :";

in deinem Template :
Code: [Select]
<b>{lang_all_total_images} {all_total_images}</b>

Beides würde in der Ansicht dann z.B. folgendes ergeben :

Bilder gesamt : 3895
Bilder für dich : 2537


mawenzi
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Please, need total new images count.
« Reply #17 on: November 28, 2005, 06:39:11 PM »
(69 neu = abhängig vom status)

variable $total_new_image ... siehe : hier
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline CharlieF.

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: Please, need total new images count.
« Reply #18 on: April 21, 2007, 06:23:20 PM »
Hallo,
was muss man den tun, um um den {total_new_images} tag auf allen .html seiten verwenden zu können? Wenn ich alles wie beschrieben in meine statistics.php einbinde, kann ich ihn halt auch nur in der statistics.html verwenden. Auf allen anderen Seiten wird nur eine 0 angezeigt.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Please, need total new images count.
« Reply #19 on: April 22, 2007, 09:03:45 PM »
@ CharlieF.
... dann binde den Code in /includes/page_header.php ein ... ;)
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline CharlieF.

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: Please, need total new images count.
« Reply #20 on: April 23, 2007, 04:26:49 PM »
Hab ich versucht, hat aber irgendwie nicht getan so wie ich wollt.  :?
Kanns ja nochmal probieren.

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Please, need total new images count.
« Reply #21 on: September 09, 2007, 04:47:10 AM »
Will anyone plz tell me how to show total no of images on the site ?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Please, need total new images count.
« Reply #22 on: September 09, 2007, 04:52:52 AM »
In index.php file,

Quote
//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------

is say all. Use {if new_images}{new_images}{endif new_images} in templates/your_template/home.html file. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Please, need total new images count.
« Reply #23 on: September 09, 2007, 05:42:14 PM »
Thanks dear for reply, i wanna show total number of images (old and new) on my site i mean site stats.
For example.

Total Wallpapers: 1239

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Please, need total new images count.
« Reply #24 on: September 09, 2007, 06:07:06 PM »
Hum ... I do like this.

// Step 1

Find:

Quote
//-----------------------------------------------------
//--- Random Image ------------------------------------
//-----------------------------------------------------

Add before:

Code: [Select]
$sql = "SELECT COUNT(image_id) AS total_stats_images
           FROM " . IMAGES_TABLE . "
           WHERE image_active = 1 AND (cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))";

$row = $site_db->query_firstrow($sql);
$total_stats_images = (isset($row['total_stats_images'])) ? (int)$row['total_stats_images'] : 0;

$get_total_stats_images = (isset($total_stats_images) && $total_stats_images > 0) ? preg_replace("/" . $site_template->start . "total_images_count" . $site_template->end . "/siU", $total_stats_images, $lang['total_stats_images']) : "";

$site_template->register_vars("total_stats_images", $get_total_stats_images);
$total_stats_images_template = $site_template->parse_template("total_stats_images");
$site_template->register_vars("total_stats_images_template", $total_stats_images_template);

// Step 2

In lang/english/main.php file,

add top ?>:

Code: [Select]
$lang['total_stats_images'] = "Total images count: {total_images_count}";

// Step 3

In templates/your_template/home.html file (or any HTML have {header} & {footer} file),

add where you want:

Code: [Select]
{if total_stats_images_template}{total_stats_images_template}{endif total_stats_images_template}

// Step 4

In templates/your_template, create file: total_stats_images.html .

Add:

Code: [Select]
{if total_stats_images}{total_stats_images}{endif total_stats_images}

8)
« Last Edit: September 09, 2007, 08:22:21 PM by thunderstrike »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Please, need total new images count.
« Reply #25 on: September 10, 2007, 02:09:38 AM »
Dear bro i cannot edit "Random Image" section of index.php bcoz i am already using it to show random images on my site, plz suggest something more...

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Please, need total new images count.
« Reply #26 on: September 10, 2007, 02:41:56 AM »
My code is no random image ... is for total count of image ...

Quote
Thanks dear for reply, i wanna show total number of images (old and new) on my site i mean site stats.
For example.

Total Wallpapers: 1239
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Please, need total new images count.
« Reply #27 on: September 10, 2007, 03:16:23 AM »
My code is no random image ... is for total count of image ...

Quote
Thanks dear for reply, i wanna show total number of images (old and new) on my site i mean site stats.
For example.

Total Wallpapers: 1239

You are right dear your code is for Total Images but i wanna say that i am already using this section to show random wallpaper and i think if i put your code in that section then random wallpaper will not work but total images count will work but i wanna use both... so plz give suggestion

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Please, need total new images count.
« Reply #28 on: September 10, 2007, 12:40:07 PM »
Quote
if i put your code in that section then random wallpaper will not work

My instruction say you can put tag anywhere you like in all HTML template file have {header} to {footer} ... My code is do from page_header.php ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline ashfaq

  • Full Member
  • ***
  • Posts: 128
    • View Profile
Re: Please, need total new images count.
« Reply #29 on: September 10, 2007, 05:18:21 PM »
Oo, i was thinking to put code in index.php but i also add code in page_header.php above "Random Image"
and when i put code in page_header.php in change colors of other code, it means that your given code has some errors or i put code wrongly but i have checked and i put code as you gave, plz can you attach code file ? Plz i will be very thankfull.
« Last Edit: September 10, 2007, 06:19:48 PM by ashfaq »