Closed (fixed)
Project:
Privatemsg
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2009 at 06:55 UTC
Updated:
3 Jan 2014 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
liam mcdermott commentedAm also curious about this line:
It doesn't return anything, why?
Comment #2
berdirHm. I'm not a native speaker, but your suggestion doesn't make sense to me. "theme pattern" imho belongs together, it's a feature that the theme system provides.
A "theme pattern" is simply a wildcard for theme names. By defining "'pattern' => 'privatemsg_list_header__',", the theme system will search for functions that start with that name (and with the theme name prefix). We can then pass an array with multiple possible names to theme() which will use the first match it can find. That's basically everything these patterns do.
I will handle the documentation of those that in a separate topic in the apidocs.
Comment #3
liam mcdermott commentedFair enough, the problem with the existing docs are 'Does use' should be 'Uses' and 'display the single fields' should be 'display single fields'. :)
So, how about:
I understand how theme patterns work. What I don't understand is what problem they solve. If we can explain -- in the docs -- the problem we're solving, and how theme patterns solve that problem, it becomes obvious why the code is the way it is.
Comment #4
liam mcdermott commentedAnd here's a patch.
Comment #5
litwol commentedCommited the patch from #4 as is. however it is not immediately clera what are those evil patterns. To help whomever is reading this line of code find more information we should include some further reading link. Not sure if @see is able to point to files which documents this well (privatemsg.theme.inc), if not then we can just point the reader to documentation on d.o if such exists.
Comment #6
berdirAdded links to the theming topics, see http://blog.worldempire.ch/api/function/_privatemsg_list_thread/1.
Comment #7
litwol commentedCommitted.