Topic: tvExplorer 0.7 betaTest  (Read 62590 times)

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

#1: 11-Jul-2007, 01:09 PM

Coding Team
heliotrope
Posts: 2,545

WWW
NOTE : this post has been translated with google translator

Hi,

The file containing the snippet is here. :
http://modxcms.com/forums/index.php/topic,16455.msg104821/topicseen.html#msg104821

Before using tvExplorer you have to install tvEditor Module

What is tvExplorer?

tvExplorer offers you to create very  easily  advanced search forms  combining fulltext, document tree and tvs.
The list of results is generated with ditto.

Sample form using tvExplorer:
http://www.deco-in.com/recherche-avancee

DOCUMENTATION

Obligatory parameters:

&dittoName => the name of the snippet ditto to be used
&dittoSnippetParameters => parameters of ditto
They must be written in the form
param: value|param: value
&formTPL => name of the chunk containing tvexplorer tags

IMPORTANT:

To activate tvexplorer you must give to your submit  the value “search”.
If you use the parameter &tveID, think of adding like prefixes the value of &tveID followed “_” to the value “search”
Ex: &tveID= `tvx `=><input type="submit" name="tvx_search" />.

Optional parameters:

&tveID => for multiple calls of the snippet in the page, this parameter makes single each form.
You will have to add this value like prefix followed by “_” in front of each placeholder placed following the call.
Ex: &tveID= `tvx `
[+tvx_tve.searchForm+]
[+tvx_tve.dittoList+]

&extraTVs => If in your/your chunks Ditto you use the placeholder [+tagLinks+], extraTVs enables you to post tvs which do not form part of the form.
They will have passed to ditto via tagData.

&cssStyle => list of files css (separated by a comma) to include in the head document.

&jScript => list of files js (separated by a comma) to include in the head document.

Tags

Syntax to use to build a tag is as follows.

[+tve.nomElement:param->value:param2->value2+]


Tags for the tvs

 - Properties of the tags tvs

  • tvtype: which type to apply to the for frent end rendering
  • fullText: activate full text search on this tv
  • filter: which filter to apply
  • filterOff:
  • label:


- The method #RANGE
here is a sample using the range Method

The form element before applying the range method



once the range is applied



Some explanations
The tv type in DB is number

[+tve.ObjectPrix:#RANGE{tvtype->dropdown:label->Votre budget (prix max.):elements->@Chunk intervalPrix:filter->4}+]

tvtype->dropdown => we are changing the tv type from number to dropdwon
elements->@CHUNK intervalPrix => as tv type in db is number there are no options so we're creating them by calling @Bindings (all are supported @EVAL @SELECT @DIRECTORY plus one I creatd @TV)
In this sample the chunk contains
Quote
Moins de 15€==15||Moins de 50€==50||Moins de 80€==80||Pas de limite==9999
filter->4 the filter to apply

If you need to have two elements in your range you have to separate the properties with ||

[+tve.tvname:#RANGE{from || to }+]


Special tags

[+tve.keywordsSearch+]
- Properties of keywordsSearch


  • searchStyle
  • label
  • excludeTVs
  • includeTVs

to supplement

[+tve.parentElt+]

parentElt is used to restore the tree of documents in the form of its choice to offer to the visitors faculty to restrict research with a folder and its children in particular.

Ex of tag: [+tve.parentElt: type->select: start->10,15: depth->2,3: label->Choisissez a heading: blankLabel->-+]
 
- parentElt Parameters
  • start: list ids of the folders which you wish to post separated by a comma.
          Ex: start->5 or start->5,14,47
  • depth: fix the depth for each folder contained in the list start.
          You can define a depth for each folder
          Ex: start->5,14,47: depth->2,3,1
  • excludeStart:
  • hideFolders:
  • type: the type of element has to use in the form (checkbox, dropdown/select, radio/option)
          The denomination modx and HTML are supported
  • label: The text contained in the beacon <label>
          Ex: label->Mots Key
  • blankLabel: for the selects/dropdown you can determine the text to post in the first empty value.
          blankLabel->sélectionnez a value
  • addBlank: If you wish to activate/decontaminate the first value select empties (by defect the value is 1)
          Ex: addBlank->0 one decontaminates the inclusion of the first option empties select.
 

[+tve.dateElt+]

Ex of tag: [+tve.dateElt:source->createdon:name->dateCreation:filter->dateFilter: label->Créé le+]

    * source
    * name
    * dateFormat
    * dateSplitter
    * filter


The system of templates

- Chunks by type

At the time of the installation of the module tvEditor, chunks by defect will be installed for tvExplorer.
Here contents of each one of them.
I will standardize their contents for next the release.
The construction of each input is carried out by using the class MakeForm de Jason (OpenGeek)
I will return later on the régles of substitution of the placeholders of the MakeForm class.

to supplement
&checkboxTPL

Quote
<label class= " checkbox " [+for+] ><input class= " checkbox " type= " checkbox " [+id+] name= " [+name+] “[+value+] [+size+] [+checked+] [+disabled+] [+style+] [+events+]/> [+label+] </label>
[+extra+]

&textTPL
Quote
<label class= " [+required+] [+optional+] [+className+] “[+for+] > [+label+] </label>
<input type= " text " [+id+] name= " [+name+] “[+value+] [+size+] [+maxlength+] [+readonly+] [+disabled+] [+class+] [+style+] [+events+] [+onclick+]/>
[+extra+]

&hiddenTPL

Quote
<input type= " [+type+] “[+id+] name=” [+name+]” [+value+]/> [+extra+]

&selectTPL
Quote
<label class= " select [+required+] [+optional+] [+className+] “[+for+] > [+label+] </label>
<select [+id+] name= " [+name+] “[+size+] [+disabled+] [+multiple+] [+class+] [+style+] [+onchange+] >
[+tve.wrapper+]
</select>
[+extra+]

&optionTPL
Quote
<option [+value+] [+selected+] > [+label+] </option>

&radioTPL
note: this one will have to be modified in the new version of tvexplorer (<label> badly placed)
Quote
<input class= " radio " type= " radio " [+id+] name= " [+name+] “[+value+] [+size+] [+checked+] [+disabled+] [+style+] [+events+]/>
<label radio class= " [+required+] [+optional+] “[+for+] > [+label+] </label>
[+extra+]

- Personalized chunks
to supplement

Placeholders

 - To place after the call
to supplement

[+tve.searchForm+]

[+tve.dittoList+]

 - To place in the chunks
to supplement


EXAMPLES:

http://www.dixsix.fr/explorer/

The code of the chunk &formTPL

Quote
<form action= " [~[*id*]~] “method= "get” >
<fieldset>
[+tve.keywordsSearch:excludeTVs->all:label->Mots clés+]
</fieldset>
<fieldset>
[+tve.Name:filter->9+]
</fieldset>
<fieldset>
[+tve.categorie:filter->9:blankLabel->-+]
</fieldset>
<fieldset>
[+tve.Color:filter->9+]
</fieldset>
<fieldset class= "sendForm" >
<input type= "submit" name= "search" value= "Search"/>
</fieldset>
</form>

The call and placeholders

Quote
[[tvExplorer? &dittoName=`Ditto`&formTPL=`formVin`&dittoSnippetParameters=`tpl: testPHX2|summarize:30|debug:1|paginate:1|depth:5|parents:23`]]
[+tve.searchForm+]
<h3>nb documents: [+total+] </h3>
<div id= " ditto_list " > [+tve.dittoList+] </div>
<p class= " ditto_pagination " >Page <strong> [+currentPage+] </strong> of <strong> [+totalPages+] </strong></p>
<p class= " ditto_pagination " > <span id= " ditto_pages " > [+previous+] [+pages+] [+next+] </span></p>



:-)
« Last Edit: 29-Mar-2008, 06:20 AM by heliotrope »

#2: 14-Jul-2007, 11:46 AM

krypto
Posts: 36

Hi heliotrope!

I found the right forum for my questions Smiley

It seems I still have this problem:

Fatal error: Call to undefined method MakeForm::fetch() in C:\Program Files\xampp\htdocs\096\modx-0.9.6\assets\modules\tvEditor\class\tveditor.class.php on line 1762

here is my snippet call

Code:
[!tvExplorer? &dittoName=`Ditto` &dittoSnippetParameters=`tpl:Katalogtpl|depth:1|parents:14|display:10` &formTPL=`sampleform`!]

[+tve.searchForm+]
[+tve.dittoList+]

and here is my form chunk:

Code:
<form action="[~[*id*]~]" method="get" >

<fieldset>
[+tve.zupanija:filter->7+]
</fieldset>
<fieldset>
[+tve.category:filter->7+]
</fieldset>
<fieldset>
[+tve.price:filter->7+]
</fieldset>
<fieldset class="sendForm">
<input type="submit" name="search" value="Search" />
</fieldset>
</form>

So what am I doing wrong?  I am testing this on a local apache network

#3: 14-Jul-2007, 12:09 PM

Coding Team
heliotrope
Posts: 2,545

WWW
Hi,

never had this error before.
your snippet call and your form are correct.

I'm looking at the code and don't find where the error could come from.

I'll be back in a couple of hour.
If you are on line tonight join me on skype and we'll try to fix this together.

:-)

#4: 14-Jul-2007, 03:57 PM

krypto
Posts: 36

hey there,

sorry I was out but if your are still around, I don't have skype but I am currently on messenger:

krypto-spiderman@hotmail.com

edit

guess we couldn't get together tonight maybe tomorrow, i will be on messenger so hopefully we can work through this.
« Last Edit: 14-Jul-2007, 05:19 PM by krypto »

#5: 15-Jul-2007, 11:39 AM

Coding Team
heliotrope
Posts: 2,545

WWW
Issue solved.

the version used by krypto was an older one posted in french forum.

:-)

#6: 17-Jul-2007, 01:18 PM

Testers

Dimmy
Posts: 2,065

Я не говорю по-русски 私は日本語を話さない

WWW
Nice work Heliotrope,

Thank you for assisting me to get this to work. here is my call:
Code:
[[tvExplorer? &dittoSnippetParameters=`parents:6|tpl:ditto_aanbod_tpl1|tplAlt:ditto_aanbod_tpl2|displayArchive:0|summarize:999|total:999` &dittoName=`Ditto` &formTPL=`tve`]]

[+tve.searchForm+]
[+tve.dittoList+]


and my form template:

Code:
<form action= "[~[*id*]~]"method= "get" >
<table>
<tr><td class="een">Kernwoord</td><td class="twee">[+tve.keywordsSearch:label->+]</td><td>
[+tve.merk:filter->9:label->Merk:tvtype->dropdown+]</td></tr>

<tr><td>Prijs van</td><td>[+tve.prijs:#RANGE{elements->@CHUNK priceList:tvtype->select:filter->3:label->:extra-></td>
<td class="drie">||elements->@CHUNK priceList:tvtype->select:filter->4:label->Tot}+]</td></tr>

<tr><td>In catogorie</td><td colspan="2">
[+tve.indeling:filter->9:label->indeling:tvtype->checkbox+]</td></tr>
<tr><td></td><td></td><td>
<input style="float: right;" type="submit" value="Zoek"  name="search" /></td></tr>
</form>
</table>

and here you see the result:
http://www.caravanking.nl/actueel-aanbod.html

the tricky part was the split price tags but helio helped me with that.

greets
Projects we are working on:
VisionCart: modx Revolution Webshop
support the development of VisionCart:

follow me on twitter: @dimmy01
Reclamebureau 1-vision in Rijssen twente

#7: 19-Jul-2007, 05:27 AM

krypto
Posts: 36

Hi heliotrope~

When I click submit all that happens is it appends values to the url:

Quote
index.php?zupanija=Sisacko-moslovacka&category=Stan&price=&tve_search=Search

I assume ditto should be picking up these params and giving output but it seems it is not happening.  Any ideas?

#8: 19-Jul-2007, 07:00 AM

Coding Team
heliotrope
Posts: 2,545

WWW
Hi,

if you don't have FURLs enabled, you have to add an hidden field in your form to pass the id value.

<input type="hidden" name="id" value="[*id*]" />

:-)

#9: 19-Jul-2007, 09:29 AM

Coding Team

doze
Posts: 4,187

....Boom!

Great work Heliotrope! Nice to see public beta finally..  Smiley I know you have done a lot work with this one and it is very much appreciated! This is an excellent resource to have in MODx.
New MODx wiki! Please help up with documentation efforts! || Old Wiki

"He can have a lollipop any time he wants to. That's what it means to be a programmer."

#10: 30-Aug-2007, 10:16 AM

Coding Team
heliotrope
Posts: 2,545

WWW
@krypto

Quote
index.php?zupanija=Sisacko-moslovacka&category=Stan&price=&tve_search=Search

To activate tvexplorer the submit name must be "search".
If you are using tveID param then you have to prepend the name with tveID + "_"

Your mistake comes from my sample code which is wrong.

So to fix your call

Change the submit name from tve_search to search

and add

<input type="hidden" name="id" value="[*id*]" /> in your formTPL
Mandatory when FURLS are off

@doze
sorry for this late reply
Thx for your support and testing during the development

:-)


« Last Edit: 30-Aug-2007, 10:18 AM by heliotrope »

#11: 30-Aug-2007, 04:41 PM

krypto
Posts: 36

Thanks heliotrope, I already figured that one out. Wink  This snippet works great and will be used in a couple of projects I have lined up. Thanks for all your help!

#12: 2-Sep-2007, 10:13 AM


TXRX
Posts: 138

WWW
This has a great set of features and I look forward to testing it out!!
p i x e l  p u s h e r  e x t r o d i n a i r e       
       A x i s  A n i m a t i o n . c o m

#13: 8-Sep-2007, 12:41 PM

krypto
Posts: 36

Hi helio~

I see in the instructions you have a &cssStyle parameter. Where do I need to put the css files for it to use them?

Can I use css files for the [+tveSearchForm+] and [+tveDittoList+] placeholders?

Thanks!

#14: 9-Sep-2007, 04:45 AM

Coding Team
heliotrope
Posts: 2,545

WWW
Hi Krypto,

for this feature I've borrowed some code from eForm (thx to Tobyl )
You can put your files wherever you want you, it can be a chunk, a modx document or a file
If this is a file you have to write the path (relative or absolute)
relative => assets/cssFolder/my.css
absolute=>www.mydomain/ltd/assets/cssFolder/my.css

 [+tve.SearchForm+] and [+tve.DittoList+] placeholders are used to display the rendered output.
css style will be applied to them as any content in the page.

Hope that helps

:-)
« Last Edit: 14-Nov-2007, 04:57 PM by heliotrope »

#15: 11-Sep-2007, 01:08 PM

krypto
Posts: 36

Hi helio~

It's me again  Undecided.  Thanks for all your help thus far, it has been appreciated.  I have a new question for you.

I tried creating a search form with two #RANGE elements in it.  After I created the second one the first one disappeared.  Is it possible two have two #RANGE elements in the search form?  If so, how?  Or am I doing something wrong?  Here is my form template:

Code:
<form id="ponudaForm" action="[~[*id*]~]" method="get">
<input type="hidden" name="id" value="[*id*]" />
<table>
  <tr>
    <td>
      <fieldset>
        [+tve.Marka:filter->7+]
      </fieldset>
    </td>
    <td>
      <fieldset>
        [+tve.Motor:filter->7+]
      </fieldset>
    </td>
  </tr>
  <tr>
    <td>
      <fieldset>
        [+tve.Cijena-eur:#RANGE{tvtype->dropdown:label->Cijena (EUR):elements->@Chunk interval:filter->4}+]
      </fieldset>
    </td>
    <td>
      <fieldset>
        [+tve.Godina:#RANGE{tvtype->dropdown:label->Godina od:elements->@Chunk intervalGod:filter->6||tvtype->dropdown:label->do:elements->@Chunk intervalGod:filter->5}+]
      </fieldset>
    </td>
  </tr>
  <tr>
    <td>
      <fieldset>
        <input type="submit" name="search" value="Search" />
      </fieldset>
    </td>
  </tr>
</table>
</form>

Thanks,
krypto

#16: 11-Sep-2007, 01:16 PM

Coding Team
heliotrope
Posts: 2,545

WWW
Hi Krypto,

this is a known bug

here is a quick fix posted in tveditor thread. => http://modxcms.com/forums/index.php/topic,16455.msg109886.html#msg109886

I'm quite busy and have no time to finish the next release in which I've fixed this bug by rewrting some functions in the tveditor class

So please be patient

:-)

#17: 28-Sep-2007, 07:50 PM

Testers

ZAP
Posts: 1,625

I've started using tvEditor/tvExplorer a lot - thanks for all the work creating it!

I've got one issue that I haven't been able to figure out. If I have a multi-select TV (e.g., "tags") and documents with one or more of these selected and I add a drop-down menu to the search form with a filter number of 9, the only documents that are returned are those with only that value selected (and no others). So for example if one document is tagged "Africa", "Asia", and also "Latin America" it does not show up in a search for any of these values. If it's tagged with only one of these values, however, then it does appear in a search for that value.

I've tried other filter numbers, but none of those have worked either. I would've thought that the standard Ditto filter number 7 would work also, but nope. If I make the field a set of checkboxes, however, it does work. (EDIT: Not true. In fact I get a parse error...) Is there some conflict between the dropdown list form type and multi-select results? And if so, is there a way to work around this?
« Last Edit: 28-Sep-2007, 08:47 PM by ZAP »
"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bugs & requests  | info you should include with your post | commercial support options

#18: 29-Sep-2007, 11:18 AM

Coding Team
heliotrope
Posts: 2,545

WWW
Hi Zap,

did you set the widget for this TV to delimited list with value "," ?
The 9 filter should work nicely in this case.

:-)

#19: 29-Sep-2007, 11:47 AM

Testers

ZAP
Posts: 1,625

That was it! Thanks for setting me straight. I didn't follow all of the directions from the beginning this time because I thought I knew what I was doing, but I skipped that one very important detail.
"Things are not what they appear to be; nor are they otherwise." - Buddha

"Well, gee, Buddha - that wasn't very helpful..." - ZAP

Useful MODx links: documentation | wiki  | forum guidelines  | bugs & requests  | info you should include with your post | commercial support options

#20: 29-Sep-2007, 11:59 AM

Coding Team
heliotrope
Posts: 2,545

WWW
u're welcome  Wink

I had a new version of tvexplorer but unfortnately I've lost in a HD crash.
I will try to get a new version in the month to be to increase performance and improve the quality code.
If you have any features request let me know.

:-)
Pages: [1] 2 3 ... 12   Go Up
0 Members and 1 Guest are viewing this topic.