Custom Post Reputations

← General Support — Started 22 Dec, 2011

leesester
22 Dec, 2011, 4:20 am (This post was last modified: 22 Dec, 2011 4:21 am by leesester.)
Hi Tomm,

I was doing some work on Leefish and I wanted to ask if it is possible to use a CSS styled button for the custom post rep rather than an image. Ideally I wanted to have a different style per stylesheet.

Thank you

Happy Birthday Smile
[Image: leelink.gif]
0  
Reply
Apologies Mr. Fish - it seems I missed this thread altogether. I've only just noticed it from working off a backup. Shy

Of course it's possible! As far as I know, you just need to alter the template but keep the same information (class, id etc). I'll be upgrading Xekko in the coming days when I get a chance and that has a styled button - I'll post the templates it uses once I've ran some tests.

(Thanks for the birthday wishes! Smile)
0  
Reply
Thanks Tomm.

I was just confused as to how I could select the image (we have to have an image on the server) but then turn it into a css class. I will keep an eye out for the templates.

On missing the thread - it seems that sometimes the red notifications does not pick up some threads, not sure why. Or maybe after a certain amount of time the thread/post is no longer picked up in the notification.
[Image: leelink.gif]
0  
Reply
The notifications work from the lastvisit - if I visited the forum to remove a spammer but not read your thread, and then revisited again an hour later or so, then I would have missed the notification!

Here's the template I used:

Code:
<span class="button like">
    <a href="javascript:;" title="{$lang->plus_post}" onclick="PostReputation.vote('{$pid}', 'plus', '{$uid}')" id="plus_link_{$pid}"><span>Like</span></a>
</span>

So basically, you can create a class that looks something like this:

Code:
div.postrep span.button.like {
    background: url(../path/to/image/like.png) no-repeat;
}

It works a bit different here (the background is actually applied to the span element in the a tag) but you get the idea. Tongue
1  
Reply
I get it - but is that for custom post reputations?

This is what I have in my template

Code:
<div class="post_meta" id="post_meta_{$post['pid']}">
                {$post['iplogged']}

                </div>
<div class="float_right"><div id="posttags_{$post['pid']}">{$post['posttags']}</div></div>
0  
Reply
Haha, uhm, I thought you meant customizing Post Reputation, not realizing you meant Custom Post Reputation!

I'm not entirely sure it is possible. I think the img tag is hard referenced (a bit like smilies). I'll take a look.
0  
Reply

User(s) browsing this thread: 2 Guest(s)