Modify

Opened 14 years ago

Last modified 12 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

Description

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)

wikiprint.py (19.1 KB) - added by ajo 12 years ago.
wikiprint.pyc (16.6 KB) - added by ajo 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by ajo

Attachment: wikiprint.py added

comment:1 Changed 12 years ago by ajo

Attached wikiprint.py contains the hotfix from #9854.

Changed 12 years ago by ajo

Attachment: wikiprint.pyc added

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.