• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

adding reputation and post count in topic view

Scheduled Pinned Locked Moved Technical Support
9 Posts 2 Posters 2.3k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    torn2
    wrote on last edited by torn2
    #1

    May someone please assist me with the coding to add reputation and post count in the topic view? I added this code, not correct as i'm a novice, in post.tpl in partials:

    <span class="userinfo-extra">
    				<i class="fa fa-star"></i> <span component="user/reputation" data-reputation="{reputation}" data-uid="{posts.user.uid}" class="formatted-number reputation">{reputation}</span>&nbsp;|&nbsp;
    				<i class="fa fa-pencil"></i> <span class="formatted-number" component="user/postcount" data-uid="{posts.user.uid}" data-postcount="{postcount}">{postcount}</span>
    			</span>
    

    However it does not work properly as you can see in the image below. I got this by looking at someone else's site.

    alt text

    pichaliteP 1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    replied to torn2 on last edited by
    #2

    @torn2 try this

    <span class="userinfo-extra">
    	<i class="fa fa-star"></i> <span component="user/reputation" data-reputation="{posts.user.reputation}" data-uid="{posts.user.uid}" class="formatted-number reputation">{posts.user.reputation}</span>&nbsp;|&nbsp;
    	<i class="fa fa-pencil"></i> <span class="formatted-number" component="user/postcount" data-uid="{posts.user.uid}" data-postcount="{posts.user.postcount}">{posts.user.postcount}</span>
    </span>
    
    T 1 Reply Last reply
    1
  • T Offline
    T Offline
    torn2
    replied to pichalite on last edited by
    #3

    @pichalite Awesome! Thanks for replying so quickly. It works, though for some users it will not show?

    pichaliteP 1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    replied to torn2 on last edited by
    #4

    @torn2 did they make any posts and do they have reputation?

    T 1 Reply Last reply
    0
  • T Offline
    T Offline
    torn2
    replied to pichalite on last edited by
    #5

    @pichalite Yes, one has 5K as posts and 1k as rep. Also, just noticed that the same user has it showing on one post, but two posts later does not?

    pichaliteP 1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    replied to torn2 on last edited by pichalite
    #6

    @torn2 which template did you add the code in?

    Is your site public to take a look?

    T 1 Reply Last reply
    0
  • T Offline
    T Offline
    torn2
    replied to pichalite on last edited by
    #7

    @pichalite It is added in Persona.

    pichaliteP 1 Reply Last reply
    0
  • pichaliteP Offline
    pichaliteP Offline
    pichalite Plugin & Theme Dev
    replied to torn2 on last edited by
    #8

    @torn2 I am talking about the template file... not theme

    T 1 Reply Last reply
    0
  • T Offline
    T Offline
    torn2
    replied to pichalite on last edited by
    #9

    @pichalite I cleared my browser cache and now it works! Thanks for all the help.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development