are u using a plugin?
u should upload a file star.png to /my-plugins/topic-icons/icons/
Hey, that’s pretty cool. I hadn’t been using the plugin, but I’ve added it and it works. Trouble is, that word “[sticky]” is still there, and so is everything else. Where would I look to get rid of [sticky] and the other stuff you can see here?
http://www.triplepundit.com/forum/
I realize the test.png icon is CSS, but some of the rest isn’t….
I don’t think you should remove the word [sticky] as its very handy for users, if they can see which topics are sticky. but thats just my meaning.
you should add a new colom in the left, and add <?php topic_icon(); ?>
in it.
See
http://i628.photobucket.com/albums/uu8/npoeran/plaatjes.png
If you can’t do it, just copy paste the whole front-page.php in this thread, ill try to help you.
Check out the “bb_topic_labels();” function on your front-page.php template:
https://trac.bbpress.org/browser/trunk/bb-templates/kakumei/front-page.php#L24
The word “sticky” used to be hardwired into templates, but it got moved into the bb_topic_labels function in version 0.8.x. That provides the infrastructure for things like the Topic Icons plugin. More here:
https://bbpress.org/forums/topic/what-is-bb_topic_labels
Thanks guys. Very helpful. I guess I’ll leave the word ‘sticky’ for now.
Here’s a question. The plugin somehow magically added the icon without my adding the “<?php topic_icon(); ?>” the first time, as illustrated above. When I followed your suggestion, adding a table column, with “<?php topic_icon(); ?>” in it, then it appeared just as predicted.
How was it smart enough to stop showing the icon in the other place? That’s wild!
What code did this for you:
» You're Not Logged In. Please Login or Register «
re: “You’re Not Logged In…”
I just slapped that in manually on front-page.php between an if/then about whether you’re logged in or not. As follows:
<tr>
<td class="topper-col" colspan="5">
<?php if ( bb_is_user_logged_in() ) : ?>
<h3 class="new-post"><?php bb_new_topic_link('Start a new conversation »'); ?></h3>
<?php else: ?>
<h3 class="not-logged">» You're Not Logged In. Please Login or <a href="http://www.triplepundit.com/forum/register.php"><u>Register</u></a> «</a></h3>
<?php endif; // bb_is_user_not_logged_in() ?>
</td>
</tr>
How do i edit what the [STICKY] part says? For some reason mine have an extra character in them that i’d like to get rid of. I think the author of the blank theme i used put it in there possibly.
Thanks.
If the theme author coded it in to the theme, just find it in the theme and remove it.
You can also change it by creating a functions.php
file in your theme folder, and put this in it:
<?php
remove_filter('bb_topic_labels', 'bb_closed_label');
add_filter('bb_topic_labels', 'my_closed_label');
function my_closed_label( $label ) {
global $topic;
if ( '0' === $topic->topic_open )
return sprintf(__('[Read Only] %s'), $label);
return $label;
}
?>
That changes [Sticky] to [Read Only]. You can change the [Read Only] to whatever text you want instead of sticky.
@nickaster thanks
I implemented it today, it works like a charm
This is the whole code I used btw:
<?php if ( bb_is_user_logged_in() ) : ?>
<?php else: ?>
<a href="http://domain/register.php" >Register free</a>
<?php endif; // bb_is_user_not_logged_in() ?>