• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

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>

😀
 
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>

😀

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