[pmwiki-users] Maintenance templates?
Johan Bengtsson
elijah at chalmers.se
Fri Mar 9 04:41:53 CST 2018
On Thu, 8 Mar 2018, Johan Bengtsson wrote:
> Hi,
>
> I was wondering if there is a cookbook recipe or similar to do something like
> this:
>
> https://en.wikipedia.org/wiki/Template:Unreferenced
>
> A piece of code that is put in a page and then displays an info box and puts
> the page in a certain category or sets a variable.
I came up with something myself, it's not finished but appears to be working:
In groupheader or similar:
(:if ! equal "{*$:itactt_notrans}" "":)
(:table align=center style="border:3px solid black; background-color:white"
width=50% :)
(:cell align=center valign=bottom:)
Attach:Svar/GroupHeader/Gartoon_actions_messagebox_warning.svg
'''Maintenance required''' '''Reason:''' No translation! List of all pages
[[Svar/NoTrans | lacking translation]]. '''Date:{*$:itactt_notrans}'''
'''Comment:{*$:itactt_comment}'''
List of [[Svar/MaintenanceTemplates | underhållsmallar]].
(:tableend:)
(:ifend:)
In page needing maintenance:
(:itactt_notrans:"2018-03-09":)
(:itactt_comment:"English translation missing.":)
Then a few pages with pagelists:
Index page:
!!Pages needing maintenance
* [[NoTrans | Translation missing]] ((:pagelist $:itactt_notrans=- fmt=count
name=-MaintenanceTemplates list=all:))
!!Maintenance templates
* [[MaintenanceTemplates | Maintenance templates]]
NoTrans page:
!!Pages needing translation:
(:pagelist $:itactt_notrans=- name=-MaintenanceTemplates list=all:)
MaintenanceTemplates page:
!!Maintenance templates
!!!!No translation
(:markup:)
(:itactt_notrans:"2018-03-09":)
(:itactt_comment:"My comment":)
(:markupend:)
Best regards,
Johan Bengtsson
More information about the pmwiki-users
mailing list