UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V  1 2 >  (Go to first unread post)
   Reply to this topicStart new topic
> Wiki Template?    
 
   
strive4peace
post May 1 2010, 12:13 AM
Post#1


strive4peace
Posts: 20,385
Joined: 10-January 04



Is it possible to give the user an option of template markup when creating a wiki article? As a minimum, I believe the link to TOC and Index should be provided
[Category:Table of Contents]]
[[Category:Access Wiki Index]]
For a more extensive template, here is an example:
=Article Title=
introduction
==First Major Idea==
text
==Second Major Idea==
text
=== Minor Idea===
text
==CODE==
explanation if desired
<font color=green>' _________________________________________ </font>
:<font color = green>'----------- ProcedureName </font>
:Public Sub ProcedureName(parameters)
: <br>
:: <font color = green>'comments about procedure </font>
:: On Error Goto Proc_Err
: <br>
:: MsgBox "Hello World"
: <br>
:Proc_Exit:
:: On Error Resume Next
:: <font color = green>' close and release object variables </font>
::If Not r Is Nothing Then
:::r.Close
:::Set r = Nothing
::End If
: <br>
::Set db = Nothing
::Exit Sub
: <br>
:Proc_Err:
::MsgBox Err.Description, , _
::: "ERROR " & Err.Number _
::: & " ProcedureName"
:: <br>
::Resume Proc_Exit
::Resume
: <br>
:End Sub
:
<font color=green>' _________________________________________ </font>
<br>
==DOWNLOAD blah blah blah==
[[Media:Bas_Crystal_ReLinker_97-2007.zip]]<br>
download notes
[[Category:Table of Contents]]
[[Category:Access Wiki Index]]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
the reason I do not use CODE tags is because the comments cannot be green ... but using the Code tags is easier, of course <
I have attached a JPG of what is rendered from this example
Attached File(s)
Attached File  Wiki_Example_Article.jpg ( 138.64K )Number of downloads: 17
 
Go to the top of the page
 
argeedblu
post May 1 2010, 04:09 AM
Post#2


UA Forum + Wiki Administrator
Posts: 14,057
Joined: 26-September 02
From: Sudbury, Ontario, Canada


Crystal,
ananaRepublic, one of our wiki moderators, has written a little about wiki templates here and he may respond to your post. I am not sure if he has done any more work on templates yet. MediWiki has an article that extensively describes wiki templates and how to create them.
Having flooded you with references, the short answer is yes, we could have a (or some) article templates. The problem as I see it is getting people to use them. However, that said, unless someone beats me to it, I will add a template page much as you have described and update the main page article with a reference to it.
You have done a lot of the foundation work for the template just in writing this post. If you have time, why not have at it yourself.
I'm sure Banana will look in on this post but I will pm him just in case he doesn't. He may well have additional thoughts and comments on your question.
Glenn
Go to the top of the page
 
strive4peace
post May 1 2010, 09:22 AM
Post#3


strive4peace
Posts: 20,385
Joined: 10-January 04



Hi Glenn,
Thanks < I still have much on my plate otherwise I would take a gander. Hopefully Banana (feel free to change it) will set it up <
Go to the top of the page
 
BananaRepublic
post May 1 2010, 09:57 AM
Post#4


Dungeon Cleaner
Posts: 1,504
Joined: 16-June 07
From: Banana Republic


Two thoughts.
) I agree we need to have a template. The thing, though, is that people has to know how to use it to use it. We would have to look into whether we can make inclusion of certain templates automatic (especially for the link to TOC and Index). I'll definitely look into getting it templatized and figure out the "people problem" later.
2) I need to think carefully about using the proposed HTML to format the code. Just so you know, there is a cheap alternative right now, though:
CODE
'This is a comment
Public Function MyFunction(MyString As String)
'Set up error handling
On Error GoTo ErrorHandler
'Let's try it!
DoIt
ExitProcedure:
Exit Function
ErrorHandler:
Select Case Err.Number
Case 2501
'The report was cancelled, ignore it.
Resume ExitProcedure
Case Else
Msgbox Err.Number & ": " & Err.Description
Resume ExitProcedure
End Select
End Function

By using codebox instead of code tags, we can have further markup within the box that a code tag wouldn't allow. Here's the same code (with markups) in the code tag:
CODE
[color=green]'This is a comment[/color]
Public Function MyFunction(MyString As String)
[color=green]'Set up error handling[/color]
On Error GoTo ErrorHandler
    [color=green]Let's try it![/color]
    DoIt
ExitProcedure:
   Exit Function
ErrorHandler:
   Select Case Err.Number
      Case 2501
      [color=green]'The report was cancelled, ignore it.[/color]
         Resume ExitProcedure
      Case Else
          Msgbox Err.Number & ": " & Err.Description
          Resume ExitProcedure
   End Select
End Function

What I am thinking is that I would prefer that people use the built-in tags over trying to format the HTML because that way if we have updates to the tags, it can then be retroactively applied at no cost to all articles that uses the tags whereas HTML formatting now would look different from newer pages and may need updating. The only thing, though, is that the customization for code tags is not available in this version we're using but is in a newer version. Gord already has indicated he's not in a hurry to upgrade the version, having said he wanted to start a bit behind because there's more mods available for this version than the latest version. Unforunately, code tags is one of things that's not easily modded without an upgrade.
Whether we could possibly create template so that the resulting HTML markup could then look like perhaps:
CODE
{{code|
{{comment|This is an example of comment}}
Public Function MyFunction(MyString As String)
}}

I do not know if that is feasible but I will certainly try and work out if this would be preferable compared to the codebox alternative.
I'm open to others' thoughts as well. The more, the better. <
Go to the top of the page
 
strive4peace
post May 1 2010, 10:35 AM
Post#5


strive4peace
Posts: 20,385
Joined: 10-January 04



thanks, Banana <
put your last example into a wiki article to preview what it would do ... and fail to see the value.
Personally, I do not like codeboxes
For those who do want to take the time to format their code, I think my example is good.
> "whereas HTML formatting now would look different from newer pages and may need updating."
Odisagree as the tags used are standard.
~~~~~~~~~~~~~~~~
code formatting aside ... I think that if there is a DOWNLOAD, it should be indexed. If there is CODE, it should be indexed. Once there are 4 heading level tags, an index at the top of the article will be created automatically.
Go to the top of the page
 
strive4peace
post May 1 2010, 11:04 AM
Post#6


strive4peace
Posts: 20,385
Joined: 10-January 04



on these 2 tags:
[Category:Table of Contents]]
[[Category:Access Wiki Index]]
Oedited the Wiki main page to bold them ... I missed it and others may as well. Wondered why my recent articles were not indexed <
Go to the top of the page
 
strive4peace
post May 1 2010, 11:28 AM
Post#7


strive4peace
Posts: 20,385
Joined: 10-January 04



> "Hmm, aren't we actually agreeing? My point was that tags, being a standard, could make maintaining the wiki easier because if the definition get updated, all tags will reflect this change. HTML markups don't have that feature."
hould have said HTML tags...of which colon is not -- but it is a standard Wiki feature
> "I'm not sure what is meant here - when we create a heading, there's a ToC automatically built at the top of page?"
If there are only 3 Heading tags, a page index will not be created. If there are 4, then it will be.
Go to the top of the page
 
BananaRepublic
post May 1 2010, 05:18 PM
Post#8


Dungeon Cleaner
Posts: 1,504
Joined: 16-June 07
From: Banana Republic


Here's a start:
{rem|This is a comment}}
{{comment|This will work as comment, too.}}
{{code|If True Then MsgBox Me.Name}}
The complications are as following:
1) Certain characters are parsed specially and thus interfere with the templates parsing. For example, a simple "If 1 = 0 Then" will break the template.
2) I've yet to figure how to preserve the formatting. If we type the If block in several lines, it collapses back into a single line. Tabs/leading spaces are not preserved as well.
3) <pre> is not an option because it will ignore any further parsing within the <pre> block.
4) For some reasons, it does not like it when I try to do this:
{{code|{{rem|This is a comment}}}}
Though this should work in theory - The template Comment actually is just an alias for the template Rem:
{{rem|{{{1}}}}}
Thus we only need to maintain the Rem page and Comment will always work and behave same as Rem so people can choose between two.
HAs for the index we no longer need to do this:
[[Category:Table of Contents]]
[[Category:Access Wiki Index]]
but now this:
{{index}}
So, that's a start. I'll continue to study the template and see what I can do for the code tags.
Go to the top of the page
 
argeedblu
post May 1 2010, 05:45 PM
Post#9


UA Forum + Wiki Administrator
Posts: 14,057
Joined: 26-September 02
From: Sudbury, Ontario, Canada


Have you posted this in the templates namespace Banana or is it still a work in progress?
Glenn
Go to the top of the page
 
BananaRepublic
post May 1 2010, 05:50 PM
Post#10


Dungeon Cleaner
Posts: 1,504
Joined: 16-June 07
From: Banana Republic


Well, I'd think it should be OK to go ahead and use the index right now. They're not in a sandbox namespace (gee, I should know better than to do that....).
'd very much consider the comment and code markups as work in progress, though. Index is not a problem because there's nothing to parameterize and we can enhance the Index template where needed without breaking the pages that uses it. That wouldn't be true for code/comment as I'm not sure what the final form will be.
Go to the top of the page
 
theDBguy
post May 1 2010, 06:07 PM
Post#11


Access Wiki and Forums Moderator
Posts: 71,233
Joined: 19-June 07
From: SunnySandyEggo


Hi BR,
seem to remember during one of our earlier discussions when porting the archives into the Wiki that there were times when we need to omit [[Category:Table of Contents]] from the page but still ensure that we put [[Category:Access Wiki Index]]
However, I can't remember the exact situation when we had to do that.
Anyway, just thought I would mention it in case somebody else remembers a situation when those two would not be used at the same time on one page.
Just my 2 cents...
Go to the top of the page
 
BananaRepublic
post May 1 2010, 06:17 PM
Post#12


Dungeon Cleaner
Posts: 1,504
Joined: 16-June 07
From: Banana Republic


Thanks, theDBGuy for the reminder. I may need to go hunting in our earlier discussion to find the 'why'.
The thought I was going with the {{index}} was that we can build rules that would include other things. Earlier, Crystal suggested having a index for all codes and download. What I was planning to research is whether Wiki markup languages permits reflection to determine if we should include A, B, C or not and thus everyone only need to add the {{index}} and it's all automagically handled, with ToC, indices and other metadata all automatically updated. Whether this is feasible is the question I will have to answer first, though.
Go to the top of the page
 
strive4peace
post May 1 2010, 07:39 PM
Post#13


strive4peace
Posts: 20,385
Joined: 10-January 04



Hi DBguy
The Index is just for Redirects -- and my take on that is when the title is copies of the same thing like ComboBox and combobox
Odid put a few TOC tags in redirect pages because the article name cannot be long enough. For instance, I have code to document the SQL for queries. It also has options to document RecordSource for Forms or RecordSource for reports ... so 3 things in one.
the output goes to Word and it made more sense to combine all 3 of these into the same code
Go to the top of the page
 
argeedblu
post May 1 2010, 07:59 PM
Post#14


UA Forum + Wiki Administrator
Posts: 14,057
Joined: 26-September 02
From: Sudbury, Ontario, Canada


Hi Crystal,
Just as in a book, the Table of Contents should only include article titles. If an article has several subtopics then the index should have those references. If we start departing from that standard, we risk having an overly cluttered Table of Contents. If the article name 'cannot be long enough' perhaps you should consider breaking the article into several articles.
Glenn
Go to the top of the page
 
argeedblu
post May 1 2010, 08:01 PM
Post#15


UA Forum + Wiki Administrator
Posts: 14,057
Joined: 26-September 02
From: Sudbury, Ontario, Canada


As Crystal indicated, redirect pages should have only the index category and not the toc category markup. I think the main wiki page has a note to this effect.
Glenn
Go to the top of the page
 
strive4peace
post May 2 2010, 12:09 AM
Post#16


strive4peace
Posts: 20,385
Joined: 10-January 04



Hi Glenn,
On that case, the wiki article name needs to change. I don't know how to do that ... make a new page, copy everything, and delete the first one? Don't know how to delete
the current topic is:
Queries: Document SQL to Word
a better name would be:
Document Query SQL, Form RecordSource, or Report RecordSource
Go to the top of the page
 
argeedblu
post May 2 2010, 12:58 AM
Post#17


UA Forum + Wiki Administrator
Posts: 14,057
Joined: 26-September 02
From: Sudbury, Ontario, Canada


Hi Crystal,
It the top right of every article there is an Options button. Check out the move option rather than deleting. It's a bit counter-intuitive I think but that's how you can change the title and automatically create a re-direct page in the process.
If I may be so bold, however, the title you are suggesting seems somewhat awkward to me. What about Document Form and Report RecordSource SQL ?
Glenn
Go to the top of the page
 
strive4peace
post May 2 2010, 01:04 AM
Post#18


strive4peace
Posts: 20,385
Joined: 10-January 04



Hi Glenn,
Thanks, but that is not what it is.
When you run the program, you specify a parameter. It can do one of 3 things:
1. Document the SQL for every Query in the database to a Word document
2. Document the RecordSource for every Form in the database to a Word document
3. Document the RecordSource for every Report in the database to a Word document
for 2 & 3, if the RecordSource is a query, you can look on report #1 for the SQL
it is awkward to name because it is 3 programs in one...
Once I had the code to make a Word document, make a table, size the cells, set up fonts, etc -- it was just faster to use the same code rather than writing different programs. What is being documented only takes a little code to get -- the majority of the code is laying out and formatting the Word document.
Oreally do not know how to name it for the
Go to the top of the page
 
argeedblu
post May 2 2010, 01:10 AM
Post#19


UA Forum + Wiki Administrator
Posts: 14,057
Joined: 26-September 02
From: Sudbury, Ontario, Canada


Ok then, what about Document Form and Report RecordSource and Query Sql to Word?
Glenn
Go to the top of the page
 
strive4peace
post May 2 2010, 01:35 AM
Post#20


strive4peace
Posts: 20,385
Joined: 10-January 04



Hi Glenn,
That sounds good -- and better than what I suggested -- but even then it is not really right as it does them all, not just one. While I can change RecordSource to plural, I cannot make SQL plural without making up a word Any other thoughts? I appreciate your help, thanks <
Go to the top of the page
 
2 Pages V  1 2 >


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 09:25 PM