webmin notes
0.2
메모를 작성/편집/제거 할 수있는 작은 모듈.
템플릿 파일 (body.cgi 또는 index.cgi)에 다음을 추가하십시오.
&foreign_require( " webmin-notes " );
@notes = &webmin_notes::list_notes();
foreach my $n ( @notes ) {
# now you have access to each note
# Available methods: status, style, title, content
}이 예제는 정통-테마 (https://github.com/virtualmin/authentic-theme)에 적합합니다.
/usr/share/webmin/authentic-theme/sysinfo.cgi 편집하고 22 행에 다음 코드를 추가하십시오.
&foreign_require( " webmin-notes " , " webmin-notes-lib.pl " );
my @notes = &webmin_notes::list_notes();
foreach my $n ( @notes ) {
if ( $n -> { ' status ' } == 1) {
print ' <div class="alert alert- ' . html_escape( $n -> { ' style ' }) . ' " role="alert"><b> ' . html_escape( $n -> { ' title ' }) . ' </b> ' . html_escape( $n -> { ' content ' }) . " </div> n " ;
}
}이 예제는 @winfuture bootstrap 테마 (http://theme.winfuture.it/)에 적합합니다.
테마의 index.cgi 를 편집하고 다음 코드를 추가하십시오.
&foreign_require( " webmin-notes " );
@notes = &webmin_notes::list_notes();
foreach my $n ( @notes ) {
if ( $n -> { ' status ' } == 1) {
print ' <div class="alert alert- ' . html_escape( $n -> { ' style ' }) . ' " role="alert"><b> ' . html_escape( $n -> { ' title ' }) . ' </b> ' . html_escape( $n -> { ' content ' }) . " </div> n " ;
}
}::list_notes()
::create_note( $note )
::modify_note( $note )
::delete_note( $note )| Key | Value
| ------------- |:-------------:
| status | 0 = disabled / 1 = enabled
| style | warning, info, danger, success
| title | note-title
| content | note-content
http://www.webmin.com/cgi-bin/search_third.cgi?search=webmin-notes