what's the new plugins thing about?

minimalniemand 20 Feb, 2008
I've just upgraded to 2.3.8 and wonder what the new functions are about?
I've read the "profile page" tooltip, which I find kinda interesting. Its maybe exactly what I need.

What I want to have is a very simple management for jobpostings with just a few fields: [list]
  • clientdescription
  • position
  • requirements
  • postdate
  • category
  • section
  • clientname(noto be seen in FE)
  • [/list]So I thought I build
    [list]
  • one form, to make new postings (which can easily be done with CF)
  • a possibility to view and edit current postings, which is only accessible for logged in users
  • one page that displays all postings (or filtered by category/section)
  • and another page which just displays a certain posting.
  • [/list]I thought, maybe the last 3 can be done with this new functions? Is that possible? How? I don't need an complete todo, just some kinda roadmap. The details (logged in users and so) are all in the forums somewhere ...<br><br>Post edited by: GreyHead, at: 2008/02/21 10:48
    GreyHead 21 Feb, 2008
    Hi miniemalniemand,

    I'm still learning about the new PlugIns feature. What Max has provided is the basis for a whole range of possible PlugIns and three specific examples. Here's a quick summary of what I've got so far. [list]
  • A plugin has three functions show_conf() and save_conf(0) which work on the Admin side and allow you to configure the plugin; and either onLoad() or onSubmit(). onLoad is executed when the form is created and onSubmit which is called by ChronoForms when it is processing the form results. (I'm not sure if you can have both in the same PlugIn.)
  • Two of the three examples 'Joomla Registration' and 'CB Registration' can be configured to write results from a form into specific Joomla database tables. So 'Joomla Registration' has code built in to validate the results from specified fields and use those to register the user on the site (including sending off the various emails. (CB Registration does something similar for Community Builder though I haven't used or looked at it at all.)
  • The 'Profile Page' PlugIn is a simple tool to read data from a Joomla database table and include it in form html.
  • [/list]Clearly - all of this is theoretically possible by writing code into the standard ChronoForms boxes. What PlugIns do is to provide a way of adding functionality and sharing it between different forms. As some more PlugIns are built we will put them up on the site here.

    Bob

    PS That is the general reply about PlugIns. I'll look at the specifics in my next post.
    GreyHead 21 Feb, 2008
    Hi miniemalniemand,

    As far as I can see, you could do all of this with the Profile Page PlugIn. I think it would still need some work and particularly around the edit and save parts.

    Bob

    PS I've been building a set of forms for a client using a modified Joomla Registration PlugIn so that people signing up for an information sheet using a ChronoForms form are automatically registered. In the minimal case my version will create a valid registration using just an email address and generating a user name and password.
    minimalniemand 22 Feb, 2008
    thank you so much GreyHead!
    I started building a form and it already saves the data to the table.
    As soon as I'm finished I'll post my results. Could sure be usefull to others...

    ok, here some things I figured out so far:

    To load data from a certain table I created a very simple form with the following code:

    <table style="text-align: left; width: 100%;" >
      <tbody>
        <tr>
          <td>posted on</td>
          <td>title</td>
          <td>category</td>
        </tr>
        <tr>
          <td>{recordtime}</td>
          <td>{title}</td>
          <td>{category}</td>
        </tr>
    
      </tbody>
    </table>


    Then I check "Profile Page" on the Plugins Tab and configure Profile Page for this form on the Chrono Forms - Form Manager like this:
    table name = name of the table like created by CF (jos_chronoforms_1 in my case)
    target field name = cf_id (by default)
    and the Request parameter a column that you want to use as criteria. It would be nice, if this could be let empty for selecting all entries of the table or select all entries by not providing a parameter in the URL.
    ATM the fieldnames in {} brackets are displayed when I dont provide an id.

    But very nice anyways. I see great possibilities!<br><br>Post edited by: minimalniemand, at: 2008/02/22 16:07
    minimalniemand 22 Feb, 2008
    obviously the Profile Page Plugin does not accept all datatypes as parameters.
    I set the parameter to "category" and added &category=consulting (I know its not normalized) giving me no resultset (I have one testrecord with "consulting" in the column "category" (varchar(255)) - without the quotation marks of course).
    So the parameters-thing needs a little tweaking I guess ... ? Or am I doing something wrong?

    now thats strange:
    I manually added the column "published" (tinyint) and set it to 1 for my testrecord.
    using published as a parameter, I get an empty resultset when I provide 1, but the correct record if I provide 2:

    Klick and try for yourself

    could this be some kind of integer/binary thing where my 1 is somehow interpreted as a binary 10?<br><br>Post edited by: minimalniemand, at: 2008/02/22 17:54
    This topic is locked and no more replies can be posted.