Topic: tvEditor beta 0.8.5  (Read 46030 times)

Pages: [1] 2 3 ... 7   Go Down

#1: 11-Jul-2007, 12:59 PM

Coding Team
heliotrope
Posts: 2,545

WWW
Hi Folks,

Here is tveditor.
(for detailed features see screenshots)

what is tvEditor:
tvEditor is a GUI for tv options editing.
Dropdown, listbox, option, listbox-multiple and radio are supported (even those containing @BINDINGS)
You can edit, add, sort tvoptions.
You can search documents for each tvs or create custom forms.

INSTALLATION:

Step 1:

- unzip tvEditor.zip
- upload in assets/modules/ the tvEditor folder (keep the name as it is=>camelCase)
- Create a new module => tveditor
Copy and paste this line in the content
Code:
include_once($modx->config['base_path'] . "/assets/modules/tvEditor/tveditor.module.php");

Step 2:

In  tvEditor/snippets/ You will find several snippets
1/tvExplorer
2/tve_splitPagination
3/tve_AjaxSearch

Install each of them, keep their name as mentioned above.

To execute ditto in the backend you need to change one line in  ditto.class.inc.php .
This will not affect ditto in any manner
In the buildURL() function
Change:
Quote
$url = $modx->makeURL(trim($cID), '', $queryString);
to:
Quote
//$url = $modx->makeURL(trim($cID), '', $queryString);
         $url = (isset($modx->documentObject['id'])) ? $modx->makeURL(trim($cID), '', $queryString) : 'index.php?id='.$GLOBALS['modID'].$queryString;
         

Add the extenders=> tve.extenders.inc.php et tvefilter.extenders.inc.php
(they are in the ditto_extenders folder) in your assets/snippet/ditto/extenders.

Once done:
-Execute le  tvEditor Module
Click on the install button
This will add to your db the required chunk.

Once the module is installed, check in the configuration tab if ditto name match the name of ditto on your installation.

Now you can easily edit tv options

:-)
there are some options but my english is much too bad to give you the details

NOTE: Ditto2 is mandatory
TVs with multiple values (checkbox, listbox-multiple) must have widgets set to delimited list with value = ','
No other widgets is supported


SCREENSHOTS:

TVs List:
Columns can be sorted.



TV options list



Edit tv options



Edit single option



Add new options



Sort options values



Search document per tv



Form builder


Step 1: choose your template



Step 2:  choose the tvs you want to search



Step 3: find the documents which matches your criteria



Etape 4 : Edit TV values
And you can edit the tvs value from the list with QE



Toutes les étapes s'effectuent sans recharger la page grace a AJAX.

* tvEditor.0.8.5.2.zip (182.63 KB - downloaded 1240 times.)
« Last Edit: 16-Jul-2007, 10:00 AM by heliotrope »

#2: 11-Jul-2007, 02:08 PM

raum
Posts: 103

WWW
looks great!
can´t await testing it ...

#3: 11-Jul-2007, 02:19 PM

mmjaeger
Posts: 616

is there a download link somewhere or did I just miss it?

#4: 11-Jul-2007, 02:19 PM

Coding Team
heliotrope
Posts: 2,545

WWW
Sorry I forgot to attach the files 
first post updated
Grin

#5: 11-Jul-2007, 03:00 PM

mmjaeger
Posts: 616

Sorry I forgot to attach the files 
first post updated
Grin

just trying to install it but I seem to have some problems:

Warning: Invalid argument supplied for foreach() in C:\Documents and Settings\Marco M. Jaeger\My Documents\My Web Sites\www\cms\modx\assets\modules\tvEditor\class\tveditor.class.php on line 1233

moreover you're pointing to a line in the ditto class that doesn't exist: //$url = $modx->makeURL(trim($cID), '', $queryString);

note there is a trim now

hope we get this going so I can try it out

#6: 11-Jul-2007, 03:08 PM

Coding Team
heliotrope
Posts: 2,545

WWW

Warning: Invalid argument supplied for foreach() in C:\Documents and Settings\Marco M. Jaeger\My Documents\My Web Sites\www\cms\modx\assets\modules\tvEditor\class\tveditor.class.php on line 1233

Fixed
Download updated files in my first post
you only have to change class/tveditor.class.php

Quote
moreover you're pointing to a line in the ditto class that doesn't exist: //$url = $modx->makeURL(trim($cID), '', $queryString);

note there is a trim now

hope we get this going so I can try it out

You 're right
Now the line (around #958) in ditto class looks like
//$url = $modx->makeURL(trim($cID), '', $queryString);

change it to:
$url = (isset($modx->documentObject['id'])) ? $modx->makeURL(trim($cID), '', $queryString) : index.php?id='.$GLOBALS['modID'].$queryString;
         

« Last Edit: 11-Jul-2007, 03:13 PM by heliotrope »

#7: 11-Jul-2007, 03:30 PM

mmjaeger
Posts: 616

now I'm getting this one:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\Documents and Settings\Marco M. Jaeger\My Documents\My Web Sites\www\cms\modx\assets\modules\tvEditor\class\tveditor.class.php on line 1303

#8: 11-Jul-2007, 03:38 PM

Coding Team
heliotrope
Posts: 2,545

WWW
My bad  Grin
This error should go away once you run the installer

Whatever i've fixed the error in tveditor.class.php

See my first post.

:-)


#9: 11-Jul-2007, 03:40 PM

mmjaeger
Posts: 616

I'm afraid I already ran the installer before the update - I don't see the install button anymore - what do I have to do now?

#10: 11-Jul-2007, 03:48 PM

Coding Team
heliotrope
Posts: 2,545

WWW
This should be fixed in 0.8.5.2 (files attached to first post)

Anyway , if you need to reinstall tveditor in case you delete some of the required chunk.
Just change the param tve installed in the module configuration tab.
Set it to 0 and run the module.

:-)

#11: 12-Jul-2007, 04:18 AM

raum
Posts: 103

WWW
Hi Heliotrope!
Thanks for this great module! I just installed it (0.8.5.2) and it works perfectly, no functional problems encountered up to now. It just makes the handling of lists much easier - you could even allow clients to edit the values in a comfortable way.
... and all the search-functions will really make life easier ...

Just some small suggestions:
- usually with listbox-options just the value-field is shown. This changes as soon as one value look 's like "name == value". This is great ... But: it would be even greater if there would be an button to add the "value" column, or, if it allways would be shown as "value, if different from name" and
- if only the name is filled in without a value, the name should be used
- currently only "listbox,listbox-multiple,checkbox,option,dropdown"-TV´s are supported. it would be great, if the other TV´s would be shown as well. of course, most functions of the module are list-functions, but still it would be perfect to be able to have the others as overview as well ...

BUT: great module! It really makes MODx easier and faster to use ...


* tvEditor-options.png (31.92 KB, 938x482 - viewed 831 times.)

#12: 12-Jul-2007, 04:35 AM

Coding Team
heliotrope
Posts: 2,545

WWW
Hi,

thx for your feedback :-)

Quote
- usually with listbox-options just the value-field is shown. This changes as soon as one value look 's like "name == value". This is great ... But: it would be even greater if there would be an button to add the "value" column, or, if it allways would be shown as "value, if different from name" and
- if only the name is filled in without a value, the name should be used
Not sure to understand correctly :-(
MODx offers two ways to write tvs options.
tveditor does not offer the possibility to mix the syntax (value||value2 or name==value||name==value)
you have to choose one of them when you add the first options.

Quote
- currently only "listbox,listbox-multiple,checkbox,option,dropdown"-TV´s are supported. it would be great, if the other TV´s would be shown as well. of course, most functions of the module are list-functions, but still it would be perfect to be able to have the others as overview as well ...

That's a bit hard to do ! :-)
You can use tvexplorer for this
It allows to render any kind of tv (except file).

I could add a feature to allow you to code your form (as in tvexplorer) and call them in the backend.

:-)

#13: 12-Jul-2007, 05:53 AM


lukwe
Posts: 190

WWW

Searching /listing documents by TV value etc, installed flawlessly on 0.9.6; I would say this instantly bumps it to 0.9.6.7 !!

I believe there is an issue regarding TVs "name == value" in the current MODx core, it may affect further development of tveditor, please check  FlySpray#911


----------------------------------------------------------
http://www.linkedin.com/in/lucapost/
http://www.twitter.com/lukwe/
----------------------------------------------------------

#14: 12-Jul-2007, 06:43 AM

raum
Posts: 103

WWW
Quote
Quote
- usually with listbox-options just the value-field is shown. This changes as soon as one value look 's like "name == value". This is great ... But: it would be even greater if there would be an button to add the "value" column, or, if it allways would be shown as "value, if different from name" and
- if only the name is filled in without a value, the name should be used
Not sure to understand correctly :-(
MODx offers two ways to write tvs options.
tveditor does not offer the possibility to mix the syntax (value||value2 or name==value||name==value)
you have to choose one of them when you add the first options.

it is not really a problem ... but when testing (see the screenshot in my last post) I didn´t fill all values - therefore I had two names associated with a value and the others were just blank values - it would be great, if the default value (if nothing is filled in) would be the name ... it would be great, if the output would look like "name==value||name==name||name==name" or "name==value||name||name" instead of "name==value||name==||name==" if the 2nd and 3rd value are blank ...

Quote
I could add a feature to allow you to code your form (as in tvexplorer) and call them in the backend.
this would be great!!!!!!!! I would love to add a preview of some text-tv´s to the document-overview ... and thumbs of the selected images ;-)

Just now a new warning occured in tvexplorer:
Warning : Wrong parameter count for explode() in /www/htdocs/v158413/modx096/assets/snippets/ditto/extenders/tve.extender.inc.php on line 49
... I was deleting some TV´s, the warning was shown when I had just one list-TV without values, and now I can get rid of it ... before it worked fine.

And a question: in tvExplorer I already set the StartID. How can I change it now?

I just love your work! If somebody implements the functions of the current "Resources - Template Variables" - section it could just replace it - and bump MODx it beyond 0.9.6.7 ;-)                                                                     

#15: 12-Jul-2007, 07:25 AM

Coding Team
heliotrope
Posts: 2,545

WWW
Quote
it is not really a problem ... but when testing (see the screenshot in my last post) I didn´t fill all values - therefore I had two names associated with a value and the others were just blank values - it would be great, if the default value (if nothing is filled in) would be the name ... it would be great, if the output would look like "name==value||name==name||name==name" or "name==value||name||name" instead of "name==value||name==||name==" if the 2nd and 3rd value are blank ...

That's weird
You should not be able to save the options when the form contains empty fields.
I will check this out.

Quote
And a question: in tvExplorer I already set the StartID. How can I change it now?

click on any label in document tree, the value will change accordingly

:-)

P.S about new features, I have been working for about 9 months on the module and the snippet i do not promise anything. I don't have too much free time to keep working on this
I think I will reauthor most of the code for 0.9.7
« Last Edit: 12-Jul-2007, 08:24 AM by heliotrope »

#16: 12-Jul-2007, 07:41 AM

raum
Posts: 103

WWW
Quote
You should not be able to save the options when the form contains empty fields.
Just in case you want to reproduce it:
I had a TV with values only (NOT name - value) and inserted "x==y" as value - and it switched to the name & value view ... with empty values (except one). ok, this was not the common way of using it ...

Quote
click on any label of the folder in document tree, the value will change accordingly
great!

... and I just wanted to say, that I love the direction of this module - and I see a promising picture of where MODx could be somewere soon ...
(now I should start to contribute to the community ... but I am still learning, so it takes a little bit ...)

#17: 12-Jul-2007, 10:19 AM

Coding Team
heliotrope
Posts: 2,545

WWW
Quote
Just in case you want to reproduce it:
I had a TV with values only (NOT name - value) and inserted "x==y" as value - and it switched to the name & value view ... with empty values (except one). ok, this was not the common way of using it ...

You 're pushing the module limit  Grin

When the elements are parsed (name==value||... or value||...)
tvavatar class apply a mode to the tv.
Mode 1 is value||.. and mode 2 is name==value||...
the mode selection is based on the condition that elements contains ==

I haven't thought about this case (enter name==value in value field).

I could add a control on submitted values.

Thx again for your feedback and testing.

:-)



#18: 12-Jul-2007, 11:06 AM

raum
Posts: 103

WWW
what about just adding the line "if ($value == "") $value= $name;"?
it would allow leaving the value-field empty and using the name-field-value instead ...

#19: 12-Jul-2007, 11:48 AM

Coding Team
heliotrope
Posts: 2,545

WWW
I'm gonna try to fix this.
I have to check first if there could be side effects.

I guess I will prohibit the "==" in options value and will add a switch type feature (mode 1<=>mode 2) .

But you 'll have to be patient :-)

By the way, did  you try the tvexplorer snippet ?
« Last Edit: 12-Jul-2007, 11:55 AM by heliotrope »

#20: 12-Jul-2007, 01:13 PM

raum
Posts: 103

WWW
not yet - I don´t use tagged pages up to now, so the snippet doesn´t make sense with these. but if I have some time I will try it!
Pages: [1] 2 3 ... 7   Go Up
0 Members and 1 Guest are viewing this topic.