WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Modules => Topic started by: nonplus on April 17, 2006, 08:51:07 AM

Title: New Module: Javascript Admin
Post by: nonplus on April 17, 2006, 08:51:07 AM
Module Javascript Admin - for WB 2.6.x

Download:  http://www.nonplus.net/software/download/wb/jsadmin-1.0.2.zip (~44KB)
05/05/2006: Version 1.0.2 fixes style sheet to display "hand" cursor over links inside draggable rows
04/20/2006: Version 1.0.1  fixes problem with most hosting setups


Purpose:  This modules fixes some pet peeves I have with WB.  8-) It enhances the WebsiteBaker administration, rather than a WB site.  Using Javascript (and AJAX) it makes certain administration tasks more pleasant.  The current version supports the following features, each of which can be turned on or off.


Installation: Download the ZIP and install it in the WebsiteBaker Administration (Add-ons -> Modules -> Install Module). To activate this module, you will have to edit the WB source:

The modified function should end up looking like this:
Code:
Only registered users can see contents. Please click here to Register or Login.
Configuration: Go to "Settings", click "Show Advanced Options" at the bottom of the page, click "Javascript Admin" at the bottom of next page.

Usage: "Remembering Expanded Pages" does what it says: it remembers and restores which pages were expanded.  When you have drag-and-drop enabled, clicking on a row and dragging it it to another row will reorder the rows using AJAX.  You don't have to wait for the page to be saved or reloaded.

Compatibility: I've tested it on IE 6 on Windows, in FF 1.5.0.1 on Windows and MacOS and in Safari 2.0.3 on MacOS. It should really work with any current browser, though.
Addendum: I tested it with Opera and the drag-and-drop does not work.  But then again, WB looks a bit messed up in Opera, anyway.

License: BSD license.  The Javascript files in the /modules/jsadmin/js/yui directory are from the Yahoo! User Interface Library (http://developer.yahoo.com/yui/), which also carries a BSD license.
Title: Re: New Module: Javascript Admin
Post by: maxbrax on April 17, 2006, 10:59:38 AM
 :|
sorry i have installed this module but it not work :-(

the administation setting respond with this message:

--------------------------------------------------------------------------------------------------------------
The module has not yet been integrated into WebsiteBaker. Use to following steps to activate the module:

1. In a text editor, open the file wb/framework/class.admin.php
2. Find the function print_footer()
2. Add the following line to it:
   @include(WB_PATH.'/modules/jsadmin/footer.php');
4. The function should end up looking like this:
        function print_footer() {
                @include(WB_PATH.'/modules/jsadmin/footer.php');
                $footer_template = new Template(ADMIN_PATH."/interface");
                $footer_template->set_file('page', 'footer.html');
                $footer_template->set_block('page', 'footer_block', 'header');
                $footer_template->parse('header', 'footer_block', false);
                $footer_template->pparse('output', 'page');
        }
----------------------------------------------------------------------------------------------

i have made this changment but it not work.

please send your comments.

sorry fo my english.

Title: Re: New Module: Javascript Admin
Post by: nonplus on April 17, 2006, 05:14:01 PM
The admin shows the instructions if it cannot detect that the module has been properly included - for example if you didn't specify the correct path.  It will also show this if you have JavaScript disabled (I should probably change the message for this).

Try removing the "@" from the include line.  You should then see some error messages at the bottom of the screen telling you why the include is failing.

Also, I've developed and tested this with the latest version (2.6.2) of WB.  I have no idea whether it will work with an older version...
Title: Re: New Module: Javascript Admin
Post by: Argos on April 18, 2006, 12:46:11 PM
Sounds very nice! Will try it later today...
Title: Re: New Module: Javascript Admin
Post by: bartvdb on April 18, 2006, 03:07:52 PM
:|
sorry i have installed this module but it not work :-(

the administation setting respond with this message:

--------------------------------------------------------------------------------------------------------------
The module has not yet been integrated into WebsiteBaker. Use to following steps to activate the module:

1. In a text editor, open the file wb/framework/class.admin.php
2. Find the function print_footer()
2. Add the following line to it:
   @include(WB_PATH.'/modules/jsadmin/footer.php');
4. The function should end up looking like this:
        function print_footer() {
                @include(WB_PATH.'/modules/jsadmin/footer.php');
                $footer_template = new Template(ADMIN_PATH."/interface");
                $footer_template->set_file('page', 'footer.html');
                $footer_template->set_block('page', 'footer_block', 'header');
                $footer_template->parse('header', 'footer_block', false);
                $footer_template->pparse('output', 'page');
        }
----------------------------------------------------------------------------------------------

i have made this changment but it not work.

please send your comments.

sorry fo my english.



Well, I've tried to install this module also, and didn't get it to work either. Not in version 2.6.2 or 2.6.3
I've tried to remove the @ to get the errors, but even this didn't work.
Title: Re: New Module: Javascript Admin
Post by: valerie on April 18, 2006, 09:09:13 PM
@nonplus:

Not to be dense, but can you clarify on the installation instructions you added above (for the php challenged)--would the new line in class.admin.php be this?

Code:
Only registered users can see contents. Please click here to Register or Login. or this?
Code:
Only registered users can see contents. Please click here to Register or Login. or something else?

This sounds like a fantastic module and I'd love to get it running.

Thanks!
Title: Re: New Module: Javascript Admin
Post by: nonplus on April 18, 2006, 09:15:45 PM
The line needs to go after the curly brace.  The modified print_footer function should end up looking like this:

Code:
Only registered users can see contents. Please click here to Register or Login.
Title: Re: New Module: Javascript Admin
Post by: Vincent on April 19, 2006, 01:28:24 PM
Pity it doesn't work  :| in my 2.6.2 version, seems very promising. Hope you can make it work for all of us.
Vincent
Title: Re: New Module: Javascript Admin
Post by: kickarse on April 19, 2006, 04:16:57 PM
Doesn't work for me either my code looks like this

Latest install of WB

Code:
Only registered users can see contents. Please click here to Register or Login.
Title: Re: New Module: Javascript Admin
Post by: centran on April 20, 2006, 03:40:13 AM
Still on 2.6.2 and this doesn't work.
When I click on Javascript Admin i get the error saying I didn't edit the file correctly.
The file was edited correctly.
I restarted my webserver just in case and still no luck.

My server is running on Linux. Maybe it is an OS thing.
Title: Re: New Module: Javascript Admin
Post by: nonplus on April 20, 2006, 05:26:49 AM
Well I'm not sure what the heck is going on with this.  I've been trying to debug this with kickarse with no good luck on my part.  I too am running it on Linux on Apache with PHP 4.x.  :|

Is anyone (beside me, that is) having success with this module?
Title: Re: New Module: Javascript Admin
Post by: centran on April 20, 2006, 07:15:13 AM
Hopefully this works for someone else besides nonplus. Then we might be able to firgure out similarites and differences in our setups.

here is my phpinfo
http://calendar.stjosephat.com

Could this be a php4 or php5 problem? I would think that other errors would have been thrown.
Title: Re: New Module: Javascript Admin
Post by: nonplus on April 20, 2006, 07:45:50 AM
Thanks for the phpinfo.  I think I figured out the problem.  My setup uses phpsuexec (it's a security thing that lets PHP scripts run with a real userid rather than the web server's userid).  Anyway, the script is using the $_ENV variable which is initialized in phpsuexec, but not in a "standard" Apache setting.

If someone's willing to test the following change and let me know if it works, I'd appreciate it.  Instal JsAdmin as per instructions (including modifying the class.admin.php file)  Then change the /modules/jsadmin/footer.php file, by replacing line 8:

Code:
Only registered users can see contents. Please click here to Register or Login.
with the following:

Code:
Only registered users can see contents. Please click here to Register or Login.
BTW, this should work in either 2.6.2 or 2.6.3 (I haven't tested it in anything older than that).
Title: Re: New Module: Javascript Admin
Post by: Vincent on April 20, 2006, 09:09:42 AM
The good news: it did the trick!  :-) :-) :-)
More good news: it also works in 2.6.1
A very handy tool. So: great work, nonplus.

The bad news (maybe just for me): I can only make it work on my local server. On my webhost I can't change the CHMOD settings to execute... Very strange, never had this before. If you know the problem (and the solution), please let me know.

Vincent


added:
I made a new zip-file with the changed footer.php. It works. Great!
Title: Re: New Module: Javascript Admin
Post by: maxbrax on April 20, 2006, 09:35:10 AM
 :lol: :lol: :lol:

ok the New Module: Javascript Admin work on WB 2.6.2 in local PC with Easy PHP 1.8 and on remote server WEB.

very good application thank nonplus
Title: Re: New Module: Javascript Admin
Post by: kibmcz on April 20, 2006, 09:40:43 AM
Thanks for the phpinfo.  I think I figured out the problem.  My setup uses phpsuexec (it's a security thing that lets PHP scripts run with a real userid rather than the web server's userid).  Anyway, the script is using the $_ENV variable which is initialized in phpsuexec, but not in a "standard" Apache setting.

If someone's willing to test the following change and let me know if it works, I'd appreciate it.  Instal JsAdmin as per instructions (including modifying the class.admin.php file)  Then change the /modules/jsadmin/footer.php file, by replacing line 8:

Code:
Only registered users can see contents. Please click here to Register or Login.
with the following:

Code:
Only registered users can see contents. Please click here to Register or Login.
BTW, this should work in either 2.6.2 or 2.6.3 (I haven't tested it in anything older than that).

Works for me on WB 2.6.3 on  my commercially hosted site... great job.
Title: Re: New Module: Javascript Admin
Post by: nonplus on April 20, 2006, 01:36:24 PM
Everyone - thanks for helping me fix this.  It was driving me nuts...   :-)

A new version 1.0.1 which contains this fix can be downloaded from http://www.nonplus.net/software/download/wb/jsadmin-1.0.1.zip.

I've also updated the download link and license info in the original post at the top of this page.
Title: Re: New Module: Javascript Admin
Post by: valerie on April 20, 2006, 01:48:02 PM
Works here too, though I had the same permissions problem and got php errors when I tried to uninstall through the wb interface.  For some reason I have that permissions problem with wb--I can't change files installed by wb except through the wb interface.

Anyway,  thanks for your work on this!
Title: Re: New Module: Javascript Admin
Post by: centran on April 20, 2006, 08:54:51 PM
awesome job. This should be added to WB.

However, how hard would it be to intergrate more fully. By that, I mean so modules can take advantage of the drag and drop.

This would have really helped when setting up forms. I would also like to use this for the download gallery.

Would be an easy fix like adding another pagetype or is there more coding envolved? I would try to firgure it out myself but no time right now and I firgured the programmer would know better then I.
Title: Re: New Module: Javascript Admin
Post by: nonplus on April 20, 2006, 09:17:56 PM
If this were properly integrated with WB, it could probably be designed in a fairly generic way to make it usable with other pages and modules, not unlike how the move up/down buttons work.  The beck-end is pretty trivial, it's the UI part of it thats's hard.

To make this feasible, it would require a common way of generating the HTML for tabular and hierarchical data.  I've looked at three areas: "Pages", "Sections" and "Chapters" (in the Manual module) and they all do it differently.  And the "Pages" HTML is malformed, to begin with (duplicate IDs, ULs that are direct descendants of other ULs, etc.) so my script first has to fix everything up before it can even start thinking about drag-and-drop.

Maybe the WB developer(s) can look at this as an incentive to design the WB3 UI in a more consistent and standards compliant way. It should then be AJAX-fiable without too much effort.  8-)

Otherwise, drag-and-drop would have to be hand coded for each page, and that's definitely not something for the faint of heart...
Title: Re: New Module: Javascript Admin
Post by: pcwacht on April 20, 2006, 11:01:37 PM
Since you allready master the trick

What are the requirements to 'easaly' integrate the ajax stuff?


Maybe if you can write some guidelines the core developers and the module makers can use it.


John
Title: Re: New Module: Javascript Admin
Post by: nonplus on April 21, 2006, 04:10:04 AM
Maybe if you can write some guidelines the core developers and the module makers can use it.
I suppose I could tackle that.  I'm actually not all that familiar with what the "popular" modules are.  What are some of the most common ones that could benefit from drag-and-drop?  I'll take a look at their UI and try to come up with a common approach that would work for all (or most) of them.

   - Stepan
Title: Re: New Module: Javascript Admin
Post by: centran on April 21, 2006, 04:30:37 AM
...  What are some of the most common ones that could benefit from drag-and-drop?  ...

The built in ones can benefit. The form module and the news.
There are upgraded verisions to those core modules that add some enhanced features. However, I am pretty sure the list generating code is the same between the core module and upgraded module. The upgrades had nothing to do with the list.

Other addon modules that I know have lists are
Download gallery and Image gallery.  I think the download gallery was modified off of the image gallery, so that code may be similar.

The modules are here.
http://addons.WebsiteBaker.org/modules/

I am not sure if there are any other that use lists.
Title: Re: New Module: Javascript Admin
Post by: nonplus on April 21, 2006, 04:47:01 AM
I've checked some of them out.  It seems that most of them are pretty similar, just a flat table with a row per entry.  The only exceptions I noticed are the Manual (which uses a flat table to represents a 2-level hierarchy) and the main Pages (which uses nested lists).

I could generalize the drag-and-drop Javascript code for the common forms pretty easily.  The module developer would have to add a particular class name to the table (for example "wb_dragdrop") and implement a "move_to.php" script similar to the existing "move_up/down.php" scripts.  The move_to should be implemented in the class.order.php file.

Ryan, please PM me if you'd like me to work on this integration.
Title: Re: New Module: Javascript Admin
Post by: Stefan on April 21, 2006, 10:53:29 AM
I have just now noticed this thread.
Fantastic work, nonplus! Unbelievable that this modification is possible with only a single line changed in the core files!
I'd love to see this integrated into 2.7.0 and I'd love to see you on the development team. Thanks for the contribution!
Title: Re: New Module: Javascript Admin
Post by: kickarse on April 21, 2006, 10:28:52 PM
What would be great too is if you could help us out with the E-Commerce modules... like this one
http://forum.WebsiteBaker.org/index.php/topic,3016.0.html
and the Paypal cart that I am struggling with... grr... im such a newb...
Title: Re: New Module: Javascript Admin
Post by: nonplus on May 05, 2006, 01:28:54 PM
A new version 1.0.2 is available from http://www.nonplus.net/software/download/wb/jsadmin-1.0.2.zip.

This version corrects the stylesheet s.t. when you mouse over links inside a draggable row (for example over a page name or a move up/down button) the browser shows to correct "pointer" or "hand" cursor.
Title: Re: New Module: Javascript Admin
Post by: ilicz on May 19, 2006, 01:06:27 PM
i just found this module, installed it and it's great! Good work, sir ;o)
Title: Re: New Module: Javascript Admin
Post by: Vincent on May 29, 2006, 01:52:22 PM
Hi, Nonplus,

unfortunately it doesn't seem to work in 2.6.4...  :|

Vincent
Title: Re: New Module: Javascript Admin
Post by: kibmcz on May 29, 2006, 08:01:08 PM
Hi, Nonplus,

unfortunately it doesn't seem to work in 2.6.4...  :|

Vincent

It works on my 2.6.4 install... Are you shure you modified the uploaded 2.6.4 class.admin(.)php?

Attached is my modifed class.admin(.)php

[gelöscht durch Administrator]
Title: Re: New Module: Javascript Admin
Post by: Vincent on May 29, 2006, 09:13:59 PM
Thanks kibmcz!
I don't know where you got it from, but it works.

Vincent
Title: Re: New Module: Javascript Admin
Post by: ilicz on May 30, 2006, 12:31:04 AM
i think that he took it from install notes  :-)
Title: Re: New Module: Javascript Admin
Post by: virgil on May 31, 2006, 01:02:22 AM
Hi everybody

Quote

... Attached is my modifed class.admin(.)php...

...i think that he took it from install notes  :-)...


@kibmcz @ilicz

I'm interested in following:

could you please specify more exactly ...
- what the modification consists in?   ...and...
- where you get it from

Thank you
Virgil

---

[EDIT]

OK forget my questions, found out what you meant... :roll:
add in line 149 of class.admin(.)php
Code:
Only registered users can see contents. Please click here to Register or Login.like explained in install notes of first posting
Title: Re: New Module: Javascript Admin
Post by: valerie on September 29, 2006, 11:33:38 AM
What does this mean? Anyone know? I have uploaded the new classadmin(.)php file referenced above...

query("SELECT value FROM ".TABLE_PREFIX."settings WHERE name = '".$name."'"); if($row = $rs->fetchRow()) return $row['value']; return $default; } function save_setting($name, $value) { global $database; $prev_value = get_setting($name, false); if($prev_value === false) { $database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('$name','$value')"); } else { $database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$name'"); } } ?>
Fatal error: Call to undefined function: get_setting() in /home/..../public_html/modules/jsadmin/tool.php on line 34

I get the error when I go to settings>advanced>javascript admin
Title: Re: New Module: Javascript Admin
Post by: valerie on October 26, 2006, 09:13:33 PM
Does anyone have this working in 2.6.4? The last version I could get it to work on was 2.6.3 so I'm wondering if the get_setting() function that is causing the above error was added in the 2.6.4 version and if I go back to 2.6.3 then I could get this working...
Title: Re: New Module: Javascript Admin
Post by: generic on October 28, 2006, 06:00:24 PM
I have noticed that the 3 checkbox admin settings dont seem to stick.  I check all the boxes, then I am able to drag and drop fine, but if I close the browser or come back to the admin at a later date, the drag and drop does not work and the settings are unchecked.

Anyone else experoence this?
Title: Re: New Module: Javascript Admin
Post by: mathetos on October 30, 2006, 03:31:13 PM
Just installed it on my desktop installation (WB: 2.6.4 server: xampp, OS: WinME, browser: Fx 2). And it worked flawlessly!

I agree with the others that it would be great to be able to implement this into the other modules as well.

Great work. Can't wait to see how it develops.

~mathetos~
Title: Re: New Module: Javascript Admin
Post by: generic on November 15, 2006, 07:35:41 PM
I have noticed that the 3 checkbox admin settings dont seem to stick.  I check all the boxes, then I am able to drag and drop fine, but if I close the browser or come back to the admin at a later date, the drag and drop does not work and the settings are unchecked.

Anyone else experoence this?

nobody else has experienced this?..  ok...
Title: Re: New Module: Javascript Admin
Post by: ruebenwurzel on January 17, 2007, 07:21:29 AM
@nonplus

please read here:

http://forum.WebsiteBaker.org/index.php/topic,5138.0.html (http://forum.WebsiteBaker.org/index.php/topic,5138.0.html)

can you do this for us?

Matthias
Title: Re: New Module: Javascript Admin
Post by: doc on January 17, 2007, 08:24:43 PM
Matthias,

had a look on the existing javaadmin script.
It shouldn´t be a big deal to modify it thus we could implement it to the core files.

See the following problems with implementing javascript admin into WB 2.7 core files:
Alll PHP files are copyright by Stephan (maybe we could get the rights).
Even more anoying, most of the vital Javascript core files are Copyright Yahoo.com without any further support  <<< Copyright (c) 2006 Yahoo! Inc. All rights reserved. >>>

There are some powerfull free AXAJ kits available which are lincensed under GNU like Prototype, XAJAX, SAXAJ and some free effect JavaScript kits like scritpaculus or mad4milk.
Would be better to rewrite the whole Script based on such a free library (with support, bugfixes and a big community). The second proposal would need some time and may not be finished until WB2.7 becomes available.

Regards Christian
Title: Re: New Module: Javascript Admin
Post by: ruebenwurzel on January 17, 2007, 08:36:53 PM
Hello doc,

yes i totally agree. Didn't look at the licenses. And yes we better should use scripts wich are licensed under GNU.

Don't know how fast WB 2.7 will be available but i think we have enough time to get this working in WB 2.7. as all the changes ryan planed need also a little bit time and testing.

Is there a special script you know wich could easily be used? Think about putting the whole third party script in the include folder and only including this files in the framework/class_admin.php and only adapt the ordering functions to use this scripts.

I Only understand a little bit php, no javascript and no AJAX so it would be nice if this could do someone who understand this.  :wink:

Matthias
Title: Re: New Module: Javascript Admin
Post by: Waldschwein on January 17, 2007, 08:42:20 PM
And always remember- some people have deactivated javascript in their browsers or have a too old one.

Edit: Found a bug. When moving "sections" with it enabled, the delete button is disappering. Using IE7.
Title: Re: New Module: Javascript Admin
Post by: doc on January 17, 2007, 08:45:00 PM
Matthias,

for the Virtual Postits module I´ve used the XAJAX framework (GNU) which is good for people developing in PHP and was a good choice for that specific project.

However, I am currently playing around with the more popular frameworks Prototype and the effect libraries of Scriptaculous. There are a lot of demos available (including things like drag and drop) which works on almost all Browser > 4er generation.

See the links below to get some impression whats possible.
http://openrico.org/rico/demos.page?demo=rico_drag_and_drop_custom_draggable
http://demo.script.aculo.us/shop

Will play around with Prototype and sriptaculus and see what could be done.
Regards Christian

@Waldschwein: most of the demo scripts will work with and without Javascript. Without Javascript you may miss the cool effects, but the principal things work.

Remember that almost all this Javascript libraries needs to be included into the <head> section!!
Title: Re: New Module: Javascript Admin
Post by: Hans on January 17, 2007, 09:38:18 PM
Interesting discussion! I really think WB (Admin) could benefit from some kind of integration with AJAX (maybe Scriptaculous?).
One suggestion: maybe it is wise to merge this topic with this one: http://forum.WebsiteBaker.org/index.php/topic,5138.0.html (http://forum.WebsiteBaker.org/index.php/topic,5138.0.html) ?
Thanks to all
Hans
Title: Re: New Module: Javascript Admin
Post by: Waldschwein on January 18, 2007, 03:10:41 PM
Hello!
Ok, I have actually found the link of AJAX discussion in phpBB3.  :roll: http://area51.phpbb.com/phpBB/viewtopic.php?f=3&t=23911
So, nearly everybody thinks, that it should not be integrated permanently.
Yours Michael
Title: Re: New Module: Javascript Admin
Post by: doc on January 18, 2007, 07:52:22 PM
Hello Michael,

read through the AJAX discisson in the phpBB forum followin the link you posted below. Most posts looks for me more like stomach feeling than solid background. Of course, some posts show substance, but pros and cons are equally distributed.

Quote
The real problem with AJAX is that you have to take special care to make sure your javascript works on all browsers, otherwise you must also spend time gracefully degrading your javascript so that if a browser doesn't work as expected or they have javascript turned off that the site will still function.

Quote
All current browsers support AJAX, fyi. It's why so many CMSes and forums use it, now: there's no disadvantages.

Best regards Christian
Title: Javascript Admin - Licensce
Post by: doc on January 18, 2007, 08:44:37 PM
Just did some research in GOOGLE to find some background information to the licencse model used for the YAHOO Javascript routines used in the jsadmin module and etvoila, the YAHOO Javascript sources are licensed under BSD, see: http://developer.yahoo.com/yui/license.txt

BSD is comparable to GNU-GPL but withoug copy left, see here for details:
http://en.wikipedia.org/wiki/BSD-Lizenz

Will download the latest version of the YAHOO Javascript code and give it a try:
http://developer.yahoo.com/yui/

Regards Christian

Updated:
Uups, seems the author of the jsadmin module has given a very professional intro in its first post in this thread. There the BDS license is mentioned, however the license module are not written in all Javascript code files (sorry for the worry).
http://forum.WebsiteBaker.org/index.php/topic,3029.msg19152.html#msg19152


Title: Re: New Module: Javascript Admin
Post by: ruebenwurzel on January 18, 2007, 08:47:04 PM
Hello

sounds good  :-D

Matthias
Title: Re: New Module: Javascript Admin
Post by: Argos on July 09, 2007, 05:13:44 PM
Would be nice if this module would work for form fields as well. I have several very long forms, and every now and then I need to edit them. It's a drag to click dozens of times on the arrows to change the order of an item... Is it possible for someone who can code to add this possibility?
Title: Re: New Module: Javascript Admin
Post by: Marsu on July 10, 2007, 01:07:35 PM
I got this Error after installation
whats wrong???

query("SELECT value FROM ".TABLE_PREFIX."settings WHERE name = '".$name."'"); if($row = $rs->fetchRow()) return $row['value']; return $default; } function save_setting($name, $value) { global $database; $prev_value = get_setting($name, false); if($prev_value === false) { $database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('$name','$value')"); } else { $database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$name'"); } } ?>
Fatal error: Call to undefined function get_setting() in
.............\wb\modules\jsadmin\tool.php on line 34

can someone please help me thx
Title: Re: New Module: Javascript Admin
Post by: doc on July 10, 2007, 04:39:57 PM
Hello,

have you followed the installation steps described in the very first post (http://forum.WebsiteBaker.org/index.php/topic,3029.msg19152.html#msg19152) in this thread? You need to add one line to framework/class.admin.php to get the module working.

Regards Christian
Title: Re: New Module: Javascript Admin
Post by: cthelight on July 11, 2007, 12:37:20 PM
You must enable this for it to work. Go to settings -> Show advanced options -> JavaScript admin -> Save. It should work
Title: Re: New Module: Javascript Admin
Post by: Marsu on July 12, 2007, 12:09:46 PM
hi

sry for the late response !!!

it was an php.ini thing I changed it and now it works

thx for help juergen
Title: Re: New Module: Javascript Admin
Post by: ruebenwurzel on July 12, 2007, 02:09:40 PM
Hello,

Quote
it was an php.ini thing I changed it and now it works

If you tell us wich thing maybe it is helpfull for other users too.  :wink:

Matthias
Title: Re: New Module: Javascript Admin
Post by: Marsu on July 13, 2007, 02:52:18 PM
Hi Matthias,

sorry I miss it

if this option "short_open_tag = On" is turned Off then this error happens with this module

query("SELECT value FROM ".TABLE_PREFIX."settings WHERE name = '".$name."'"); if($row = $rs->fetchRow()) return $row['value']; return $default; } function save_setting($name, $value) { global $database; $prev_value = get_setting($name, false); if($prev_value === false) { $database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('$name','$value')"); } else { $database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$name'"); } } ?>
Fatal error: Call to undefined function get_setting() in
.............\wb\modules\jsadmin\tool.php on line 34


Juergen
Title: Re: New Module: Javascript Admin
Post by: faquir on December 13, 2007, 07:45:05 PM
Hi Matthias,

sorry I miss it

if this option "short_open_tag = On" is turned Off then this error happens with this module

query("SELECT value FROM ".TABLE_PREFIX."settings WHERE name = '".$name."'"); if($row = $rs->fetchRow()) return $row['value']; return $default; } function save_setting($name, $value) { global $database; $prev_value = get_setting($name, false); if($prev_value === false) { $database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('$name','$value')"); } else { $database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$name'"); } } ?>
Fatal error: Call to undefined function get_setting() in
.............\wb\modules\jsadmin\tool.php on line 34


Juergen

Hey, I was install into my localhost, got the same error, and changed the php.ini, whatever in the system folder or in the php folder, it doesn't work, does someone can tell me how can I enable the error.

---------------------------------
query("SELECT value FROM ".TABLE_PREFIX."settings WHERE name = '".$name."'"); if($row = $rs->fetchRow()) return $row['value']; return $default; } function save_setting($name, $value) { global $database; $prev_value = get_setting($name, false); if($prev_value === false) { $database->query("INSERT INTO ".TABLE_PREFIX."settings (name,value) VALUES ('$name','$value')"); } else { $database->query("UPDATE ".TABLE_PREFIX."settings SET value = '$value' WHERE name = '$name'"); } } ?>
-------------------------------------------
Title: Re: New Module: Javascript Admin
Post by: Schnetty on December 18, 2007, 10:49:42 AM
Hi,

great Tool !
Is it possible to make this work on the Form-Module too? To sort the Formfields with Drag and Drop too, would complete the WB-Backoffice.  :-D


Greets
Schnetty
Title: Re: New Module: Javascript Admin
Post by: Stefek on January 09, 2008, 09:11:34 PM
After installing the mod I get this alert as result
Code:
Only registered users can see contents. Please click here to Register or Login.
Now after reinstalling it shows the same result. damn.
What should I do now?

Stefek

//Edit

OK I got it now.
The problem was the safe-mode which is set on default by the provider "strato", which is a popular "well promoted" webhoster in germany.

It works great now!!

To the Germans:
Mit dem Handling, der in diesem thread beschrieben wird, funktioniert das Mod super. Es ist auch empfehlenswert bei vielen Seiten.
http://forum.WebsiteBaker.org/index.php/topic,5441.20.html
Title: Javascript Admin not working with WB 2.7
Post by: virgil on May 08, 2008, 04:59:39 PM
Hi

I have just installed WB 2.7 ... so far everything seems to work smoothly ... but not Javascript Admin (like it would hot have been installed) ... do I have to activate it also in 2.7 as described in the first post? (I expectet all files are already altered the way it should work directly).

I tested both with IE7 and FF2, and btw an installation I run with WB 2.63 and Javascript runs smoothly wit both browsers.

Your help is very appreciated
thank you
Virgil
Title: Re: New Module: Javascript Admin
Post by: doc on May 08, 2008, 05:50:41 PM
@Virgil:
You need to enable the Javascript Admin via WB Backend: Admin Tools -> Javascript Admin (enable all checkboxes)

Regards Christian
Title: Re: New Module: Javascript Admin
Post by: virgil on May 08, 2008, 06:31:28 PM
Hi Christian

Tks. !!! Works like charm    :-D

You guys did a fantastic job!

cheers
Virgil
Title: Re: New Module: Javascript Admin
Post by: Boudi on October 02, 2008, 05:40:18 PM
Ok here we go:

I have a question in which I could not find any solution here on the forum. After trying it myself I'm stucked.

I'm using the Catalog mod wich works fine with WB2.7. The only thing is that the Catalog mod is not supported by the jasadmin drag and drop mod.

Therefore clients have to manually move their list up and down in the Catalog mod.

My question: How can I implement the jsadmin into this mod? I thought it could be done with a simple
Code:
Only registered users can see contents. Please click here to Register or Login.
but that obviously does not solve this issue.

Any ideas would be highly appreciated. Thnq

Greetz
Boudi




Title: Re: New Module: Javascript Admin
Post by: doc on October 02, 2008, 07:38:29 PM
Hello,

there is currently no kind of API which modules can use to offer the JS-Admin functionallity. As a consequence, this feature needs to be implemented manually for each module itself.

If anybody is willing to create a module or core modification which provides drag and drop in a way which can be used by other modules as well, feel free to post your solution here in the forum. Pretty sure it will make it´s way into the WB core files with a next release.

My preferred solution would be the Javascript Framework jQuery in combination with with a drag and drop plugin like TableDnD (http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/).

Regards Christian