| 1 |
// $Id: README.txt,v 1.27 2007/12/30 00:16:14 agentken Exp $
|
| 2 |
|
| 3 |
-------------------------------------------------------------
|
| 4 |
README.txt for MySite version 5.x.2.y
|
| 5 |
-------------------------------------------------------------
|
| 6 |
Drupal version: 5.x
|
| 7 |
|
| 8 |
Author: Ken Rickard
|
| 9 |
Email: agentrickard [at] gmail [dot] com
|
| 10 |
Drupal: agentrickard
|
| 11 |
CVS: agentken
|
| 12 |
IRC: agentrickard
|
| 13 |
|
| 14 |
Additional documentation is online at:
|
| 15 |
|
| 16 |
http://therickards.com/api
|
| 17 |
|
| 18 |
|
| 19 |
CONTENTS
|
| 20 |
=======
|
| 21 |
* == NEW in 5.x.3
|
| 22 |
^ == requires the MySite Icons module
|
| 23 |
|
| 24 |
1. MYSITE OVERVIEW
|
| 25 |
1.1 Installation
|
| 26 |
1.2 Credits
|
| 27 |
1.3 MySite Terminology
|
| 28 |
1.4 Features
|
| 29 |
1.5 Access Control Permissions
|
| 30 |
1.6 Menu Items
|
| 31 |
1.7 Suggested Usage
|
| 32 |
1.8 User-Submitted Content
|
| 33 |
|
| 34 |
2. BASIC CONFIGURATION
|
| 35 |
2.1 Activating Content
|
| 36 |
2.2 Plugins and User Options
|
| 37 |
2.3 Required Plugin Files
|
| 38 |
2.4 The 'Contrib' Folder
|
| 39 |
2.4.1 Current Contributions
|
| 40 |
2.5 CSS Files and Layout Issues
|
| 41 |
|
| 42 |
3. DEFAULT USER SETTINGS
|
| 43 |
3.1 Default Page Settings
|
| 44 |
3.2 Default Page Content
|
| 45 |
3.3 Locking Content for Users
|
| 46 |
|
| 47 |
4. MYSITE SETTINGS
|
| 48 |
4.1 Content Settings
|
| 49 |
4.1.1 Content Types
|
| 50 |
4.1.2 Disabled Content Types
|
| 51 |
4.1.3 Adding New Content Types
|
| 52 |
4.2 Display Settings
|
| 53 |
4.2.1 MySite Sitename
|
| 54 |
4.2.2 MySite Behavior
|
| 55 |
4.2.3 MySite Privacy
|
| 56 |
4.2.4 MySite Page Setup
|
| 57 |
4.2.5 MySite Item Deletion
|
| 58 |
4.2.6 MySite Node Links
|
| 59 |
4.3 Content Browser
|
| 60 |
4.3.1 Content Browsing ^
|
| 61 |
4.3.2 Content Layout ^
|
| 62 |
4.3.3 Items per Page
|
| 63 |
4.4 User Limits
|
| 64 |
4.4.1 Item Count
|
| 65 |
4.4.2 Element Count
|
| 66 |
4.4.3 Page Count *
|
| 67 |
4.5 Action Buttons
|
| 68 |
4.6 MySite Cache
|
| 69 |
4.7 Default MySite Page
|
| 70 |
|
| 71 |
5. TYPE INCLUDE SETTINGS
|
| 72 |
5.1 All Content Types *
|
| 73 |
5.2 Droplets
|
| 74 |
5.2.1 Custom Droplets
|
| 75 |
5.2.2 Block Droplets
|
| 76 |
5.2.3 Views Droplets
|
| 77 |
5.2.4 Panels Droplets
|
| 78 |
5.3 Feeds
|
| 79 |
5.3.1 Aggregator Feeds
|
| 80 |
5.3.2 Allowed Feed Categories
|
| 81 |
5.3.3 Default Feed Category
|
| 82 |
5.3.4 Update Interval
|
| 83 |
5.4 Nodes
|
| 84 |
5.5 Posts
|
| 85 |
5.6 Profiles
|
| 86 |
5.7 Terms
|
| 87 |
5.8 Themes
|
| 88 |
5.9 Users
|
| 89 |
|
| 90 |
6. MYSITE ICONS ^
|
| 91 |
6.1 Why Use Icons?
|
| 92 |
6.2 Icon Settings
|
| 93 |
6.3 Default Icons
|
| 94 |
6.4 Custom Icons
|
| 95 |
6.4.1 Adding a New Icon
|
| 96 |
6.4.2 Changing Existing Icons
|
| 97 |
6.4.3 Deleting MySite Icons
|
| 98 |
6.5 Aggregator Icons
|
| 99 |
|
| 100 |
7. DEVELOPERS API
|
| 101 |
7.1 Changes from Earlier Releases
|
| 102 |
7.2 Type Plugins
|
| 103 |
7.3 Layout Plugins
|
| 104 |
7.4 Format Plugins
|
| 105 |
7.5 Style Plugins
|
| 106 |
7.6 Integrating With Modules and Themes
|
| 107 |
|
| 108 |
8. CONTRIBUTING
|
| 109 |
8.1 Submitting Bug Reports
|
| 110 |
8.2 Submitting Feature Requests
|
| 111 |
8.3 Submitting New Plugins
|
| 112 |
8.4 Calls for Help
|
| 113 |
|
| 114 |
---------
|
| 115 |
1. MYSITE OVERVIEW
|
| 116 |
|
| 117 |
MySite pages are designed to let users create a personalized summary of the
|
| 118 |
site and their favorite places on the Web. As such, the MySite module
|
| 119 |
duplicates the functionality of tools like MyYahoo! and Google's personalized
|
| 120 |
homepage.
|
| 121 |
|
| 122 |
The module allows registered site users to create a MySite page that contains
|
| 123 |
content from throughout the site. For sites that use the Aggregator module,
|
| 124 |
users may also add feeds from external web sites to their MySite pages.
|
| 125 |
|
| 126 |
Content collections are specific to each user, and users can choose:
|
| 127 |
|
| 128 |
- One or more pages of content.
|
| 129 |
- A custom layout for each page.
|
| 130 |
- A personal stylesheet for each page.
|
| 131 |
- The content format for each page element
|
| 132 |
- A personal theme each page.
|
| 133 |
|
| 134 |
MySite was written using an API/Plugin model that allows the core module to be
|
| 135 |
extended to handle additional content types. The following content concepts are
|
| 136 |
supported by MySite:
|
| 137 |
|
| 138 |
- "Droplets" of content (HTML, PHP, or JavaScript code)
|
| 139 |
- Blocks generated by other Drupal modules
|
| 140 |
- Content generated by the Views and Panels modules
|
| 141 |
- Individual RSS feeds handled by Aggregator
|
| 142 |
- RSS feed categories handled by Aggregator
|
| 143 |
- Blog posts by individual site users
|
| 144 |
- Forum topics and content
|
| 145 |
- Content assigned to taxonomy terms
|
| 146 |
- Pages added to individual books
|
| 147 |
- User profile data for each MySite user
|
| 148 |
- Content posts of a specific node or CCK type
|
| 149 |
- All posts by a specific user
|
| 150 |
|
| 151 |
The intent is for the core MySite module to handle core Drupal publishing
|
| 152 |
frameworks.
|
| 153 |
|
| 154 |
In order for MySite to function correctly, you must first enable and configure
|
| 155 |
the content types that your site will use. For details and restrictions, see
|
| 156 |
section 5 of this manual, TYPE INCLUDE SETTINGS.
|
| 157 |
|
| 158 |
----
|
| 159 |
1.1 Installation
|
| 160 |
|
| 161 |
See the INSTALL.txt file for complete instructions on installing and upgrading.
|
| 162 |
|
| 163 |
----
|
| 164 |
1.2 Credits
|
| 165 |
|
| 166 |
MySite is sponsored by Morris DigitalWorks. http://morrisdigitalworks.com/
|
| 167 |
|
| 168 |
Special thanks to:
|
| 169 |
|
| 170 |
* jjeff for the jQuery Update and jQuery Interface modules
|
| 171 |
* starbow for his work on AHAH and ajax-based tables and forms
|
| 172 |
* merlinofchaos for tips and tricks regarding page layouts
|
| 173 |
* Mark Baggett and Heine for security review
|
| 174 |
* dww for the Project module
|
| 175 |
* jonbob for the API module
|
| 176 |
* douggreen for the Coder module
|
| 177 |
* kbahey for getting me started in CVS
|
| 178 |
* yelvington for encouragement
|
| 179 |
* bobscape and MDW for time to work on the project
|
| 180 |
* tdekhnich and mdekkers for the string settings patch
|
| 181 |
* mikesmullin for patches and code review
|
| 182 |
|
| 183 |
* All the Drupalers who submitted bug reports and patches
|
| 184 |
|
| 185 |
----
|
| 186 |
1.3 MySite Terminology
|
| 187 |
|
| 188 |
The following terms are used throughout this documentation and in elements of
|
| 189 |
the MySite administrative and user interfaces.
|
| 190 |
|
| 191 |
User -- the person looking at a MySite collection.
|
| 192 |
Owner -- the person to whom a MySite collection belongs. (In cases where the
|
| 193 |
user is the owner, the term User is generally applied.)
|
| 194 |
Admin -- the person(s) who may administer MySite settings and collections.
|
| 195 |
Personal Page -- the default MySite page for a user. Also called page.
|
| 196 |
Settings -- the display options available to a MySite user.
|
| 197 |
Content -- the content options available to a MySite user.
|
| 198 |
Collection -- a MySite user's current content selections. A collection may contain
|
| 199 |
multiple pages.
|
| 200 |
Page -- a specific page view in a user's collection.
|
| 201 |
Item -- a group of content displayed on a MySite page.
|
| 202 |
Element -- the number of headlines or stories within a content item on a
|
| 203 |
MySite page.
|
| 204 |
Plugin -- a code file used to define and extend MySite options and features.
|
| 205 |
Content Types -- a MySite plugin that defines and controls how content items
|
| 206 |
are generated.
|
| 207 |
Icon -- a graphical element used by MySite.
|
| 208 |
Action Buttons -- display elements that trigger changes in a user's MySite
|
| 209 |
page.
|
| 210 |
|
| 211 |
If you need help with common Drupal terminology, see:
|
| 212 |
|
| 213 |
http://drupal.org/node/21951.
|
| 214 |
|
| 215 |
If you find deviation from these terms, you may consider it an interface bug
|
| 216 |
and open a new issue at http://drupal.org/project/issues/mysite.
|
| 217 |
|
| 218 |
----
|
| 219 |
1.4 Features
|
| 220 |
|
| 221 |
MySite allows each registered site user to create a page that shows a custom
|
| 222 |
view of the site's content.
|
| 223 |
|
| 224 |
Users with the permission to create a MySite page have the following features:
|
| 225 |
|
| 226 |
- The user page exists at http://example.com/mysite/UID/view, where UID is
|
| 227 |
the user's Drupal id.
|
| 228 |
- User pages can be named and may be made public or private at the user's
|
| 229 |
discretion.
|
| 230 |
- An overview page, http://example.com/mysite/all, shows all public MySite
|
| 231 |
pages, so that users can see how other people organize site content.
|
| 232 |
- Users may add and remove content from their MySite.
|
| 233 |
- Users may sort the order of their MySite content.
|
| 234 |
- Users may rename the title of their MySite content items.
|
| 235 |
- Users may choose a display format for each MySite content item.
|
| 236 |
- Users may select the following options based on the plugins available:
|
| 237 |
- Theme, which selects the Drupal theme used to display the MySite page.
|
| 238 |
- Layout, which controls the page structure of the MySite content.
|
| 239 |
- Style, which controls the CSS file used to present the MySite content.
|
| 240 |
- Format, which controls what information to display for each MySite item
|
| 241 |
|
| 242 |
Administrators have the following settings options available:
|
| 243 |
|
| 244 |
- How to handle the URL http://example.com/mysite.
|
| 245 |
The two options are to go to the list at http://example.com/mysite/all
|
| 246 |
or to automatically redirect the user to his or her MySite page.
|
| 247 |
- Which of the available content plugins are available for users.
|
| 248 |
As noted above, MySite ships with twelve (15) content types (including a
|
| 249 |
"Most Popular Content" type); admins do not have to enable all the
|
| 250 |
content types for their site.
|
| 251 |
- How many items a user can assign to the MySite page.
|
| 252 |
Since retrieving the data for a MySite page can be intensive, there is
|
| 253 |
a default cap of 10 content items per MySite page. This number can
|
| 254 |
be altered under the module settings.
|
| 255 |
- How many elements are displayed for each content item in a MySite page view.
|
| 256 |
As above, if we pulled back all content related to a taxonomy term,
|
| 257 |
pagination and response time may become an issue. Since MySite is
|
| 258 |
designed to be a gateway to content, the default caps the element count
|
| 259 |
at the 5 most recent articles.
|
| 260 |
- Whether or not to use the included action button icons in MySite.
|
| 261 |
- Whether and how long to cache MySite content views (see section 4.6
|
| 262 |
for more detail).
|
| 263 |
- How to handle user-submitted Aggregator content (RSS feeds).
|
| 264 |
Since we allow users to submit their own RSS feeds, the administrator
|
| 265 |
should set default values for the updating and categorization of these
|
| 266 |
feeds (see section 3.1.1 for more detail).
|
| 267 |
- Which taxonomy vocabularies to allow users to access with MySite.
|
| 268 |
- A default user MySite page for use as a site homepage or navigation element.
|
| 269 |
- Whether to show default theme blocks on MySite pages, or to give MySite the
|
| 270 |
entire page width.
|
| 271 |
- What default content and formats to use for new and anonymous users.
|
| 272 |
|
| 273 |
----
|
| 274 |
1.5 Access Control Permissions
|
| 275 |
|
| 276 |
MySite has the following access control permissions by default:
|
| 277 |
|
| 278 |
- 'administer mysite'
|
| 279 |
Allows a user to control the MySite settings at:
|
| 280 |
http://example.com/administer/settings/mysite.
|
| 281 |
Users with this permission also have the ability to edit other user's
|
| 282 |
MySite content and settings. This is allow you to provide customer
|
| 283 |
support for users having trouble with MySite.
|
| 284 |
|
| 285 |
- 'edit mysite'
|
| 286 |
Grants a user the ability to create and update a MySite page.
|
| 287 |
|
| 288 |
- 'view mysite'
|
| 289 |
Grants a user the ability to see public MySite pages created by other
|
| 290 |
users.
|
| 291 |
|
| 292 |
If the Aggregator module is present and enabled, then an additional permission
|
| 293 |
exists:
|
| 294 |
|
| 295 |
- 'add mysite feeds'
|
| 296 |
Grants MySite users the ability to add RSS feeds to the site based on the
|
| 297 |
settings established under the MySite settings page.
|
| 298 |
(See sections 1.8 and 5.3 for more detail).
|
| 299 |
|
| 300 |
----
|
| 301 |
1.6 Menu Items
|
| 302 |
|
| 303 |
For most users, the menu paths enabled by MySite are the following:
|
| 304 |
|
| 305 |
- http://example.com/mysite-all
|
| 306 |
A list of all public MySite pages, visible to those with 'view all mysites'
|
| 307 |
permissions.
|
| 308 |
|
| 309 |
- http://example.com/mysite-default
|
| 310 |
The default user's MySite page. This is used if the site admin wants to
|
| 311 |
keep a public page, especially as a front page. This value is set in the
|
| 312 |
module settings and is optional.
|
| 313 |
|
| 314 |
- http://example.com/mysite/UID/view
|
| 315 |
The MySite page for a given user id (UID).
|
| 316 |
|
| 317 |
- http://example.com/mysite/UID/edit
|
| 318 |
The MySite configuration page for a given user.
|
| 319 |
|
| 320 |
- http://example.com/mysite/UID/content
|
| 321 |
The content adding page for a given user's MySite
|
| 322 |
|
| 323 |
- http://example.com/mysite/UID/reset
|
| 324 |
Reverts a user's collection to the default settings and content set by the
|
| 325 |
site administrator. See http://drupal.org/node/153560
|
| 326 |
|
| 327 |
- http://example.com/mysite/UID/delete
|
| 328 |
Allows a user or the administrator to delete an entire MySite collection.
|
| 329 |
|
| 330 |
- http://example.com/mysite/UID/settings/MID
|
| 331 |
The settings configuration page for an item in a user's MySite collection.
|
| 332 |
|
| 333 |
All other menu items are callback functions or administrative settings.
|
| 334 |
|
| 335 |
In the main site navigation menu, two links are registered by default:
|
| 336 |
|
| 337 |
- 'My SITENAME'
|
| 338 |
A link to http://example.com/mysite/UID/view, where SITENAME is taken
|
| 339 |
from admin/settings.
|
| 340 |
|
| 341 |
- 'View all custom sites'
|
| 342 |
A link to http://example.com/mysite-all
|
| 343 |
|
| 344 |
----
|
| 345 |
1.7 Suggested Usage
|
| 346 |
|
| 347 |
MySite gives your users a personal homepage for your web site. The recommended
|
| 348 |
usage is to configure the third-level domain http://my.example.com to send
|
| 349 |
visitors directly to http://example.com/mysite.
|
| 350 |
|
| 351 |
Under this configuration, set the MySite settings for 'Display Settings' to
|
| 352 |
'Go to User MySite.' This is the default setting and will automatically
|
| 353 |
direct users from http://example.com/mysite to http://example.com/mysite/UID/view.
|
| 354 |
|
| 355 |
If MySite is configured in this manner, you can market and promote the URL
|
| 356 |
http://my.example.com as you see fit.
|
| 357 |
|
| 358 |
Giving instructions for configuring sub-domains on your server is beyond the
|
| 359 |
scope of this file. For more information, start with
|
| 360 |
http://en.wikipedia.org/wiki/Subdomains.
|
| 361 |
|
| 362 |
If you cannot configure your 3rd-level domain, you may also choose to set your
|
| 363 |
default site homepage to be 'mysite' and then direct MySite to "Go to user
|
| 364 |
MySite page." To set your default homepage, go to Administer >> Site
|
| 365 |
Configuration >> Site Information and change the "Default front page:" to
|
| 366 |
'mysite' (the default value is 'node').
|
| 367 |
|
| 368 |
|
| 369 |
----
|
| 370 |
1.8 User-Submitted Content
|
| 371 |
|
| 372 |
A note here on how MySite interacts with Aggregator. The key feature of sites
|
| 373 |
like MyYahoo! and Google's personal homepage is that they allow users to import
|
| 374 |
content from across the web to a single page.
|
| 375 |
|
| 376 |
Normally, the ability to add an Aggregator feed to a Drupal site is restricted
|
| 377 |
to trusted users (the site administrator, and perhaps a specific role). In a
|
| 378 |
few cases 'authenticated users' are allowed to add their own RSS feeds using
|
| 379 |
Aggregator.
|
| 380 |
|
| 381 |
That is because misuse of Aggregator can have some adverse effects,
|
| 382 |
particularly if feeds are updated too often, or if too many feeds are updated
|
| 383 |
at the same time.
|
| 384 |
|
| 385 |
Further, Aggregator's method for selecting Categories for RSS feeds is rarely
|
| 386 |
opened to authenticated users.
|
| 387 |
|
| 388 |
MySite handles these issues in two ways.
|
| 389 |
|
| 390 |
1) It is possible to simply turn off the ability for users to add their own
|
| 391 |
RSS feeds to their MySite page. Deselect the 'add mysite feeds' permission
|
| 392 |
in your site's access control settings.
|
| 393 |
|
| 394 |
2) The site administrator can configure the default settings for handling
|
| 395 |
user-submitted RSS feeds. Those controls are at
|
| 396 |
http://example.com/administer/settings/mysite, under the
|
| 397 |
'Feeds' tab.
|
| 398 |
|
| 399 |
If you grant users the ability to add RSS feeds to their MySite, they only
|
| 400 |
have limited permissions, described below.
|
| 401 |
|
| 402 |
- Users can only enter the Name and URL of the feed source. Other settings
|
| 403 |
(update frequency, categories) are set by the administrator.
|
| 404 |
|
| 405 |
- When a user enters a new feed, both the title and the URL are checked
|
| 406 |
against existing feeds. If a match is found, that existing feed is used
|
| 407 |
and the new feed is ignored.
|
| 408 |
|
| 409 |
- Users can only assign a feed to a category if the administrator enables
|
| 410 |
more than one feed category under the module settings. In practice, we
|
| 411 |
recommend that you establish a User Feeds category in Aggregator and force
|
| 412 |
all user submitted feeds into this category. Doing so has the effect of
|
| 413 |
separating user-submitted feeds from those entered by site administrators.
|
| 414 |
Some, but not all, sites will desire this type of separation to indicate
|
| 415 |
which feeds are 'endorsed' by the site and which are the responsibility
|
| 416 |
of site users.
|
| 417 |
|
| 418 |
- If only one category is available for users to add feeds, that category
|
| 419 |
will be used for all user-submitted feeds. If more than one is available,
|
| 420 |
users may choose, though the administrator can set a default category.
|
| 421 |
|
| 422 |
Further separation of user feeds from 'site administrator' feeds is not
|
| 423 |
possible without changes to the Aggregator module. Such changes are also, in
|
| 424 |
most cases, not necessary and are considered out of scope for MySite.
|
| 425 |
|
| 426 |
|
| 427 |
--------
|
| 428 |
2. BASIC CONFIGURATION
|
| 429 |
|
| 430 |
The MySite module has a large number of configuration options. Individual
|
| 431 |
Content Types can also define their own settings. This section covers only
|
| 432 |
the most basic options. For further detail, see sections 4 and 5.
|
| 433 |
|
| 434 |
----
|
| 435 |
2.1 Activating Content
|
| 436 |
|
| 437 |
For MySite to function, three conditions must be met:
|
| 438 |
|
| 439 |
1) Your site must contain some content or the ability to create content.
|
| 440 |
2) The directory mysite/plugins/types must exist and contain the type.inc
|
| 441 |
file you wish to activate.
|
| 442 |
3) At least one MySite Content Type must be activated.
|
| 443 |
|
| 444 |
On the MySite settings page (http://example.com/admin/settings/mysite), you
|
| 445 |
have the option of enabling all content types that are available. However,
|
| 446 |
you are not required to offer all content to users. Use these settings to
|
| 447 |
determine which content types can be added to a MySite page.
|
| 448 |
|
| 449 |
The MySite module is largely dependent on other modules. In MySite 5.x.2,
|
| 450 |
however, you can configure MySite to work if you activate "Droplets," since
|
| 451 |
these are independent of other modules, or "Posts" or "User Posts," both of
|
| 452 |
which use required core modules.
|
| 453 |
|
| 454 |
To get the full benefit of the MySite module, at least one of the following
|
| 455 |
core modules should be active on your site:
|
| 456 |
|
| 457 |
a) Aggregator
|
| 458 |
If you wish to allow users to add new RSS feeds, set the appropriate Aggregator
|
| 459 |
settings for MySite at http://example.com/admin/settings/mysite (the Feeds tab).
|
| 460 |
|
| 461 |
Note that there are two types of feed handling in MySite. 'Web Feeds' refer to
|
| 462 |
individual RSS feeds. 'Web Headlines' refer to Aggregator categories
|
| 463 |
containing multiple RSS feeds.
|
| 464 |
|
| 465 |
b) Blog
|
| 466 |
If the Blog module is active, MySite will allow users to add any active blogger
|
| 467 |
to their MySite page.
|
| 468 |
|
| 469 |
c) Book
|
| 470 |
If the Book module is active, MySite will allow users to track recent changes
|
| 471 |
to individual books.
|
| 472 |
|
| 473 |
For this feature to work, at least one book must exist.
|
| 474 |
|
| 475 |
d) Comment
|
| 476 |
If the Comment module is active, MySite will allow users to track comments
|
| 477 |
on specific posts.
|
| 478 |
|
| 479 |
e) Forum
|
| 480 |
If the Forum module is active, MySite will allow users to add Forum topics to
|
| 481 |
their MySite page.
|
| 482 |
|
| 483 |
For this feature to work, at least one forum container and one forum topic
|
| 484 |
must be present.
|
| 485 |
|
| 486 |
f) Path
|
| 487 |
If the Path module is active and you turn on Path Aliasing, each MySite will
|
| 488 |
be aliased to the path 'mysite/USERNAME' when the MySite is created or updated.
|
| 489 |
|
| 490 |
g) Taxonomy
|
| 491 |
If the taxonomy module is active, MySite will allow users to add tagged content
|
| 492 |
to their MySite page.
|
| 493 |
|
| 494 |
For this feature to work, you must have at least one Vocabulary and one Term
|
| 495 |
created at http://example.com/admin/content/taxonomy.
|
| 496 |
|
| 497 |
Note that Forum categories are not included in MySite's taxonomy-based lists.
|
| 498 |
|
| 499 |
h) Theme
|
| 500 |
MySite supports user-based theme settings. When enabled, MySite users may
|
| 501 |
choose from any active site theme. Anyone viewing a MySite page will view the
|
| 502 |
page in the user-selected theme.
|
| 503 |
|
| 504 |
Special Cases
|
| 505 |
|
| 506 |
i) Droplets, Blocks and Views
|
| 507 |
"Droplets" are the Drupal equivalent of Google Gadgets: they enable the site
|
| 508 |
administrators to create small widgets that add new features to the site.
|
| 509 |
Droplets can be created from HTML, JavaScript, or PHP code. They can also be
|
| 510 |
generated from Blocks or from Views.
|
| 511 |
|
| 512 |
MySite does not expose Blocks or Views directly to end users; the administrator
|
| 513 |
must select which elements to expose via the Droplet creation system.
|
| 514 |
|
| 515 |
j) Node and CCK (Content)
|
| 516 |
The node module is a required core module. MySite can handle requests for all
|
| 517 |
posts of a specific node type. If you use the CCK (Content) module, CCK node
|
| 518 |
types are also supported.
|
| 519 |
|
| 520 |
k) User
|
| 521 |
The user module is a required core module. MySite can track posts based on
|
| 522 |
individual users.
|
| 523 |
|
| 524 |
See sections 4.2.1 and 5 for additional details.
|
| 525 |
|
| 526 |
----
|
| 527 |
2.2 Plugins and User Options
|
| 528 |
|
| 529 |
Part of the design of MySite is to reduce code overhead through the use of
|
| 530 |
includes (called Plugins). For MySite to function, certain plugins are
|
| 531 |
required, but others are optional and can be removed.
|
| 532 |
|
| 533 |
In the case of Format, Layout, and Style plugins, the "default" file is always
|
| 534 |
required. If this file is the only plugin present, users will not be allowed
|
| 535 |
to change their content settings.
|
| 536 |
|
| 537 |
For Type plugins, only the plugins you wish to use need to be present. Since
|
| 538 |
the administrator can deactivate Content Types, there is no reason to remove
|
| 539 |
these files.
|
| 540 |
|
| 541 |
For additional detail, including how to change the default files, see the
|
| 542 |
README.txt files in each plugin directory.
|
| 543 |
|
| 544 |
----
|
| 545 |
2.3 Required Plugin Files
|
| 546 |
|
| 547 |
If you remove any of these files from your modules directory, MySite will not
|
| 548 |
work correctly.
|
| 549 |
|
| 550 |
mysite/plugins/formats/default.theme
|
| 551 |
mysite/plugins/layouts/default.php
|
| 552 |
mysite/plugins/styles/default.css
|
| 553 |
|
| 554 |
----
|
| 555 |
2.4 The 'Contrib' Folder
|
| 556 |
|
| 557 |
When you download MySite and untar the file, you may see a 'contrib' folder
|
| 558 |
within the MySite directory. Files within this directory require Contributed
|
| 559 |
rather than Core Drupal modules.
|
| 560 |
|
| 561 |
MySite development has been targeted at Drupal's Core modules. The items
|
| 562 |
within the "contrib" folder are designed to extend MySite for use with
|
| 563 |
additional modules.
|
| 564 |
|
| 565 |
Any file within the "contrib" folder can be used with MySite by placing the
|
| 566 |
file inside the appropriate "plugins" folder.
|
| 567 |
|
| 568 |
For instructions, open the file and look for this section at the top:
|
| 569 |
|
| 570 |
/**
|
| 571 |
* INSTALLATION
|
| 572 |
*
|
| 573 |
* Requires: name_of.module
|
| 574 |
* Directory: mysite/plugins/path_to_folder
|
| 575 |
* Settings: Yes / No
|
| 576 |
*
|
| 577 |
*/
|
| 578 |
|
| 579 |
These items indicate:
|
| 580 |
|
| 581 |
1) Requires: the name of the module required to use this Plugin.
|
| 582 |
2) Directory: the location of the MySite plugins folder to put the file.
|
| 583 |
3) Settings: whether the plugin requires any administrative settings
|
| 584 |
before it can be activated.
|
| 585 |
|
| 586 |
----
|
| 587 |
2.4.1 Current Contributions
|
| 588 |
|
| 589 |
MySite 5.x.2 ships with four contributed plugins.
|
| 590 |
|
| 591 |
- biblio.inc -- for the Biblio module, plugin by csc4
|
| 592 |
- refine.inc -- for the Refine by Taxonomy module, plugin by agentrickard
|
| 593 |
- storylink.inc -- for the Vote Up Down module, plugin by patchak
|
| 594 |
- weblinks.inc -- for the Links / Weblinks module, plugin by suchold-it
|
| 595 |
|
| 596 |
For more information on contributing to MySite, see sections 7 and 8.
|
| 597 |
|
| 598 |
----
|
| 599 |
2.5 CSS Files and Layout Issues
|
| 600 |
|
| 601 |
A note here about mysite.css and the included layout files.
|
| 602 |
|
| 603 |
On fixed-width layouts, content that extends beyond the default width of columns
|
| 604 |
on the mysite pages will be forced to scroll in order to not break the page
|
| 605 |
layout. As three column layouts create more narrow columns, you are more likely
|
| 606 |
to see scrolling on mysite pages with 3 columns.
|
| 607 |
|
| 608 |
The css that governs this behavior is the div.mysite-group (lines 59-64 of
|
| 609 |
mysite.css). If you prefer, you may set the 'overflow' value to 'hidden'.
|
| 610 |
Doing so will hide parts of elements that extend beyond the content group.
|
| 611 |
|
| 612 |
Remember that you can also remove layouts that you do not wish to use.
|
| 613 |
|
| 614 |
--------
|
| 615 |
3. DEFAULT USER SETTINGS *
|
| 616 |
|
| 617 |
As of MySite 5.x.2, the administrator can now set up the user default settings
|
| 618 |
for MySite. It is highly recommended that you configure MySite's default
|
| 619 |
options for your users.
|
| 620 |
|
| 621 |
----
|
| 622 |
3.1 Default Page Settings *
|
| 623 |
|
| 624 |
Clicking on the "Default page settings" tab will take you to the MySite
|
| 625 |
configuration page for user 0 (zero).
|
| 626 |
|
| 627 |
The settings and content that are established for user zero (0) will be used
|
| 628 |
for all anonymous users who visit http://example.com/mysite and for all users
|
| 629 |
who have not yet created a MySite page.
|
| 630 |
|
| 631 |
Further, when a user creates a MySite page, the user's settings will initially
|
| 632 |
match the Default Settings.
|
| 633 |
|
| 634 |
----
|
| 635 |
3.2 Default Page Content *
|
| 636 |
|
| 637 |
As of MySite 5.x.2, the administrator can now select a default set of content
|
| 638 |
to show to all anonymous users and to authenticated users who have not yet
|
| 639 |
created a MySite page.
|
| 640 |
|
| 641 |
When a user creates a new MySite page, the default content set will
|
| 642 |
automatically be saved in their collection. Once saved, the user can change
|
| 643 |
his or her individual content settings to remove the default content.
|
| 644 |
|
| 645 |
To define the default content set, click on the "Default page content" tab
|
| 646 |
of MySite's administration page.
|
| 647 |
|
| 648 |
----
|
| 649 |
3.3 Locking Content for Users *
|
| 650 |
|
| 651 |
For MySite 5.x.2.5 and higher, the site administrator now has the option to
|
| 652 |
"lock" default page content. Locking content forces the content element
|
| 653 |
to load for each MySite user; locked content loads in the position set by
|
| 654 |
the site administrator.
|
| 655 |
|
| 656 |
To lock a content item, click on 'Default Page Content' and click the
|
| 657 |
configure action button. You should see a checkbox that asks if you
|
| 658 |
would like to lock the content. Check the box and submit the form to lock
|
| 659 |
the content item.
|
| 660 |
|
| 661 |
Note: This feature may have some odd behavior when the user changes
|
| 662 |
his or her content layout. Since the user no longer has control over the
|
| 663 |
position of locked content, there may be some user confusion.
|
| 664 |
|
| 665 |
See http://drupal.org/node/152917 for the feature request.
|
| 666 |
|
| 667 |
--------
|
| 668 |
4. MYSITE SETTINGS
|
| 669 |
|
| 670 |
This section covers the core settings for MySite. The options are divided
|
| 671 |
into sections on the MySite settings page.
|
| 672 |
|
| 673 |
----
|
| 674 |
4.1 Content Settings
|
| 675 |
|
| 676 |
The Content Settings option highlights the Content Types panel, which lets you
|
| 677 |
configure which content options will be available to your users.
|
| 678 |
|
| 679 |
These settings control the options that MySite users will be presented.
|
| 680 |
|
| 681 |
----
|
| 682 |
4.1.1 Content Types
|
| 683 |
|
| 684 |
In the MySite Settings main page, find the section labeled MySite Content Types.
|
| 685 |
The default options are:
|
| 686 |
|
| 687 |
MySite Content Types:
|
| 688 |
Aggregation options:
|
| 689 |
[] Web Feeds: News items for a specific Aggregator feed.
|
| 690 |
[] Web Headlines: News items for an Aggregator category.
|
| 691 |
Comment options:
|
| 692 |
[] Post Comments: Comments on a specific post.
|
| 693 |
Content options:
|
| 694 |
[] Blog Posts: Blog posts from a specific user.
|
| 695 |
[] Books: Pages from a book collection.
|
| 696 |
[] Categories: Content assigned to a specific taxonomy term.
|
| 697 |
[] Forum Topics: Forum posts within a specific topic.
|
| 698 |
[] Posts: Add a specific post.
|
| 699 |
[] Post Types: Content posts of a specific type.
|
| 700 |
[] User Posts: Content posted by a specific user.
|
| 701 |
[] User Profiles: Selected information about the user
|
| 702 |
MySite options:
|
| 703 |
[] Droplets: Content defined by the site administrator.
|
| 704 |
[] Most Popular: The mysite content most requested by users.
|
| 705 |
Usability options:
|
| 706 |
[] Path Aliases: Creates mysite/USERNAME path aliases for MySite users.
|
| 707 |
[] Theme Switching: Enables users to choose a theme for MySite.
|
| 708 |
|
| 709 |
Of these options, only the Droplets content type is native to MySite. The
|
| 710 |
other options require that specific modules be present. For example, if you
|
| 711 |
have not activated the Aggregator module, then neither the Web Feeds nor Web
|
| 712 |
Headlines options will be available.
|
| 713 |
|
| 714 |
Note: Some type files have configuration settings -- these are visible as menu
|
| 715 |
tabs. Be sure to configure each active content type as needed.
|
| 716 |
|
| 717 |
See sections 2.1 and 5 for more information.
|
| 718 |
|
| 719 |
----
|
| 720 |
4.1.2 Disabled Content Types
|
| 721 |
|
| 722 |
You may also see a section like this on the settings page:
|
| 723 |
|
| 724 |
Disabled Content Types:
|
| 725 |
* Categories: Content assigned to a specific taxonomy term.
|
| 726 |
The MySite Category options must be configured.
|
| 727 |
|
| 728 |
The MySite module checks to see if various options and permissions have been
|
| 729 |
defined before allowing you to activate a content type. The module will
|
| 730 |
present you with a link to correct the configuration error. After you make
|
| 731 |
the suggested change, the content type should be available for activation.
|
| 732 |
|
| 733 |
For further detail about configuring specific Content Types, see section 5.
|
| 734 |
|
| 735 |
----
|
| 736 |
4.1.3 Adding New Content Types
|
| 737 |
|
| 738 |
When a new Type plugin is added to your module, a new option should appear in
|
| 739 |
the Content Types of the Disabled Content Types lists.
|
| 740 |
|
| 741 |
|
| 742 |
----
|
| 743 |
4.2 Display Settings
|
| 744 |
|
| 745 |
Options that affect user interaction with MySite.
|
| 746 |
|
| 747 |
----
|
| 748 |
4.2.1 MySite Sitename
|
| 749 |
|
| 750 |
This option allows you to change the default 'My Sitename' string used
|
| 751 |
to display menu links and page titles for the MySite module.
|
| 752 |
|
| 753 |
Note: If you do not change this value, it will update if you change
|
| 754 |
the name of your site in your System Information settings.
|
| 755 |
|
| 756 |
----
|
| 757 |
4.2.2 MySite Behavior
|
| 758 |
|
| 759 |
Options: *default
|
| 760 |
* Show list of all user mysites
|
| 761 |
Go to User MySite
|
| 762 |
|
| 763 |
This option tells MySite how to behave when a visitor goes to
|
| 764 |
http://example.com/mysite.
|
| 765 |
|
| 766 |
Most installation will use the default setting 'Go to User MySite page' which
|
| 767 |
directs the user to http://example.com/mysite/UID/view.
|
| 768 |
|
| 769 |
The additional option 'Show list of all user mysites' mirrors the menu callback
|
| 770 |
for http://example.com/mysite/all and is mainly used for debugging.
|
| 771 |
|
| 772 |
----
|
| 773 |
4.2.3 MySite Privacy
|
| 774 |
|
| 775 |
Options: *default
|
| 776 |
* Default setting is "public"
|
| 777 |
Default setting is "private"
|
| 778 |
|
| 779 |
This option sets the default visibility of the owner's MySIte page with regard
|
| 780 |
to other users. By default, all users with the "view all mysites" privilege
|
| 781 |
can see all other user personal pages. Individual users can turn this setting to "private."
|
| 782 |
|
| 783 |
----
|
| 784 |
4.2.4 MySite Page Setup
|
| 785 |
|
| 786 |
Options: *default
|
| 787 |
* Show MySite within normal theme
|
| 788 |
Show MySite pages full screen
|
| 789 |
|
| 790 |
The administrator now has the option to turn off the left and right rail regions for
|
| 791 |
MySite pages. This allows the user to have complete control over the content
|
| 792 |
presented by MySite.
|
| 793 |
|
| 794 |
If this feature is turned on, the "footer" region of your site will still be
|
| 795 |
printed on all MySite pages.
|
| 796 |
|
| 797 |
Note: The full screen display may have unexpected consequences for your theme,
|
| 798 |
since it eliminates the default sidebars and most page regions. Test before
|
| 799 |
you deploy.
|
| 800 |
|
| 801 |
----
|
| 802 |
4.2.5 MySite Item Deletion
|
| 803 |
|
| 804 |
The administrator may configure MySite to require users to confirm the deletion
|
| 805 |
of content from their MySite collection. Users have the option to disable this
|
| 806 |
feature for their own collection.
|
| 807 |
|
| 808 |
----
|
| 809 |
4.2.6 MySite Node Links
|
| 810 |
|
| 811 |
By enabling this feature, MySite will place a link at the bottom of all content.
|
| 812 |
The link, when moused over, will display a box of options related to the content.
|
| 813 |
Typical options include adding the item to your collection or deleting an item
|
| 814 |
from your collection.
|
| 815 |
|
| 816 |
----
|
| 817 |
4.3 Content Browser
|
| 818 |
|
| 819 |
The Content Browser settings affect how users will be presented the content
|
| 820 |
options for adding elements to their MySite page.
|
| 821 |
|
| 822 |
----
|
| 823 |
4.3.1 Content Browsing ^
|
| 824 |
|
| 825 |
This option will only be available if you have activated the MySite Icons
|
| 826 |
module.
|
| 827 |
|
| 828 |
Options: *default
|
| 829 |
* Display a text-only table
|
| 830 |
Display rows of icons
|
| 831 |
|
| 832 |
Versions prior to 5.x.2 presented users with a simple table of choices. In
|
| 833 |
newer versions, MySite presents options for displaying content choices to users.
|
| 834 |
|
| 835 |
The default setting is to show a plain-text table of items, with "Add" links.
|
| 836 |
|
| 837 |
The optional behavior is to show a table of icons, with each icon representing
|
| 838 |
a content option.
|
| 839 |
|
| 840 |
----
|
| 841 |
4.3.2 Content Layout ^
|
| 842 |
|
| 843 |
This options will only be available if you have activated the MySite Icons
|
| 844 |
module.
|
| 845 |
|
| 846 |
Options: *default
|
| 847 |
* 4
|
| 848 |
Numbers 1 through 10
|
| 849 |
|
| 850 |
If you select the 'Display row of icons' option for content browsing, this
|
| 851 |
option is used to set the number of items to show per row. You should test
|
| 852 |
this settings to optimize the presentation for your site theme(s).
|
| 853 |
|
| 854 |
----
|
| 855 |
4.3.3 Items per Page
|
| 856 |
|
| 857 |
Options: *default
|
| 858 |
* 10
|
| 859 |
10, 25, or 50
|
| 860 |
|
| 861 |
This option sets the pagination limit for the content browser. In either
|
| 862 |
table or panel mode, this setting will control the number of items to show per
|
| 863 |
page.
|
| 864 |
|
| 865 |
----
|
| 866 |
4.4 User Limits
|
| 867 |
|
| 868 |
These options determine how much content a user can add to their MySite page.
|
| 869 |
|
| 870 |
----
|
| 871 |
4.4.1 Item Count
|
| 872 |
|
| 873 |
Options: *default
|
| 874 |
* 10
|
| 875 |
5, 10, or 20
|
| 876 |
|
| 877 |
Since MySite collects content from a variety of Drupal content, it can make a
|
| 878 |
high number of database requests. This setting puts a cap on the number of
|
| 879 |
content items a user can add to a MySite page. The default is 10.
|
| 880 |
|
| 881 |
----
|
| 882 |
4.4.2 Element Count
|
| 883 |
|
| 884 |
Options: *default
|
| 885 |
* 5
|
| 886 |
3, 5, 10, 15 or 20
|
| 887 |
|
| 888 |
MySite is meant to give a quick overview, not to substitute for reading the
|
| 889 |
original content in context. This setting limits the number of items (links)
|
| 890 |
presented under each content group. The default is 5.
|
| 891 |
|
| 892 |
----
|
| 893 |
4.4.3 Page Count *
|
| 894 |
|
| 895 |
Options: *default
|
| 896 |
* 5
|
| 897 |
1, 3, 5, 8, 10, 15 or 20
|
| 898 |
|
| 899 |
In 5.x.3, users may have multiple pages in their MySite collection.
|
| 900 |
|
| 901 |
This setting places a limit on the number of pages a user may create.
|
| 902 |
|
| 903 |
----
|
| 904 |
4.5 Action Buttons
|
| 905 |
|
| 906 |
Options: *default
|
| 907 |
Text
|
| 908 |
* Icons
|
| 909 |
Icons and Text
|
| 910 |
|
| 911 |
MySite ships with a small set of GPL icons, created by agentrickard expressly
|
| 912 |
for MySite, which can be used to present the action buttons to users. Select
|
| 913 |
the option that you prefer. Default is 'Icons.' The icons are previewed on
|
| 914 |
the settings page.
|
| 915 |
|
| 916 |
----
|
| 917 |
4.6 MySite Cache
|
| 918 |
|
| 919 |
Options: *default
|
| 920 |
* Cache Off
|
| 921 |
5 minutes
|
| 922 |
15 minutes
|
| 923 |
30 minutes
|
| 924 |
1 hour
|
| 925 |
|
| 926 |
For high-traffic sites, MySite might cause a high volume of database requests
|
| 927 |
(especially if the Item and Element Count settings are very high). If you
|
| 928 |
have performance issues, you can cache the results of a MySite page view for
|
| 929 |
a set amount of time.
|
| 930 |
|
| 931 |
----
|
| 932 |
4.7 Default MySite Page
|
| 933 |
|
| 934 |
Options: *default
|
| 935 |
* <empty>
|
| 936 |
The numeric User ID of any MySite user
|
| 937 |
|
| 938 |
In response to http://drupal.org/node/93012, the administrator can now set a
|
| 939 |
default user id for MySite. Visitors who browse to
|
| 940 |
http://example.com/mysite/default will be taken to that user page.
|
| 941 |
|
| 942 |
Default value is <empty>; if default user is not configured, then the page will
|
| 943 |
return users to the standard behaviors defined in 4.1.1.
|
| 944 |
|
| 945 |
Note: No navigation menu item will be generated for this link; you must add one
|
| 946 |
to your site manually.
|
| 947 |
|
| 948 |
--------
|
| 949 |
5. TYPE INCLUDE SETTINGS
|
| 950 |
|
| 951 |
Each content type for MySite can be configured. Some configuration options
|
| 952 |
are more advanced than others, see below for details.
|
| 953 |
|
| 954 |
----
|
| 955 |
5.1 All Content Types
|
| 956 |
|
| 957 |
As of MySite 5.x.3 (currently HEAD), there are default settings for all type
|
| 958 |
includes. These were developed by mdekkers and tdekhnich. See
|
| 959 |
http://drupal.org/node/174673 for the history.
|
| 960 |
|
| 961 |
Each content type now has default settings, which include:
|
| 962 |
|
| 963 |
-- Prefix value preppended to content titles.
|
| 964 |
-- Suffix value appended to content titles.
|
| 965 |
-- Menu label that appears to users in the content interface.
|
| 966 |
-- Link target used when a user clicks on a headline link.
|
| 967 |
|
| 968 |
----
|
| 969 |
5.2 Droplets
|
| 970 |
|
| 971 |
Droplets are content elements similar to Drupal blocks, Google Gadgets and
|
| 972 |
Yahoo! Widgets. The Droplet system allows the site administrator to define
|
| 973 |
custom content objects that users may place on a MySite page.
|
| 974 |
|
| 975 |
The Droplet system enables the creation of Droplets from code that you supply,
|
| 976 |
from existing Drupal Blocks, or from existing Views (if the Views module is
|
| 977 |
installed and active).
|
| 978 |
|
| 979 |
No Droplets are installed by default. The following Droplet creation options
|
| 980 |
exist:
|
| 981 |
|
| 982 |
----
|
| 983 |
5.2.1 Custom Droplets
|
| 984 |
|
| 985 |
Custom droplets allow you to place whatever code you wish into a Droplet item.
|
| 986 |
In this sense, Droplets are very similar to Blocks. We do not use the Drupal
|
| 987 |
Block system because it doesn't make sense to require administrators to create
|
| 988 |
new Blocks every time they wish to add a new Droplet.
|
| 989 |
|
| 990 |
Custom Droplets can contain any code that you desire, but are subject to
|
| 991 |
Drupal's normal input filter system. If, for example, you wish to add the
|
| 992 |
JavaScript to use a Google Gadget, you must input that Droplet as "Full HTML."
|
| 993 |
|
| 994 |
----
|
| 995 |
5.2.2 Block Droplets
|
| 996 |
|
| 997 |
MySite will show a selection form that will allow you to convert any existing
|
| 998 |
Block into a MySite Droplet. Simply select the Block to convert and submit
|
| 999 |
the form. You will then have the option to preview and configure the Droplet.
|
| 1000 |
|
| 1001 |
Note: Not all Blocks make good Droplets. Also note that Block access rules
|
| 1002 |
do not apply to Droplets. Any user can access any Droplet.
|
| 1003 |
|
| 1004 |
----
|
| 1005 |
5.2.3 Views Droplets
|
| 1006 |
|
| 1007 |
If you have installed and activated the Views module, you can create Droplets
|
| 1008 |
based on existing Views. (You cannot, however, create Droplets based on
|
| 1009 |
default Views until you have activated them locally.)
|
| 1010 |
|
| 1011 |
To create a Droplet based on a View, simply select the View from the select
|
| 1012 |
list and submit the form. You will then have the option to preview and
|
| 1013 |
configure the Droplet.
|
| 1014 |
|
| 1015 |
Note: Not all Views make good Droplets. In particular, Views that require
|
| 1016 |
arguments cannot be handled by the current Droplet system. The only argument
|
| 1017 |
that a View on a MySite page can accept is the UID of the MySite page owner.
|
| 1018 |
|
| 1019 |
To enable this argument, use this code in your View:
|
| 1020 |
|
| 1021 |
if (arg(0) == 'mysite' && is_numeric(arg(1))) {
|
| 1022 |
return array(arg(1));
|
| 1023 |
}
|
| 1024 |
|
| 1025 |
Also note that Views access rules do not apply to Droplets. Any user can
|
| 1026 |
access any Droplet.
|
| 1027 |
|
| 1028 |
----
|
| 1029 |
5.2.4 Panels Droplets
|
| 1030 |
|
| 1031 |
The Panels module creates Blocks for each Panel. These blocks can be added
|
| 1032 |
to MySite in the same manner described in 5.2.2.
|
| 1033 |
|
| 1034 |
----
|
| 1035 |
5.3 Feeds
|
| 1036 |
|
| 1037 |
Please see section 1.8 "User-Submitted Content" before configuring Feeds.
|
| 1038 |
|
| 1039 |
If the Aggregator module is enabled and you have given users the permission
|
| 1040 |
to 'add mysite feeds,' you will need to configure the default settings for
|
| 1041 |
handling new Aggregator feeds. These settings help prevent users from
|
| 1042 |
overloading the Aggregator be setting throttles on update frequency.
|
| 1043 |
|
| 1044 |
----
|
| 1045 |
5.3.1 Aggregator Feeds
|
| 1046 |
|
| 1047 |
Options: *default
|
| 1048 |
Allow users to add new feeds
|
| 1049 |
* Do not allow users to add new feeds
|
| 1050 |
|
| 1051 |
Only if you 'Allow users to add new feeds' will the access control settings
|
| 1052 |
appear. Then you can give specific roles the ability to add new feeds.
|
| 1053 |
Recommended use is to allow all registered users to add new feeds.
|
| 1054 |
|
| 1055 |
----
|
| 1056 |
5.3.2 Allowed Feed Categories
|
| 1057 |
|
| 1058 |
Options: varies
|
| 1059 |
default is <empty>
|
| 1060 |
|
| 1061 |
When a user adds a new feed through MySite, they will only be given the
|
| 1062 |
category options that you allow. If only one option is selected, there is no
|
| 1063 |
choice allowed and all user feeds will be filed under the default category.
|
| 1064 |
|
| 1065 |
In MySite 5.x.2 Feed Categories are no longer required.
|
| 1066 |
|
| 1067 |
----
|
| 1068 |
5.3.3 Default Feed Category
|
| 1069 |
|
| 1070 |
Options: varies
|
| 1071 |
default is <empty>
|
| 1072 |
|
| 1073 |
Establishes the default feed category for user-submitted feeds. This is
|
| 1074 |
helpful because it separate user-submitted feeds from those set up by the site
|
| 1075 |
administrator.
|
| 1076 |
|
| 1077 |
----
|
| 1078 |
5.3.4 Update Interval
|
| 1079 |
|
| 1080 |
Options: *default
|
| 1081 |
15 minutes
|
| 1082 |
30 minutes
|
| 1083 |
1 hour
|
| 1084 |
2 hours
|
| 1085 |
3 hours
|
| 1086 |
* 6 hours
|
| 1087 |
9 hours
|
| 1088 |
18 hours
|
| 1089 |
1 day
|
| 1090 |
2 days
|
| 1091 |
3 days
|
| 1092 |
1 week
|
| 1093 |
2 weeks
|
| 1094 |
4 weeks
|
| 1095 |
|
| 1096 |
Sets the feed update interval for all user-submitted feeds. This prevents your
|
| 1097 |
site from getting flooded when trying to process all user-submitted feeds.
|
| 1098 |
|
| 1099 |
----
|
| 1100 |
5.4 Nodes *
|
| 1101 |
|
| 1102 |
The Node module is a core Drupal module. This MySite feature also works with
|
| 1103 |
CCK (Content) module to allow users to select content based on content type.
|
| 1104 |
|
| 1105 |
On the Nodes settings page, you should see a list of checkboxes for all
|
| 1106 |
content types used by your site. Simply select which elements you want users
|
| 1107 |
to be able to access through MySite.
|
| 1108 |
|
| 1109 |
If you do not select content types, then all content types will be available to
|
| 1110 |
users.
|
| 1111 |
|
| 1112 |
The MySite module will display the X most recent posts by type, where X is set
|
| 1113 |
by the default Element Count setting.
|
| 1114 |
|
| 1115 |
Note: MySite does not use PHPTemplate for node formatting. Custom node theming
|
| 1116 |
do at the template layer will not appear to MySite users. See the API
|
| 1117 |
documentation for information about changing node templates in MySite.
|
| 1118 |
|
| 1119 |
----
|
| 1120 |
5.5 Posts *
|
| 1121 |
|
| 1122 |
The Posts handler allows users to add single posts (Drupal nodes) to their
|
| 1123 |
MySite collection.
|
| 1124 |
|
| 1125 |
The administrator may restrict users to specific node types.
|
| 1126 |
|
| 1127 |
If you do not select content types, then all content types will be available to
|
| 1128 |
users.
|
| 1129 |
|
| 1130 |
----
|
| 1131 |
5.6 Profiles *
|
| 1132 |
|
| 1133 |
The Profiles handler is new in MySite 5.x.2 and is a little tricky. This
|
| 1134 |
plugin works with the User module -- through hook_user() -- and the Profile
|
| 1135 |
module to define the available profile elements that MySite users may display
|
| 1136 |
on their personal page.
|
| 1137 |
|
| 1138 |
The problem is that Profile elements may be different for users of different
|
| 1139 |
roles or permissions, or for users who have done certain actions (like
|
| 1140 |
blogging).
|
| 1141 |
|
| 1142 |
The settings on this page establish the default elements for each user's
|
| 1143 |
MySite profile item. Users may change these settings after they activate
|
| 1144 |
their profile item.
|
| 1145 |
|
| 1146 |
Note: MySite users can only add their profile to their personal page. By
|
| 1147 |
design, only publicly-viewable profile fields are allowed. The link to a
|
| 1148 |
user's MySite page provided by mysite_user() will not be shown, since it
|
| 1149 |
is redundant.
|
| 1150 |
|
| 1151 |
----
|
| 1152 |
5.7 Terms
|
| 1153 |
|
| 1154 |
If the Taxonomy module is enabled, you may configure which taxonomy categories
|
| 1155 |
(Drupal vocabularies) that users may add to MySite pages. At least one
|
| 1156 |
vocabulary must be selected, and that vocabulary must have active terms.
|
| 1157 |
|
| 1158 |
If you select no categories, then all categories will be available to users.
|
| 1159 |
|
| 1160 |
----
|
| 1161 |
5.8 Themes
|
| 1162 |
|
| 1163 |
On Mysite's Theme settings page, you will find a list of all active themes
|
| 1164 |
for your web site. Check the themes that users are allowed to apply to their
|
| 1165 |
MySite page and save. When users edit their MySite page, the available theme
|
| 1166 |
list will be presented if more than one theme is made available.
|
| 1167 |
|
| 1168 |
----
|
| 1169 |
5.9 Users *
|
| 1170 |
|
| 1171 |
The Users plugin is new in MySite 5.x.2 and allows MySite users to track posts
|
| 1172 |
by individual site users.
|
| 1173 |
|
| 1174 |
The settings for this plugin are based on the user Roles active for your site.
|
| 1175 |
Only selected roles can be tracked in MySite. This feature lets the site
|
| 1176 |
administrator have some selectivity over which users can be tracked.
|
| 1177 |
|
| 1178 |
By default, all "authenticated users" are available to all MySite users. If
|
| 1179 |
"authenticated users" are allowed, then _all_ roles will be allowed by MySite
|
| 1180 |
except for "anonymous user".
|
| 1181 |
|
| 1182 |
Note: The "anonymous user" role is included in the list in cases where
|
| 1183 |
anonymous users are allowed to post site content.
|
| 1184 |
|
| 1185 |
|
| 1186 |
--------
|
| 1187 |
6. MYSITE ICONS *^
|
| 1188 |
|
| 1189 |
The MySite Icons module is included in the MySite 5.x.2 release. The icons
|
| 1190 |
module allows the site administrator to assign a small graphic to represent
|
| 1191 |
a content item.
|
| 1192 |
|
| 1193 |
MySite Icons should work correctly for sites using both the Public and Private
|
| 1194 |
file download methods.
|
| 1195 |
|
| 1196 |
The MySite Icons module allows the upload of GIF, JPG, and PNG files only and
|
| 1197 |
stores them inside a folder your File uploads directory.
|
| 1198 |
|
| 1199 |
----
|
| 1200 |
6.1 Why Use Icons?
|
| 1201 |
|
| 1202 |
An icon-based content listing page can be more attractive to users. Using
|
| 1203 |
icons makes MySite more similar to the experience of Google or Yahoo!
|
| 1204 |
|
| 1205 |
Icon usage with MySite is purely optional; enabling or disabling the MySite
|
| 1206 |
Icons module will not affect the core MySite module.
|
| 1207 |
|
| 1208 |
----
|
| 1209 |
6.2 Icon Settings
|
| 1210 |
|
| 1211 |
When you install MySite Icons, two new Administrative menu items appear.
|
| 1212 |
Both the path Administer > Settings > MySite Icons and the MySite settings
|
| 1213 |
tab "Content icons" will take you to the MySite Icons settings page.
|
| 1214 |
|
| 1215 |
There are four options for MySite Icons. All are required.
|
| 1216 |
|
| 1217 |
1) MySite Icons Directory * default: "mysite"
|
| 1218 |
This is the folder inside your File uploads directory where MySite will
|
| 1219 |
store icons. A directory name is required. The default value for this
|
| 1220 |
directory is "mysite" and should not need to be changed. The directory
|
| 1221 |
name must not conflict with other modules.
|
| 1222 |
|
| 1223 |
2) Icon maximum dimensions * default "120x60"
|
| 1224 |
This sets the Width x Height (in pixels) of the largest size image that
|
| 1225 |
can be uploaded. If your site uses GD or another supported image processor,
|
| 1226 |
MySite will automatically resize the image on upload.
|
| 1227 |
|
| 1228 |
3) Icon maximum file size * default "32"
|
| 1229 |
The maximum size of an icon uploaded through MySite, in kB. If your site
|
| 1230 |
uses GD or another supported image processor, MySite will automatically
|
| 1231 |
resize the image on upload.
|
| 1232 |
|
| 1233 |
4) Download icons * default 'Attempt to download icons'
|
| 1234 |
To make icon loading faster and more secure, RSS feeds that contain image
|
| 1235 |
identifiers will have those images downloaded to a local directory. If you
|
| 1236 |
wish to disable this behavior, set this option to 'Do not download icons.'
|
| 1237 |
|
| 1238 |
----
|
| 1239 |
6.3 Default Icons
|
| 1240 |
|
| 1241 |
MySite comes with default icons that are used in cases where custom icons
|
| 1242 |
have not been loaded. These icons are all 120x60 pixels. Changing the Icon
|
| 1243 |
maximum dimensions setting may alter the appearance of these icons.
|
| 1244 |
|
| 1245 |
The following icons are provided inside mysite/plugins/icons:
|
| 1246 |
|
| 1247 |
- icon-aggregator.png
|
| 1248 |
- icon-blog.png
|
| 1249 |
- icon-book.png
|
| 1250 |
- icon-droplet.png
|
| 1251 |
- icon-extra.png
|
| 1252 |
- icon-extra2.png
|
| 1253 |
- icon-extra3.png
|
| 1254 |
- icon-feed.png
|
| 1255 |
- icon-forum.png
|
| 1256 |
- icon-node.png
|
| 1257 |
- icon-term.png
|
| 1258 |
- icon-user.png
|
| 1259 |
- icon.png
|
| 1260 |
|
| 1261 |
These icons a used by the Type plugins for MySite. If no type-specific icon
|
| 1262 |
is found, the default icon.png is used. The icon-extra.png files are included
|
| 1263 |
if you wish to extend or change the default icons.
|
| 1264 |
|
| 1265 |
When a custom icon is not found, MySIte prints the default icon as a CSS
|
| 1266 |
background image and displays the title of the item over the image.
|
| 1267 |
|
| 1268 |
Note: If a user has uploaded a User picture, it will be used by the Blog,
|
| 1269 |
Profile, and User content types unless a Custom Icon is loaded.
|
| 1270 |
|
| 1271 |
----
|
| 1272 |
6.4 Custom Icons
|
| 1273 |
|
| 1274 |
Custom Icons are uploaded by the administrator through a simple file interface.
|
| 1275 |
They are checked, resized, and saved as {type}-{type_id}.ext inside the MySite
|
| 1276 |
Icons Directory. A record of the upload is also stored in the {mysite_icon}
|
| 1277 |
table of the database.
|
| 1278 |
|
| 1279 |
----
|
| 1280 |
6.4.1 Adding a New Icon
|
| 1281 |
|
| 1282 |
To add a new icon, click the "Add content icon" link under MySite Icon settings.
|
| 1283 |
You will be shown a list of selection menus, one for each available Content
|
| 1284 |
Type used by MySite.
|
| 1285 |
|
| 1286 |
Select the name of the item you wish to add an icon for and hit "Select Item
|
| 1287 |
and Continue." You will then be taken to an icon upload form.
|
| 1288 |
|
| 1289 |
Select an image file from your computer and submit the form. On success, you
|
| 1290 |
will be given the "Icon saved" message. On failure, an error message will
|
| 1291 |
appear.
|
| 1292 |
|
| 1293 |
Note: As the site administrator, you can also add icons from the MySite
|
| 1294 |
Content Browser list at http://example.com/mysite/UID/content/type. Click
|
| 1295 |
the * next to the item title to add or change the icon for that item.
|
| 1296 |
|
| 1297 |
----
|
| 1298 |
6.4.2 Changing Existing Icons
|
| 1299 |
|
| 1300 |
To change an existing icon, click the Current icons tab in MySite Icons
|
| 1301 |
settings. Doing so will take you to a table showing all current icons.
|
| 1302 |
|
| 1303 |
----
|
| 1304 |
6.4.3 Deleting MySite Icons
|
| 1305 |
|
| 1306 |
From the Current icons screen, you may also delete an icon be clicking the
|
| 1307 |
"delete" link and then verifying the deletion.
|
| 1308 |
|
| 1309 |
Note: Deleting files from the server may cause errors, since the icon record
|
| 1310 |
is also stored in the {mysite_icon} table. If you wish to delete all MySite
|
| 1311 |
Icons, the preferred method is to Uninstall the MySite Icons module. Doing so
|
| 1312 |
will delete icons from the file server and the database.
|
| 1313 |
|
| 1314 |
----
|
| 1315 |
6.5 Aggregator Icons
|
| 1316 |
|
| 1317 |
MySite is trying a new technique with site icons provided by RSS and ATOM
|
| 1318 |
feeds. Normally, the Aggregator module stores complete IMG tags in the
|
| 1319 |
database, with absolute URLs to the files on remote servers.
|
| 1320 |
|
| 1321 |
This method introduces network latency when fetching images from remote
|
| 1322 |
servers. When MySite loads data for Aggregator feeds, it will attempt to grab
|
| 1323 |
the feed icon and store a local version on your web server.
|
| 1324 |
|
| 1325 |
This behavior is recorded in your site logs whenever MySite tries (or fails)
|
| 1326 |
to retrieve a feed image.
|
| 1327 |
|
| 1328 |
Images fetched from remote servers are processed and verified (as GIF, JPG, or
|
| 1329 |
PNG files) the same way as uploaded files are.
|
| 1330 |
|
| 1331 |
For discussion on this feature, see http://groups.drupal.org/node/3716.
|
| 1332 |
|
| 1333 |
|
| 1334 |
----
|
| 1335 |
7. DEVELOPERS API
|
| 1336 |
|
| 1337 |
MySite is designed to be extended to handle additional types of content or
|
| 1338 |
content groupings. The API is documented throughout the code, in the API.php
|
| 1339 |
file and online at:
|
| 1340 |
|
| 1341 |
http://therickards.com/api
|
| 1342 |
|
| 1343 |
The API documentation can show you how to create new plugins to extend MySite.
|
| 1344 |
This section defines the types of plugins and their roles within MySite,
|
| 1345 |
|
| 1346 |
----
|
| 1347 |
7.1 Changes from Earlier Releases
|
| 1348 |
|
| 1349 |
For users who have written custom plugins, you may need to revise your code
|
| 1350 |
to match changes in the API.
|
| 1351 |
|
| 1352 |
There have been substantial changes to the Format, Layout, and Style plugins.
|
| 1353 |
|
| 1354 |
Type plugins have changed in subtle ways and may not work in MySite 5.x.2
|
| 1355 |
as they did in MySite 5.x.1.
|
| 1356 |
|
| 1357 |
Some specific items to watch for:
|
| 1358 |
|
| 1359 |
FORMATS:
|
| 1360 |
Be sure you check the $element array for the 'content' item.
|
| 1361 |
If $element['content'] is set, then it should be printed for
|
| 1362 |
the end user instead of other data elements.
|
| 1363 |
|
| 1364 |
Changes have been made to mysite_theme_hook(). See the API.
|
| 1365 |
|
| 1366 |
LAYOUTS:
|
| 1367 |
Added mysite_layout_hook(), required API element.
|
| 1368 |
|
| 1369 |
Added mysite_prepare_columns(), required element.
|
| 1370 |
|
| 1371 |
The CSS ids and classes have changed radically to support
|
| 1372 |
the Interface drag-and-drop library.
|
| 1373 |
|
| 1374 |
STYLES
|
| 1375 |
Styles have been rewritten totally. Start over. Use the
|
| 1376 |
provided examples as guides.
|
| 1377 |
|
| 1378 |
TYPES
|
| 1379 |
Deprecated the THRESHOLD settings element.
|
| 1380 |
|
| 1381 |
Changes the mysite_type_hook() array elements.
|
| 1382 |
|
| 1383 |
Adds mysite_type_hook_active($type) for administrators.
|
| 1384 |
This function reports configuration errors.
|
| 1385 |
|
| 1386 |
Make sure all items in mysite_type_hook_options use
|
| 1387 |
mysite_type_hook_title() to retrieve their names.
|
| 1388 |
|
| 1389 |
Makes sure that mysite_type_hook_title() invokes the
|
| 1390 |
mysite_type_hook() with the parameter set to FALSE.
|
| 1391 |
(Failing to do so can cause infinite callback loops!)
|
| 1392 |
|
| 1393 |
Note the use of the 'icon' element in the mysite_type_hook_options()
|
| 1394 |
array.
|
| 1395 |
|
| 1396 |
In mysite_type_hook_data(), use mysite_teaser($node) to generate teaser
|
| 1397 |
elements for all nodes. (Only call this function for nodes, though.)
|
| 1398 |
|
| 1399 |
The function mysite_type_hook_block_node() is new to some. It is
|
| 1400 |
used on node view pages (e.g. http://example.com/node/123).
|
| 1401 |
|
| 1402 |
For details on the API, see http://therickards.com/api.
|
| 1403 |
|
| 1404 |
----
|
| 1405 |
7.2 Type Plugins
|
| 1406 |
|
| 1407 |
'Types' are content definitions. They control the content selection options
|
| 1408 |
available to the user and generate the data that is presented on a MySite page view.
|
| 1409 |
|
| 1410 |
They are named {type}.inc and stored in the /mysite/plugins/types/ folder.
|
| 1411 |
|
| 1412 |
----
|
| 1413 |
7.3 Layout Plugins
|
| 1414 |
|
| 1415 |
These plugins handle the page architecture of the MySite page. They are named
|
| 1416 |
{layout}.php and stored in the /mysite/plugins/layouts folder.
|
| 1417 |
|
| 1418 |
Layouts have two parts: a {layout}.php file that defines the layout theme and
|
| 1419 |
a {layout}.png image that is used in the layout selection form.
|
| 1420 |
|
| 1421 |
To create a new {layout}.png, use the provided default.png as a blank. There
|
| 1422 |
is a 5px space between sections in each provided image.
|
| 1423 |
|
| 1424 |
NOTE: You must at least keep default.php in this folder. If you wish, you may
|
| 1425 |
remove any other files. If only one layout file is present, users will not be
|
| 1426 |
given an option during MySite customization.
|
| 1427 |
|
| 1428 |
----
|
| 1429 |
7.4 Format Plugins
|
| 1430 |
|
| 1431 |
Handles the presentation theming for individual content elements on a MySite
|
| 1432 |
page. They are named {format}.theme and stored in the /mysite/plugins/formats/
|
| 1433 |
folder.
|
| 1434 |
|
| 1435 |
NOTE: You must at least keep default.theme in this folder. If you wish, you
|
| 1436 |
may remove any other files. If only one layout file is present, users will
|
| 1437 |
not be given an option during MySite customization.
|
| 1438 |
|
| 1439 |
----
|
| 1440 |
7.5 Style Plugins
|
| 1441 |
|
| 1442 |
Handles stylesheets for user MySite pages. Users may select the style that
|
| 1443 |
they prefer. They are named {style}.css and stored in the
|
| 1444 |
/mysite/plugins/styles/ folder.
|
| 1445 |
|
| 1446 |
Current styles are very simple. The default style is designed to respect
|
| 1447 |
inherited styles, and is deliberately minimal.
|
| 1448 |
|
| 1449 |
All stylesheets should include the core styles defined in default.css,
|
| 1450 |
rewritten as needed. Only the selected stylesheet is loaded on MySite page
|
| 1451 |
views.
|
| 1452 |
|
| 1453 |
NOTE: You must at least keep default.css in this folder. If you wish, you may
|
| 1454 |
remove any other files. If only one layout file is present, users will not be
|
| 1455 |
given an option during MySite customization.
|
| 1456 |
|
| 1457 |
----
|
| 1458 |
7.6 Integrating With Modules and Themes *
|
| 1459 |
|
| 1460 |
As of MySite 5.x.2.5, you can now reference individual MySite content elements
|
| 1461 |
from external function calls. Two functions are available.
|
| 1462 |
|
| 1463 |
mysite_render($type, $type_id, $uid = 0)
|
| 1464 |
Returns the raw data array for a specific content element. Formatted
|
| 1465 |
according to mysite_type_data().
|
| 1466 |
|
| 1467 |
mysite_display($type, $type_id, $uid = 0, $format = 'default')
|
| 1468 |
Returns a themed HTML snippet ready for insertion into a theme or to be
|
| 1469 |
used by a module or block.
|
| 1470 |
|
| 1471 |
In both cases, the functions are looking for the following information:
|
| 1472 |
|
| 1473 |
$type == A string indicating the content type
|
| 1474 |
$type_id == The content id (such as term id) to retrieve
|
| 1475 |
$uid == The user account to retrieve MySite page settings for. Optional.
|
| 1476 |
|
| 1477 |
The $format parameter in mysite_display() is an optional name of the MySite
|
| 1478 |
format plugin to use for output theming.
|
| 1479 |
|
| 1480 |
For more details, see http://therickards.com/api.
|
| 1481 |
|
| 1482 |
----
|
| 1483 |
8. CONTRIBUTING
|
| 1484 |
|
| 1485 |
The MySite project page is at http://drupal.org/project/mysite. You are
|
| 1486 |
invited to submit bug reports and feature requests there.
|
| 1487 |
|
| 1488 |
----
|
| 1489 |
8.1 Submitting Bug Reports
|
| 1490 |
|
| 1491 |
Before submitting a bug report, please check the issue queue for duplicate
|
| 1492 |
entries at:
|
| 1493 |
|
| 1494 |
http://drupal.org/project/issues/mysite
|
| 1495 |
|
| 1496 |
When submitting a bug report, please include the following:
|
| 1497 |
|
| 1498 |
- Drupal version (e.g. Drupal 5.3)
|
| 1499 |
- PHP version (e.g. PHP 5.1.6)
|
| 1500 |
- Database type and version (e.g. MySQL 4.1.13)
|
| 1501 |
- MySite release number (e.g. MySite 5.x.3.0)
|
| 1502 |
|
| 1503 |
If you don't include this information, I'll just have to ask you for it.
|
| 1504 |
|
| 1505 |
When you submit a bug report, it is very likely that I will need to ask you
|
| 1506 |
follow-up questions, so please track your request.
|
| 1507 |
|
| 1508 |
----
|
| 1509 |
8.2 Submitting Feature Requests
|
| 1510 |
|
| 1511 |
Feature requests are welcome, and should be submitted to:
|
| 1512 |
|
| 1513 |
http://drupal.org/project/issues/mysite
|
| 1514 |
|
| 1515 |
Please check the "closed", "by design" and "postponed" feature requests before
|
| 1516 |
submitting. Your request may have been addressed previously.
|
| 1517 |
|
| 1518 |
Please limit each new issue to a single feature request. If you have six
|
| 1519 |
ideas, you may overview them in a single issue and then divide the requests
|
| 1520 |
into separate tasks. Doing so make development more efficient and tracking
|
| 1521 |
collaboration easier.
|
| 1522 |
|
| 1523 |
----
|
| 1524 |
8.3 Submitting New Plugins
|
| 1525 |
|
| 1526 |
To submit a new plugin for MySite, go to the project page and submit a new
|
| 1527 |
feature request. File the feature request under the specific type of Plugin
|
| 1528 |
that you are submitting.
|
| 1529 |
|
| 1530 |
----
|
| 1531 |
8.4 Calls for Help
|
| 1532 |
|
| 1533 |
The MySite module could use work on the following additions:
|
| 1534 |
|
| 1535 |
- A comment.inc that tracks comments by user
|
| 1536 |
- A search.inc that tracks search terms
|
| 1537 |
(see http://drupal.org/node/102219)
|
| 1538 |
- Work on privacy settings for user content
|
| 1539 |
(see http://drupal.org/node/135378)
|
| 1540 |
- Work on "Pages" for MySite (see http://drupal.org/node/145423)
|
| 1541 |
|
| 1542 |
|
| 1543 |
--------
|
| 1544 |
|
| 1545 |
/**
|
| 1546 |
* @file
|
| 1547 |
* Module information and configuration notes for the MySite and MySite Icons modules.
|
| 1548 |
*/
|