Projet

Général

Profil

Paste
Télécharger (4,44 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / author_pane / README.txt @ 87dbc3bf

1

    
2
CONTENTS OF THIS FILE
3
-----------------------------------------------------------------------------------------
4
 * Introduction
5
 * Installation
6
 * Usage
7

    
8
INTRODUCTION
9
-----------------------------------------------------------------------------------------
10
Author Pane (http://drupal.org/project/author_pane) provides information about the author
11
of a node, comment, or page. From core, it collects the user picture, name, join
12
date, online status, contact link, and profile information. In addition, it gathers data
13
from many user related contributed modules and puts it together in a modifiable template
14
file.
15

    
16
INSTALLATION
17
-----------------------------------------------------------------------------------------
18
1. Copy the entire author_pane module directory into your normal directory for modules,
19
   usually sites/all/modules.
20

    
21
2. Enable the Author Pane module in ?q=admin/build/modules.
22

    
23
USAGE
24
-----------------------------------------------------------------------------------------
25
Advanced Forum:
26
If you have Advanced Forum installed, it will make use of Author Pane automatically on
27
forum posts. Advanced Forum provides its own Author Pane template and CSS so it can be
28
styled specifically for use in the forums.
29

    
30
Advanced Profile Kit:
31
If you have Advanced Profile Kit installed, it will make use of Author Pane automatically
32
on the default user page variant. Advanced Profile Kit provides its own Author Pane
33
template so it can be styled specifically for use on profile pages. Please note that if
34
you remove and re-add the Author Pane content type, you will need to edit the pane
35
settings and put "advanced_profile" back in the "Caller" field.
36

    
37
CTools content pane:
38
If you have Page Manager (from CTools) installed, you can add the Author Pane content
39
pane to any page variant. It requires the user context. You can choose an imagecache
40
preset to use for the user picture. You can also use the "caller" field to give this
41
instance a unique ID that can be accessed from the preprocess functions and the template
42
file.
43

    
44
Block:
45
There is an Author Pane block provided that you can enable. The block will show up on
46
user/NN, blog/NN, and node/NN where the node type is one that you allow in the block
47
config. If you want to exclude it from one of those page types, use the core block
48
visibility option. Exclusion of the /edit page happens automatically. 
49

    
50
The block is disabled by default and must be enabled. Further options are available by
51
configuring the block:
52

    
53
* Node types to display on - Check on which node types the block should be shown. The
54
  block will show in the region it is placed, not literally on the node, and only on
55
  full node view pages. (ie: node/42 not when the node is part of a view)
56

    
57
* User picture preset - This is the Imagecache preset that will be used to format the
58
  user picture. Leave blank to show the full sized picture. Requires Imagecache module.
59

    
60
Theme function:
61
You can call the theme function directly and print the author pane anywhere in your code.
62
You must have a fully loaded user object to pass into the function. The rest of the
63
parameters are optional.
64

    
65
<?php
66
print theme('author_pane', $account, $caller, $picture_preset, $context, $disable_css);
67
?>
68

    
69
Parameters:
70
$account - The fully loaded user object. If all you have is a UID, you can get the object
71
with $account = user_load($uid); where $uid is a variable holding the user id.
72

    
73
$caller - (optional) This is an ID you can pass in as a way to track who is calling the
74
function. If you use Author Pane on your user profiles, on your blog pages, and in your
75
forums, you may want to display slightly different information in each Author Pane. By
76
passing in the caller, you can tell from within the preprocess functions where this is
77
going to be displayed.
78

    
79
$picture_preset - (optional) This is an imagecache picture preset that, if given, and
80
if imagecache is enabled, will be used to size the user picture on the author pane.
81

    
82
$context - (optional) This is usually a node or comment object and gives the context of
83
where the Author Pane has been placed so information from that context is available to
84
the template and preprocesses.
85

    
86
$disable_css - (optional) Because the Author Pane preprocess gets called after the code
87
that calls it, the Author Pane CSS file will be loaded last and clobber any earlier CSS.
88
This option tells Author Pane not to load its CSS so it uses the CSS of the caller. This
89
is mainly intended for Advanced Forum because the styles include Author Pane styling but
90
can be used for custom purposes as well.
91

    
92

    
93

    
94

    
95

    
96

    
97