Support Forums

Got a question? Post it here. We'd love to help.

Knowledge Base:

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthortodd
    • CommentTimeJul 4th 2008
     

    Sorry if this is a repeat, but I don't think my post about this from yesterday was saved.

    This could have been caused by one of the other changes I've made, but the email sent out from the forums doesn't show the breadcrumbs. (Which course/forum it's from) All you see are little black arrows >>. Which forum the email is from does appear in black when you hover over the area.

    Todd

    •  
      CommentAuthorptrkmkl
    • CommentTimeJul 4th 2008 edited
     

    Try adding the following to remove all styles from emails:

    /* to remove styles from emails sent to users */ body#email, #email .navbar, #mail .navbar a, #email #page { background:none !important; color:#333 !important; margin:0 !important; }

    Let me know how that works - this is tough to test.

    •  
      CommentAuthorptrkmkl
    • CommentTimeJul 8th 2008 edited
     

    For future reference, here is the Moodle core code that generates the emails sent by the forum module. In my opinion, the email should NOT pull styles from the theme folder, but it does. So, specific styles (like that above) will need to be added to every custom theme.

    Pulled from /moodle/mod/forum/lib.php:

    $posthtml .= "n<body id="email">nn"; $posthtml .= '<div class="navbar">'. '<a target="_blank" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> &raquo; '. '<a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/index.php?id='.$course->id.'">'.$strforums.'</a> &raquo; '. '<a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/view.php?f='.$forum->id.'">'.format_string($forum->name,true).'</a>'; if ($discussion->name == $forum->name) { $posthtml .= '</div>'; } else { $posthtml .= ' &raquo; <a target="_blank" href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$discussion->id.'">'. format_string($discussion->name,true).'</a></div>'; } $posthtml .= forum_make_mail_post($course, $forum, $discussion, $post, $userfrom, $userto, false, $canreply, true, false); if ($canunsubscribe) { $posthtml .= '<hr /><div align="center" class="unsubscribelink"><a href="'.$CFG->wwwroot.'/mod/forum/subscribe.php?id='.$forum->id.'">'. get_string('unsubscribe', 'forum').'</a></div>'; } $posthtml .= '</body>';

    Note: the above code has been cleansed by this forum's software and is presented here for reference alone.

    •  
      CommentAuthorptrkmkl
    • CommentTimeJul 8th 2008
     

    Simplified in CSS form:

    body#email { } body#email .navbar { } body#email .navbar .breadcrumb { } body#email .navbar .breadcrumb a { } body#email a { } body#email .unsubscribelink { }

    Then, there is the forum post table to deal with:

    body#email table.forumpost { } body#email .forumpost td.picture { } body#email .forumpost td.topic { } body#email .forumpost td.subject { } body#email .forumpost td.author { } body#email .forumpost td.footer { } body#email .forumpost td.left { } body#email .forumpost td.content { } And, that should be everything present in the forum email!