in reply to Re: http://perlmonks.org: Title, or Trash?
in thread http://perlmonks.org: Title, or Trash?
I sugguest the only tokens available be:
%T - the actual post title
%D - the gmt date the post was created
%N - the node_id
It would be user setting, blank by default (in which case it's just the node_title in the title). It would be have a 12 character limit (<INPUT TYPE="text"..., and anything other than %T %D and %N would be represented litelarlly, so that
perlmonks (%N) %T
for this post would translate into
perlmonks (128020)(crazyinsomniac) Re^2: http://perlmonks.org: Title, or Trash?
That'd be pretty easy to implement, some potential code (which should work if some pmdev-er wants to submit the patches), on user settings (with appropriate html around)
and on basichead[{textfield:customnodetitledefinition,12}] # or, in case that don't work (i don't recall, i'll have to check) [{setvar:customnodetitledefinition,12}]
my $V=getVars $USER; my $pt = (exists $$V{customnodetitledefinition} and defined $$V{customnodetitledefinition} )? $$V{customnodetitledefinition} : undef; return qq{<TITLE>$$NODE{title}</TITLE>} unless $pt; $pt =~ s/\%T/$$NODE{title}/; $pt =~ s/\%N/$$NODE{node_id}/; $pt =~ s/\%D/$$NODE{createtime}/; return qq{<TITLE>$pt</TITLE>};
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void
perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"
|
|---|