Info
- 12 posts
- 5 voices
- Started 2 years ago by nickaster
- Latest reply from chandersbs
- This topic is not resolved
Where is the word 'sticky' hidden?
-
- Posted 2 years ago #
So... I've got a theme where the word [sticky] appears next to any sticky thread. Is this happeneing because that it actually appended to the title of the thread? What if I wanted to get rid of that text and replace with, say, a little star icon? What file is that located in?
Thanks!
-
- Posted 2 years ago #
are u using a plugin?
u should upload a file star.png to /my-plugins/topic-icons/icons/
-
- Posted 2 years ago #
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....
-
- Posted 2 years ago #
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.pngIf you can't do it, just copy paste the whole front-page.php in this thread, ill try to help you.
-
- Posted 2 years ago #
Check out the "bb_topic_labels();" function on your front-page.php template:
http://trac.bbpress.org/browser/trunk/bb-templates/kakumei/front-page.php#L24The 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:
http://bbpress.org/forums/topic/what-is-bb_topic_labels -
- Posted 2 years ago #
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!
-
- Posted 2 years ago #
What code did this for you:
» You're Not Logged In. Please Login or Register « -
- Posted 2 years ago #
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> -
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
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.phpfile 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.
-
- Posted 2 years ago #
@nickaster thanks
I implemented it today, it works like a charm :)
-
- Posted 2 years ago #
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() ?> -
You must log in to post.