DPWiki talk:Magic tags

From DPWiki
Jump to navigation Jump to search

This is cool. What are the %word%s that produce the PM/PP IDs and the remaining_pages/total_pages ? Wwoods 18:35, 28 June 2006 (PDT)

I'd also really like to know. Ricdiogo 07:35, 30 June 2006 (PDT)

How can we show non-us-ascii characters? e.g.:

Ricdiogo 05:55, 29 June 2006 (PDT)

They'll just show up now. Mike (talk) 00:01, 24 December 2006 (PST)


Ok, I don't know how those look to you, but here (Konqueror & Firefox on Linux) I see a question mark inside a diamond everywhere there should be an accented character. (Test: á è ø ū ß ð ṅ) Also, the character right after the diamond gets swallowed.

This page, itself, says that it's in UTF-8. My test characters up there look right in the preview. (Testing magic tags: Let's try Encyclopaedia Britannica 11th Ed. Vol. 07; "Convention" to "Copyright". ← note missing "d"!)

To me, that says the Wiki is doing what it should, but the database is re-coding or hiding the characters before they are passed along to the Wiki, which then puts them into the page and sends them to our browsers. [14:31, 29 June 2006 Rassilon]

I see "Encyclop�dia", with the "d" but without the "æ", I presume. (Firefox on Mac OSX) Wwoods 01:49, 30 June 2006 (PDT)
I see "Encyclop�dia", with the "d" but without the "æ", I presume, (Firefox on WinXP SP2), and "Encyclop□a" (a box for the "æ," and no "d" or "i") with IE6 on WinXP SP2. kraester 02:05, 30 June 2006 (PDT)
Using IE7 with WXP SP2: using utf-8 encoding to see this page I see a chinese character in rassilon's "Encyclop[ae]dia"; I see all other test characters; I don't see accents in my "commentário ao código" above; i see all accented characters in this wiki page.
Using ISO Western Europe I can't see any accents in this page with the exception of my "commentário ao código" above; I can't see any accented characters in this wiki page. Ricdiogo 07:35, 30 June 2006 (PDT)

Auto upgrades

Does anyone know how frequently the projectinfo data is upgraded? My %n_available_pages% doesn't seem to have changed since I first added the code, but new pages have already been saved. see here (Specially P2's, _Os Bravos do Mindelo_) Ricdiogo 05:31, 16 July 2006 (PDT)

Jmdyck 11:53, 16 July 2006 (PDT): Data that you get via <projectinfo> should always be up-to-date. Note that saving a page does not itself cause a change in the number of available pages. The number of available pages for shown for 'Os Bravos do Mindelo' is correct.
Because it's checking out a page that reduces the number of available pages? But there's something odd about this. Despite reloading a page that uses them, I still see the numbers that were there when I first loaded the page, even though when I copy and paste the same code here I get the up-to-date numbers:
  • A New Astronomy
    PPer: susanskinner; PM: susanskinner; 357/494 pages.
  • A sequel to the first six books of the Elements of Euclid, ..., 2d ed.
    PPer: (none); PM: jhutch; 51/342 pages.
Wwoods 18 July 2006
OK, I think I've figured out why/how it's working and/or what/when it's not working, but whether it can be "fixed" is up to someone else. It appears that the Magic Tags only update when the page is SAVED AFTER AN EDIT. As wwoods said, the Magic Tag values do NOT change after a "simple" reload of the page. The only tag where this is a real/common/noticeable problem would be the %n_available_pages% tag because all the other tag values are quite stable (i.e., it isn't too often that a project's title or total page count changes once it's been set up). kraester 21:47, 18 July 2006 (PDT)
You know, come to think of it, this probably explains why the "Recent Actvity" list at the bottom of the Main Page hardly ever matches the Recent changes page too. kraester 21:59, 18 July 2006 (PDT)

Maybe it's a browser caching problem. Try doing a forced refresh (Ctrl-F5 on my computer), or clearing your cache. I'm not sure about the project info numbers, but it worked for me on the wiki Main Page when the recent activity was stuck. Acunning40 07:07, 19 July 2006 (PDT)

Well, now this is even stranger. The Recent Activity listing on Main Page now is getting updated to match Recent changes with a simple/F5 refresh for me, but the available page counts on the P3 Junkies project list don't. (And Ctrl-F5 doesn't do anything on that page either. Thanks for the suggestion tho.) The only way I can seem to get the P3 Junkies project list page counts to update is do a Edit page/Save, and it's got to be a real Edit/Save. Trying to "fake it out" with just hitting Save and making no changes won't cut it. Curiouser and curiouser. kraester 23:22, 23 July 2006 (PDT)

The page's rendered text (including the last <projectinfo> update) will be saved until the cache either expires or is purged. The cache is purged when you edit, or when you load the page with action=purge in the URL. Mike (talk) 08:39, 13 December 2006 (PST)

PM (%username%)


Does the PM show up as 'PM LaTeX' or 'pvachusk'? I'm seeing the former, but the project page says the latter. — WWoods 11:24, 27 July 2006 (PDT)

The projectIDs do not match. Mike (talk) 23:38, 27 July 2006 (PDT)

Can't use it with templates

I added a short section under "substitution" to cover the things I tried to create a custom template for project information. You cannot use a {{TemplateCall}} between the <projectinfo...> tags, and you cannot pass in a project ID as a parameter to a template because a parameter in a tag won't be expanded. --ReneeMattie 23:14, 6 December 2006 (PST)

Possible Additions

Would it be possible to add %n_completed_pages% as parameter, as I like to give progress in the form 123/456, meaning 123 out of 456 pages have completed. On a same vein, can %short_state% be added, which just says P1, P2, P3, F1, F2, PP or the same with a star if in waiting state, to indicate a state. Jeroen Hellingman 02:47, 12 December 2006 (PST)

Zounds, it works! Mike (talk) 23:56, 23 December 2006 (PST)

Other tags

The following other tags exist (based on the source code and the contents of the project table) but I'm not sure what they mean, exactly, so I'm dropping them here rather than on the main page.

  `language` varchar(255) NOT NULL default '',
  `special_code` varchar(20) NOT NULL default '',
  `correctedby` varchar(25) NOT NULL default '',
  `modifieddate` int(20) NOT NULL default '0',
  `t_last_edit` int(11) NOT NULL default '0',
  `scannercredit` tinytext NOT NULL,
  `year` varchar(4) NOT NULL default '',
  `topic_id` int(10) default NULL,
  `updated` tinyint(1) NOT NULL default '1',
  `int_level` int(11) NOT NULL default '0',
  `archived` tinyint(1) NOT NULL default '0',
  `postproofer` varchar(25) NOT NULL default '',
  `ppverifier` varchar(25) default NULL,
  `image_source` varchar(10) NOT NULL default '',
  `image_preparer` varchar(25) NOT NULL default '',
  `text_preparer` varchar(25) NOT NULL default '',
  `extra_credits` tinytext NOT NULL,
  `smoothread_deadline` int(20) NOT NULL default '0',
  `up_projectid` int(10) default '0',
  `deletion_reason` tinytext NOT NULL,

Enjoy! JesseW 13:21, 29 December 2006 (PST)


The %state% tag should have another special case added to it, changing "In Post-Processing" to "Post-Processing" so something like "in %state%" doesn't become "in In Post-Processing". I know quite a bit of special-casing is already done on that variable, so here's another bit... If the current code could be made available, I'd be happy to hack up and send in a patch. JesseW 23:39, 3 January 2007 (PST)

Hi, Jesse: (The code copy I originally made is still up-to-date as of [21:50, 24 January 2007 (PST)].) I'm not sure this is a bug per se, but more of an inconsistency in the naming of states in the DP code (it's not an explicit requirement for state names to make sense with the word "in" in front of them, but it would be nice, I guess). E.g., does it make sense for a project to be "In Posted to Project Gutenberg" or "In Available for Verifying Post-Processing"? Mike (talk) 21:50, 24 January 2007 (PST)