Fortunately, since you already have a custom theme layer, this should be pretty straightforward. I've added the code in blue to the print_module_userprofile() function below: (Made a typo the first time)
function print_module_userprofile(string title, bool show_profile, bool show_userpic) { var Page p = get_page(); if ($show_userpic and not $show_profile) { if (defined $p.journal.default_pic) { open_module("photo", $title, $p.journal.userpic_listing_url); println """$p.journal.default_pic"""; close_module(); } return; }
if (not $show_profile and not $show_userpic) { open_module("about-me", $title, $p.view_url{"userinfo"}, true); close_module(true); return; }
That's great - worked first time. The previous code I had you had to change to your own journal details, so it's really clever the way this just works.
Comments 2
(Made a typo the first time)
function print_module_userprofile(string title, bool show_profile, bool show_userpic) {
var Page p = get_page();
if ($show_userpic and not $show_profile) {
if (defined $p.journal.default_pic) {
open_module("photo", $title, $p.journal.userpic_listing_url);
println """$p.journal.default_pic""";
close_module();
}
return;
}
if (not $show_profile and not $show_userpic) {
open_module("about-me", $title, $p.view_url{"userinfo"}, true);
close_module(true);
return;
}
open_module("about-me", $title, $p.view_url{"userinfo"});
print """
$p.journal.default_pic\n\n""";
println """""";
println """$p.journal""";
println """$p.journal.name if ($p.journal.website_url ( ... )
Reply
Thank you again.
Reply
Leave a comment