Author Topic: New Module: SorTable (sortable table) a listingmodule  (Read 18694 times)

snark

  • Guest
New Module: SorTable (sortable table) a listingmodule
« on: March 15, 2009, 10:26:26 PM »
I needed an excel like table where each column was clickable to be in alphabetical order

Here it is:  'SorTable'

It comes with 12 fields which I thought would be enough most of the time

the first field has the class "nosort" which makes this column 'not clickble to be the sorting column'... this can be removed from or added to ather column in the settings section.

if you need less than 12 fields just get rid of some <td>'s

other features:
- a maximum amount of rows per page
- buttons for next, previous, first and last
- different colors for odd and even rows

I didn't know how to put the images for next page etc into the loop so I made it ../modules/SorTable/images/ but I guess it would be best to either fill in a full path or someone help me out here and add the proper code ..

to make certain fields emailfields or weblinkfields just put in the settings something like

Code: [Select]
<td><a href="[FIELD_4]">[FIELD_4]</a></td> in stead of just
Code: [Select]
<td>[FIELD_4]</td>


[gelöscht durch Administrator]
« Last Edit: March 16, 2009, 06:41:04 AM by snark »

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #1 on: March 15, 2009, 11:36:46 PM »
Hello Snark!

I like your Module!!

It's similar to something I was already looking for:



But unfortunatly I have a bug with the options.
After putting "save options" I got the message
"Unbekanntes Tabellenfeld 'mod_sortable_settin gs.section_id' in where clause "
(Unknown Tablefield).

Looking forward to it.

Regards,
Stefek
« Last Edit: March 16, 2009, 12:06:59 PM by Stefek »
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

snark

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #2 on: March 15, 2009, 11:42:53 PM »
I have got no errors here, I will test it on some other installations tommorrow

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #3 on: March 16, 2009, 12:29:16 AM »
Hello!

On another installation (on Xampp) it works.
I don't know why the another server says me the line i posted above.

One hint:
- you have a "packed.js" in your module. Please rename this file into "frontend.js".
There is no need to have this line:
<script type="text/javascript" src="script.js"></script>
in the settings (footer loop).

Thank you for this module.

I hope you will be able to figure out why it is not working on my another installation.
Let me know if you need the php info.

Best regards,
Stefek
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #4 on: March 16, 2009, 12:44:45 AM »
Hello.

I think its better if I provide you the phpinfo results of this specific server.

Please find attached.

Best Regards,
Stefek

[gelöscht durch Administrator]
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

snark

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #5 on: March 16, 2009, 06:40:26 AM »
Okay thanks for the information and help, I hope someone with good php knoledge will look into the stuff regarding the error you had, I just do not know where to start since I am not a real coder and creating this module was already a bit beyond my capacities anyway....


I have editted the files like you told me and updated the link in the first file

thanks so far




erpe0812

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #6 on: March 16, 2009, 12:01:08 PM »
Hallo

confirming the error that Stefek got.
The same at my fresh live WB 2.7 installation.

rgds

erpe

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #7 on: March 16, 2009, 03:40:14 PM »
error, not installed, nor tested

change :
Code: [Select]
// Update settings
$sql = "UPDATE `".TABLE_PREFIX."mod_sortable_settings` SET "
    . "`subject` = '$name',"
    . "`field1name` = '$field1name',"
    . "`field2name` = '$field2name',"
    . "`field3name` = '$field3name',"
    . "`field4name` = '$field4name',"
    . "`field5name` = '$field5name',"
    . "`field6name` = '$field6name',"
    . "`field7name` = '$field7name',"
    . "`field8name` = '$field8name',"
    . "`field9name` = '$field9name',"
    . "`field10name` = '$field10name',"
    . "`field11name` = '$field11name',"
    . "`field12name` = '$field12name',"
    . "`style` = '$style',"
    . "`header` = '$header',"
    . "`loop` = '$loop',"
    . "`footer` = '$footer', "
    . "`rssactive` = $rssactive "
    . "WHERE `mod_sortable_settings`.`section_id` = $section_id LIMIT 1 ;";
$database->query($sql);
to
Code: [Select]
// Update settings
$sql = "UPDATE `".TABLE_PREFIX."mod_sortable_settings` SET "
    . "`subject` = '$name',"
    . "`field1name` = '$field1name',"
    . "`field2name` = '$field2name',"
    . "`field3name` = '$field3name',"
    . "`field4name` = '$field4name',"
    . "`field5name` = '$field5name',"
    . "`field6name` = '$field6name',"
    . "`field7name` = '$field7name',"
    . "`field8name` = '$field8name',"
    . "`field9name` = '$field9name',"
    . "`field10name` = '$field10name',"
    . "`field11name` = '$field11name',"
    . "`field12name` = '$field12name',"
    . "`style` = '$style',"
    . "`header` = '$header',"
    . "`loop` = '$loop',"
    . "`footer` = '$footer', "
    . "`rssactive` = $rssactive "
    . "WHERE `section_id` = $section_id LIMIT 1 ;";
$database->query($sql);
no need to call the table again since that table is chosen.

Might give error on different mysql versions.


John

PS Nice module ;)
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

snark

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #8 on: March 16, 2009, 04:17:30 PM »
Dankjewel @ PCWacht, I will change the files tonight...


erpe0812

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #9 on: March 16, 2009, 04:19:57 PM »
Hello

after changing the code in the settings_modify.php the error disappeared, but now:
Quote
Notice: Undefined variable: raw in /var/kunden/webs/test3/modules/SorTable/settings_modify.php on line 129

Notice: Undefined variable: friendly in /var/kunden/webs/test3/modules/SorTable/settings_modify.php on line 129

Notice: Undefined variable: raw in /var/kunden/webs/test3/modules/SorTable/settings_modify.php on line 129

Notice: Undefined variable: friendly in /var/kunden/webs/test3/modules/SorTable/settings_modify.php on line 129

rgds

erpe

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #10 on: March 16, 2009, 04:37:40 PM »
settings_modify.php doesn't has the variable declaration of $raw and $friendly,
these are just warnings or notices, nothing more...

to clean this up:
remove those from that line:
before:
Code: [Select]
       <textarea name="footer" style="width: 100%; height: 80px;"><?php echo str_replace($raw$friendlystripslashes($tfSettings[&#39;footer&#39;])); ?></textarea>
after:
Code: [Select]
       <textarea name="footer" style="width: 100%; height: 80px;"><?php echo stripslashes($tfSettings[&#39;footer&#39;]); ?></textarea>

or add the two variables in the beginning somewhere before line 14:
before:
Code: [Select]
// Get settings
after
Code: [Select]
// This code removes any php tags
$friendly = array('&lt;', '&gt;', '?php');
$raw = array('<', '>', '');

// Get settings
http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....

erpe0812

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #11 on: March 16, 2009, 04:43:46 PM »
Thanks, that did it.

rgds

erpe

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #12 on: March 16, 2009, 05:04:12 PM »
Thanks John.
This is really cool.

Dankjewel @ PCWacht, I will change the files tonight...
Thanks Snark.
Will wait 'till you're done with it.

BTW - you say you ain't coder... but... hoho!
Would be glad having enough skills to do such a module  *lol*

Stefek
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

snark

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #13 on: March 16, 2009, 07:15:43 PM »
Thanks, that did it.

rgds

erpe

Mr Erpe, are all of your errors gone now?...

can you put up or send me a corrected version, since I didn't get to see any errors I would like to use your edit as the 1.0.2 version please put mr PCwacht and yourself into the info file


Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #14 on: March 16, 2009, 09:28:28 PM »
I installed the newest version (1.0.2), but there is no backend admin... And the frontend looks incomplete...
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

snark

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #15 on: March 16, 2009, 11:22:51 PM »
aargh I just saw it too 1.0.2 should have had the corrections mentioned here above... I didn't create the 1.0.2 and I haven't had time to run trough the given solutions above

I advice to use 1.0.1 (and if needed alter it as mentioned above).. I will see if I have some time left tomorrow otherwise it will be wednesday. Right about now I can't do much here

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #16 on: March 16, 2009, 11:25:07 PM »
allright, thanks for the info!
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

erpe0812

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #17 on: March 17, 2009, 08:29:45 AM »
Hi

there must be some hardcoded stuff in there  for I modified the path in the info.php.
I changed back to the old path and now the module works including the changes from PCWacht.
I tested it on my live server.
Release 1.0.3 uploaded to AMASP.

@Snark:  Please check again regarding the  paths.

rgds

erpe

Offline Argos

  • Posts: 2542
  • Gender: Male
    • Argos Media
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #18 on: March 17, 2009, 10:39:44 AM »
That works, thanks!
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
----------------------------------------------------------------
Please don't request personal support, use the forums!

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #19 on: March 17, 2009, 12:23:10 PM »
Thanks to all.

It now works also on the serverI used.

Kindly Regards,
Stefek
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

snark

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #20 on: March 17, 2009, 02:15:34 PM »
great to hear my first real contribution works fine

expect some more to come soon!

Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #21 on: March 17, 2009, 02:26:58 PM »
great to hear my first real contribution works fine

expect some more to come soon!

Great.
Nice to see new "skilly fingers" in the community ;-)

Best Regards,
Stefek
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

snark

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #22 on: March 17, 2009, 02:29:47 PM »
my skills are more into photoshop/designstuff...

As soon as I find the time I will create a new design for the admin for ya all



Offline Stefek

  • Posts: 6177
  • Gender: Male
  • ("ړ)
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #23 on: March 17, 2009, 02:31:55 PM »
Cool.

As you can see at the "project" page - there will be maybe a possibility to skin the Backend Theme comfortable (and exchangeable).

:-)

Regards,
Stefek
"Gemeinsam schafft man mehr."

gemeinsam
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

snark

  • Guest
Re: New Module: SorTable (sortable table) a listingmodule
« Reply #24 on: September 16, 2009, 10:24:13 PM »
I am working on a new version...

I found this and want to integrate this

http://www.javascriptkit.com/script/script2/tablefilter.shtml

is there anyone here that knows how to make the table start invisible?



 

postern-length