Changeset 10817


Ignore:
Timestamp:
02/27/11 12:58:36 (2 years ago)
Author:
ArthurClemens
Message:

Item10417: 1.9.0 Added setting =outline= to control the summary text. Added form field !SummmaryImage to choose the attachment name to be displayed in the summary. Improved display of comments in list view. Added options to define image sizes.

Location:
trunk/BlogAddOn
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/BlogAddOn/data/_BlogAddOn/BlogPost.txt

    r10801 r10817  
    77        then="%display%" 
    88        else="all" 
     9}%" 
     10poutline="%IF{ 
     11        "defined outline and $outline!=''" 
     12        then="%outline%" 
     13        else="formfield(Summary)" 
     14}%" 
     15pdefaultoutline="summary(200)" 
     16ppicsizesummary="%IF{ 
     17        "defined picsizesummary and $picsizesummary!=''" 
     18        then="%picsizesummary%" 
     19        else="85" 
     20}%" 
     21ppicsizeauthor="%IF{ 
     22        "defined picsizeauthor and $picsizeauthor!=''" 
     23        then="%picsizeauthor%" 
     24        else="50" 
     25}%" 
     26ppicsizecommenter="%IF{ 
     27        "defined picsizecommenter and $picsizecommenter!=''" 
     28        then="%picsizecommenter%" 
     29        else="20" 
    930}%" 
    1031psort="%URLPARAM{ 
     
    213234} 
    214235.blogPostAddOnExcerpt {%IF{ 
    215 "defined BLOGADDON_AUTHOR_PICTURE_FIELD and $'BLOGADDON_AUTHOR_PICTURE_FIELD'!=''"  
     236"defined BLOGADDON_AUTHOR_PICTURE_FIELD and $BLOGADDON_AUTHOR_PICTURE_FIELD!=''"  
    216237then=" 
    217         margin-left:50px; 
     238        margin-left:%ppicsizeauthor%px; 
    218239        padding-left:10px; 
    219240"}%} 
    220241.blogPostAddOnItem h3 { 
    221         font-size:115%; 
     242        font-size:120%; 
    222243        font-weight:bold; 
    223         padding:0 0 3px 0; 
     244        padding:0 0 5px 0; 
    224245        margin:0; 
    225246        border:none; 
    226247} 
    227248.blogPostAddOnSummary { 
    228         margin:.5em 0 0 0; 
     249        margin:10px 0 0 0; 
     250} 
     251.blogPostAddOnHasSummaryImage .blogPostAddOnSummaryText { 
     252        margin-left:%ppicsizesummary%px; /* image width %ppicsizesummary%px */ 
     253        padding-left:15px; 
     254} 
     255.blogPostAddOnSummaryPicture { 
     256        float:left; 
     257        width:%ppicsizesummary%px; 
     258        min-height:%ppicsizesummary%px; 
     259        border:none; 
     260        margin:0 10px 5px 0; 
    229261} 
    230262.blogPostAddOnPicture { 
    231263        float:left; 
    232264} 
    233 .blogPostAddOnLatestComment { 
     265ul.blogPostAddOnCommentStatus { 
    234266        margin:.5em 0 0 0; 
     267        padding:0; 
     268        list-style:none; 
     269        position:relative; 
     270        width:35em; 
     271} 
     272ul.blogPostAddOnCommentStatus li { 
     273        display:block; 
     274        background:#f6f6f5; 
     275        padding:3px 0; 
     276        margin:0 0 2px 0; 
     277        font-size:86%; 
     278} 
     279ul.blogPostAddOnCommentStatus li .blogPostAddOnPicture { 
     280        margin:0 10px; 
     281} 
     282.blogPostAddOnCommentStatusText { 
     283        padding:0 10px; 
    235284} 
    236285.blogPostAddOnLatestCommentCount {} 
     
    315364%STARTSECTION{"blogPostAddOnItem"}%<div class='blogPostAddOnItem'> 
    316365%IF{ 
    317 "defined BLOGADDON_AUTHOR_PICTURE_FIELD and $'BLOGADDON_AUTHOR_PICTURE_FIELD'!=''"  
    318 then="$percntINCLUDE{$quot%WEB%.BlogPost$quot section=$quotblogPostAuthorPicture$quot imgWeb=$quot%USERSWEB%$quot imgTopic=$quot$formfield(Author)$quot imgWidth=$quot50$quot}$percnt" 
     366"defined BLOGADDON_AUTHOR_PICTURE_FIELD and $BLOGADDON_AUTHOR_PICTURE_FIELD!=''"  
     367then="$percntINCLUDE{$quot%WEB%.BlogPost$quot section=$quotblogPostAuthorPicture$quot imgWeb=$quot%USERSWEB%$quot imgTopic=$quot$formfield(Author)$quot imgWidth=$quot%ppicsizeauthor%$quot}$percnt" 
    319368}%<div class='blogPostAddOnExcerpt'><h3>[[$web.$topic][$formfield(Title)]]</h3> 
     369<!-- author, category, tags --> 
    320370<div class='blogPostAddOnHeaderInfo foswikiUnvisited'>$percntINCLUDE{$quot%WEB%.%TOPIC%$quot section=$quotblogPostInfo$quot web=$quot$web$quot topic=$quot$topic$quot author=$quot$formfield(Author)$quot}$percnt</div> 
    321 <div class='blogPostAddOnSummary'>$summary(200)</div>$percntSEARCH{$quot$topicComments%IF{"($WIKINAME = '%BLOGADDON_HIDE_COMMENTS%') OR (($WIKINAME ingroup '%BLOGADDON_HIDE_COMMENTS%')" then="n0nEToP1C"}%$quot web=$quot%IF{"defined BLOGADDON_COMMENTS_WEB and $BLOGADDON_COMMENTS_WEB!=''" then="%BLOGADDON_COMMENTS_WEB%" else="$web"}%$quot scope=$quottopic$quot nonoise=$quoton$quot format=$quot<span class='blogPostAddOnLatestComment foswikiGrayText'>Comments: $dollarcount(.*?(#CommentDate).*) - <a href='$percntSCRIPTURL{view}$percnt/$web/$topic?r=$dollarrev#BlogPostPrompt'>latest comment by $percntSPACEOUT{$quot<nop>$dollarwikiname$quot}$percnt</a> - $dollardate</span>$quot}$percnt 
     371<!-- summary --> 
     372<div class='blogPostAddOnSummary$percntIF{$quot'$formfield(SummaryImage)'!=''$quot then=$quot blogPostAddOnHasSummaryImage$quot}$percnt'>$percntIF{$quot'$formfield(SummaryImage)'!=''$quot then=$quot$percntINCLUDE{$quot%WEB%.%TOPIC%$quot section=$quotsummaryPicture$quot imgWeb=$quot$web$quot imgTopic=$quot$topic$quot imgName=$quot$formfield(SummaryImage)$quot}$percnt$quot}$percnt<div class='blogPostAddOnSummaryText'><div class='foswikiGrayText'>$percntIF{$quot'$%poutline%'!=''$quot then=$quot$%poutline%$quot else=$quot$%pdefaultoutline%$quot}$percnt</div>$percntSEARCH{$quot$topicComments%IF{"($WIKINAME = '%BLOGADDON_HIDE_COMMENTS%') OR (($WIKINAME ingroup '%BLOGADDON_HIDE_COMMENTS%')" then="n0nEToP1C"}%$quot web=$quot%IF{"defined BLOGADDON_COMMENTS_WEB and $BLOGADDON_COMMENTS_WEB!=''" then="%BLOGADDON_COMMENTS_WEB%" else="$web"}%$quot scope=$quottopic$quot nonoise=$quoton$quot format=$quot<ul class='blogPostAddOnCommentStatus'> 
     373<li><div class='blogPostAddOnCommentStatusText'>Comments: $dollarcount(.*?(#CommentDate).*)</div></li><li>$dollarpercntIF{$dollarquot(defined BLOGADDON_AUTHOR_PICTURE_FIELD and $BLOGADDON_AUTHOR_PICTURE_FIELD!='') AND (istopic '$dollarwikiusername')$dollarquot then=$dollarquot$percntINCLUDE{$quot%TOPIC%$quot section=$quotblogPostAuthorPicture$quot imgTopic=$quot$dollarwikiusername$quot imgWeb=$quot%USERSWEB%$quot imgWidth=$quot%ppicsizecommenter%$quot}$percnt$dollarquot}$dollarpercnt<div class='blogPostAddOnCommentStatusText'><a href='$percntSCRIPTURL{view}$percnt/$web/$topic?r=$dollarrev#BlogPostPrompt'>Latest comment by $percntSPACEOUT{$quot<nop>$dollarwikiname$quot}$percnt</a><span class='foswikiGrayText'> - $dollardate</span></div></li></ul>$quot}$percnt</div></div> 
    322374</div><div class='foswikiClear'></div></div>%ENDSECTION{"blogPostAddOnItem"}% 
    323375 
     
    343395"%WEB%.%TOPIC%" 
    344396section="%includeSection%" 
    345 listtopic="%IF{"defined BLOGADDON_LIST_TOPIC and $'BLOGADDON_LIST_TOPIC'!=''" then="%BLOGADDON_LIST_TOPIC%" else="%WEB%.BlogPost"}%" 
     397listtopic="%IF{"defined BLOGADDON_LIST_TOPIC and $BLOGADDON_LIST_TOPIC!=''" then="%BLOGADDON_LIST_TOPIC%" else="%WEB%.BlogPost"}%" 
    346398authortopic="%author%" 
    347399}%%ENDSECTION{"_info"}% 
     
    388440 
    389441<!-- ########################################################################### 
    390 authorPicture 
    391         params: imgWeb, imgTopic, imgWidth 
     442blogPostAuthorPicture 
     443        params: imgWeb, imgTopic 
    392444--> 
    393445%STARTSECTION{"blogPostAuthorPicture"}%<div class='blogPostAddOnPicture'>%INCLUDE{ 
     446        "%TOPIC%" 
     447        section="%IF{"context ImagePluginEnabled" then="imagePluginImage" else="pubImage"}%" 
     448}% 
     449</div>%ENDSECTION{"blogPostAuthorPicture"}% 
     450 
     451%STARTSECTION{"pubImage"}%$percntIF{$quot'%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'/%BLOGADDON_AUTHOR_PICTURE_FIELD%$quot then=$quot<a href='%SCRIPTURL{view}%/%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'><img src='%PUBURL%/%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%/$percntQUERY{\"'%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'/%BLOGADDON_AUTHOR_PICTURE_FIELD%\"}$percnt' width='%imgWidth%' title='%MAKETEXT{"Author page"}%' alt='%MAKETEXT{"Author picture"}%' /></a>$quot else=$quot<img src='%PUBURL%/%SYSTEMWEB%/PersonalInfoAddOn/silhouette.gif' width='%imgWidth%' alt='' />$quot}$percnt%ENDSECTION{"pubImage"}% 
     452 
     453%STARTSECTION{"imagePluginImage"}%$percntIF{$quot'%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'/%BLOGADDON_AUTHOR_PICTURE_FIELD%$quot then=$quot$percntIMAGE{web=\"%imgWeb%\" topic=\"%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%\" href=\"%SCRIPTURL{view}%/%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%\" \"$percntQUERY{\"'%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'/%BLOGADDON_AUTHOR_PICTURE_FIELD%\"}$percnt\" align=\"none\" zoom=\"on\" title=\"%MAKETEXT{"Author page"}%\" alt=\"%MAKETEXT{"Author picture"}%\" size=\"%imgWidth%\"}$percnt$quot else=$quot$percntIMAGE{web=\"%SYSTEMWEB%\" topic=\"PersonalInfoAddOn\" \"silhouette.gif\" align=\"none\" alt=\"\" size=\"%imgWidth%\"}$percnt$quot}$percnt%ENDSECTION{"imagePluginImage"}% 
     454 
     455 
     456<!-- ########################################################################### 
     457summaryPicture 
     458        params: imgWeb, imgTopic, imgName 
     459--> 
     460%STARTSECTION{"summaryPicture"}%<div class='blogPostAddOnSummaryPicture'>%INCLUDE{ 
    394461"%TOPIC%" 
    395 section="%IF{"context ImagePluginEnabled" then="imagePluginImage" else="pubImage"}%" 
    396 }% 
    397 </div>%ENDSECTION{"blogPostAuthorPicture"}% 
    398  
    399 %STARTSECTION{"pubImage"}%$percntIF{$quot'%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'/%BLOGADDON_AUTHOR_PICTURE_FIELD%$quot then=$quot<a href='%SCRIPTURL{view}%/%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'><img src='%PUBURL%/%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%/$percntQUERY{\"'%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'/%BLOGADDON_AUTHOR_PICTURE_FIELD%\"}$percnt' width='%imgWidth%' title='%MAKETEXT{"Author page"}%' alt='%MAKETEXT{"Author picture"}%' /></a>$quot else=$quot<img src='%PUBURL%/%SYSTEMWEB%/PersonalInfoAddOn/silhouette.gif' width='%imgWidth%' alt='' />$quot}$percnt%ENDSECTION{"pubImage"}% 
    400  
    401 %STARTSECTION{"imagePluginImage"}%$percntIF{$quot'%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'/%BLOGADDON_AUTHOR_PICTURE_FIELD%$quot then=$quot$percntIMAGE{web=\"%imgWeb%\" topic=\"%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%\" href=\"%SCRIPTURL{view}%/%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%\" \"$percntQUERY{\"'%imgWeb%/%CALC{$SUBSTITUTE(%imgTopic%,%USERSWEB%.,)}%'/%BLOGADDON_AUTHOR_PICTURE_FIELD%\"}$percnt\" align=\"none\" title=\"%MAKETEXT{"Author page"}%\" alt=\"%MAKETEXT{"Author picture"}%\" size=\"%imgWidth%\"}$percnt$quot else=$quot$percntIMAGE{web=\"%SYSTEMWEB%\" topic=\"PersonalInfoAddOn\" \"silhouette.gif\" align=\"none\" alt=\"\" size=\"%imgWidth%\"}$percnt$quot}$percnt%ENDSECTION{"imagePluginImage"}% 
     462section="%IF{"context ImagePluginEnabled" then="summaryImagePluginImage" else="summaryPubImage"}%" 
     463imgWidth="%ppicsizesummary%" 
     464}% 
     465</div>%ENDSECTION{"summaryPicture"}% 
     466 
     467%STARTSECTION{"summaryPubImage"}%<a href='%SCRIPTURL{view}%/%imgWeb%/%imgTopic%'><img src='%PUBURL%/%imgWeb%/%imgTopic%/%imgName%' width='%imgWidth%' alt='' /></a>%ENDSECTION{"summaryPubImage"}% 
     468 
     469%STARTSECTION{"summaryImagePluginImage"}%$percntIMAGE{web=\"%imgWeb%\" topic=\"%imgTopic%\" \"%imgName%\" align=\"center\" alt=\"\" size=\"%imgWidth%x%imgWidth%\" zoom=\"on\" href=\"%SCRIPTURL{view}%/%imgWeb%/%imgTopic%\"}$percnt%ENDSECTION{"summaryImagePluginImage"}% 
    402470 
    403471<!-- ########################################################################### 
  • trunk/BlogAddOn/data/_BlogAddOn/BlogPostCommentTemplate.txt

    r10798 r10817  
    88<verbatim> 
    99%TMPL:DEF{FORM:blogpost}%#BlogPostPrompt 
    10 <form method="post" action="%SCRIPTURL{save}%/%IF{"defined BLOGADDON_COMMENTS_WEB and $BLOGADDON_COMMENTS_WEB!=''" then="%BLOGADDON_COMMENTS_WEB%" else="%BASEWEB%"}%/%BASETOPIC%Comments" enctype="application/x-www-form-urlencoded" name="blogpostcomment" id="blogpostcomment"> 
     10<form method="post" action="%SCRIPTURL{save}%/%IF{"defined BLOGADDON_COMMENTS_WEB and $BLOGADDON_COMMENTS_WEB!=''" then="%BLOGADDON_COMMENTS_WEB%" else="%BASEWEB%"}%/%BASETOPIC%Comments" enctype="application/x-www-form-urlencoded" name="blogpostcomment" id="blogpostcomment">%IF{ 
     11        "$BLOGADDON_ALLOW_GUEST_COMMENTS='1'" 
     12        then='<input type="hidden" name="username" value="WikiGuest" /> 
     13        <input type="hidden" name="password" value="" />' 
     14}% 
    1115<input type="hidden" name="redirectto" value="%BASEWEB%.%BASETOPIC%" /> 
    1216<input type="hidden" name="topicparent" value="%BASEWEB%.%BASETOPIC%" /> 
  • trunk/BlogAddOn/data/_BlogAddOn/BlogPostForm.txt

    r10745 r10817  
    66| *Name*  | *Type* | *Size* | *Values* | *Tooltip message* | *Attributes* | 
    77| Title | text | 80 | | Blog post title | M,H | 
     8| Author | text | 50 | %WIKINAME% | Blog post author | M,H | 
     9| <nop>PublishingDate | date | 30 | %GMTIME{"$day $month $year"}% | | H | 
    810| Category | select | 1 | %CALC{$LISTJOIN($comma,$LISTSORT($LISTUNIQUE(%FORMFIELD{"Category" topic="%BASEWEB%.%BASETOPIC%"}%, %SEARCH{"   *\s*.*?" topic="BlogCategory" type="regex" multiple="on" casesensitive="on" nonoise="on" separator="," format="$pattern(.*   \*\s*([^\n]*).*)"}%)))}% | Edit values in BlogCategory | H | 
    9 | Author | text | 50 | %WIKINAME% | Blog post author | M,H | 
    1011| Tags | text | 100 |  |  | H | 
    11 | <nop>PublishingDate | date | 30 | %GMTIME{"$day $month $year"}% | | H | 
     12| Summary | textarea | 100x4 |  |  | H | 
     13| <nop>SummaryImage | select | 1 | ,%QUERY{"'%BASEWEB%.%BASETOPIC%'/attachments[NOT name=~'igp.*'].name"}% | | H | 
    1214| <nop>CommentsDisabled | checkbox | 1 | disabled | | H | 
    1315| <nop>CommentsClosed | checkbox | 1 | closed | | H | 
  • trunk/BlogAddOn/data/_BlogAddOn/BlogPostViewTemplate.txt

    r10802 r10817  
    6767}%" 
    6868}%</div><div class="foswikiClear"></div></div></noautolink> 
    69 %TEXT% %IF{"(lc(CommentsDisabled)!='disabled') AND NOT (($WIKINAME = '%BLOGADDON_HIDE_COMMENTS%') OR (($WIKINAME ingroup '%BLOGADDON_HIDE_COMMENTS%'))" then="$percntTMPL:P{$quotcomments$quot}$percnt"}% 
     69%FORMFIELD{"Summary" format="<p>$value</p>"}% %TEXT% %IF{"(lc(CommentsDisabled)!='disabled') AND NOT (($WIKINAME = '%BLOGADDON_HIDE_COMMENTS%') OR (($WIKINAME ingroup '%BLOGADDON_HIDE_COMMENTS%'))" then="$percntTMPL:P{$quotcomments$quot}$percnt"}% 
    7070#BlogPostEnd 
    7171%TMPL:END% 
Note: See TracChangeset for help on using the changeset viewer.