AutoFormPlus/XSLTSearch dictionary entries Options
azzlack
Posted: Friday, February 08, 2008 2:06:17 PM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
Is there a way to edit AutoFormPlus and XSLTSearch to make them "dictionaryized"?

Or more specifically, how can you edit an ascx file to allow for the umbraco dictionary to do its magic?

Maybe this should be a feature for the next version of these otherwise extremely good tools?

Regards,
Ove Andersen

www.eyecatch.no
drobar
Posted: Friday, February 08, 2008 2:16:47 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,256
Location: KY, USA
Hi, Ove,

I know that AutoFormPlus (being renamed Doc2Form) allows for dictionary items. Check out Casey's beta documentation at http://www.codeplex.com/umbracoext/Release/ProjectReleases.aspx?ReleaseId=5251

XSLTsearch does not yet have built-in dictionary support, but I'm working on it. Or, more precisely, I started working on it and then got very busy. You can read more at http://forum.umbraco.org/17644. I won't give an estimate of when I'll be able to get it completed and tested and released because I just don't know. But it is in process and I *will* finish and release the update. If you need this in a hurry, please contact me through my website.

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
azzlack
Posted: Friday, February 08, 2008 2:48:39 PM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
Hi again Douglas... :)
You are sure good at answering my questions... :D

Is Doc2Form beta3 in a state where it is possible to use it?
(Maybe I should have been asking Casey for that)

I was thinking in these lines on the other post you linked. To change the text that pops up according to the dictionary.

Code:

...

<xsl:when test="count($matchedNodes) = 0">
      No matches were found for <strong>
            <xsl:value-of select="$unescapedSearch"/>
      </strong>
</xsl:when>
<xsl:when test="count($matchedNodes) = 1">
      Your search for <strong>
            <xsl:value-of select="$unescapedSearch"/>
      </strong> matches <strong>1</strong> page
</xsl:when>
<xsl:otherwise>
      Your search for <strong>
            <xsl:value-of select="$unescapedSearch"/>
      </strong> matches <strong>
            <xsl:value-of select="count($matchedNodes)"/>
      </strong> pages
</xsl:otherwise>

...

<span id="xsltsearch_pagerange">
      Showing results <xsl:value-of select="$startMatch"/>
      <xsl:if test="$startMatch != $endMatch">
            to <xsl:value-of select="$endMatch"/>
      </xsl:if>
</span>

...            


I could try to change this myself, but can you put xsl code in dictionary items?
Otherwise I will have to create a LOT of dictionary items.
The "Showing results x to y" line would alone require 3 dictionary items.

Oh. And I shamelessly stole some of your navigation code for my "Articles" section.
I did some changes though, and one of them I can list here because it is something that I request in future versions of XSLTsearch.

Code:

<!-- previous page -->
<a id="previous">
      <xsl:choose>
            <xsl:when test="$page &lt;= 1">
                  <xsl:attribute name="class">disabled</xsl:attribute>
            </xsl:when>
            <xsl:otherwise>
                  <xsl:attribute name="href">
                        ?search=<xsl:value-of select="$search"/>&amp;page=<xsl:value-of select="$page - 1"/>
                  </xsl:attribute>
            </xsl:otherwise>
      </xsl:choose>
      &lt; Previous
</a>
&nbsp;&nbsp;

Changed to: (Visa versa for the <!-- next page --> secion)
Code:

<!-- previous page -->
<xsl:if test="$page &gt; 1">      
      <a id="previous">
            <xsl:attribute name="href">
                  ?page=<xsl:value-of select="$page - 1"/>
            </xsl:attribute>
            &#171; Previous
      </a>
</xsl:if>
&nbsp;&nbsp;

So that the previous page doesn't get shown if there is no previous page.

www.eyecatch.no
drobar
Posted: Friday, February 08, 2008 3:06:18 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,256
Location: KY, USA
I'm using Doc2Form beta on a site and it works well for what I'm doing with it. Do let Casey know of any bugs you encounter, though.

As for XSLTsearch... yes, there will be quite a few dictionary items needed to handle all the text.

Nice idea about the previous link. But for maximum flexibility, and to provide the link for people that want it (even if disabled), why not change the CSS rule to simply hide it rather than show it grayed out? The end result is the same but is more flexible.
Code:

   #xsltsearch_navigation .disabled {display: none;}


Or have I missed an important aspect of your suggestion?

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
neehouse
Posted: Friday, February 08, 2008 3:56:08 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,038
Location: Charleston, West Virginia, United States
Doc2Form is nearly ready, but, the release is awaiting the next release of umbraco (3.0.5) to fix a few problems with the editor controls. Currently, the known issues are:

• Paging will loose the value of the control if the user pages back to a previously displayed/entered 'tab'. This problem is with the umbraco controls and the way they handle ViewState; they have been corrected in source.

• Ajax enabled features of Doc2Form will not work with the current versions of umbraco as the controls that utilize javascript that is loaded by the control don't occur unless it is on the first tab being displayed. Then, if you are using paging, the javascript controls won't re-render correctly. This problem is also corrected in source.

So, simply, don't use paging until the next version of umbraco.

Casey

BTW, the current version of AF+ also has the paging issue above. It also supports some dictionary items, but the latest beta supports dictionary items nearly everywhere. Give it a go.



• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
bootnumlock
Posted: Friday, February 08, 2008 4:00:23 PM

Rank: Fanatic

Joined: 10/9/2006
Posts: 333
we are using Doc2Form on a site that is near launch and as long as you use it for a single page form, it workes great!

we are actually using dictionary items for the receipt emails that are sent out after submission and those even have variable replacement based on content of the form and it was super easy to get set up and rockin'

give it a whirl, i think you will love it!

bootnumlock - aka bob baty-barr [http://www.baty-barr.com]
Level 1 Certified!
neehouse
Posted: Friday, February 08, 2008 4:08:01 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,038
Location: Charleston, West Virginia, United States
Thanks Bob..

Bob reminded me of a good point. Since the emails are dictionary enabled, you should use dictionary items for the content storage, as it gets you around yet another umbraco feature(bug to Doc2Form). If your email contains a comma, it will be parsed incorrectly by umbraco, and will leave you scratching your head. Using the dictionary items bypasses this issue.

• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
azzlack
Posted: Friday, February 08, 2008 4:09:31 PM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
Douglas Robar wrote:

Nice idea about the previous link. But for maximum flexibility, and to provide the link for people that want it (even if disabled), why not change the CSS rule to simply hide it rather than show it grayed out? The end result is the same but is more flexible.
Code:

   #xsltsearch_navigation .disabled {display: none;}


Or have I missed an important aspect of your suggestion?


You are completely on-spot, Douglas. I will not bother change it on my site, but your solution is much better for the package, I think.

I will give Doc2Form a whirl at once.

BTW. How is it with updating Doc2Form when it's released? Do I have to delete all templates, document types, etc. before I install it?

www.eyecatch.no
azzlack
Posted: Friday, February 08, 2008 4:21:18 PM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
Which reminds me...

Up until now I couldnt get email from webpage working.

Casey? Did you look into it?

I will try with Doc2Form and see if the issue is resolved, but I have my doubts.

Anyone else has success with sending emails with Doc2Form?



www.eyecatch.no
neehouse
Posted: Friday, February 08, 2008 4:26:28 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,038
Location: Charleston, West Virginia, United States
Depending on the features introduced (probably nothing new for the current version), updating would be as simple as adding the dll to the bin directory.

If there are new properties, there would be a document explaining which properties to add.
I may look into a update control for the package if it is feasible.

But, to answer your question, templates would not have to be deleted. At the most, the macros would need to be deleted as they would add back with the update.

Case

• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
bootnumlock
Posted: Friday, February 08, 2008 5:38:43 PM

Rank: Fanatic

Joined: 10/9/2006
Posts: 333
My personal blog usese Doc2Form for the comments... which are emailed to me and the testing sites we are using it on all email, just fine...

couple points to investigate...
make sure the sending email address is a legit address... most servers require that now... and also, do you have mail sending configured correctly in umbraco? not sure, but all servers may not accept the 127.0.0.1 default config... use your smtp server and even add your authentication stuff if necessary...

i think all that is set up in the umbracosettings.config in the config directory... right?

bootnumlock - aka bob baty-barr [http://www.baty-barr.com]
Level 1 Certified!
azzlack
Posted: Friday, February 08, 2008 5:58:15 PM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
In my web.config I have this:

Code:
<add key="umbracoSmtpServer" value="smtp-relay2.webhuset.no" />


The only change I have done in the umbracoSettings.config is to change the email in the notifications area to <email>postmaster@eyecatch.no</email> and useDomainPrefixes to false.

The macro looks like this:

Code:
<?ASPNET_FORM>
<?UMBRACO_MACRO macroAlias="Doc2FormEmail" DocumentType="1243" TabName="data" PageTabs="0" HideTabNames="1" ShowDescriptions="1" RequiredText="Required" SubmitButtonText="Send" PreviousButtonText="" NextButtonText="" TextOnSubmit="" RedirectToNode="" StorePropertiesInCookies="" SendEmailResponse="0" ResponseSubject="" ResponseMessage="" ResponseEmailFieldAlias=", " ResponseCopyTo="" EmailForm="1" FormSubject="Message from www.eyecatch.no" FormMessage="[#name] has sent you a message.

[#message]

[#email]" FormToEmailAddress="ove@eyecatch.no" FormFromEmailAddress="[#email]" UseAjax="1" DefaultValueNode=""></?UMBRACO_MACRO>
</?ASPNET_FORM>


www.eyecatch.no
azzlack
Posted: Friday, February 08, 2008 6:02:22 PM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
Hmm.
I don't know why, but some stuff from the last post just disappeared...

Hope Umbraco is getting a better forum soon, because this one is loaded with bugs.

Anyway, what I had in my web.config:

Code:

<appSettings>
    <add key="umbracoDbDSN" value="Server=mssql01.webhuset.no; Database=eyecatch; User ID=eyecatch; Password=vKWhFQw7x; Trusted_Connection=False" />
    <add key="umbracoConfigurationStatus" value="3.0.3" />
    <add key="umbracoReservedUrls" value=",/config/splashes/booting.aspx,/config/splashes/noNodes.aspx," />
    <add key="umbracoReservedPaths" value="/umbraco/,/install/" />
    <add key="umbracoContentXML" value="/data/umbraco.config" />
    <add key="umbracoStorageDirectory" value="/data" />
    <add key="umbracoPath" value="/umbraco" />
    [b]<add key="umbracoSmtpServer" value="smtp-relay2.webhuset.no" />[/b]
    <add key="umbracoEnableStat" value="false" />
    <add key="umbracoHideTopLevelNodeFromPath" value="true" />
    <add key="umbracoEditXhtmlMode" value="true" />
    <add key="umbracoUseDirectoryUrls" value="false" />
    <add key="umbracoDebugMode" value="true" />
    <add key="umbracoTimeOutInMinutes" value="20" />
    <add key="umbracoDisableVersionCheck" value="true" />
    <add key="umbracoDisableXsltExtensions" value="true" />
    <add key="umbracoDefaultUILanguage" value="en" />
    <add key="umbracoProfileUrl" value="profiler" />
</appSettings>


This is the only changes that I remember doing...

www.eyecatch.no
azzlack
Posted: Friday, February 08, 2008 6:03:21 PM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
Aww shit!

And I just posted my password to my mssql?!!!

And there is no way to edit my post... LOL!! How stupid can one be?

www.eyecatch.no
neehouse
Posted: Friday, February 08, 2008 10:35:47 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,038
Location: Charleston, West Virginia, United States

Code:
<?UMBRACO_MACRO macroAlias="Doc2FormEmail"
   DocumentType="1243" TabName="data" PageTabs="0" HideTabNames="1"
   ShowDescriptions="1" RequiredText="Required" SubmitButtonText="Send"
   PreviousButtonText="" NextButtonText="" TextOnSubmit="" RedirectToNode=""
   StorePropertiesInCookies="" SendEmailResponse="0" ResponseSubject=""
   ResponseMessage="" ResponseEmailFieldAlias=", " ResponseCopyTo=""
   EmailForm="1" FormSubject="Message from www.eyecatch.no"
   FormMessage="[#name] has sent you a message.  [#message] - [#email]"
   FormToEmailAddress="ove@eyecatch.no" FormFromEmailAddress="[#email]"
   UseAjax="1" DefaultValueNode=""
></?UMBRACO_MACRO>  


Not sure what FormFromEmailAddress="[#email]" is.. this field is not template enabled, and the format you have is not dictionary.

• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
azzlack
Posted: Saturday, February 09, 2008 7:43:46 AM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
"name", "email", and "message" are fields in the "Data" tab for the "ContactMail" document type.

www.eyecatch.no
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.