Opened 12 years ago

Last modified 10 years ago

#8623 new enhancement

New field in the template - USERNAME

Reported by: charlie@… Owned by: charlie@…
Priority: normal Component: TracWikiPrintPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


I suggest to add following code in order to enhance the fields for substitution in templates :

In def add_headers() add the two "#SUBJECT" rows as following :

        extra_content = self.get_extracontent(req)
        extra_content = extra_content.replace('#TITLE', title)
        extra_content = extra_content.replace('#VERSION', version)
        extra_content = extra_content.replace('#DATE', date)
        extra_content = extra_content.replace('#SUBJECT', subject)
        extra_content = extra_content.replace('#USER', req.remote_user)

        if book:
            frontpage = self.get_frontpage(req)
            frontpage = frontpage.replace('#TITLE', title)
            frontpage = frontpage.replace('#VERSION', version)
            frontpage = frontpage.replace('#DATE', date)
            frontpage = frontpage.replace('#SUBJECT', subject)
            frontpage = frontpage.replace('#USER', req.remote_user)

Attachments (2) (19.1 KB) - added by ajo 10 years ago.
wikiprint.pyc (16.6 KB) - added by ajo 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by ajo

Attachment: added

comment:1 Changed 10 years ago by ajo

Attached contains the hotfix from #9854.

Changed 10 years ago by ajo

Attachment: wikiprint.pyc added

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain charlie@….

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.