Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 [2]   Go Down

Author Topic: Display Stats  (Read 10606 times)

0 Members and 1 Guest are viewing this topic.

haters

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Display Stats
« Reply #20 on: February 28, 2014, 08:09:05 pm »

Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #21 on: February 28, 2014, 08:35:10 pm »

I think you see a old version of your page because I see that it worked.
it only needs to be in the right position (without all that space around it.I will help you to do that),more width to #showStats maybe 10% and if the number will be bigger then like 10.000 even 30%

thanks for allowing me to see your website.is easier to help you this way.
Logged

haters

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Display Stats
« Reply #22 on: February 28, 2014, 08:42:32 pm »

I think you see a old version of your page because I see that it worked.
it only needs to be in the right position (without all that space around it.I will help you to do that),more width to #showStats maybe 10% and if the number will be bigger then like 10.000 even 30%

thanks for allowing me to see your website.is easier to help you this way.
I've set it to 8% (will update as I get to double figures). Any way to get it as the same colour, text and size as the other text in the box where it is? Also there's a huge gap above and below the numbers. How do we fix that? :D
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #23 on: February 28, 2014, 08:44:25 pm »

Yes.I am going to do all now.please wait 10 minutes to make the code for you.
Logged

haters

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Display Stats
« Reply #24 on: February 28, 2014, 08:59:10 pm »

Yes.I am going to do all now.please wait 10 minutes to make the code for you.
Alright. Thank you :)
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #25 on: February 28, 2014, 09:18:38 pm »

I just realised that you don't need to load all the .statlink div but just the strong tag.

replace my code from reply#2 with:

Code: [Select]
<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script>
        $(document).ready( function() {
          $( "#showStats" ).load( "http://allvip.us/cpg/test/index.php .statlink strong" );
});
</script>

replace my code from reply#14 with:

Code: [Select]
#showStats{display:inline;padding:0 0.5rem 0 0.5rem;}
#showStats strong{display:none;}#showStats strong:first-child{display:inline;font-weight:normal;font-family:Arial,sans-serif;font-size:11px;color:#666;line-height:18px;}
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #26 on: February 28, 2014, 09:24:37 pm »

I think you can delete:

Code: [Select]
<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>

from the code.I see your website already has jquery 1.7.1 and 1.6 loding on the page so my code should work with out that line from the code.

please try:

Code: [Select]
<script>
        $(document).ready( function() {
          $( "#showStats" ).load( "http://allvip.us/cpg/test/index.php .statlink strong" );
});
</script>

Logged

haters

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Display Stats
« Reply #27 on: February 28, 2014, 09:27:25 pm »

I just realised that you don't need to load all the .statlink div but just the strong tag.

replace my code from reply#2 with:

Code: [Select]
<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script>
        $(document).ready( function() {
          $( "#showStats" ).load( "http://allvip.us/cpg/test/index.php .statlink strong" );
});
</script>

replace my code from reply#14 with:

Code: [Select]
#showStats{display:inline;padding:0 0.5rem 0 0.5rem;}
#showStats strong{display:none;}#showStats strong:first-child{display:inline;font-weight:normal;font-family:Arial,sans-serif;font-size:11px;color:#666;line-height:18px;}
Just one thing, there'a bit of a gap to the side of it. Is there any way to fix that? I'm happy with how it is though now anyways.

Thank you SO MUCH. I really do appreciate your help!
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #28 on: February 28, 2014, 09:32:21 pm »

With this code you don't need to update if the number will be 10 000

« Last Edit: February 28, 2014, 09:42:42 pm by allvip »
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #29 on: February 28, 2014, 09:38:18 pm »

Do you want the number to stand out from the text:change font-weight:normal; to font-weight:bold;

you can change even font-size:11px; to font-size:20px; if you want the number to be bigger.
you can underline it or add a border dotted under it,or a background color.
If you want anything diffrent you can always ask.is no trouble.

I like how your website and gallery looks.nice work.
« Last Edit: February 28, 2014, 10:00:05 pm by allvip »
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #30 on: February 28, 2014, 09:46:02 pm »

Quote
Just one thing, there'a bit of a gap to the side of it. Is there any way to fix that?

change padding:0 0.5rem 0 0.5rem; to padding:0 0.2rem 0 0.2rem;
you can use even pixels:padding:0 5px 0 5px;
 or just delete padding:0 0.5rem 0 0.5rem; from the code.I think is ok even without.
« Last Edit: February 28, 2014, 09:51:35 pm by allvip »
Logged

haters

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 36
Re: Display Stats
« Reply #31 on: March 01, 2014, 06:45:16 am »

change padding:0 0.5rem 0 0.5rem; to padding:0 0.2rem 0 0.2rem;
you can use even pixels:padding:0 5px 0 5px;
 or just delete padding:0 0.5rem 0 0.5rem; from the code.I think is ok even without.
I changed it to 0.0.1 and it looks much neater. Thank you again for all your help!
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #32 on: March 01, 2014, 08:10:16 am »

You can even change padding:0 0.5rem 0 0.5rem; to padding:0px;This way will have 0px padding for all 4 values(top,right,bottom,left.).

padding:0 0.5rem 0 0.5rem; means 0 gap to top,0.5 gap to right 0 gap to bottom and 0.5 gap to left.

You can add even margin:0px; to the code.
« Last Edit: March 01, 2014, 08:27:59 am by allvip »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Display Stats
« Reply #33 on: March 04, 2014, 09:51:31 am »

Please keep in mind that allvip's solution just works if your users have JavaScript enabled.
Logged

ninouee

  • Coppermine novice
  • *
  • Country: fr
  • Offline Offline
  • Gender: Female
  • Posts: 44
Re: Display Stats
« Reply #34 on: June 16, 2014, 09:20:25 pm »

hello

Thank you for your informations.

but i have questions about the function <p id="showStats"></p>

I put on my index page the different elements and it's ok but the informations is on a line.

Can you explaine-me where i can find the element in order to change it.

My goal is show the informations like that:
- 12,611 photos
- 805 albums
- 45 catégories...
=> http://ddstv.fr/ on my index i write the informations manually.

I'm sorry i y do mistakes in english, i'm french.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #35 on: June 24, 2014, 04:20:45 pm »

I can see jquery 1.4.2 is loding on your page.

1.add in the head of your page (<head></head> tags):

Code: [Select]
<script>
        $(document).ready( function() {
          $( "#showStats" ).load( "http://ddstv.fr/galerie/index.php .statlink" );
});
</script>

2.add to your_page_style.css:

Code: [Select]
.statlink p {
    display: block;
    margin: 0px;
    padding: 0px;
}
.statlink p strong {
    display: inline;
}
.statlink strong {
    display: none;
}

3.add: <p id="showStats"></p> where you want the stats to show on your page.


4.Open http://ddstv.fr/galerie/lang/english.php find:

Code: [Select]
$lang_list_categories['stat1'] = '[pictures] files in [albums] albums and [cat] categories with [comments] comments viewed [views] times'; // do not translate the stuff in square brackets
 

and replace with:

Code: [Select]
$lang_list_categories['stat1'] = '<p>[pictures] files </p><strong>in</strong> <p>[albums] albums </p><strong>and</strong> <p>[cat] categories </p><strong>with</strong> <p>[comments] comments</p><p> viewed [views] times</p>'; // do not translate the stuff in square brackets

5.add to themes/curve/style.css :

Code: [Select]
.statlink p,.statlink strong {
    display: inline;
}
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Display Stats
« Reply #36 on: June 24, 2014, 04:32:21 pm »

If your users can view your gallery in their own language (Autodetect language is ON in Config) then you need to edit all the language files.
I don't know any other way.
If you don't want to edit english.php then follow step1,step2 and step 3 and replace step 3 with:

Code: [Select]
.statlink strong {
    display: block;
}
and you will have: see  the image I attached.
Logged

ninouee

  • Coppermine novice
  • *
  • Country: fr
  • Offline Offline
  • Gender: Female
  • Posts: 44
Re: Display Stats
« Reply #37 on: June 24, 2014, 07:25:31 pm »

Hello!

Thank you for your help it's working on mys page test! Now i have to do my new style.

 :)
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.029 seconds with 20 queries.