Hi all,
I've made a module, the Sobi2 Userlist Module, which i would like to share. The module shows some key information to the Sobi2 entry owner like, entry ID, title, site visits (hits), date of last update, number of days until the entry expires and total payments for each entry. It can be set to show active (published), as well as unpublished/unapproved and expired entries (or any combinations of these) (see attached image). The user can also edit the entries indexed in the module, if the Edit/Delete options are enabled (in Sobi2) for the entry owner.
The module should preferably be shown under the usermenu somewhere and assigned to a module position which extends at least the center column of your template, as the module need some width. Some templates offer a "banner" position, which seems to be appropriate. If your template does not offer a module position with sufficient width, you can create a new module position (see below) to fit the requirements of the module.
The current version is 1.2 and the module is only compatible with J 1.5x.
Feel free to test it and use it at your own risk, of course.
Regards Poffen
DESCRIPTION AND KEY INFORMATIONSobi2 Userlist ModuleThe information displayed by the module include number of hits, date of last update, number of days until expiration and the total payment for the entry. The module can be configured to also display the "Edit" and "Delete" buttons as well as the "Renew" link, if these options are set in the Sobi2 configuration.
The module has been created to display Sobi2 entry related content to logged in owners
only, and will not display any information to anonymous users. It's recommended therefore that the module is displayed under the usermenu (see installation instructions below). It will, however, work under any other Joomla menu item.
InstallationGo to
Menus --> usermenu and click on "new". Then, select a menu item type of
User --> Default User Layout. This page layout will have a default "welcome message" which you can use as it is, or you can edit or even remove. The welcome message can be edited in the WELCOME_DESC key of com_user.ini (site language folder).
Select a suitable module position (which provides some width), or, if necessary, create a new position. Finally, make sure the module is set to be displayed
only under the menu link you just created.
HOW TO CREATE A NEW MODULE POSITIONOpen your Joomla
templateDetails.xml file and find the list of module positions (between <position> tags) in the file. You should see something like:
...........
<position>user8</position>
<position>user9</position>
<position>user10</position>...........
Then, add a new position with a unique name, like e.g.
<position>userlist</position> to the bottom of the list:
...........
<position>user8</position>
<position>user9</position>
<position>user10</position><position>userlist</position>...........
The new module position should now be visible at the module's back end.
This step is not required, as you can still type in the new module position in the dropdown list in the module's admin area, but the new position will always remain in the list when you add it to the
templateDetails.xml file. The alternative is to type it in manually in the dropdown list in the modules admin area, in which case it will disappear from the list if no modules are assigned to this position.
Next, open your Joomla Template
index.php file and look for
<jdoc:include type="component" /> command. This is the position in the template where the components are displayed. Then, add the code below after the "component" command. This area in the template should provide sufficient space for the module to be displayed properly.
<?php if( $this->countModules('userlist') ) {?>
<div style="text-align:center"><jdoc:include type="modules" name="userlist" style="XHTML" /></div>
<?php } ?>You can use other module chromes (module styles), but XHTML is probably fine. The styling element of the div (
style="text-align:center") may be added to center the table elements of the module. Additional CSS is included in the module to left-align some table elements.
See here for information on using module chromes:
http://docs.joomla.org/What_is_module_chrome%3Fhttp://docs.joomla.org/Understanding_Output_Overrides#Module_ChromeAnd don't forget to
BACKUP before you modify the template files!!
INFORMATION ON UPGRADES OR FIXES
Any information related to upgrade of the module will be posted in this tread. The users are encouraged to also use this tread to report any problems experienced with the use of the module.
CHANGELOGVersion 1.1.1Fixed bug: A wrong data format has been fixed
Fixed bug: The code has been changed to prevent the display of
un-assigned Sobi2 entries to anonymous users, if attempted by the admin to display the module publicly.
Add: A german language file has been included, thanks to
KASMorpheus.
Version 1.1.2Change: Reversed the output of owner name and accompanying text above table to comply with the
grammer of our Italian friends.
Add: Added Italian language file, thanks to J. Sparrow.
Version 1.2Fixed bug: In version 1.1.2 a wrong payment was returned if an entry was listed in several non-free categories.
This should now be fixed.
Fixed bug: Proper escaping was missing for a couple of output values.
Change: The options in the module's back end (v 1.1.2) to set "User can see unpublished entries" and "User can see expired
entries", have been removed. The visibility of "unpublished" and "expired" entires are now automatically set by the
config keys in the Registry Editor of Sobi2 (i.e. "can_see_unpublished" and "can_see_expired").
Add: A javascript (jQuery) navigation option has been included (optional). This option is based on a slightly modified
version of a jQuery plugin,
Table Navigation, made by Ryan Zielke . To avoid conflicts with the mootools library of Joomla,
an option is included to load a "noconflict" script with the jQuery library. Both scripts are loaded by default. If
your installation is already using jQuery, with a noconflict option included, you should set both "Load noconflict
script" and "Load jQuery" to "No", or if jQuery is loaded without a noconflict script, you should set "Load jQuery"
to "No" and "Load noconflict script" to "Yes". The jQuery plugin require jQuery v1.2.3 or above.
To avoid the columns from jumping around (changing width), when using the navigation option, it may be
necessary to give the table header cells in the template file (default.php) a fixed width.
If you don't need the pagination option, it's recommende that you turn this off at the module's back end to avoid
unneccessary loading of scripts.
Add: The title can now be truncated and set to a predefined character length, followed by three dots (...). This feature is
useful if you have long entry titles.
Add: French and spanish translations have been included, thanks to aka VeeTouine and aka silvasfull.
Add: Some new language definitions have been included in the ini files.
DOWNLOAD
The module can be downloaded from the Download Directory of Sigsiu.net:
User List Module