My Assistant
![]() ![]() |
|
|
May 1 2010, 12:13 AM
Post
#1
|
|
|
UtterAccess VIP Posts: 20,187 From: Colorado |
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 (IMG:style_emoticons/default/wink.gif) I have attached a JPG of what is rendered from this example
Attached File(s)
|
|
|
|
May 1 2010, 04:09 AM
Post
#2
|
|
|
UA Forum + Wiki Administrator Posts: 11,953 From: Sudbury, Ontario, Canada |
Crystal,
BananaRepublic, 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 |
|
|
|
May 1 2010, 09:22 AM
Post
#3
|
|
|
UtterAccess VIP Posts: 20,187 From: Colorado |
Hi Glenn,
thanks (IMG:style_emoticons/default/wink.gif) I still have much on my plate otherwise I would take a gander. Hopefully Banana (feel free to change it) will set it up (IMG:style_emoticons/default/smile.gif) |
|
|
|
May 1 2010, 09:57 AM
Post
#4
|
|
|
Rent-an-Admin Posts: 8,766 From: Banana Republic |
Two thoughts.
1) 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. (IMG:style_emoticons/default/smile.gif) |
|
|
|
May 1 2010, 10:35 AM
Post
#5
|
|
|
UtterAccess VIP Posts: 20,187 From: Colorado |
thanks, Banana (IMG:style_emoticons/default/smile.gif)
I 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." I disagree 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. |
|
|
|
May 1 2010, 11:01 AM
Post
#6
|
|
|
Rent-an-Admin Posts: 8,766 From: Banana Republic |
I put your last example into a wiki article to preview what it would do ... and fail to see the value. You mean the wiki markup? That's because no template has been created to support that. That was meant to be hypothetical example of what it would look like if we could templatize the code formatting. QUOTE Personally, I do not like codeboxes Me, either. I've already QUOTE QUOTE (BananaRepublic) whereas HTML formatting now would look different from newer pages and may need updating." I disagree as the tags used are standard. 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. Or am I misunderstanding? QUOTE code formatting aside ... I think that if there is a DOWNLOAD, it should be indexed. If there is CODE, it should be indexed. That's actually a great idea. QUOTE Once there are 4 heading level tags, an index at the top of the article will be created automatically. I'm not sure what is meant here - when we create a heading, there's a ToC automatically built at the top of page? I went six levels deep and all are reflected in the ToC. Do you have an example that could help clarify the request? |
|
|
|
May 1 2010, 11:04 AM
Post
#7
|
|
|
UtterAccess VIP Posts: 20,187 From: Colorado |
on these 2 tags:
[[Category:Table of Contents]] [[Category:Access Wiki Index]] I edited the Wiki main page to bold them ... I missed it and others may as well. Wondered why my recent articles were not indexed (IMG:style_emoticons/default/wink.gif) |
|
|
|
May 1 2010, 11:28 AM
Post
#8
|
|
|
UtterAccess VIP Posts: 20,187 From: Colorado |
> "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."
should 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. |
|
|
|
May 1 2010, 05:18 PM
Post
#9
|
|
|
Rent-an-Admin Posts: 8,766 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. As 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. |
|
|
|
May 1 2010, 05:45 PM
Post
#10
|
|
|
UA Forum + Wiki Administrator Posts: 11,953 From: Sudbury, Ontario, Canada |
Have you posted this in the templates namespace Banana or is it still a work in progress?
Glenn |
|
|
|
May 1 2010, 05:50 PM
Post
#11
|
|
|
Rent-an-Admin Posts: 8,766 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....).
I'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. |
|
|
|
May 1 2010, 06:07 PM
Post
#12
|
|
|
Access Wiki and Forums Moderator Posts: 47,953 From: SoCal, USA |
As 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. Hi BR, I 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... |
|
|
|
May 1 2010, 06:17 PM
Post
#13
|
|
|
Rent-an-Admin Posts: 8,766 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. |
|
|
|
May 1 2010, 07:39 PM
Post
#14
|
|
|
UtterAccess VIP Posts: 20,187 From: Colorado |
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 I did 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 |
|
|
|
May 1 2010, 07:59 PM
Post
#15
|
|
|
UA Forum + Wiki Administrator Posts: 11,953 From: Sudbury, Ontario, Canada |
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 I did 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 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 |
|
|
|
May 1 2010, 08:01 PM
Post
#16
|
|
|
UA Forum + Wiki Administrator Posts: 11,953 From: Sudbury, Ontario, Canada |
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. 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 |
|
|
|
May 2 2010, 12:09 AM
Post
#17
|
|
|
UtterAccess VIP Posts: 20,187 From: Colorado |
Hi Glenn,
in 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 (IMG:style_emoticons/default/frown.gif) the current topic is: Queries: Document SQL to Word a better name would be: Document Query SQL, Form RecordSource, or Report RecordSource |
|
|
|
May 2 2010, 12:58 AM
Post
#18
|
|
|
UA Forum + Wiki Administrator Posts: 11,953 From: Sudbury, Ontario, Canada |
Hi Glenn, in 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 (IMG:style_emoticons/default/frown.gif) the current topic is: Queries: Document SQL to Word a better name would be: Document Query SQL, Form RecordSource, or Report RecordSource Hi Crystal, At 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 |
|
|
|
May 2 2010, 01:04 AM
Post
#19
|
|
|
UtterAccess VIP Posts: 20,187 From: Colorado |
QUOTE 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 ? 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. I really do not know how to name it for the Wiki (IMG:style_emoticons/default/dazed.gif) |
|
|
|
May 2 2010, 01:10 AM
Post
#20
|
|
|
UA Forum + Wiki Administrator Posts: 11,953 From: Sudbury, Ontario, Canada |
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. I really do not know how to name it for the Wiki (IMG:style_emoticons/default/dazed.gif) Ok then, what about Document Form and Report RecordSource and Query Sql to Word? Glenn |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 21st May 2013 - 01:14 PM |