Recent Topics

1 Jun 08, 2006 14:58    

Hello Crowd,
is there away to include the "Visibility / Sharing" setting after the title in the fine print of postings? What line/s would I need to put where to call that info into my template?

/me thinks that would be a nice thing to have for quickly telling apart what's what while browsing - especially for authors and admins.

Thank yous!

2 Jun 09, 2006 17:15

Yes, just add this in your skin (_main.php):

<?php $Item->status(); ?>

Or, if you want to get more tricky and use icons or something, you could make it more like this:

<?php 
if ($Item->status == 'Published') echo '<img src="yourpublishedicon.gif" alt="Published" />';
if ($Item->status == 'Protected') echo '<img src="yourprotectedicon.gif" alt="Protected" />';
// etc
 ?>

3 Jun 09, 2006 17:35

hey; great, thanks! (I had already thought my post was shunned for stupidity, since every entry does show it's status in the backoffice)

I'll check your solution out l8r today :)
how would I have to enclose what with "the t-bracket" to give out the proper locale readout of the status?! :)

thank you! And best regards,

'lex

4 Jun 09, 2006 17:40

No, that's not a stupid question. I had to go looking for the answer. It's something I've thought about doing before, but I never knew how, so I'm glad you asked.

If you use the $Item->status() method, then it will do the translating automatically.

5 Jun 12, 2006 20:56

Finally got to try it out. First walked into a wall, forgetting case-sensitivity, duh. Now it works great, thanks for the tip!! :)
Best Regards,

'lex

6 Jun 12, 2006 21:00

My pleasure. This is another case of where the developers have already thought of something before anyone even asked for it.

7 Jun 12, 2006 21:41

In a skin I made I uss CSS to show the viewer the status. Obviously only registered members can see the effect... Anyway in your _main.php file you do like this:

<div class="bPost<?php the_status() ?>" lang="<?php $Item->lang() ?>">
<h3 class="bTitle">


That will make the page deliver with something like

<div class="bPostpublished" lang="foo">

Or bPostprotected, or bPostprivate.

So over in my CSS I did this:

.bPost, .bPostpublished, .bPostprotected, .bPostprivate {
clear: both;
margin: .4ex;
padding-top: .4ex;
padding-right: 1ex;
padding-bottom: .4ex;
padding-left: .8ex;
background: #FFFFFF;
border: 1px solid #6699CC;
}
.bPostprotected, .bPostprivate {
background-color: #FDF5E6;
}
.bPostprivate {
border: 2px solid #FF0000;
}

Basically this makes all posts look the same except protected gets a yellowish background and private gets a red border. I think it was Topanga who first shared this method way back when, but I'm not sure. I'm pretty sure about that. Credit where credit is due eh?

--------

Not sure if this'll work anymore due to calling "the_status()". I'd have to check to see if that function still exists and works.


Form is loading...