Custom playlog and gamelist within profile tab

18 years 1 month ago #6862 by NeonDevil
Somewhat of a novice in PHP & mySQL, but absolutely new to Joomla & CB. I've been looking into using the two in order to test some functionality for members of a video gaming website.

So far, CB looks and works great, and it looks like I can do a lot with it. I'm a little dumbfounded as far as list management goes, but I've done some basic testing, and am now wondering if I can configure CB to do the following:

(1)
Allow visitors to view a list of games a member owns within their profile (via tab) with the custom fields:
- Game Title (textfield)
- Game Type (dropdown: FPS, RTS, Massively Multiplayer, etc)
- Multiplayer Alias (textfield)
- Willing to sell (checkbox)
- Willing to trade (checkbox)
- Comments/Notes (editor text area)


(2)
Allow visitors to view a list of events/tournaments a member has played within their profile (via tab) with the custom fields:
- Event Date (date)
- Server (textfield)
- Kills (textfield)
- Deaths (textfield)
- Comments/Notes (editor text area)


If this can be easily (or even not-so-easily) done, I would appreciate detailed and step-by-step instructions on how to accomlish this task.
If this is a somewhat complicated to do and requires custom programming, please point me in the right direction.


Any comments, suggestions, and constructive criticisms are greatly appreciated.

Please Log in to join the conversation.

18 years 1 month ago #6867 by mikko
See the ListTab plugin, it does just what you describe.

mikko

Please Log in to join the conversation.

18 years 1 month ago #6904 by NeonDevil
I've tried it, but not sure if I'm configuring my lists right or if ListTab is capable of doing what I want.

I would like to see the fields grouped in columns for every entry when viewed in the profile tab.
[code:1]
+
+
+
+
+
+
+
| Title | Type | Alias | Sell | Trade | Comments |
+
+
+
+
+
+
+
| Starc | RTS | Neon | X | X | |
+
+
+
+
+
+
+
| WoW | MMO | Neon | | | Undead |
+
+
+
+
+
+
+
[/code:1]
Instead of:
[code:1]
Title - Starc
Type - RTS
Alias - Neon
Sell - X
Trade - X
Comments -
Title - WoW
Type - RTS
Alias - Neon
Sell -
Trade -
Comments - Undead
[/code:1]



Also, whenever I assign a date field to the ListTab, I get the following error
[code:1]Fatal error: Call to a member function cbAddCalendar() on a non-object in

C:\webdocs\pbmercs\administrator\components\com_comprofiler\comprofiler.class.php on line 1600[/code:1]

Please Log in to join the conversation.

18 years 1 month ago #6920 by NeonDevil
Looks like ListTab uses the _getViewTabContents() function from components/com_profiler/compofiler.class.php, I guess you are stuck with the layout.

I'm thinking.... is it possible to create a custom/modified _getViewTabContents() for the getDisplayTab() function in listtab.php that dynamically creates a table?

For example, if there's 4 fields, it will create 4 columns for every entry.
Perhaps a script that will:
(1) count the number of fields
-- [ SELECT COUNT(name) FROM _comprofiler_fields WHERE tabid='?tabid' ]
(2) Generate initial table structure
(3) create first row ( <tr> ) - this is the header
-- (3.1) create columns ( <td> ) based on number of fields and attributes included in the _comprofiler_listtab_23 table

[ SELECT size FROM _comprofiler_fields WHERE tabid='?tabid' ]
-- (3.2) include field titles from database

[ SELECT name FROM _comprofiler_fields WHERE tabid='?tabid' ]
-- (3.3) close column(s)
-- (3.4) close row syntax for first row
(4) genenerate additional rows ( <tr>s )per entry from database, based on existing column structure
(5) close table structure

Post edited by: NeonDevil, at: 2006/02/23 03:03

Post edited by: NeonDevil, at: 2006/02/23 03:04

Please Log in to join the conversation.

18 years 12 hours ago #9201 by NeonDevil
!! UPDATE !!


I've managed to mod the ListTab plugin so that it will show data in both rows and columns, complete with description headers.
I've also added some extra OverLib functionality in case the text gets bigger than the table cells.
It's also formattable via css, so site admins can adjust column widths and row heights. Admins should also be able to customize the table with colors and borders as well.


A working demonstration can be found in the following link.
Keep in mind that this is just a test site, and it is constantly changing, so I don't know how long it will be up.

neondevil.game-host.org/pbmercs/index.php?option=com_comprofiler&task=userProfile&user=62

I've already submitted my code to Mikko a while back, so you can expect a newer version of listtab sometime in the near future.
I've already did some minor testing, and everything seems to work out okay with a few exceptions and limitations.

If anyone thinks that this is a feature they need RIGHT NOW, PM me your e-mail and I'll see what I can do.

Please Log in to join the conversation.

18 years 11 hours ago #9208 by mikko
Looks cool. The listtab which is available here is not compatible with 1.0 final. I have a patch available and when I have the time, I will put these changes to the plugin.

mikko

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.206 seconds

Facebook Twitter LinkedIn