+ Reply to Thread
Results 1 to 10 of 10

Thread: How can i load custom statistics values

  1. #1
    Senior Member
    Join Date
    May 2014
    Posts
    182

    How can i load custom statistics values

    Hi, I have statistics plugin. I currently have 0 listings & accounts but i want to show some dummy statistics on the statistics plugin until i have real numbers.

    Like, 1000 Categories, 2000 Locations, 500 Accounts, 1500 Ads

    How do i do that?

    (I can do it with html & css codes, but i want the statistics like our statistics plugin.)
    Last edited by Pricky; September 26, 2021 at 01:27 PM.

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,137
    Hello,

    Can you show on a screenshot where exactly you need these numbers?

  3. #3
    Senior Member
    Join Date
    May 2014
    Posts
    182
    On homepage, above the footer like on demo site.

    statistics.png

  4. #4
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,137
    The simple solution is to go to templates > components > statistics > open _statistics.tpl

    after:
    Code:
    Only registered members can view the code.
    add:
    Code:
    Only registered members can view the code.

    then below replace $stat_item.total with $total

  5. #5
    Senior Member
    Join Date
    May 2014
    Posts
    182
    Thanks for the code, Rudi.

    But i don't use Listing types to show the statistics,

    I just want to show general statistics which is not listing types.

    How can i format the above code, for these statistics

    1000 Categories, 2000 Locations, 500 Accounts, 1500 Ads

    Code:
    Only registered members can view the code.
    I don't think this code will work, we shouldn't use listing type key here. These are custom texts.!
    Last edited by Pricky; September 27, 2021 at 02:20 PM.

  6. #6
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,137
    In this case, you need to remove the code: {foreach from=$statistics_block key='stat_type_key' item='stat_item'} ... {/foreach}


    and duplicate in the file this code block with html elements and set your values:

    example
    Code:
    Only registered members can view the code.
    Otherwise, I can't help you,

    you need to know the basics of html for that
    Last edited by Rudi; September 27, 2021 at 05:13 PM.

  7. #7
    Senior Member
    Join Date
    May 2014
    Posts
    182
    Got it and its working very well

  8. #8
    Senior Member
    Join Date
    Nov 2021
    Posts
    162
    Good day Rudi!
    Please tell me, and how can you implement personal statistics for an account using such an example?

    I mean that for example on the profile page the user could see: Motor 5, Real Estate 10, Services 32, etc.

  9. #9
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,137
    Hello Kaniel,

    Unfortunately, it will require additional modifications to display statistics per account

  10. #10
    Senior Member
    Join Date
    Nov 2021
    Posts
    162
    It would turn out to be a great plugin in the end for your personal account!)))
    Please think about it

+ Reply to Thread