• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Add number of uploaded images

smed79

Chevereto Noob
Hello :),

Add number of uploaded images to footer...

2zrezox.jpg


open "index.php" and find :

Code:
<div id="foot"><div class="foot-d2"><?=APP_NAME;?>, Powered by <a href="http://chevereto.com/" target="_blank">Chevereto</a></div></div>

replace white :

Code:
<div id="foot"><div class="foot-d2"><?=APP_NAME;?>, Powered by <a href="http://chevereto.com/" target="_blank">Chevereto</a><br />
    <div style="font-family: Arial; font-weight: bold; color: #6F6F6F;">
<?php
// Add number of uploaded images. smed79
// $files to liste *.* in "./images" ex: (.jpg, .png, etc...)
$files = glob("images/*.*");
// Variable $compteur counting files lister ($files) in "./images"
$compteur = count($files);
echo "There are <font color=#FF0000>$compteur</font>";
if ($compteur > 1) { echo " images uploaded so far"; }
else { echo " images uploaded so far"; }
?>
    </div>
</div></div>

:D
 
smed79 said:
Hello :),

Add number of uploaded images to footer...

2zrezox.jpg


open "index.php" and find :

Code:
<div id="foot"><div class="foot-d2"><?=APP_NAME;?>, Powered by <a href="http://chevereto.com/" target="_blank">Chevereto</a></div></div>

replace white :

Code:
<div id="foot"><div class="foot-d2"><?=APP_NAME;?>, Powered by <a href="http://chevereto.com/" target="_blank">Chevereto</a><br />
    <div style="font-family: Arial; font-weight: bold; color: #6F6F6F;">
<?php
// Add number of uploaded images. smed79
// $files to liste *.* in "./images" ex: (.jpg, .png, etc...)
$files = glob("images/*.*");
// Variable $compteur counting files lister ($files) in "./images"
$compteur = count($files);
echo "There are <font color=#FF0000>$compteur</font>";
if ($compteur > 1) { echo " images uploaded so far"; }
else { echo " images uploaded so far"; }
?>
    </div>
</div></div>

:D

Hey Smed, How about to combine 2 or more Folders to be checked ?
Like I have images , images2, images3, etc.
How can be done ? someone some help ?
 
this code is faster

Code:
<div id="foot"><div class="foot-d2"><?=APP_NAME;?>, Powered by <a href="http://chevereto.com/" target="_blank">Chevereto</a><br />
    <div style="font-family: Arial; font-weight: bold; color: #6F6F6F;">
<?php
// Add number of uploaded images. smed79 edited by dedydamy.com

$files = (count(scandir("images/")))-3;
if($files==0){
echo "Not are images uploaded <b>:(</b>";
}elseif($files==1){
echo "Only are <font color=#FF0000>1</font> image <b>:(</b>";
}else{
echo "There are <font color=#FF0000>$files</font>  images uploaded so far <b>:)</b> ";
}

?>
    </div>
</div></div>
 
dedydamy said:
this code is faster

Code:
<div id="foot"><div class="foot-d2"><?=APP_NAME;?>, Powered by <a href="http://chevereto.com/" target="_blank">Chevereto</a><br />
    <div style="font-family: Arial; font-weight: bold; color: #6F6F6F;">
<?php
// Add number of uploaded images. smed79 edited by dedydamy.com

$files = (count(scandir("images/")))-3;
if($files==0){
echo "Not are images uploaded <b>:(</b>";
}elseif($files==1){
echo "Only are <font color=#FF0000>1</font> image <b>:(</b>";
}else{
echo "There are <font color=#FF0000>$files</font>  images uploaded so far <b>:)</b> ";
}

?>
    </div>
</div></div>


Thanks Dear, but is Possible to combine 2 or more folders to be checked at the same time ?
I mean, If I have folder1, folder2 and folder3 with images, how can be the code to count the images inside those folders with an unique amount ?
If in folder1 are 10
in folder2 44
in folder3 34
then the script must/should count : There are 88 Images Uploaded !


Can be that possible please? If yes, HOW?
thanks!
 
Back
Top