Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 09:04:26 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155535 Posts in 21713 Topics by 7737 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: 1 [2]   Go Down
Print
Author Topic: New Module Data Table  (Read 4041 times)
web-based-media

Offline Offline

Posts: 100


WWW
« Reply #25 on: November 17, 2010, 12:55:49 PM »

Hi, thank You for thi great module. I guess this is just what I am lookin for.
But I have one big problem (due to I have no clue about mySQL...)
I would use the Data of one of the table-cells and put it into a pulldown-menue in a contakt form.
Can anybody help me with that?

Thanx in advance.
Kind regards
Jan
Logged
Spritemarkiv
AddOn Development
*
Offline Offline

Posts: 113



WWW
« Reply #26 on: November 18, 2010, 07:15:29 PM »

Hi Jan,
This might get you started.
Code:
//Page number of your database
$datatablepage=4;


//connect to database 
// access database and obtain users table
$query = "SELECT * FROM ".TABLE_PREFIX."mod_datatable".$datatablepage;
$results = $database->query($query);

echo"<select>";
  while($row = $results->fetchRow()) {
          // write out usernames, last login & more
        echo "<option>". $row["Your_column_name_here"]."</option>";
}
echo"</select>";
Logged
web-based-media

Offline Offline

Posts: 100


WWW
« Reply #27 on: December 22, 2010, 06:46:39 PM »

Hi Spritemarkiv,
thank You for the help.
But unfortunately I have no clue how to use this code or where to put it...
I would need the data of the tables in a normal contact form. It is meant for booking certain events. Kind of Date Picker is what I am looking for, I guess.

Regards
Jan
Logged
Spritemarkiv
AddOn Development
*
Offline Offline

Posts: 113



WWW
« Reply #28 on: December 22, 2010, 09:48:28 PM »

It sounds like you would do better with the booking module. http://www.websitebakers.com/pages/modules/calendar-and-time/bookings.php
Logged
web-based-media

Offline Offline

Posts: 100


WWW
« Reply #29 on: December 22, 2010, 09:53:08 PM »

Yes, I think so, but I tested it and it does not do the job I need, too. Date Picker for registration form is missing...
But thank You for the advice.
Logged
donv

Offline Offline

Posts: 23



« Reply #30 on: May 19, 2011, 09:46:15 PM »

I was thrilled to find this module and installed it yesterday.

I created a page with the data table and was able to set up the column headers. One thing I noted when doing so is that having non-alpha or space characters in a column name prevented adding that column (I had tried adding cols. with a & and $ in them, then tried +, -, ., and , with the same issue). It failed silently with no error message but did not add the column until the name was revised.

So I had my table with the revised column headers and went ahead to add a row and fill in the data. One column was a monetary amount, so I entered $123 and saved the value.

After that, the page updated and my row did not display (just the column header/footer), and the Show/Hide Tools button will not open.

I tried reloading the page and got the following messages in a hover-over dialog, one after the other:

Given the above, I figured the special character '$' might be causing the issue, so used phpMyAdmin to take a look at the database. The record was added. So I used the db editor to remove the '$', then went back to the original DataTable page of my site and reloaded it. Got the same two messages and the row did not display, etc. I tried forcing a complete reload with shift-reload (Firefox 4) but no change.

So this was using FF4 on Ubuntu 11.04 and my site is WB 2.8 with DataTable 0.73 (latest as of yesterday).

Through further experimentation, I find that if I log out and back in again after clearing the special characters from the database, the page will again display properly. It appears there is a need to do something to escape/transform/filter special characters?
« Last Edit: May 19, 2011, 10:07:16 PM by donv » Logged
donv

Offline Offline

Posts: 23



« Reply #31 on: May 19, 2011, 09:53:26 PM »

Correction: The above is with version 7.4. I used the latest DataTable 7.4 zip file, but the module's info.php gives Version 0.73 via the "Module Details" function in the backend.
Logged
Spritemarkiv
AddOn Development
*
Offline Offline

Posts: 113



WWW
« Reply #32 on: May 20, 2011, 08:49:18 AM »

Hi Donv,
Thanks for the well documented feedback. I will have a look into it and let you know what I can do.
Logged
Spritemarkiv
AddOn Development
*
Offline Offline

Posts: 113



WWW
« Reply #33 on: May 22, 2011, 11:03:56 AM »

New version available on AMASP.

Version 0.7.6
*Feed back when column is added or fails
*Upated DataTable Jquery Plugin to v 1.7.6

Donv,
Column header are now striped to use only alphanumeric characters any spaces are replaced with a "_".
ie"My*$@% Column Name" becomes "My_Column_Name".  Should there be any MYSQL error or success it is reported on the page. Unfortunately it is just before a mandatory page refresh, so the feed back only shows for a few seconds.

Thanks again for the feedback, and let me know how it goes.
Logged
bschaich

Offline Offline

Posts: 34


« Reply #34 on: March 04, 2012, 06:53:46 PM »

Hi,

did anybody ever try this module on 2.8.2?
I cannot add any column to the table, it seems the table just does not react.

Regards,
Benny
Logged
scoob2000

Offline Offline

Posts: 3



WWW
« Reply #35 on: April 16, 2012, 12:56:15 PM »

Yes, i seem to have the same problems.
The backend works just as it should.
When i access the frontend page "delete all rows" doesn't work, i can't add a row or column, only the "Delete row" button seems to work.

I've downloaded the latest version, installed on a clean 2.8.2 installation, checked out the given answers in this forum and tried again, but unfortunately with the same results.

Later on i will be able to test this at another hosting provider.
If any results differ i'll post it here.

Thnx
Logged

Why i have just a few posts?
I read the topics!
lausianne
WebsiteBaker Org e.V.

Offline Offline

Posts: 155


WWW
« Reply #36 on: April 19, 2012, 08:31:47 PM »

Just installed v0.7.6 on WB2.8.3r1638. Initially it worked fine. I could add rows and columns and edit data. Then I tried to hide columns. The columns disappeared, although the checkmarks stayed in the control boxes. Eventually I had all columns hidden, then switched them on again. The columns are all back now, but no rows are displayed anymore ...
There is a box with a message "Bitte warten..." (please wait). Stays there forever.

In the console I see this error: obj is null (data-table.php (Zeile 58))
That row reads:    obj.style.visibility = "visible"
Logged
lausianne
WebsiteBaker Org e.V.

Offline Offline

Posts: 155


WWW
« Reply #37 on: April 19, 2012, 08:35:37 PM »

ok. I tried exactly the same thing again (deleted the data table page, created it again, clicked the same buttons). Now everything seems to work as it should ... strange ... Only thing I did inbetween was deleting all cookies.

Cool module, very nice, thank you!

« Last Edit: April 19, 2012, 08:37:25 PM by lausianne » Logged
lausianne
WebsiteBaker Org e.V.

Offline Offline

Posts: 155


WWW
« Reply #38 on: April 19, 2012, 08:50:37 PM »

For the application that I have in mind, it would be necessary to have a "fixed" filter for the data. What I'd like to do is display user specific data. I.e. each registered user sees his own data. In that case one of the columns contains user ids, and a logged in user sees only those rows that correspond to his user id.
I "believe" this should be very simple to add to the module. Just one more line in the query ... I wouldn't mind to hard code that. Maybe you could give me a hint where to add that line?
Another question: how "safe" is the module? My table will contain sensitive data, and it is very important that no user can ever see any data of any other user ...

Thank you!
Logged
mdemaree99

Offline Offline

Posts: 68


« Reply #39 on: April 20, 2012, 03:14:41 PM »

Using WB2.8.1  and I can get dynamictable to work, but not this one..

I have tested on different templates and table appears at top  of screen outside of block.
Exactly the mod I need to get working...

« Last Edit: April 20, 2012, 03:16:26 PM by mdemaree99 » Logged
marmot

Offline Offline

Posts: 208


« Reply #40 on: April 22, 2012, 09:56:41 AM »

Hi,

In that case one of the columns contains user ids, and a logged in user sees only those rows that correspond to his user id.
I "believe" this should be very simple to add to the module. Just one more line in the query ... I wouldn't mind to hard code that. Maybe you could give me a hint where to add that line?
try line 64 in Server_Side_Process ing.php:
Code:
$query="SELECT * FROM ".$sTable;
Regrding security I have no tipps.

regards
Logged
Pages: 1 [2]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!