FINAL suepr merge step : added all modules to this super repos

This commit is contained in:
Bachir Soussi Chiadmi
2015-04-19 16:46:59 +02:00
7585 changed files with 1723356 additions and 18 deletions

View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -0,0 +1,37 @@
-- Summary --
The "User Details" module comes with two blocks, "User Detils: logged-in user" and "User Details: authored user".
-- REQUIREMENTS --
* Basic Drupal install
* Optional options:
* - User points (to list the user points on either block).
* - Panels (to list a link on the logged-in user block).
* - Views (to list a link on the logged-in user block).
-- INSTALLATION --
* Install as usual, see http://drupal.org/node/70151 for further information.
* Enable the module in Administration » Modules.
* Configure the module options at Administration » Configuration » User interface » User Details. (all options are turned off by default)
-- Updating from 7.x-2.2 -> 7.x-2.3 --
* Upload the new files to your web server.
* Un-install "User Details" completely (un-check the box next to "User Details". Click the un-install tab and un-install it from your database.)
* Install "User Details" as you would normally.
-- CONFIGURATION --
* Configure the module options at Administration » Configuration » User interface » User Details. (all options are turned off by default)
-- NOTES --
This module was created out of a need for the end-user having to wander around
looking for those important links. The idea came from D6 from php code in a
block.
-- CONTACT --
Current maintainers:
* Draven Caine (http://drupal.org/user/226086)
This project has been sponsored by:
* Talisman Design
Specialized in Graphic design, and Drupal website design. All
services are from the ground up.

View File

@@ -0,0 +1,39 @@
/**
* @file
* This file handles all the styling needed for the "User Details" module.
*/
/**
* Logged-in user block .css styling.
*/
#user-details #loggedin .name, #user-details #loggedin .user-picture {
text-align: center;
}
#user-details #loggedin .joined .title, #user-details #loggedin .postcount .title, #user-details #loggedin .rank .title {
float: left;
margin-right: 3px;
}
#user-details #loggedin .userjoined .result, #user-details #loggedin .postcount .result {
font-style: italic;
}
#user-details #loggedin .quick-links .title, #user-details #loggedin .content .title {
text-decoration: underline;
text-align: center;
}
/**
* Authored by user block .css styling.
*/
#user-details #authored .name, #user-details #authored .user-picture {
text-align: center;
}
#user-details #authored .joined .title, #user-details #authored .postcount .title, #user-details #authored .rank .title {
float: left;
margin-right: 3px;
}
#user-details #authored .userjoined .result, #user-details #authored .postcount .result {
font-style: italic;
}
#user-details #authored .quick-links .title, #user-details #authored .content .title {
text-decoration: underline;
text-align: center;
}

View File

@@ -0,0 +1,38 @@
/**
* Admin page
*/
#user-details-admin-settings .form-type-checkbox, #user-details-admin-settings .form-type-select {
float: left;
width: 25%;
border-right: 2px solid;
margin-right: 10px;
}
#user-details-admin-settings #edit-loggedin-stats .form-type-checkbox, #user-details-admin-settings .form-item-user-details-loggedin-stats-hr-display, #user-details-admin-settings .form-item-user-details-loggedin-links-hr-display, #user-details-admin-settings #edit-authored-stats .form-type-checkbox, #user-details-admin-settings .form-item-user-details-authored-stats-hr-display, #user-details-admin-settings .form-item-user-details-authored-links-hr-display {
float: none;
width: 100%;
border: 0 none;
margin: 0;
}
#user-details-admin-settings .form-item-user-details-loggedin-stats-hr-display, #user-details-admin-settings .form-item-user-details-loggedin-links-hr-display, #user-details-admin-settings .form-item-user-details-authored-stats-hr-display, #user-details-admin-settings .form-item-user-details-authored-links-hr-display {
margin-bottom: 10px;
}
#user-details-admin-settings .form-type-textfield {
width: 70%;
margin-left: 27%;
}
#user-details-admin-settings label {
font-weight: bold;
}
#user-details-admin-settings .description {
font-style: italic;
}
#user-details-admin-settings #edit-custom-link-one .form-type-textfield, #user-details-admin-settings #edit-custom-link-two .form-type-textfield, #user-details-admin-settings #edit-custom-link-three .form-type-textfield, #user-details-admin-settings #edit-custom-link-four .form-type-textfield, #user-details-admin-settings #edit-custom-link-five .form-type-textfield {
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 2px solid;
}
#user-details-admin-settings #edit-custom-link-one .form-item-user-details-loggedin-customlinkone-imgtitle, #user-details-admin-settings #edit-custom-link-two .form-item-user-details-loggedin-customlinkone-imgtitle, #user-details-admin-settings #edit-custom-link-three .form-item-user-details-loggedin-customlinkone-imgtitle, #user-details-admin-settings #edit-custom-link-four .form-item-user-details-loggedin-customlinkone-imgtitle, #user-details-admin-settings #edit-custom-link-five .form-item-user-details-loggedin-customlinkone-imgtitle {
padding-bottom: 0;
margin-bottom: 0;
border-bottom: 0 none;
}

View File

@@ -0,0 +1,47 @@
/**
* @file
* This file handles all the styling needed for the "User Details: logged-in user" block.
*/
/**
* Block Styling
*/
#user-details #authored .avatar {
text-align: center;
}
#user-details #authored .title {
float: left;
margin-right: 5px;
font-weight: bold;
}
#user_details #authored .result {
font-style: italic;
}
#user-details #authored .user-quick-links div {
float: left;
padding-right: 5px;
}
#user-details #authored .user-quick-links div.title {
float: none;
font-weight: bold;
margin-bottom: 5px;
text-align: center;
text-decoration: underline;
}
#user-details #authored .content {
clear: both;
}
#user-details #authored .content .title {
float: none;
text-align: center;
text-decoration: underline;
}
#user-details #authored .content ul, #user-details #authored .content ol {
list-style: disc inside none;
margin: 0;
padding: 0;
}
#user-details #authored .block-end {
clear: both;
float: none;
}

View File

@@ -0,0 +1,51 @@
/**
* @file
* This file handles all the styling needed for the "User Details: logged-in user" block.
*/
/**
* Block Styling
*/
#user-details #loggedin .avatar {
text-align: center;
}
#user-details #loggedin .title {
float: left;
margin-right: 5px;
font-weight: bold;
}
#user-details #loggedin .result {
font-style: italic;
}
#user-details #loggedin .user-quick-links div {
float: left;
padding-right: 5px;
}
#user-details #loggedin .user-quick-links div.title, #user-details #loggedin .admin-quick-links div.title {
float: none;
font-weight: bold;
margin-bottom: 5px;
text-align: center;
text-decoration: underline;
}
#user-details #loggedin .admin-quick-links div {
float: left;
padding-right: 5px;
}
#user-details #loggedin .content {
clear: both;
}
#user-details #loggedin .content .title {
float: none;
text-align: center;
text-decoration: underline;
}
#user-details #loggedin .content ul, #user-details #loggedin .content ol {
list-style: disc inside none;
margin: 0;
padding: 0;
}
#user-details #loggedin .block-end {
clear: both;
float: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,84 @@
<?php
GLOBAL $user;
/**
* @file
* Default theme implementation to present all variables to the theme layer for
* the logged-in user block of the user_details module.
*
* Useable variables: (syntax: <?php print variable; ?>)
* - $user_details_authored_name (user name of the logged-in user)
* - $user_details_authored_avatar (user avatar of the logged-in user)
* - $user_details_authored_joined (logged-in user's account creation date)
* - $user_details_authored_postcount (number of posts the logged-in user has created)
* - $user_details_authored_points (number of user points the logged-in user has)
* - $user_details_authored_rank (logged-in user's user role)
* - $user_details_authored_content (logged-in user's 3 most recently updated pieces of content)
* - $user_details_authored_profilelink (link to the logged-in users profile)
* - $user_details_authored_subscriptionslink (link to the logged-in user's subscription overview tab on thier profile)
* - $user_details_authored_createlink (link to the create content page)
* - $user_details_authored_logoutlink (link to logout the logged-in user)
*/
?>
<div id="user-details">
<div id="authored">
<?php if (variable_get('user_details_authored_avatar_display') != 0): ?>
<div class="avatar"><?php print $user_details_authored_avatar; ?></div>
<?php endif; ?>
<?php if (variable_get('user_details_authored_joined_display')!= 0): ?>
<div class="joined">
<div class="title"><?php print $user_details_authored_joined_title; ?>:</div>
<div class="result"><?php print $user_details_authored_joined_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_authored_postcount_display') != 0): ?>
<div class="posts-count">
<div class="title"><?php print $user_details_authored_postcount_title; ?>:</div>
<div class="result"><?php print $user_details_authored_postcount_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_authored_points_display') != 0 && module_exists('userpoints')): ?>
<div class="points">
<div class="title"><?php print $user_details_authored_points_title; ?>:</div>
<div class="result"><?php print $user_details_authored_points_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_authored_rank_display') != 0): ?>
<div class="rank">
<div class="title"><?php print $user_details_authored_rank_title; ?>:</div>
<div class="result"><?php print $user_details_authored_rank_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_authored_stats_hr_display') != 0): ?>
<?php print $user_details_authored_stats_hr; ?>
<?php endif; ?>
<?php if (variable_get('user_details_authored_profilelink_display') != 0 || variable_get('user_details_authored_privatemsglink_display') != 0 && module_exists('privatemsg')): ?>
<div class="user-quick-links">
<div class="title">User Links</div>
<?php if (variable_get('user_details_authored_profilelink_display') != 0): ?>
<div class="profile-link">
<a href="<?php print $user_details_authored_profilelink_url; ?>"><img src="<?php print $user_details_authored_profilelink_imgsrc; ?>" title="<?php print $user_details_authored_profilelink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_authored_privatemsglink_display') != 0): ?>
<div class="privatemsg-link">
<a href="<?php print $user_details_authored_privatemsglink_url; ?>"><img src="<?php print $user_details_authored_privatemsglink_imgsrc; ?>" title="<?php print $user_details_authored_privatemsglink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
</div>
<div class="block-end"></div>
<?php endif; ?>
<?php if (variable_get('user_details_authored_links_hr_display') != 0): ?>
<?php print $user_details_authored_links_hr; ?>
<?php endif; ?>
<?php if (variable_get('user_details_authored_content_display') != 0 && variable_get('user_details_authored_content_amount') != 0): ?>
<div class="content">
<div class="title">Author's Content</div>
<ul class="result">
<?php print $user_details_authored_content; ?>
</ul>
</div>
<?php endif; ?>
<div class="block-end"></div>
</div>
</div>

View File

@@ -0,0 +1,188 @@
<?php
GLOBAL $user;
/**
* @file
* Default theme implementation to present all variables to the theme layer for
* the logged-in user block of the user_details module.
*
* Useable variables: (syntax: <?php print variable; ?>)
* - $user_details_loggedin_name (user name of the logged-in user)
* - $user_details_loggedin_avatar (user avatar of the logged-in user)
* - $user_details_loggedin_joined (logged-in user's account creation date)
* - $user_details_loggedin_postcount (number of posts the logged-in user has created)
* - $user_details_loggedin_points (number of user points the logged-in user has)
* - $user_details_loggedin_rank (logged-in user's user role)
* - $user_details_loggedin_content (logged-in user's 3 most recently updated pieces of content)
* - $user_details_loggedin_profilelink (link to the logged-in users profile)
* - $user_details_loggedin_subscriptionslink (link to the logged-in user's subscription overview tab on thier profile)
* - $user_details_loggedin_createlink (link to the create content page)
* - $user_details_loggedin_logoutlink (link to logout the logged-in user)
*/
?>
<div id="user-details">
<div id="loggedin">
<?php if (variable_get('user_details_loggedin_avatar_display') != 0): ?>
<div class="avatar"><?php print $user_details_loggedin_avatar; ?></div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_joined_display')!= 0): ?>
<div class="joined">
<div class="title"><?php print $user_details_loggedin_joined_title; ?>:</div>
<div class="result"><?php print $user_details_loggedin_joined_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_postcount_display') != 0): ?>
<div class="posts-count">
<div class="title"><?php print $user_details_loggedin_postcount_title; ?>:</div>
<div class="result"><?php print $user_details_loggedin_postcount_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_points_display') != 0 && module_exists('userpoints')): ?>
<div class="points">
<div class="title"><?php print $user_details_loggedin_points_title; ?>:</div>
<div class="result"><?php print $user_details_loggedin_points_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_privatemsg_display') != 0 && module_exists('privatemsg')): ?>
<div class="private-message-count">
<div class="title"><?php print $user_details_loggedin_privatemsg_count_title; ?>:</div>
<div class="result"><?php print $user_details_loggedin_privatemsg_count_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_rank_display') != 0): ?>
<div class="rank">
<div class="title"><?php print $user_details_loggedin_rank_title; ?>:</div>
<div class="result"><?php print $user_details_loggedin_rank_result; ?></div>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_stats_hr_display') != 0): ?>
<?php print $user_details_loggedin_stats_hr; ?>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_frontlink_display') != 0 || variable_get('user_details_loggedin_profilelink_display') != 0 || variable_get('user_details_loggedin_profileeditlink_display') != 0 || variable_get('user_details_loggedin_privatemsglink_display') != 0 && module_exists('privatemsg') || variable_get('user_details_loggedin_createlink_display') != 0 || variable_get('user_details_loggedin_customlinkone_type') == '2' || variable_get('user_details_loggedin_customlinktwo_type') == '2' || variable_get('user_details_loggedin_customlinkthree_type') == '2' || variable_get('user_details_loggedin_customlinkfour_type') == '2' || variable_get('user_details_loggedin_customlinkfive_type') == '2'): ?>
<div class="user-quick-links">
<div class="title">User Links</div>
<?php if (variable_get('user_details_loggedin_frontlink_display') != 0): ?>
<div class="front-link">
<a href="<?php print $user_details_loggedin_frontlink_url; ?>"><img src="<?php print $user_details_loggedin_frontlink_imgsrc; ?>" title="<?php print $user_details_loggedin_frontlink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_profilelink_display') != 0): ?>
<div class="profile-link">
<a href="<?php print $user_details_loggedin_profilelink_url; ?>"><img src="<?php print $user_details_loggedin_profilelink_imgsrc; ?>" title="<?php print $user_details_loggedin_profilelink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_profileeditlink_display') != 0): ?>
<div class="profileedit-link">
<a href="<?php print $user_details_loggedin_profileeditlink_url; ?>"><img src="<?php print $user_details_loggedin_profileeditlink_imgsrc; ?>" title="<?php print $user_details_loggedin_profileeditlink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_privatemsglink_display') != 0): ?>
<div class="privatemsg-link">
<a href="<?php print $user_details_loggedin_privatemsglink_url; ?>"><img src="<?php print $user_details_loggedin_privatemsglink_imgsrc; ?>" title="<?php print $user_details_loggedin_privatemsglink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_createlink_display') != 0): ?>
<div class="create-link">
<a href="<?php print $user_details_loggedin_createlink_url; ?>"><img src="<?php print $user_details_loggedin_createlink_imgsrc; ?>" title="<?php print $user_details_loggedin_createlink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_logoutlink_display') != 0): ?>
<div class="logout-link">
<a href="<?php print $user_details_loggedin_logoutlink_url; ?>"><img src="<?php print $user_details_loggedin_logoutlink_imgsrc; ?>" title="<?php print $user_details_loggedin_logoutlink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinkone_type') == '2'): ?>
<div class="custom-link-one">
<a href="<?php print $user_details_loggedin_customlinkone_url; ?>"><img src="<?php print $user_details_loggedin_customlinkone_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinkone_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinktwo_type') == '2'): ?>
<div class="custom-link-two">
<a href="<?php print $user_details_loggedin_customlinktwo_url; ?>"><img src="<?php print $user_details_loggedin_customlinktwo_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinktwo_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinkthree_type') == '2'): ?>
<div class="custom-link-three">
<a href="<?php print $user_details_loggedin_customlinkthree_url; ?>"><img src="<?php print $user_details_loggedin_customlinkthree_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinkthree_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinkfour_type') == '2'): ?>
<div class="custom-link-four">
<a href="<?php print $user_details_loggedin_customlinkfour_url; ?>"><img src="<?php print $user_details_loggedin_customlinkfour_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinkfour_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinkfive_type') == '2'): ?>
<div class="custom-link-five">
<a href="<?php print $user_details_loggedin_customlinkfive_url; ?>"><img src="<?php print $user_details_loggedin_customlinkfive_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinkfive_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
</div>
<div class="block-end"></div>
<?php endif; ?>
<?php if (user_access('administor content')): ?>
<?php if (variable_get('user_details_loggedin_adminlink_display') !=0 || variable_get('user_details_loggedin_panelslink_display') != 0 && module_exists('panels') || variable_get('user_details_loggedin_viewslink_display') && module_exists('views') || variable_get('user_details_loggedin customlinkone_type') == '3' || variable_get('user_details_loggedin customlinktwo_type') == '3' || variable_get('user_details_loggedin customlinkthree_type') == '3' || variable_get('user_details_loggedin customlinkfour_type') == '3' || variable_get('user_details_loggedin customlinkfive_type') == '3'): ?>
<div class="admin-quick-links">
<div class="title">Admin Links</div>
<?php if (variable_get('user_details_loggedin_adminlink_display') != 0): ?>
<div class="admin-link">
<a href="<?php print $user_details_loggedin_adminlink_url; ?>"><img src="<?php print $user_details_loggedin_adminlink_imgsrc; ?>" title="<?php print $user_details_loggedin_adminlink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_panelslink_display') != 0 && module_exists('panels')): ?>
<div class="panels-link">
<a href="<?php print $user_details_loggedin_panelslink_url; ?>"><img src="<?php print $user_details_loggedin_panelslink_imgsrc; ?>" title="<?php print $user_details_loggedin_panelslink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_viewslink_display') != 0 && module_exists('views')): ?>
<div class="views-link">
<a href="<?php print $user_details_loggedin_viewslink_url; ?>"><img src="<?php print $user_details_loggedin_viewslink_imgsrc; ?>" title="<?php print $user_details_loggedin_viewslink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_performancelink_display') != 0): ?>
<div class="performance-link">
<a href="<?php print $user_details_loggedin_performancelink_url; ?>"><img src="<?php print $user_details_loggedin_performancelink_imgsrc; ?>" title="<?php print $user_details_loggedin_performancelink_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinkone_type') == '3'): ?>
<div class="custom-link-one">
<a href="<?php print $user_details_loggedin_customlinkone_url; ?>"><img src="<?php print $user_details_loggedin_customlinkone_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinkone_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinktwo_type') == '3'): ?>
<div class="custom-link-two">
<a href="<?php print $user_details_loggedin_customlinktwo_url; ?>"><img src="<?php print $user_details_loggedin_customlinktwo_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinktwo_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinkthree_type') == '3'): ?>
<div class="custom-link-three">
<a href="<?php print $user_details_loggedin_customlinkthree_url; ?>"><img src="<?php print $user_details_loggedin_customlinkthree_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinkthree_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinkfour_type') == '3'): ?>
<div class="custom-link-four">
<a href="<?php print $user_details_loggedin_customlinkfour_url; ?>"><img src="<?php print $user_details_loggedin_customlinkfour_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinkfour_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_customlinkfive_type') == '3'): ?>
<div class="custom-link-one">
<a href="<?php print $user_details_loggedin_customlinkfive_url; ?>"><img src="<?php print $user_details_loggedin_customlinkfive_imgsrc; ?>" title="<?php print $user_details_loggedin_customlinkfive_imgtitle; ?>" width="20px" height="20px" /></a>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="block-end"></div>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_links_hr_display') != 0): ?>
<?php print $user_details_loggedin_links_hr; ?>
<?php endif; ?>
<?php if (variable_get('user_details_loggedin_content_display') != 0 && variable_get('user_details_loggedin_content_amount') != 0): ?>
<div class="content">
<div class="title">My Content</div>
<ul class="result">
<?php print $user_details_loggedin_content; ?>
</ul>
</div>
<?php endif; ?>
<div class="block-end"></div>
</div>
</div>

View File

@@ -0,0 +1,14 @@
name = User Details
description = Uses the user variables to create a block of stats and links.
core = 7.x
stylesheets[all][] = user_details.css
package = "User interface"
configure = admin/config/user-interface/user-details
help = admin/help#user_details
; Information added by drupal.org packaging script on 2012-03-14
version = "7.x-2.5"
core = "7.x"
project = "user_details"
datestamp = "1331742945"

View File

@@ -0,0 +1,102 @@
<?php
/**
* @file
* Installation file for User Details.
*/
/**
* Implements hook_uninstall().
*/
function user_details_uninstall() {
variable_del('user_details_loggedin_avatar_display');
variable_del('user_details_loggedin_points_display');
variable_del('user_details_loggedin_joined_display');
variable_del('user_details_loggedin_postcount_display');
variable_del('user_details_loggedin_rank_display');
variable_del('user_details_loggedin_stats_hr_display');
variable_del('user_details_loggedin_privatemsg_display');
variable_del('user_details_loggedin_frontlink_display');
variable_del('user_details_loggedin_frontlink_imgsrc');
variable_del('user_details_loggedin_profilelink_display');
variable_del('user_details_loggedin_profilelink_imgsrc');
variable_del('user_details_loggedin_profileeditlink_display');
variable_del('user_details_loggedin_profileeditlink_imgsrc');
variable_del('user_details_loggedin_privatemsglink_display');
variable_del('user_details_loggedin_privatemsglink_imgsrc');
variable_del('user_details_loggedin_createlink_display');
variable_del('user_details_loggedin_createlink_imgsrc');
variable_del('user_details_loggedin_adminlink_display');
variable_del('user_details_loggedin_adminlink_imgsrc');
variable_del('user_details_loggedin_panelslink_display');
variable_del('user_details_loggedin_panelslink_imgsrc');
variable_del('user_details_loggedin_viewslink_display');
variable_del('user_details_loggedin_viewslink_imgsrc');
variable_del('user_details_loggedin_performancelink_display');
variable_del('user_details_loggedin_performancelink_imgsrc');
variable_del('user_details_loggedin_logoutlink_display');
variable_del('user_details_loggedin_logoutlink_imgsrc');
variable_del('user_details_loggedin_customlinkone_type');
variable_del('user_details_loggedin_customlinkone_url');
variable_del('user_details_loggedin_customlinkone_imgsrc');
variable_del('user_details_loggedin_customlinkone_imgtitle');
variable_del('user_details_loggedin_customlinktwo_type');
variable_del('user_details_loggedin_customlinktwo_url');
variable_del('user_details_loggedin_customlinktwo_imgsrc');
variable_del('user_details_loggedin_customlinkthree_type');
variable_del('user_details_loggedin_customlinkthree_url');
variable_del('user_details_loggedin_customlinkthree_imgsrc');
variable_del('user_details_loggedin_customlinkthree_imgtitle');
variable_del('user_details_loggedin_customlinkfour_type');
variable_del('user_details_loggedin_customlinkfour_url');
variable_del('user_details_loggedin_customlinkfour_imgsrc');
variable_del('user_details_loggedin_customlinkfour_imgtitle');
variable_del('user_details_loggedin_customlinkfive_type');
variable_del('user_details_loggedin_customlinkfive_url');
variable_del('user_details_loggedin_customlinkfive_imgsrc');
variable_del('user_details_loggedin_customlinkfive_imgtitle');
variable_del('user_details_loggedin_links_hr_display');
variable_del('user_details_loggedin_content_display');
variable_del('user_details_loggedin_content_amount');
variable_del('user_details_authored_avatar_display');
variable_del('user_details_authored_points_display');
variable_del('user_details_authored_joined_display');
variable_del('user_details_authored_postcount_display');
variable_del('user_details_authored_rank_display');
variable_del('user_details_authored_stats_hr_display');
variable_del('user_details_authored_profilelink_display');
variable_del('user_details_authored_profilelink_imgsrc');
variable_del('user_details_authored_privatemsglink_display');
variable_del('user_details_authored_privatemsglink_imgsrc');
variable_del('user_details_authored_links_hr_display');
variable_del('user_details_authored_content_display');
variable_del('user_details_authored_content_amount');
/** removing old variables **/
variable_del('user_details_loggedin_visibility');
variable_del('user_details_loggedin_subscriptionslink');
variable_del('user_details_loggedin_profilelink_reset');
variable_del('user_details_loggedin_profileeditlink');
variable_del('user_details_loggedin_privatemsg_count');
variable_del('user_details_loggedin_privatemsglink');
variable_del('user_details_loggedin_iconcolor');
variable_del('user_details_loggedin_customlinktwo_user');
variable_del('user_details_loggedin_customlinktwo_imgtitle');
variable_del('user_details_loggedin_customlinktwo');
variable_del('user_details_loggedin_customlinkthree');
variable_del('user_details_loggedin_customlinkone');
variable_del('user_details_loggedin_customlinkfour');
variable_del('user_details_loggedin_customlinkfive');
variable_del('user_details_loggedin_contentamount');
variable_del('user_details_loggedin_adminlink');
variable_del('user_details_loggedin_rank');
variable_del('user_details_loggedin_profilelink');
variable_del('user_details_authored_rank');
variable_del('user_details_authored_profilelink');
variable_del('user_details_authored_privatemsglink');
variable_del('user_details_authored_postcount');
variable_del('user_details_authored_points');
variable_del('user_details_authored_joined');
variable_del('user_details_authored_contentamount');
variable_del('user_details_authored_content');
variable_del('user_details_authored_avatar');
}

View File

@@ -0,0 +1,637 @@
<?php
/**
* @file
* Block functions.
*
* Contains all the functions to run the "User Details" blocks.
*/
/**
* Implements of hook_help().
*
* Creates a basic help page(accessible from the modules page).
*/
function user_details_help($path, $arg) {
$output = '';
switch ($path) {
case "admin/help#user_details":
require_once drupal_get_path('module', 'user_details') .'/user_details_help.inc';
$output = drupal_render(drupal_get_form('user_details_help_form'));
}
return $output;
}
/**
* Implements hook_menu().
*/
function user_details_menu() {
$items['admin/config/user-interface/user-details'] = array(
'title' => 'User Details',
'description' => 'Configure user Details.',
'page callback' => 'drupal_get_form',
'page arguments' => array('user_details_admin_settings'),
'access arguments' => array('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
'file' => 'user_details_admin_settings.inc',
);
return $items;
}
/**
* Implements hook_theme().
*
* Adds the template and variables needed to have the blocks run through a
* template file.
*/
function user_details_theme() {
return array(
'user_details_loggedin' => array(
'template' => 'templates/user-details-loggedin',
'variables' => array(
'user_details_loggedin_avatar' => NULL,
'user_details_loggedin_points_title' => NULL,
'user_details_loggedin_points_result' => NULL,
'user_details_loggedin_joined_title' => NULL,
'user_details_loggedin_joined_result' => NULL,
'user_details_loggedin_postcount_title' => NULL,
'user_details_loggedin_postcount_result' => NULL,
'user_details_loggedin_rank_title' => NULL,
'user_details_loggedin_rank_result' => NULL,
'user_details_loggedin_privatemsg_title' => NULL,
'user_details_loggedin_privatemsg_result' => NULL,
'user_details_loggedin_stats_hr' => NULL,
'user_details_loggedin_frontlink_url' => NULL,
'user_details_loggedin_frontlink_imgsrc' => NULL,
'user_details_loggedin_frontlink_imgtitle' => NULL,
'user_details_loggedin_profilelink_url' => NULL,
'user_details_loggedin_profilelink_imgsrc' => NULL,
'user_details_loggedin_profilelink_imgtitle' => NULL,
'user_details_loggedin_profileeditlink_url' => NULL,
'user_details_loggedin_profileeditlink_imgsrc' => NULL,
'user_details_loggedin_profileeditlink_imgtitle' => NULL,
'user_details_loggedin_privatemsglink_url' => NULL,
'user_details_loggedin_privatemsglink_imgsrc' => NULL,
'user_details_loggedin_privatemsglink_imgtitle' => NULL,
'user_details_loggedin_createlink_url' => NULL,
'user_details_loggedin_createlink_imgsrc' => NULL,
'user_details_loggedin_createlink_imgtitle' => NULL,
'user_details_loggedin_adminlink_url' => NULL,
'user_details_loggedin_adminlink_imgsrc' => NULL,
'user_details_loggedin_adminlink_imgtitle' => NULL,
'user_details_loggedin_panelslink_url' => NULL,
'user_details_loggedin_panelslink_imgsrc' => NULL,
'user_details_loggedin_panelslink_imgtitle' => NULL,
'user_details_loggedin_viewslink_url' => NULL,
'user_details_loggedin_viewslink_imgsrc' => NULL,
'user_details_loggedin_viewslink_imgtitle' => NULL,
'user_details_loggedin_performancelink_url' => NULL,
'user_details_loggedin_performancelink_imgsrc' => NULL,
'user_details_loggedin_performancelink_imgtitle' => NULL,
'user_details_loggedin_logoutlink_url' => NULL,
'user_details_loggedin_logoutlink_imgsrc' => NULL,
'user_details_loggedin_logoutlink_imgtitle' => NULL,
'user_details_loggedin_customlinkone_type' => NULL,
'user_details_loggedin_customlinkone_url' => NULL,
'user_details_loggedin_customlinkone_imgsrc' => NULL,
'user_details_loggedin_customlinkone_imgtitle' => NULL,
'user_details_loggedin_customlinktwo_url' => NULL,
'user_details_loggedin_customlinktwo_imgsrc' => NULL,
'user_details_loggedin_customlinktwo_imgtitle' => NULL,
'user_details_loggedin_customlinkthree_url' => NULL,
'user_details_loggedin_customlinkthree_imgsrc' => NULL,
'user_details_loggedin_customlinkthree_imgtitle' => NULL,
'user_details_loggedin_customlinkfour_url' => NULL,
'user_details_loggedin_customlinkfour_imgsrc' => NULL,
'user_details_loggedin_customlinkfour_imgtitle' => NULL,
'user_details_loggedin_customlinkfive_url' => NULL,
'user_details_loggedin_customlinkfive_imgsrc' => NULL,
'user_details_loggedin_customlinkfive_imgtitle' => NULL,
'user_details_loggedin_links_hr' => NULL,
'user_details_loggedin_content' => NULL,
),
),
'user_details_authored' => array(
'template' => 'templates/user-details-authored',
'variables' => array(
'user_details_authored_avatar' => NULL,
'user_details_authored_joined_title' => NULL,
'user_details_authored_joined_result' => NULL,
'user_details_loggedin_postcount_title' => NULL,
'user_details_loggedin_postcount_result' => NULL,
'user_details_authored_points_title' => NULL,
'user_details_authored_points_result' => NULL,
'user_details_authored_rank_title' => NULL,
'user_details_authored_rank_result' => NULL,
'user_details_authored_stats_hr' => NULL,
'user_details_authored_profilelink_url' => NULL,
'user_details_authored_profilelink_imgsrc' => NULL,
'user_details_authored_profilelink_imgtitle' => NULL,
'user_details_authored_privatemsglink_url' => NULL,
'user_details_authored_privatemsglink_imgsrc' => NULL,
'user_details_authored_privatemsglink_imgtitle' => NULL,
'user_details_authored_links_hr' => NULL,
'user_details_authored_content' => NULL,
),
),
);
}
/**
* Implements hook_block_save().
*
* Sends all the checkbox(options) variables to the database to be stored.
*/
function user_details_block_save($delta = '', $edit = array()) {
if ($delta == 'loggedin') {
variable_set('user_details_loggedin_avatar_display', $edit['user_details_loggedin_avatar_display']);
variable_set('user_details_loggedin_points_display', $edit['user_details_loggedin_points_display']);
variable_set('user_details_loggedin_joined_display', $edit['user_details_loggedin_joined_display']);
variable_set('user_details_loggedin_postcount_display', $edit['user_details_loggedin_postcount_display']);
variable_set('user_details_loggedin_rank_display', $edit['user_details_loggedin_rank_display']);
variable_set('user_details_loggedin_stats_hr_display', $edit['user_details_loggedin_stats_hr_display']);
variable_set('user_details_loggedin_privatemsg_display', $edit['user_details_loggedin_privatemsg_display']);
variable_set('user_details_loggedin_frontlink_display', $edit['user_details_loggedin_frontlink_display']);
variable_set('user_details_loggedin_frontlink_imgsrc', $edit['user_details_loggedin_frontlink_imgsrc']);
variable_set('user_details_loggedin_profilelink_display', $edit['user_details_loggedin_profilelink_display']);
variable_set('user_details_loggedin_profilelink_imgsrc', $edit['user_details_loggedin_profilelink_imgsrc']);
variable_set('user_details_loggedin_profileeditlink_display', $edit['user_details_loggedin_profileeditlink_display']);
variable_set('user_details_loggedin_profileeditlink_imgsrc', $edit['user_details_loggedin_profileeditlink_imgsrc']);
variable_set('user_details_loggedin_privatemsglink_display', $edit['user_details_loggedin_privatemsglink_display']);
variable_set('user_details_loggedin_privatemsglink_imgsrc', $edit['user_details_loggedin_privatemsglink_imgsrc']);
variable_set('user_details_loggedin_createlink_display', $edit['user_details_loggedin_createlink_display']);
variable_set('user_details_loggedin_createlink_imgsrc', $edit['user_details_loggedin_createlink_imgsrc']);
variable_set('user_details_loggedin_adminlink_display', $edit['user_details_loggedin_adminlink_display']);
variable_set('user_details_loggedin_adminlink_imgsrc', $edit['user_details_loggedin_adminlink_imgsrc']);
variable_set('user_details_loggedin_panelslink_display', $edit['user_details_loggedin_panelslink_display']);
variable_set('user_details_loggedin_panelslink_imgsrc', $edit['user_details_loggedin_panelslink_imgsrc']);
variable_set('user_details_loggedin_viewslink_display', $edit['user_details_loggedin_panelslink_display']);
variable_set('user_details_loggedin_viewslink_imgsrc', $edit['user_details_loggedin_panelslink_imgsrc']);
variable_set('user_details_loggedin_performancelink_display', $edit['user_details_loggedin_performancelink_display']);
variable_set('user_details_loggedin_performancelink_imgsrc', $edit['user_details_loggedin_performancelink_imgsrc']);
variable_set('user_details_loggedin_logoutlink_display', $edit['user_details_loggedin_logoutlink_display']);
variable_set('user_details_loggedin_logoutlink_imgsrc', $edit['user_details_loggedin_logoutlink_imgsrc']);
variable_set('user_details_loggedin_customlinkone_type', $edit['user_details_loggedin_customlinkone_type']);
variable_set('user_details_loggedin_customlinkone_url', $edit['user_details_loggedin_customlinkone_url']);
variable_set('user_details_loggedin_customlinkone_imgsrc', $edit['user_details_loggedin_customlinkone_imgsrc']);
variable_set('user_details_loggedin_customlinkone_imgtitle', $edit['user_details_loggedin_customlinkone_imgtitle']);
variable_set('user_details_loggedin_customlinktwo_type', $edit['user_details_loggedin_customlinktwo_type']);
variable_set('user_details_loggedin_customlinktwo_url', $edit['user_details_loggedin_customlinktwo_url']);
variable_set('user_details_loggedin_customlinktwo_imgsrc', $edit['user_details_loggedin_customlinktwo_imgsrc']);
variable_set('user_details_loggedin_customlinkthree_type', $edit['user_details_loggedin_customlinkthree_type']);
variable_set('user_details_loggedin_customlinkthree_url', $edit['user_details_loggedin_customlinkthree_url']);
variable_set('user_details_loggedin_customlinkthree_imgsrc', $edit['user_details_loggedin_customlinkthree_imgsrc']);
variable_set('user_details_loggedin_customlinkthree_imgtitle', $edit['user_details_loggedin_customlinkthree_imgtitle']);
variable_set('user_details_loggedin_customlinkfour_type', $edit['user_details_loggedin_customlinkfour_type']);
variable_set('user_details_loggedin_customlinkfour_url', $edit['user_details_loggedin_customlinkfour_url']);
variable_set('user_details_loggedin_customlinkfour_imgsrc', $edit['user_details_loggedin_customlinkfour_imgsrc']);
variable_set('user_details_loggedin_customlinkfour_imgtitle', $edit['user_details_loggedin_customlinkfour_imgtitle']);
variable_set('user_details_loggedin_customlinkfive_type', $edit['user_details_loggedin_customlinkfive_type']);
variable_set('user_details_loggedin_customlinkfive_url', $edit['user_details_loggedin_customlinkfive_url']);
variable_set('user_details_loggedin_customlinkfive_imgsrc', $edit['user_details_loggedin_customlinkfive_imgsrc']);
variable_set('user_details_loggedin_customlinkfive_imgtitle', $edit['user_details_loggedin_customlinkfive_imgtitle']);
variable_set('user_details_loggedin_links_hr_display', $edit['user_details_loggedin_links_hr_display']);
variable_set('user_details_loggedin_content_display', $edit['user_details_loggedin_content_display']);
variable_set('user_details_loggedin_content_amount', $edit['user_details_loggedin_content_amount']);
}
if ($delta == 'authored') {
variable_set('user_details_authored_avatar_display', $edit['user_details_authored_avatar_display']);
variable_set('user_details_authored_points_display', $edit['user_details_authored_points_display']);
variable_set('user_details_authored_joined_display', $edit['user_details_authored_joined_display']);
variable_set('user_details_authored_postcount_display', $edit['user_details_authored_postcount_display']);
variable_set('user_details_authored_rank_display', $edit['user_details_authored_rank_display']);
variable_set('user_details_authored_stats_hr_display', $edit['user_details_authored_stats_hr_display']);
variable_set('user_details_authored_profilelink_display', $edit['user_details_authored_profilelink_display']);
variable_set('user_details_authored_profilelink_imgsrc', $edit['user_details_authored_profilelink_imgsrc']);
variable_set('user_details_authored_privatemsglink_display', $edit['user_details_authored_privatemsglink_display']);
variable_set('user_details_authored_privatemsglink_imgsrc', $edit['user_details_authored_privatemsglink_imgsrc']);
variable_set('user_details_authored_links_hr_display', $edit['user_details_authored_links_hr_display']);
variable_set('user_details_authored_content_display', $edit['user_details_authored_content_display']);
variable_set('user_details_authored_content_amount', $edit['user_details_authored_content_amount']);
}
return;
}
/**
* Implements hook_block_info().
*
* Creates the title of the block for the block list page.
*/
function user_details_block_info() {
$blocks['loggedin']['info'] = t('User Details: logged-in user');
$blocks['authored']['info'] = t('User Details: authored user');
return $blocks;
}
/**
* Implements hook_block_view().
*
* Creates the block title and content.
*/
function user_details_block_view($delta = '') {
global $user;
if (arg(0) == 'node' && is_numeric(arg(1))) {
$node_load = node_load(arg(1));
$uid = $node_load->uid;
$user_load = user_load($uid);
}
if (arg(0) == 'user' && is_numeric(arg(1))) {
$user_arg = user_load(arg(1));
$uid = $user_arg->uid;
$user_load = user_load($uid);
}
switch ($delta) {
case 'loggedin':
if ($user->uid != 0) {
$block['subject'] = t('%name', array('%name' => $user->name));
$block['content'] = user_details_loggedin_block_content();
return $block;
}
else {
return;
}
case 'authored':
$block['subject'] = t('%name', array('%name' => $user_load->name));
$block['content'] = user_details_authored_block_content();
return $block;
}
}
/**
* Process variables for user-details-loggedin.tpl.php.
*
* This function takes the result of the stored variable(options checkbox) and
* creates a variable result from it.
*/
function template_preprocess_user_details_loggedin(&$variables) {
global $user;
$co = $output = NULL;
drupal_add_css(drupal_get_path('module', 'user_details') . '/css/user_details_loggedin.css');
if (variable_get('user_details_loggedin_avatar_display') !=0) {
$variables['user_details_loggedin_avatar'] = theme('user_picture', array('account' => $user));
}
if (variable_get('user_details_loggedin_joined_display') != 0) {
$user_details_loggedin_date = date('c', $user->created);
$variables['user_details_loggedin_joined_title'] = t('Joined');
$variables['user_details_loggedin_joined_result'] = date('M j, Y', strtotime($user_details_loggedin_date));
}
if (variable_get('user_details_loggedin_postcount_display') != 0) {
$user_details_loggedin_postcount_query = db_select('node', 'n');
$user_details_loggedin_postcount_query
->condition('n.uid', $user->uid, '=')
->fields('n', array('uid'));
$variables['user_details_loggedin_postcount_title'] = t('Posts');
$variables['user_details_loggedin_postcount_result'] = t('%postcount', array('%postcount' => $user_details_loggedin_postcount_query->countQuery()->execute()->fetchField()));
}
if (variable_get('user_details_loggedin_points_display') !=0 && module_exists('userpoints')) {
$variables['user_details_loggedin_points_title'] = t('!Points', userpoints_translation());
$variables['user_details_loggedin_points_result'] = userpoints_get_current_points($user->uid, 'all');
}
if (variable_get('user_details_loggedin_rank_display') != 0) {
$user_details_loggedin_rank_query = db_select('users_roles');
$user_details_loggedin_rank_query
->condition('uid', $user->uid, '=')
->fields('users_roles', array('rid'));
$user_details_loggedin_rank_fetchfield = $user_details_loggedin_rank_query->execute()->fetchField();
if (($user_details_loggedin_rank_fetchfield) == NULL) {
$user_details_loggedin_rank_fetchfield = 2;
}
$user_details_loggedin_rankname_query = db_select('role', 'r');
$user_details_loggedin_rankname_query
->condition('rid', $user_details_loggedin_rank_fetchfield, '=')
->fields('r', array('name'));
$user_details_loggedin_rankname_fetchfield = $user_details_loggedin_rankname_query->execute()->fetchField();
$variables['user_details_loggedin_rank_title'] = t('Rank');
$variables['user_details_loggedin_rank_result'] = t('%rank', array('%rank' => $user_details_loggedin_rankname_fetchfield));
}
if (variable_get('user_details_loggedin_privatemsg_display') != 0 && module_exists('privatemsg')) {
$count = privatemsg_unread_count();
$variables['user_details_loggedin_privatemsg_count_title'] = t('New messages');
$variables['user_details_loggedin_privatemsg_count_result'] = t('%rank', array('%rank' => $count));
}
if (variable_get('user_details_loggedin_avatar_display') !=0 && variable_get('user_details_loggedin_stats_hr_display') != 0 || variable_get('user_details_loggedin_joined_display') != 0 && variable_get('user_details_loggedin_stats_hr_display') != 0 || variable_get('user_details_loggedin_postcount_display') != 0 && variable_get('user_details_loggedin_stats_hr_display') != 0 || variable_get('user_details_loggedin_points_display') !=0 && module_exists('userpoints') && variable_get('user_details_loggedin_stats_hr_display') != 0 || variable_get('user_details_loggedin_rank_display') != 0 && variable_get('user_details_loggedin_stats_hr_display') != 0) {
$variables['user_details_loggedin_stats_hr'] = '<hr>';
}
if (variable_get('user_details_loggedin_frontlink_display') != 0) {
$variables['user_details_loggedin_frontlink_url'] = t('/');
$variables['user_details_loggedin_frontlink_imgsrc'] = variable_get('user_details_loggedin_frontlink_imgsrc');
$variables['user_details_loggedin_frontlink_imgtitle'] = t('Front page');
}
if (variable_get('user_details_loggedin_profilelink_display') != 0) {
$variables['user_details_loggedin_profilelink_url'] = t('/user/' . $user->uid);
$variables['user_details_loggedin_profilelink_imgsrc'] = variable_get('user_details_loggedin_profilelink_imgsrc');
$variables['user_details_loggedin_profilelink_imgtitle'] = t('My profile');
}
if (variable_get('user_details_loggedin_profileeditlink_display') != 0) {
$variables['user_details_loggedin_profileeditlink_url'] = t('/user/' . $user->uid . '/edit');
$variables['user_details_loggedin_profileeditlink_imgsrc'] = variable_get('user_details_loggedin_profileeditlink_imgsrc');
$variables['user_details_loggedin_profileeditlink_imgtitle'] = t('Edit my profile');
}
if (variable_get('user_details_loggedin_privatemsglink_display') != 0 && module_exists('privatemsg')) {
$variables['user_details_loggedin_privatemsglink_url'] = t('/messages/' . $user->uid);
$variables['user_details_loggedin_privatemsglink_imgsrc'] = variable_get('user_details_loggedin_privatemsglink_imgsrc');
$variables['user_details_loggedin_privatemsglink_imgtitle'] = t('My private messages');
}
if (variable_get('user_details_loggedin_createlink_display') != 0) {
$variables['user_details_loggedin_createlink_url'] = t('/node/add');
$variables['user_details_loggedin_createlink_imgsrc'] = variable_get('user_details_loggedin_createlink_imgsrc');
$variables['user_details_loggedin_createlink_imgtitle'] = t('Create content');
}
if (variable_get('user_details_loggedin_adminlink_display') != 0 && user_access('administor content')) {
$variables['user_details_loggedin_adminlink_url'] = t('/admin');
$variables['user_details_loggedin_adminlink_imgsrc'] = variable_get('user_details_loggedin_adminlink_imgsrc');
$variables['user_details_loggedin_adminlink_imgtitle'] = t('Admin');
}
if (variable_get('user_details_loggedin_panelslink_display') != 0 && module_exists('panels') && user_access('administor content')) {
$variables['user_details_loggedin_panelslink_url'] = t('/admin/structure/panels');
$variables['user_details_loggedin_panelslink_imgsrc'] = variable_get('user_details_loggedin_panelslink_imgsrc');
$variables['user_details_loggedin_panelslink_imgtitle'] = t('Panels');
}
if (variable_get('user_details_loggedin_viewslink_display') != 0 && module_exists('views') && user_access('administor content')) {
$variables['user_details_loggedin_viewslink_url'] = t('/admin/structure/views');
$variables['user_details_loggedin_viewslink_imgsrc'] = variable_get('user_details_loggedin_viewslink_imgsrc');
$variables['user_details_loggedin_viewslink_imgtitle'] = t('Views');
}
if (variable_get('user_details_loggedin_performancelink_display') != 0 && user_access('administor content')) {
$variables['user_details_loggedin_performancelink_url'] = t('/admin/config/development/performance');
$variables['user_details_loggedin_performancelink_imgsrc'] = variable_get('user_details_loggedin_performancelink_imgsrc');
$variables['user_details_loggedin_performancelink_imgtitle'] = t('Performance');
}
if (variable_get('user_details_loggedin_logoutlink_display') != 0) {
$variables['user_details_loggedin_logoutlink_url'] = t('/user/logout');
$variables['user_details_loggedin_logoutlink_imgsrc'] = variable_get('user_details_loggedin_logoutlink_imgsrc');
$variables['user_details_loggedin_logoutlink_imgtitle'] = t('Logout');
}
if (variable_get('user_details_loggedin_customlinkone_type') != 0) {
$variables['user_details_loggedin_customlinkone_url'] = variable_get('user_details_loggedin_customlinkone_url');
$variables['user_details_loggedin_customlinkone_imgsrc'] = variable_get('user_details_loggedin_customlinkone_imgsrc');
$variables['user_details_loggedin_customlinkone_imgtitle'] = variable_get('user_details_loggedin_customlinkone_imgtitle');
}
if (variable_get('user_details_loggedin_customlinktwo_type') != 0) {
$variables['user_details_loggedin_customlinktwo_url'] = variable_get('user_details_loggedin_customlinktwo_url');
$variables['user_details_loggedin_customlinktwo_imgsrc'] = variable_get('user_details_loggedin_customlinktwo_imgsrc');
$variables['user_details_loggedin_customlinktwo_imgtitle'] = variable_get('user_details_loggedin_customlinktwo_imgtitle');
}
if (variable_get('user_details_loggedin_customlinkthree_type') != 0) {
$variables['user_details_loggedin_customlinkthree_url'] = variable_get('user_details_loggedin_customlinkthree_url');
$variables['user_details_loggedin_customlinkthree_imgsrc'] = variable_get('user_details_loggedin_customlinkthree_imgsrc');
$variables['user_details_loggedin_customlinkthree_imgtitle'] = variable_get('user_details_loggedin_customlinkthree_imgtitle');
}
if (variable_get('user_details_loggedin_customlinkfour_type') != 0) {
$variables['user_details_loggedin_customlinkfour_url'] = variable_get('user_details_loggedin_customlinkfour_url');
$variables['user_details_loggedin_customlinkfour_imgsrc'] = variable_get('user_details_loggedin_customlinkfour_imgsrc');
$variables['user_details_loggedin_customlinkfour_imgtitle'] = variable_get('user_details_loggedin_customlinkfour_imgtitle');
}
if (variable_get('user_details_loggedin_customlinkfive_type') != 0) {
$variables['user_details_loggedin_customlinkfive_url'] = variable_get('user_details_loggedin_customlinkfive_url');
$variables['user_details_loggedin_customlinkfive_imgsrc'] = variable_get('user_details_loggedin_customlinkfive_imgsrc');
$variables['user_details_loggedin_customlinkfive_imgtitle'] = variable_get('user_details_loggedin_customlinkfive_imgtitle');
}
// User links HR
if (variable_get('user_details_loggedin_frontlink_display') != 0 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_profilelink_display') != 0 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_profileeditlink_display') != 0 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_privatemsglink_display') != 0 && module_exists('privatemsg') && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_createlink_display') != 0 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_logoutlink_display') != 0 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinkone_type') == 2 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinktwo_type') == 2 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinkthree_type') == 2 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinkfour_type') == 2 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinkfive_type') == 2 && variable_get('user_details_loggedin_links_hr_display') != 0) {
$variables['user_details_loggedin_links_hr'] = '<hr>';
}
// Admin links HR
if (variable_get('user_details_loggedin_adminlink_display') != 0 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_panelslink_display') != 0 && module_exists('panels') && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_viewslink_display') != 0 && module_exists('views') && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_performancelink_display') != 0 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinkone_type') == 3 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinktwo_type') == 3 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinkthree_type') == 3 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinkfour_type') == 3 && variable_get('user_details_loggedin_links_hr_display') != 0 || variable_get('user_details_loggedin_customlinkfive_type') == 3 && variable_get('user_details_loggedin_links_hr_display') != 0) {
$variables['user_details_loggedin_links_hr'] = '<hr>';
}
if (variable_get('user_details_loggedin_content_amount') !=0 && variable_get('user_details_loggedin_content_display') != 0) {
$user_details_loggedin_content_amount = variable_get('user_details_loggedin_content_amount');
}
if (variable_get('user_details_loggedin_content_display') != 0 && variable_get('user_details_loggedin_content_amount') != 0) {
unset($output);
if ($user->uid) {
// Sql query.
$user_details_loggedin_content_query = db_select('node', 'n');
$user_details_loggedin_content_query
->condition('n.uid', $user->uid, '=')
->fields('n', array('created', 'title', 'nid', 'changed', 'type', 'status'))
->range(0, $user_details_loggedin_content_amount)
->orderBy('changed', 'DESC');
$user_details_loggedin_content_fetchfield = $user_details_loggedin_content_query->execute();
$output = '';
foreach ($user_details_loggedin_content_fetchfield as $user_details_loggedin_content_node ) {
$co++;
$output .= '<li>';
$output .= l($user_details_loggedin_content_node->title, "node/$user_details_loggedin_content_node->nid");
$output .= '</li>';
}
$output .= '';
// Show only if user have made some content.
if ($co>0) {
$variables['user_details_loggedin_content'] = $output;
}
if ($co == 0) {
$variables['user_details_loggedin_content'] = t('No content to list.');
}
}
}
}
/**
* Process variables for user-details-authored.tpl.php.
*
* This function takes the result of the stored variable(options checkbox) and
* creates a variable result from it.
*/
function template_preprocess_user_details_authored(&$variables) {
drupal_add_css(drupal_get_path('module', 'user_details') . '/css/user_details_authored.css');
$img_dir = drupal_get_path('module', 'user_details') . "/images/";
// If the page is a node we need to load the user data from the node ID(nid)
// profile.
$co = $output = NULL;
if (arg(0) == 'node') {
$node_load = node_load(arg(1));
$uid = $node_load->uid;
$user_load = user_load($uid);
}
// If the page is a user profile we need to load the user data from the user profile.
if (arg(0) == 'user') {
$user_arg = user_load(arg(1));
$uid = $user_arg->uid;
$user_load = user_load($uid);
}
if (variable_get('user_details_authored_avatar_display') !=0) {
$variables['user_details_authored_avatar'] = theme('user_picture', array('account' => $user_load));
}
if (variable_get('user_details_authored_joined_display') != 0) {
$user_details_authored_date = date('c', $user_load->created);
$user_details_authored_dateconvert = date('M j, Y', strtotime($user_details_authored_date));
$variables['user_details_authored_joined_title'] = t('Joined');
$variables['user_details_authored_joined_result'] = t('&nbsp;%joined', array('%joined' => $user_details_authored_dateconvert));
}
if (variable_get('user_details_authored_postcount_display') != 0) {
$user_details_authored_postcount_query = db_select('node', 'n');
$user_details_authored_postcount_query
->condition('n.uid', $user_load->uid, '=')
->fields('n', array('uid'));
$user_details_authored_postcount_fetchfield = $user_details_authored_postcount_query->countQuery()->execute()->fetchField();
$variables['user_details_authored_postcount_title'] = t('Posts');
$variables['user_details_authored_postcount_result'] = t('%postcount', array('%postcount' => $user_details_authored_postcount_fetchfield));
}
if (variable_get('user_details_authored_points_display') !=0 && module_exists('userpoints')) {
$variables['user_details_authored_points_title'] = t('!Points', userpoints_translation());
$variables['user_details_authored_points_result'] = userpoints_get_current_points($user_load->uid, 'all');
}
if (variable_get('user_details_authored_rank_display') != 0) {
$user_details_authored_rank_query = db_select('users_roles');
$user_details_authored_rank_query
->condition('uid', $user_load->uid, '=')
->fields('users_roles', array('rid'));
$user_details_authored_rank_fetchfield = $user_details_authored_rank_query->execute()->fetchField();
if (($user_details_authored_rank_fetchfield) == NULL) {
$user_details_authored_rank_fetchfield = 2;
}
$user_details_authored_rankname_query = db_select('role', 'r');
$user_details_authored_rankname_query
->condition('rid', $user_details_authored_rank_fetchfield, '=')
->fields('r', array('name'));
$user_details_authored_rankname_fetchfield = $user_details_authored_rankname_query->execute()->fetchField();
$variables['user_details_authored_rank_title'] = t('Role');
$variables['user_details_authored_rank_result'] = t('%rank', array('%rank' => $user_details_authored_rankname_fetchfield));
}
if (variable_get('user_details_authored_avatar_display') !=0 && variable_get('user_details_authored_stats_hr_display') != 0 || variable_get('user_details_authored_joined_display') != 0 && variable_get('user_details_authored_stats_hr_display') != 0 || variable_get('user_details_authored_postcount_display') != 0 && variable_get('user_details_authored_stats_hr_display') != 0 || variable_get('user_details_authored_points_display') !=0 && module_exists('userpoints') && variable_get('user_details_authored_stats_hr_display') != 0 || variable_get('user_details_authored_rank_display') != 0 && variable_get('user_details_authored_stats_hr_display') != 0) {
$variables['user_details_authored_stats_hr'] = '<hr>';
}
if (variable_get('user_details_authored_profilelink_display') != 0) {
$variables['user_details_authored_profilelink_url'] = t('/user/' . $user_load->uid);
$variables['user_details_authored_profilelink_imgsrc'] = variable_get('user_details_loggedin_profilelink_imgsrc');
$variables['user_details_authored_profilelink_imgtitle'] = t('Author\'s profile');
}
if (variable_get('user_details_authored_privatemsglink_display') != 0 && module_exists('privatemsg')) {
$variables['user_details_authored_privatemsglink_url'] = t('/messages/new/' . $user_load->uid);
$variables['user_details_authored_privatemsglink_imgsrc'] = variable_get('user_details_loggedin_privatemsglink_imgsrc');
$variables['user_details_authored_privatemsglink_imgtitle'] = t('Private message the author');
}
if (variable_get('user_details_authored_profilelink_display') != 0 && variable_get('user_details_authored_links_hr_display') != 0 || variable_get('user_details_authored_privatemsglink_display') != 0 && module_exists('privatemsg') && variable_get('user_details_authored_links_hr_display') != 0) {
$variables['user_details_authored_links_hr'] = '<hr>';
}
if (variable_get('user_details_authored_content_amount') !=0 && variable_get('user_details_authored_content_display') !=0) {
$user_details_authored_content_amount = variable_get('user_details_authored_content_amount');
}
if (variable_get('user_details_authored_content_display') != 0 && variable_get('user_details_authored_content_amount') != 0) {
unset($output);
if ($user_load->uid) {
// Sql query.
$user_details_authored_content_query = db_select('node', 'n');
$user_details_authored_content_query
->condition('n.uid', $user_load->uid, '=')
->fields('n', array('created', 'title', 'nid', 'changed', 'type', 'status'))
->range(0, 3)
->orderBy('changed', 'DESC');
$user_details_authored_content_fetchfield = $user_details_authored_content_query->execute();
$output = '';
foreach ($user_details_authored_content_fetchfield as $user_details_authored_content_node ) {
$co++;
$output .= '<li>';
$output .= l($user_details_authored_content_node->title, "node/$user_details_authored_content_node->nid");
$output .= '</li>';
}
$output .= '';
if ($co>0) {
$variables['user_details_authored_content'] = $output;
}
if ($co == 0) {
$variables['user_details_authored_content'] = t('No content to list.');
}
}
}
}
/**
* Used to push the variables to the theme layer for the "logged-in" block.
*/
function user_details_loggedin_block_content() {
$content = array(
$user_details_loggedin_avatar = 'user_details_loggedin_avatar',
$user_details_loggedin_points_title = 'user_details_loggedin_points_title',
$user_details_loggedin_points_result = 'user_details_loggedin_points_result',
$user_details_loggedin_joined_title = 'user_details_loggedin_joined_title',
$user_details_loggedin_joined_result = 'user_details_loggedin_joined_result',
$user_details_loggedin_postcount_title = 'user_details_loggedin_postcount_title',
$user_details_loggedin_postcount_result = 'user_details_loggedin_postcount_result',
$user_details_loggedin_rank_title = 'user_details_loggedin_rank_title',
$user_details_loggedin_rank_result = 'user_details_loggedin_rank_result',
$user_details_loggedin_privatemsg_count_title = 'user_details_loggedin_privatemsg_title',
$user_details_loggedin_privatemsg_count_result = 'user_details_loggedin_privatemsg_result',
$user_details_loggedin_stats_hr = 'user_details_loggedin_stats_hr',
$user_details_loggedin_frontlink_url = 'user_details_loggedin_profilelink_url',
$user_details_loggedin_frontlink_imgsrc = 'user_details_loggedin_profilelink_imgsrc',
$user_details_loggedin_frontlink_imgtitle = 'user_details_loggedin_profilelink_imgtitle',
$user_details_loggedin_profilelink_url = 'user_details_loggedin_profilelink_url',
$user_details_loggedin_profilelink_imgsrc = 'user_details_loggedin_profilelink_imgsrc',
$user_details_loggedin_profilelink_imgtitle = 'user_details_loggedin_profilelink_imgtitle',
$user_details_loggedin_profileeditlink_url = 'user_details_loggedin_profilelink_url',
$user_details_loggedin_profileeditlink_imgsrc = 'user_details_loggedin_profileeditlink_imgsrc',
$user_details_loggedin_profileeditlink_imgtitle = 'user_details_loggedin_profilelink_imgtitle',
$user_details_loggedin_privatemsglink_url = 'user_details_loggedin_privatemsglink',
$user_details_loggedin_privatemsglink_imgsrc = 'user_details_loggedin_privatemsglink_imgsrc',
$user_details_loggedin_privatemsglink_imgtitle = 'user_details_loggedin_privatemsglinkimgtitle',
$user_details_loggedin_createlink_url = 'user_details_loggedin_createlink_url',
$user_details_loggedin_createlink_imgsrc = 'user_details_loggedin_createlink_imgsrc',
$user_details_loggedin_createlink_imgtitle = 'user_details_loggedin_createlink_imgtitle',
$user_details_loggedin_adminlink_url = 'user_details_loggedin_adminlink_url',
$user_details_loggedin_adminlink_imgsrc = 'user_details_loggedin_adminlink_imgsrc',
$user_details_loggedin_adminlink_imgtitle = 'user_details_loggedin_adminlink_imgtitle',
$user_details_loggedin_panelslink_url = 'user_details_loggedin_panelslink_url',
$user_details_loggedin_panelslink_imgsrc = 'user_details_loggedin_panelslink_imgsrc',
$user_details_loggedin_panelslink_imgtitle = 'user_details_loggedin_panelslink_imgtitle',
$user_details_loggedin_viewslink_url = 'user_details_loggedin_viewslink_url',
$user_details_loggedin_viewslink_imgsrc = 'user_details_loggedin_viewslink_imgsrc',
$user_details_loggedin_viewslink_imgtitle = 'user_details_loggedin_viewslink_imgtitle',
$user_details_loggedin_performancelink_url = 'user_details_loggedin_performancelink_url',
$user_Details_loggedin_performancelink_imgsrc = 'user_details_loggedin_performancelink_imgsrc',
$user_details_loggedin_performancelink_imgtitle = 'user_details_loggedin_performancelink_imgtitle',
$user_details_loggedin_logoutlink_url = 'user_details_loggedin_logoutlink_url',
$user_details_loggedin_logoutlink_imgsrc = 'user_details_loggedin_logoutlink_imgsrc',
$user_details_loggedin_logoutlink_imgtitle = 'user_details_loggedin_logoutlink_imgtitle',
$user_details_loggedin_customlinkone_url = 'user_details_loggedin_customlinkone_url',
$user_details_loggedin_customlinkone_imgsrc = 'user_details_loggedin_customlinkone_imgsrc',
$user_details_loggedin_customlinkone_imgtitle = 'user_details_loggedin_customlinkone_imgtitle',
$user_details_loggedin_customlinktwo_url = 'user_details_loggedin_customlinktwo_url',
$user_details_loggedin_customlinktwo_imgsrc = 'user_details_loggedin_customlinktwo_imgsrc',
$user_details_loggedin_customlinktwo_imgtitle = 'user_details_loggedin_customlinktwo_imgtitle',
$user_details_loggedin_customlinkthree_url = 'user_details_loggedin_customlinkthree_url',
$user_details_loggedin_customlinkthree_imgsrc = 'user_details_loggedin_customlinkthree_imgsrc',
$user_details_loggedin_customlinkthree_imgtitle = 'user_details_loggedin_customlinkthree_imgtitle',
$user_details_loggedin_customlinkfour_url = 'user_details_loggedin_customlinkfour_url',
$user_details_loggedin_customlinkfour_imgsrc = 'user_details_loggedin_customlinkfour_imgsrc',
$user_details_loggedin_customlinkfour_imgtitle = 'user_details_loggedin_customlinkfour_imgtitle',
$user_details_loggedin_customlinkfive_url = 'user_details_loggedin_customlinkfive_url',
$user_details_loggedin_customlinkfive_imgsrc = 'user_details_loggedin_customlinkfive_imgsrc',
$user_details_loggedin_customlinkfive_imgtitle = 'user_details_loggedin_customlinkfive_imgtitle',
$user_details_loggedin_links_hr = 'user_details_loggedin_links_hr',
$user_details_loggedin_content = 'user_details_loggedin_content',
);
$output = theme('user_details_loggedin', $content);
return $output;
}
/**
* Used to push the variables to the theme layer for the "Authored by" block.
*/
function user_details_authored_block_content() {
$content = array(
$user_details_authored_avatar = 'user_details_authored_avatar',
$user_details_authored_joined = 'user_details_authored_joined',
$user_details_authored_postcount_title = 'user_details_authored_postcount_title',
$user_details_authored_postcount_result = 'user_details_authored_postcount_result',
$user_details_authored_points_title = 'user_details_authored_points_title',
$user_details_authored_points_result = 'user_details_authored_points_result',
$user_details_authored_rank_title = 'user_details_authored_rank_title',
$user_details_authored_rank_result = 'user_details_authored_rank_result',
$user_details_authored_stats_hr = 'user_details_authored_stats_hr',
$user_details_authored_profilelink_url = 'user_details_authored_profilelink_url',
$user_details_authored_profilelink_imgsrc = 'user_details_authored_profilelink_imgsrc',
$user_details_authored_profilelink_imgtitle = 'user_details_authored_profilelink_imgtitle',
$user_details_authored_privatemsglink_url = 'user_details_authored_privatemsglink',
$user_details_authored_privatemsglink_imgsrc = 'user_details_authored_privatemsglink_imgsrc',
$user_details_authored_privatemsglink_imgtitle = 'user_details_authored_privatemsglinkimgtitle',
$user_details_authored_links_hr = 'user_details_authored_links_hr',
$user_details_authored_content = 'user_details_authored_content',
);
$output = theme('user_details_authored', $content);
return $output;
}

View File

@@ -0,0 +1,767 @@
<?php
function user_details_admin_settings() {
// Add the css that is needed for the admin form
drupal_add_css(drupal_get_path('module', 'user_details') . '/css/user_details_admin.css');
$overview = t('The User Details module is a simple module to help the end-user find thier way around a website by adding a central location for important link, stats, and thier content.');
$overview .= '<br/>';
$overview .= t('The User Details module is broken up into two blocks: logged-in and authored by. For a more detailed overview please visit the ') . '<a href="/admin/help/user_details">' . t('User Details help page') . '</a>';
$loggedin_header = '<hr>';
$loggedin_header .= '<h3>' . t('User Details: logged-in user settings') . '</h3>';
$authored_header = '<hr>';
$authored_header .= '<h3>' . t('User Details: authored user settings') . '</h3>';
$hr = '<hr>';
$form['overview'] = array(
'#markup' => $overview,
);
$form['loggedin_header'] = array(
'#markup' => $loggedin_header,
);
$form['loggedin_stats'] = array(
'#type' => 'fieldset',
'#title' => 'User Stats.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_stats']['user_details_loggedin_avatar_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "User Avatar".'),
'#default_value' => variable_get('user_details_loggedin_avatar_display', FALSE),
'#description' => t('Displays the Avatar of the user, if any is available.')
);
$form['loggedin_stats']['user_details_loggedin_joined_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "Joined Date".'),
'#default_value' => variable_get('user_details_loggedin_joined_display', FALSE),
'#description' => t('Displays the account creation date of the user.')
);
$form['loggedin_stats']['user_details_loggedin_postcount_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "Post count"'),
'#default_value' => variable_get('user_details_loggedin_postcount_display', FALSE),
'#description' => t('Displays the user\'s current number of posts.'),
);
if (module_exists('userpoints')) {
$form['loggedin_stats']['user_details_loggedin_points_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "User Points".'),
'#default_value' => variable_get('user_details_loggedin_points_display', FALSE),
'#description' => t('Displays the user\'s "User Points" amount.'),
'#disabled' => FALSE,
);
}
else {
$form['loggedin_stats']['user_details_loggedin_points_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "User Points".'),
'#default_value' => variable_get('user_details_loggedin_points_display', FALSE),
'#description' => t('Please install <a href="http://drupal.org/project/userpoints">User Points</a>'),
'#disabled' => TRUE,
);
}
$form['loggedin_stats']['user_details_loggedin_rank_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the role.'),
'#default_value' => variable_get('user_details_loggedin_rank_display', FALSE),
'#description' => t('Displays the user\'s role name.'),
);
if (module_exists('privatemsg')) {
$form['loggedin_stats']['user_details_loggedin_privatemsg_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the unread message amount.'),
'#default_value' => variable_get('user_details_loggedin_privatemsg_display', FALSE),
'#description' => t('Displays the unread message amount from the "Private Messages" module.'),
'#disabled' => FALSE,
);
}
else {
$form['loggedin_stats']['user_details_loggedin_privatemsg_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the unread message amount.'),
'#default_value' => variable_get('user_details_loggedin_privatemsg_display', FALSE),
'#description' => t('Please install <a href="http://drupal.org/project/privatemsg">Private Messages</a>'),
'#disabled' => TRUE,
);
}
$form['loggedin_stats_hr'] = array(
'#type' => 'fieldset',
'#title' => 'Horizontal Ruler.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_stats_hr']['user_details_loggedin_stats_hr_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display "HR"'),
'#default_value' => variable_get('user_details_loggedin_stats_hr_display', FALSE),
'#description' => t('Displays a hortizontal ruler html enity seprating the stats and links sections.'),
);
//Links Options
$form['loggedin_links'] = array(
'#type' => 'fieldset',
'#title' => 'Links.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['front_link'] = array(
'#type' => 'fieldset',
'#title' => t('Front Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['front_link']['user_details_loggedin_frontlink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_frontlink_display', FALSE),
'#description' => t('Displays an icon link leading to the site\'s front page.'),
);
$form['loggedin_links']['front_link']['user_details_loggedin_frontlink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_frontlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/front-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/front-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['profile_link'] = array(
'#type' => 'fieldset',
'#title' => t('Profile Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['profile_link']['user_details_loggedin_profilelink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_profilelink_display', FALSE),
'#description' => t('Displays an icon link leading to the user\'s profile page.'),
);
$form['loggedin_links']['profile_link']['user_details_loggedin_profilelink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_profilelink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/profile-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/profile-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['profile_edit_link'] = array(
'#type' => 'fieldset',
'#title' => t('Profile Edit Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['profile_edit_link']['user_details_loggedin_profileeditlink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_profileeditlink_display', FALSE),
'#description' => t('Displays an icon link leading to the user\'s edit profile page.')
);
$form['loggedin_links']['profile_edit_link']['user_details_loggedin_profileeditlink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_profileeditlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/profileedit-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/profileedit-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['privatemsg_link'] = array(
'#type' => 'fieldset',
'#title' => t('Private Message Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
if (module_exists('privatemsg')) {
$form['loggedin_links']['privatemsg_link']['user_details_loggedin_privatemsglink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_privatemsglink_display', FALSE),
'#description' => t('Displays an icon link leading to the user\'s private message profile page.'),
'#disabled' => FALSE,
);
}
else {
$form['loggedin_links']['privatemsg_link']['user_details_loggedin_privatemsglink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_privatemsglink_display', FALSE),
'#description' => t('please install <a href="http://drupal.org/project/privatemsg">Private Message</a>.'),
'#disabled' => TRUE,
);
}
if (module_exists('privatemsg')) {
$form['loggedin_links']['privatemsg_link']['user_details_loggedin_privatemsglink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_privatemsg_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/privatemsg-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/privatemsg-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
}
$form['loggedin_links']['create_link'] = array(
'#type' => 'fieldset',
'#title' => t('Create Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['create_link']['user_details_loggedin_createlink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_createlink_display', FALSE),
'#description' => t('Displays an icon link to the /node/add page'),
);
$form['loggedin_links']['create_link']['user_details_loggedin_createlink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_createlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/create-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/create-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['admin_link'] = array(
'#type' => 'fieldset',
'#title' => t('Admin Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['admin_link']['user_details_loggedin_adminlink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_adminlink_display', FALSE),
'#description' => t('Displays an icon link to the admin page.')
);
$form['loggedin_links']['admin_link']['user_details_loggedin_adminlink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_adminlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/admin-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/admin-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['panels_link'] = array(
'#type' => 'fieldset',
'#title' => t('Panels Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
if (module_exists('panels')) {
$form['loggedin_links']['panels_link']['user_details_loggedin_panelslink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_panelslink_display', FALSE),
'#description' => t('Displays an icon link to the admin section of the "Panels" module.')
);
}
else {
$form['loggedin_links']['panels_link']['user_details_loggedin_panelslink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_panelslink_display', FALSE),
'#description' => t('Please install <a href="http://drupal.org/project/panels">Panels</a>'),
'#disabled' => TRUE,
);
}
if (module_exists('panels')) {
$form['loggedin_links']['panels_link']['user_details_loggedin_panelslink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_panelslink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/panels-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/panels-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
}
$form['loggedin_links']['views_link'] = array(
'#type' => 'fieldset',
'#title' => t('Views Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
if (module_exists('views')) {
$form['loggedin_links']['views_link']['user_details_loggedin_viewslink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_viewslink_display', FALSE),
'#description' => t('Displays an icon link to the admin section of the "Views" module.')
);
}
else {
$form['loggedin_links']['views_link']['user_details_loggedin_viewslink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_viewslink_display', FALSE),
'#description' => t('Please install <a href="http://drupal.org/project/views">Panels</a>'),
'#disabled' => TRUE,
);
}
if (module_exists('views')) {
$form['loggedin_links']['views_link']['user_details_loggedin_viewslink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_viewslink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/views-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/views-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
}
$form['loggedin_links']['performance_link'] = array(
'#type' => 'fieldset',
'#title' => t('Performance Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['performance_link']['user_details_loggedin_performancelink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_performancelink_display', FALSE),
'#description' => t('Displays an icon link to the admin section of the "Views" module.')
);
$form['loggedin_links']['performance_link']['user_details_loggedin_performancelink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_performancelink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/performance-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/performance-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['logout_link'] = array(
'#type' => 'fieldset',
'#title' => t('Logout Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['logout_link']['user_details_loggedin_logoutlink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_loggedin_logoutlink_display', FALSE),
'#description' => t('Displays an icon link to allow the user to logout.')
);
$form['loggedin_links']['logout_link']['user_details_loggedin_logoutlink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_loggedin_logoutlink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/logout-icon.png"),
'#description' => t('It is the URL relative to your drupal install. Do not include your domain name.(http://www.example.com)'),
'#size' => 75,
'#maxlength' => 500,
);
//Custom Link One Options
$form['loggedin_links']['custom_link_one'] = array(
'#type' => 'fieldset',
'#title' => t('Custom Link One'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['custom_link_one']['user_details_loggedin_customlinkone_type'] = array(
'#type' => 'select',
'#title' => t('Link Type'),
'#options' => array(
0 => t('Disabled'),
2 => t('User Link'),
3 => t('Admin Link'),
),
'#default_value' => variable_get('user_details_loggedin_customlinkone_type', '0'),
'#description' => t('Choose which type of link this link is.'),
);
$form['loggedin_links']['custom_link_one']['user_details_loggedin_customlinkone_url'] = array(
'#type' => 'textfield',
'#title' => t('URL path.'),
'#default_value' => variable_get('user_details_loggedin_customlinkone_url', ''),
'#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_one']['user_details_loggedin_customlinkone_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image path.'),
'#default_value' => variable_get('user_details_loggedin_customlinkone_imgsrc', ''),
'#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-one.png)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_one']['user_details_loggedin_customlinkone_imgtitle'] = array(
'#type' => 'textfield',
'#title' => t('Image title.'),
'#default_value' => variable_get('user_details_loggedin_customlinkone_imgtitle', ''),
'#description' => t('The image title, or mouse-over tooltip, of the image.'),
'#size' => 75,
'#maxlength' => 500,
);
//Custom Link Two Options
$form['loggedin_links']['custom_link_two'] = array(
'#type' => 'fieldset',
'#title' => t('Custom Link Two'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['custom_link_two']['user_details_loggedin_customlinktwo_type'] = array(
'#type' => 'select',
'#title' => t('Link Type'),
'#options' => array(
0 => t('Disabled'),
2 => t('User Link'),
3 => t('Admin Link'),
),
'#default_value' => variable_get('user_details_loggedin_customlinktwo_type', '0'),
'#description' => t('Choose which type of link this link is.'),
);
$form['loggedin_links']['custom_link_two']['user_details_loggedin_customlinktwo_url'] = array(
'#type' => 'textfield',
'#title' => t('URL path.'),
'#default_value' => variable_get('user_details_loggedin_customlinktwo_url', ''),
'#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_two']['user_details_loggedin_customlinktwo_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image path.'),
'#default_value' => variable_get('user_details_loggedin_customlinktwo_imgsrc', ''),
'#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-two.png)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_two']['user_details_loggedin_customlinktwo_imgtitle'] = array(
'#type' => 'textfield',
'#title' => t('Image title.'),
'#default_value' => variable_get('user_details_loggedin_customlinktwo_imgtitle', ''),
'#description' => t('The image title, or mouse-over tooltip, of the image.'),
'#size' => 75,
'#maxlength' => 500,
);
//Custom Link Three Options
$form['loggedin_links']['custom_link_three'] = array(
'#type' => 'fieldset',
'#title' => t('Custom Link Three'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['custom_link_three']['user_details_loggedin_customlinkthree_type'] = array(
'#type' => 'select',
'#title' => t('Link Type'),
'#options' => array(
0 => t('Disabled'),
2 => t('User Link'),
3 => t('Admin Link'),
),
'#default_value' => variable_get('user_details_loggedin_customlinkthree_type', '0'),
'#description' => t('Choose which type of link this link is.'),
);
$form['loggedin_links']['custom_link_three']['user_details_loggedin_customlinkthree_url'] = array(
'#type' => 'textfield',
'#title' => t('URL path.'),
'#default_value' => variable_get('user_details_loggedin_customlinkthree_url', ''),
'#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_three']['user_details_loggedin_customlinkthree_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image path.'),
'#default_value' => variable_get('user_details_loggedin_customlinkthree_imgsrc', ''),
'#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-three.png)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_three']['user_details_loggedin_customlinkthree_imgtitle'] = array(
'#type' => 'textfield',
'#title' => t('Image title.'),
'#default_value' => variable_get('user_details_loggedin_customlinkthree_imgtitle', ''),
'#description' => t('The image title, or mouse-over tooltip, of the image.'),
'#size' => 75,
'#maxlength' => 500,
);
//Custom Link Four Options
$form['loggedin_links']['custom_link_four'] = array(
'#type' => 'fieldset',
'#title' => t('Custom Link Four'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['custom_link_four']['user_details_loggedin_customlinkfour_type'] = array(
'#type' => 'select',
'#title' => t('Link Type'),
'#options' => array(
0 => t('Disabled'),
2 => t('User Link'),
3 => t('Admin Link'),
),
'#default_value' => variable_get('user_details_loggedin_customlinkfour_type', '0'),
'#description' => t('Choose which type of link this link is.'),
);
$form['loggedin_links']['custom_link_four']['user_details_loggedin_customlinkfour_url'] = array(
'#type' => 'textfield',
'#title' => t('URL path.'),
'#default_value' => variable_get('user_details_loggedin_customlinkfour_url', ''),
'#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_four']['user_details_loggedin_customlinkfour_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image path.'),
'#default_value' => variable_get('user_details_loggedin_customlinkfour_imgsrc', ''),
'#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-four.png)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_four']['user_details_loggedin_customlinkfour_imgtitle'] = array(
'#type' => 'textfield',
'#title' => t('Image title.'),
'#default_value' => variable_get('user_details_loggedin_customlinkfour_imgtitle', ''),
'#description' => t('The image title, or mouse-over tooltip, of the image.'),
'#size' => 75,
'#maxlength' => 500,
);
//Custom Link Five Options
$form['loggedin_links']['custom_link_five'] = array(
'#type' => 'fieldset',
'#title' => t('Custom Link Five'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links']['custom_link_five']['user_details_loggedin_customlinkfive_type'] = array(
'#type' => 'select',
'#title' => t('Link Type'),
'#options' => array(
0 => t('Disabled'),
2 => t('User Link'),
3 => t('Admin Link'),
),
'#default_value' => variable_get('user_details_loggedin_customlinkfive_type', '0'),
'#description' => t('Choose which type of link this link is.'),
);
$form['loggedin_links']['custom_link_five']['user_details_loggedin_customlinkfive_url'] = array(
'#type' => 'textfield',
'#title' => t('URL path.'),
'#default_value' => variable_get('user_details_loggedin_customlinkfive_url', ''),
'#description' => t('the url of the page you want this link to refer to. (example: /admin/structure/pages)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_five']['user_details_loggedin_customlinkfive_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image path.'),
'#default_value' => variable_get('user_details_loggedin_customlinkfive_imgsrc', ''),
'#description' => t('the path to your image. (example: /sites/all/themes/my-theme/custom-link-five.png)'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links']['custom_link_five']['user_details_loggedin_customlinkfive_imgtitle'] = array(
'#type' => 'textfield',
'#title' => t('Image title.'),
'#default_value' => variable_get('user_details_loggedin_customlinkfive_imgtitle', ''),
'#description' => t('The image title, or mouse-over tooltip, of the image.'),
'#size' => 75,
'#maxlength' => 500,
);
$form['loggedin_links_hr'] = array(
'#type' => 'fieldset',
'#title' => 'Horizontal Ruler.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_links_hr']['user_details_loggedin_links_hr_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display "HR"'),
'#default_value' => variable_get('user_details_loggedin_links_hr_display', FALSE),
'#description' => t('Displays a hortizontal ruler html enity seprating the links and content sections.'),
);
//Content Options
$form['loggedin_content'] = array(
'#type' => 'fieldset',
'#title' => 'Content.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['loggedin_content']['user_details_loggedin_content_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display "Content"'),
'#default_value' => variable_get('user_details_loggedin_content_display', FALSE),
'#description' => t('Lists the last X updated nodes authored by the user.')
);
$form['loggedin_content']['user_details_loggedin_content_amount'] = array(
'#type' => 'textfield',
'#title' => t('User content amount'),
'#default_value' => variable_get('user_details_loggedin_content_amount', 3),
'#size' => 2,
'#maxlength' => 2,
'#description' => t('Changes the number of recent items listed for the "Content" list. (<b>if set to 0 it renders this list null.</b>)')
);
/**
* Authored options
*
* the authored by block settings.
*/
$form['authored_header'] = array(
'#markup' => $authored_header,
);
$form['authored_stats'] = array(
'#type' => 'fieldset',
'#title' => 'User Stats.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['authored_stats']['user_details_authored_avatar_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "User Avatar".'),
'#default_value' => variable_get('user_details_authored_avatar_display', FALSE),
'#description' => t('Displays the Avatar of the user, if any is available.')
);
$form['authored_stats']['user_details_authored_joined_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "Joined Date".'),
'#default_value' => variable_get('user_details_authored_joined_display', FALSE),
'#description' => t('Displays the account creation date of the user.')
);
$form['authored_stats']['user_details_authored_postcount_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "Post count"'),
'#default_value' => variable_get('user_details_authored_postcount_display', FALSE),
'#description' => t('Displays the user\'s current number of posts.'),
);
if (module_exists('userpoints')) {
$form['authored_stats']['user_details_authored_points_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "User Points".'),
'#default_value' => variable_get('user_details_authored_points_display', FALSE),
'#description' => t('Displays the user\'s "User Points" amount.'),
'#disabled' => FALSE,
);
}
else {
$form['authored_stats']['user_details_authored_points_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the "User Points".'),
'#default_value' => variable_get('user_details_authored_points_display', FALSE),
'#description' => t('Please install <a href="http://drupal.org/project/userpoints">User Points</a>'),
'#disabled' => TRUE,
);
}
$form['authored_stats']['user_details_authored_rank_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display the role.'),
'#default_value' => variable_get('user_details_authored_rank_display', FALSE),
'#description' => t('Displays the user\'s role name.'),
);
$form['authored_stats_hr'] = array(
'#type' => 'fieldset',
'#title' => 'Horizontal Ruler.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['authored_stats_hr']['user_details_authored_stats_hr_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display "HR"'),
'#default_value' => variable_get('user_details_authored_stats_hr_display', FALSE),
'#description' => t('Displays a hortizontal ruler html enity seprating the stats and links sections.'),
);
$form['authored_links'] = array(
'#type' => 'fieldset',
'#title' => 'Links.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['authored_links']['profile_link'] = array(
'#type' => 'fieldset',
'#title' => t('Profile Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['authored_links']['profile_link']['user_details_authored_profilelink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_authored_profilelink_display', FALSE),
'#description' => t('Displays an icon link leading to the user\'s profile page.'),
);
$form['authored_links']['profile_link']['user_details_authored_profilelink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_authored_profilelink_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/profile-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/profile-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
$form['authored_links']['privatemsg_link'] = array(
'#type' => 'fieldset',
'#title' => t('Private Message Link'),
'#collapsible' => 'true',
'#collapsed' => 'true',
);
if (module_exists('privatemsg')) {
$form['authored_links']['privatemsg_link']['user_details_authored_privatemsglink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_authored_privatemsglink_display', FALSE),
'#description' => t('Displays an icon link leading to the user\'s private message profile page.'),
'#disabled' => FALSE,
);
}
else {
$form['authored_links']['privatemsg_link']['user_details_authored_privatemsglink_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display'),
'#default_value' => variable_get('user_details_authored_privatemsglink_display', FALSE),
'#description' => t('please install <a href="http://drupal.org/project/privatemsg">Private Message</a>.'),
'#disabled' => TRUE,
);
}
if (module_exists('privatemsg')) {
$form['authored_links']['privatemsg_link']['user_details_authored_privatemsglink_imgsrc'] = array(
'#type' => 'textfield',
'#title' => t('Image source.'),
'#default_value' => variable_get('user_details_authored_privatemsg_imgsrc', "/" . drupal_get_path('module', 'user_details') . "/images/privatemsg-icon.png"),
'#description' => t('default value: <i>/' . drupal_get_path('module', 'user_details') . '/images/privatemsg-icon.png</i>'),
'#size' => 75,
'#maxlength' => 500,
);
}
$form['authored_links_hr'] = array(
'#type' => 'fieldset',
'#title' => 'Horizontal Ruler.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['authored_links_hr']['user_details_authored_links_hr_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display "HR"'),
'#default_value' => variable_get('user_details_authored_links_hr_display', FALSE),
'#description' => t('Displays a hortizontal ruler html enity seprating the links and content sections.'),
);
//Content Options
$form['authored_content'] = array(
'#type' => 'fieldset',
'#title' => 'Content.',
'#collapsible' => 'true',
'#collapsed' => 'true',
);
$form['authored_content']['user_details_authored_content_display'] = array(
'#type' => 'checkbox',
'#title' => t('Display "Content"'),
'#default_value' => variable_get('user_details_authored_content_display', FALSE),
'#description' => t('Lists the last X updated nodes authored by the user.')
);
$form['authored_content']['user_details_authored_content_amount'] = array(
'#type' => 'textfield',
'#title' => t('User content amount'),
'#default_value' => variable_get('user_details_authored_content_amount', 3),
'#size' => 2,
'#maxlength' => 2,
'#description' => t('Changes the number of recent items listed for the "Content" list. (<b>if set to 0 it renders this list null.</b>)')
);
return system_settings_form($form);
}
?>

View File

@@ -0,0 +1,91 @@
<?php
function user_details_help_form($form) {
$intro = t('The "User Details" module comes with two blocks, "User Detils: logged-in user" and "User Details: authored user".');
$intro .= '<br/><br/>';
$background = '<h3>' . t('Background') . '</h3>';
$background .= t('The idea for "User Details" started as a request from an end-user, to have a centreal place for quick links to important locations on the website.') . '<br>';
$background .= t('For Drupal 6 this was just some <a href="http://drupal.org/node/395578">custom code</a> you could add to a custom block.') . '<br/>';
$background .= t('For Drupal 7 the "User Details" module has expanded to its own module, which allows non-coders to alter and customize to thier liking.');
$background .= '<br/><br/>';
$overview = '<h3>' . t('Overview') . '</h3>';
$overview .= t('The "User Details" module is a basic collection of user data (or variables) and commonly used links in a block. In no way is this a required part of any website, only for the ease of naviagtion.') . '<br/>';
$overview .= t('Below is a list of all the stats and links that can be turned on as part of the "User Details" blocks.');
$overview .= t('The links come with some default images, but you can change these by uploading an image to your web server and typing in the location for each image.');
$overview .= '<br/><br/>';
$overview_loggedin = '<div class="overview-loggedin" style="width: 48%; float: left;">';
$overview_loggedin .= '<h3>' . t('User Details: loggedin user') . '</h3>';
$overview_loggedin .= '<ul>';
$overview_loggedin .= '<li>' . t('User avatar') . '</li>';
$overview_loggedin .= '<li>' . t('Joined date') . '</li>';
$overview_loggedin .= '<li>' . t('Post count') . '</li>';
$overview_loggedin .= '<li>' . t('User points') . '</li>';
$overview_loggedin .= '<li>' . t('Role') . '</li>';
$overview_loggedin .= '<li>' . t('Unread private messeges') . '</li>';
$overview_loggedin .= '<li>' . t('Homepage link') . '</li>';
$overview_loggedin .= '<li>' . t('Profile link') . '</li>';
$overview_loggedin .= '<li>' . t('Profile edit link') . '</li>';
$overview_loggedin .= '<li>' . t('Private message link') . '</li>';
$overview_loggedin .= '<li>' . t('Create link') . '</li>';
$overview_loggedin .= '<li>' . t('Admin link') . '</li>';
$overview_loggedin .= '<li>' . t('Panels link') . '</li>';
$overview_loggedin .= '<li>' . t('Views link') . '</li>';
$overview_loggedin .= '<li>' . t('Performance link') . '</li>';
$overview_loggedin .= '<li>' . t('Logout link') . '</li>';
$overview_loggedin .= '<li>' . t('Custom link one') . '</li>';
$overview_loggedin .= '<li>' . t('Custom link two') . '</li>';
$overview_loggedin .= '<li>' . t('Custom link three') . '</li>';
$overview_loggedin .= '<li>' . t('Custom link four') . '</li>';
$overview_loggedin .= '<li>' . t('Custom link five') . '</li>';
$overview_loggedin .= '<li>' . t('Recent Content') . '</li>';
$overview_loggedin .= '</ul>';
$overview_loggedin .= '</div>';
$overview_authored = '<div class="overview-authored" style="width: 48%; float: left;">';
$overview_authored .= '<h3>' . t('User Details: authored user') . '</h3>';
$overview_authored .= '<ul>';
$overview_authored .= '<li>' . t('User avatar') . '</li>';
$overview_authored .= '<li>' . t('Joined date') . '</li>';
$overview_authored .= '<li>' . t('Post count') . '</li>';
$overview_authored .= '<li>' . t('User points') . '</li>';
$overview_authored .= '<li>' . t('Role') . '</li>';
$overview_authored .= '<li>' . t('Profile link') . '</li>';
$overview_authored .= '<li>' . t('Private message link') . '</li>';
$overview_authored .= '<li>' . t('Recent Content') . '</li>';
$overview_authored .= '</ul>';
$overview_authored .= '</div>';
$closing = '<div style="float: none; clear: both;">';
$closing .= '<br/><br/>';
$closing .= t('NOTE:') . '<br/>';
$closing .= t('*All users will be able to see: stats, user links content list.') . '<br/>';
$closing .= t('*All admin will be able to see: stats, user links, content list and admin links.') . '<br/>';
$closing .= t('*The custom links have a dropdown menu to determine which type of user will be able to view them.');
$closing .= '<br/><br/>';
$closing .= t('This module is under active development. Any feature request, bug report or issue you might find, please make a new issue in the ') . '<a href="http://drupal.org/project/issues/user_details?categories=All">' . t('"User Details" issue queue') . '</a>.';
$closing .= '</div>';
$hr = '<hr>';
$form['intro']['markup'] = array(
'#markup' => $intro,
);
$form['background']['markup'] = array(
'#markup' => $background,
);
$form['overview']['markup'] = array(
'#markup' => $overview,
);
$form['overview_loggedin']['markup'] = array(
'#markup' => $overview_loggedin,
);
$form['overview_authored']['markup'] = array(
'#markup' => $overview_authored,
);
$form['closing']['markup'] = array(
'#markup' => $closing,
);
$form['hr']['markup'] = array(
'#markup' => $hr,
);
return $form;
}
?>