in reply to Re: Screamer
in thread Aristotle
When writing on a wiki, please only add new entries at the top. Having the chronological order of posts move in different spatial directions is confusing to read. Also, please precede your entry with Username, YYYY-MM-DD.
To view just the code of a patch instead of getting the usual diff, follow the "view code" link in the PmDev Nodelet. To see how the patch affected things, view it, hit the "related patches" link, and go to the previous patch. It will show what the new patch changed - in reverse, of course. This will work even for the first real patch as the gods take care to create new nodes empty and put the data in via a patch.
should be changed to:$HTMLVARS{embed_node}{doctext} = $U->{scratchpad}; return htmlcode( 'parselinksinstring', '0' );
where parselinksinstring takes 3 arguments:return htmlcode( 'parselinksinstring', '', 0, '', $U->{scratchpad} );
For backward compatibility $HTMLVARS{embed_node}{doctext} will be used when (3) is missing.
Nowadays, $q is exported along with $query. The latter will still work but should be considered deprecated.
Do not write non-trivial hard-coded HTML - use $q->htmlshortcut(...) and co instead. They can do intelligent defaulting based on input parameters and will automatically HTML-escape text. $q->table(...) and the like should also become smarter so they will handle CSS and other special processing some day.
You don't need to fetch $NODE->{author_user}'s user node manually anymore - you can use $AUTHOR for that.
Makeshifts last the longest.
|
---|