Printing (no subject) in the actual subject bar where there is no subject

Mar 26, 2011 00:18

Hi, where there's no subject defined I want to print (no subject) in the subject bar, just like in the subject summary list. I know it has to be done via the theme layer, and I assume it uses the function Entry::lay_print_subjectline(Color bg, Color fg, bool usecolour)function. I'm struggling to adapt the code in the other functions to this one ( Read more... )

subject bar, layers

Leave a comment

Comments 3

(The comment has been removed)

mordyn4 March 26 2011, 02:18:59 UTC
Not the OP, but thank you. :D

Reply


mordyn4 March 26 2011, 04:33:54 UTC
I worked it into the existing override code like this:

""";
print (defined $.security_icon or $.subject!=""?" ":"")+(defined $.security_icon?"$.security_icon ":"");

var string subject = "";
if ($.subject == "") { print "(no subject)"; }
else { print $this->formatted_subject({"class"=>"subj-link"}); }
"""
""";

But I'm still working on linkifying the "(no subject)" like the permalink it should be.

Reply

(The comment has been removed)

mordyn4 March 26 2011, 19:19:24 UTC
Huzzah!

Great start to the weekend. Thanks for the brainstorming! The permalink_url bit worked perfectly. :D

""";
print (defined $.security_icon or $.subject!=""?" ":"")+(defined $.security_icon?"$.security_icon ":"");

var string subject = "";
var string subject_text = "(no subject)";
if ($.subject == "") { print "" + $subject_text + ""; }
else { print $this->formatted_subject({"class"=>"subj-link"}); }

"""
""";

Reply


Leave a comment

Up