From robin-p at slingshot.co.nz Wed Aug 5 03:37:01 2009 From: robin-p at slingshot.co.nz (Robin Patterson) Date: Tue, 4 Aug 2009 20:37:01 -0700 Subject: [Genealogy-l] FW: [Semediawiki-user] Page view displays template definition text when wikitext is entered in field Message-ID: <002401ca157d$fec1f5e0$fc45e1a0$@co.nz> From: Yaron Koren [mailto:yaron57 at gmail.com] Sent: Tuesday, August 04, 2009 9:19 AM To: Brian Harriger Cc: semediawiki-user at lists.sourceforge.net Subject: Re: [Semediawiki-user] Page view displays template definition text when wikitext is entered in field Hi, I think the issue is just that, by default, SMW doesn't allow property values that contain brackets, because the handling for it is buggy. You can override that, though, just by adding the following to your LocalSettings.php: $smwgLinksInValues = true; -Yaron On Tue, Aug 4, 2009 at 8:20 AM, Brian Harriger wrote: Hi All, I am having trouble with the display of content that is input into a text field on a form. In order to gain more control over the display of free text I followed Yaron's advice from another posting where he recommended eliminating the free text entry and replacing it with with a text field in a template. I followed his advice and gained the control over the layout of the text that I was after. However, during testing I discovered if a user inputs any sort of wiki markup anywhere in the text it causes the template definition text for that field to be displayed. For example: Using the Template and Form definitions below I can enter regular text in the Notes field of the MyTestNotes template and it will be displayed as one would expect. (Note: Using CAPS to indicate user-entered text.) i.e. Entering MY TEST TEXT. would result in the display of MY TEST TEXT. However, if I add an image, category tag, article link, or just about any other annotation text, the template text will be displayed. i.e. Entering MY TEST TEXT. [[image:myimage.jpg]] results in the display of [[Notes::MY TEST TEXT. ]] when in page view. Note the template text surrounding the content. Article and Category links will be functional, and images are displayed correctly, but the entire entry is always wrapped in the template text. This issue has a detrimental effect on section headers too. If you don't put some sort of simple text at the very beginning of the entry the section header will be displayed as Notes::==My Special Notes==, instead of My Special Notes in large bold with a horizontal rule. Am I doing something wrong here or have I uncovered a bug? (I'm pretty new to the sematic wiki world, so I wouldn't be surprised if it is something I've overlooked or done incorrectly.) :-) Thanks, Brian // // The Notes Template // This is the 'MyTestNotes' template. It should be called in the following format:

{{MyTestNotes

|Notes=

}}

}}

Edit the page to see the template text.
{|style="float:left; clear:none;width:60%;" | [[Notes::{{{Notes|}}}]] |} [[Category:Motor]] // // The Details Template // This is the 'MyTestDetails' template. It should be called in the following format:

{{MyTestDetails

|Manufacturer=

|Model=

|Voltage - Rated=

|Voltage - Tested=

}}

Edit the page to see the template text.
{| style="width: 35%; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;" ! style="text-align: center; background-color:#ccccff;" colspan="2" |Details |- ! Manufacturer | [[Manufacturer::{{{Manufacturer|}}}]] |- ! Model | [[Model::{{{Model|}}}]] |- ! Voltage - Rated | [[Voltage - Rated::{{{Voltage - Rated|}}} vdc]] |- ! Voltage - Tested | [[Voltage - Tested::{{{Voltage - Tested|}}} vdc]] |} [[Category:Motor]] // // The Form code // This is the 'MyTest' form. To add a page with this form, enter the page name below; if a page with that name already exists, you will be sent to a form to edit that page. {{#forminput:MyTest}} {{{info|page name= }}} __notoc__ = Notes = {{{for template|MyTestNotes|label=Enter Descriptive Notes|strict}}} {| class="formtable" ! Notes: | {{{field|Notes|cols=90|rows=20}}} |} {{{end template}}} = My Test Details = {{{for template|MyTestDetails|label=My Test Details}}} {| class="formtable" ! style="color:red"|*Manufacturer: | {{{field|Manufacturer|mandatory|size=20}}} |- ! style="color:red"|*Model: | {{{field|Model|mandatory|size=20}}} |- ! Voltage - Rated: | {{{field|Voltage - Rated|size=5}}} vdc |- ! Voltage - Tested: | {{{field|Voltage - Tested|size=5}}} vdc |} {{{end template}}} {{{standard input|summary}}} {{{standard input|minor edit}}} {{{standard input|watch}}} {{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}} ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Semediawiki-user mailing list Semediawiki-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-user -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.wikia.com/pipermail/genealogy-l/attachments/20090804/96d73bd6/attachment-0001.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00022.txt Url: http://lists.wikia.com/pipermail/genealogy-l/attachments/20090804/96d73bd6/attachment-0002.txt -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00025.txt Url: http://lists.wikia.com/pipermail/genealogy-l/attachments/20090804/96d73bd6/attachment-0003.txt From robin-p at slingshot.co.nz Thu Aug 6 02:10:06 2009 From: robin-p at slingshot.co.nz (Robin Patterson) Date: Thu, 6 Aug 2009 14:10:06 +1200 Subject: [Genealogy-l] FW: [Semediawiki-user] [News] SMW 1.4.3 released Message-ID: <003701ca163b$056929a0$103b7ce0$@co.nz> A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available Url : http://lists.wikia.com/pipermail/genealogy-l/attachments/20090806/618e6310/attachment.bin -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00004.txt Url: http://lists.wikia.com/pipermail/genealogy-l/attachments/20090806/618e6310/attachment.txt -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00007.txt Url: http://lists.wikia.com/pipermail/genealogy-l/attachments/20090806/618e6310/attachment-0001.txt