KwGrid:Editing Help: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
m (Reverted edit of RiganasoL, changed back to last version by Barre)
Line 1: Line 1:
[http://adjustablemortga.fiberia.com | Adjustable Mortgage Rate]
{{:kwGrid:Template/Header}}
[http://adjustablerateqw.fiberia.com | Adjustable Rate Mortgage]
In addition to the guidelines provided in the [http://meta.wikimedia.org/wiki/Help:Editing MediaWiki General Editing] page, the following rules are suggested:
[http://advicemortgagew.fiberia.com | Advice Mortgage Online]
 
[http://applicationmort1.fiberia.com | Application Mortgage Online]
==Page and File Names==
[http://applicationmorte.fiberia.com | Application Mortgage]
 
[http://arizonaloanmorw.fiberia.com | Arizona Loan Mortgage]
* Prefix a page name with the <tt>kwGrid:</tt> namespace (lowercase <tt>kw</tt>). For example, [[kwGrid:Welcome]]. Used the [http://meta.wikimedia.org/wiki/Help:Piped_link piped link] notation to hide the namespace when the page is rendered. Namespaces allow separation of different kinds of unrelated content within the same Wiki (i.e. isolate projects like VTK, CMake, ITK, kwGrid). Namespaces also provide facilities to limit searches to a particular area and allow easy exporting of a selection of work.
[http://arizonamortgage.fiberia.com | Arizona Mortgage Loan]
* Use spaces at will. For example, use [[kwGrid:My Own Hardware]] over [[kwGrid:MyOwnHardware]].
[http://arizonamortgage1.fiberia.com | Arizona Mortgage Lender]
* Use slashes (/) to provide additional structure and depth. For example, the [[kwGrid:Partners]] page provides links to pages describing each partner one by one: use [[kwGrid:Partners/Argonne National Lab]] over [[kwGrid:Partners Argonne National Lab]], as it emphasizes that it is a "sub-page" of [[kwGrid:Partners]] and mimics the traditional web structure. Furthermore, if the [http://en.wikipedia.org/wiki/Help:Link#Subpage_feature sub-page feature] is enabled in the Wiki, a link is automatically created on top of the sub-page to the "parent" page.
[http://arizonamortgageq.fiberia.com | Arizona Mortgage Rate]
* Use the same rules to upload files, but remove spaces and slashes since they are not allowed in a file name. For example: <tt>kwGridPartnersArgonneNationalLab.png</tt>. Let the [[kwGrid:Team|team]] know about the files, images, PDF or Word documents you upload, so that we can also archive a copy in the [[kwGrid:Download#CVS|CVS]] repository.
[http://badcredit1mortg.fiberia.com | Bad Credit Mortgage Memphis]
 
[http://badcredithomeg1.fiberia.com | Bad Credit Home Mortgage]
==Page Content==
[http://badcredithomegt.fiberia.com | Bad Credit Home Mortgage Loan]
 
[http://badcredithomeqw.fiberia.com | Bad Credit Home Loan Mortgage]
* Start a page with a call to the [[:kwGrid:Template/Header|Header]] template. Terminate a page with a call to the [[:kwGrid:Template/Footer|Footer]] template. This automatically adds a header and footer to the page. They provide extra navigational links and associate the page to specific searchable categories. Check the top and bottom of this page to see how the templates are rendered.
[http://badcreditloaba.fiberia.com | Bad Credit Loan Mortgage]
<pre>
[http://badcreditmortge.fiberia.com | Bad Credit Mortgage Lender]
{{:kwGrid:Template/Header}}
[http://badcreditmortggt.fiberia.com | Bad Credit Mortgage Second]
...
[http://besthome2loanm.fiberia.com | Best Home Loan Mortgage Rate Refinance]
{{:kwGrid:Template/Footer}}
[http://bestloanmortga.fiberia.com | Best Loan Mortgage]
</pre>
[http://bestmortgagelows.fiberia.com | Best Mortgage Loan]
 
[http://bestmortgagerat.fiberia.com | Best Mortgage Rate Refinance]
==Templates==
[http://bestmortgagerate.fiberia.com | Best Mortgage Rate]
 
[http://bestrefinancem12.fiberia.com | Best Refinance Mortgage Rate]
===<tt>Mail To</tt>===
[http://bestrefinanceqh.fiberia.com | Best Refinance Home Mortgage Loan Rate]
The [[:kwGrid:Template/Mail To|Mail To]] template can be used to build a mailto: link prefixed with a small mail icon [[Image:kwGridMailToIcon.png]]. For example:
[http://bestrefinanceqh.fiberia.com | Equity Home Loan Mortgage Second]
<pre>
[http://broker1californi.fiberia.com | Broker California Mortgage]
{{:kwGrid:Template/Mail To|sebastien.barre@kitware.com|Sebastien Barre}}
[http://calculatormortge.fiberia.com | Calculator Mortgage]
</pre>
[http://californialoanca.fiberia.com | California Loan Mortgage]
...is rendered as:
[http://californiamortg.fiberia.com | California Mortgage Rate]
{{:kwGrid:Template/Mail To|sebastien.barre@kitware.com|Sebastien Barre}}
[http://californiamortg3.fiberia.com | California Mortgage Broker]
 
[http://californiamortge.fiberia.com | California Mortgage]
===<tt>Note Box</tt>===
[http://californiamortgf.fiberia.com | California Mortgage Refinance]
The [[:kwGrid:Template/Note Box|Note Box]] template can be used to provide a short note:
[http://chasemanhattan3.fiberia.com | Chase Manhattan Mortgage]
<pre>
[http://citymortgagenas.fiberia.com | City Mortgage National]
{{:kwGrid:Template/Note Box|message=This is an example of text inside a Note Box template.}}
[http://coloradocompany.fiberia.com | Colorado Company Home Loan Mortgage]
</pre>
[http://coloradomortgag5.fiberia.com | Colorado Mortgage Loan]
...is rendered as:
[http://companyflorida4.fiberia.com | Company Florida Mortgage]
{{:kwGrid:Template/Note Box|message=This is an example of text inside a Note Box template.}}
[http://companymortgage1.fiberia.com | Company Mortgage Refinance]
 
[http://connecticutmortg.fiberia.com | Connecticut Mortgage Refinance]
===<tt>Warning Box</tt>===
[http://consolidationde.fiberia.com | Consolidation Debt Loan Mortgage Refinance]
The [[:kwGrid:Template/Warning Box|Warning Box]] template can be used to provide a short warning:
[http://consolidationdet.fiberia.com | Consolidation Debt Loan Mortgage]
<pre>
[http://countrywidemorta.fiberia.com | Countrywide Mortgage]
{{:kwGrid:Template/Warning Box|message=This is an example of text inside a Warning Box template.}}
[http://currenmortgaget.fiberia.com | Current Mortgage Interest Rate]
</pre>
[http://currentinterestq.fiberia.com | Current Interest Mortgage Rate]
...is rendered as:
[http://currentmortgage3.fiberia.com | Current Mortgage Rate]
{{:kwGrid:Template/Warning Box|message=This is an example of text inside a Warning Box template.}}
[http://dailymortgagerq.fiberia.com | Daily Mortgage Rate]
 
[http://debtconsolidati1.fiberia.com | Debt Consolidation Mortgage Loan]
===<tt>Help Box</tt>===
[http://ditechloanmort.fiberia.com | Ditech Loan Mortgage]
The [[:kwGrid:Template/Help Box|Help Box]] template can be used to provide a short help:
[http://ditechmortgage32.fiberia.com | Ditech Mortgage Loan]
<pre>
[http://fhamortgage.fiberia.com | Fha Mortgage]
{{:kwGrid:Template/Help Box|message=This is an example of text inside a Help Box template.}}
[http://fixedmortgag30.fiberia.com | 30 Fixed Mortgage Rate Year]
</pre>
[http://fixedmortgagerat.fiberia.com | Fixed Mortgage Rate]
...is rendered as:
[http://fixedratemortg12.fiberia.com | Fixed Rate Mortgage]
{{:kwGrid:Template/Help Box|message=This is an example of text inside a Help Box template.}}
[http://floridainmortgee.fiberia.com | Florida In Mortgage Refinance]
 
[http://floridamortgage4.fiberia.com | Florida Mortgage]
===<tt>Tip Box</tt>===
[http://floridamortgage7.fiberia.com | Florida Mortgage Lender]
The [[:kwGrid:Template/Tip Box|Tip Box]] template can be used to provide a short tip:
[http://floridamortgagea.fiberia.com | Florida Mortgage Refinance]
<pre>
[http://floridamortgagew.fiberia.com | Florida Mortgage Company]
{{:kwGrid:Template/Tip Box|message=This is an example of text inside a Tip Box template.}}
[http://floridarefinanc4.fiberia.com | Florida Refinance Mortgage]
</pre>
[http://gmacmortgage.fiberia.com | Gmac Mortgage]
...is rendered as:
[http://homeequitymort.fiberia.com | Home Equity Mortgage Loan]
{{:kwGrid:Template/Tip Box|message=This is an example of text inside a Tip Box template.}}
[http://homeequitymort1.fiberia.com | Home Equity Mortgage]
 
[http://homeinsurancemo.fiberia.com | Home Insurance Mortgage]
===<tt>Security Box</tt>===
[http://homeinterest1mo.fiberia.com | Home Interest Mortgage Rate Refinance]
The [[:kwGrid:Template/Security Box|Security Box]] template can be used to provide a short security notice:
[http://homeloanmortga.fiberia.com | Home Loan Mortgage Second]
<pre>
[http://homeloanmortga1.fiberia.com | Home Loan Mortgage Rate]
{{:kwGrid:Template/Security Box|message=This is an example of text inside a Security Box template.}}
[http://homeloanmortgag.fiberia.com | Home Loan Mortgage Refinance]
</pre>
[http://homemortgagein2.fiberia.com | Home Mortgage Insurance]
...is rendered as:
[http://homemortgagelo.fiberia.com | Home Mortgage Loan Rate]
{{:kwGrid:Template/Security Box|message=This is an example of text inside a Security Box template.}}
[http://homemortgagera.fiberia.com | Home Mortgage Rate]
 
[http://hommortgagera1.fiberia.com | Home Mortgage Rate Refinance]
==Extensions==
[http://illinoismortgagt.fiberia.com | Illinois Mortgage Rate]
{{User:Barre/MediaWiki/Extensions}}
[http://insurance2mortga.fiberia.com | Insurance Mortgage Quote]
 
[http://insurancelifem32.fiberia.com | Insurance Life Mortgage]
{{:kwGrid:Template/Footer}}
[http://insurancemortga.fiberia.com | Insurance Mortgage]
[http://interestmortgag.fiberia.com | Interest Mortgage]
[http://interestmortgag3.fiberia.com | Interest Mortgage Rate]
[http://interestmortgagt.fiberia.com | Interest Mortgage Rate Refinance]
[http://loanmortgage.fiberia.com | Loan Mortgage]
[http://loanmortgagereg.fiberia.com | Loan Mortgage Refinance]
[http://lowmortgagerate.fiberia.com | Low Mortgage Rate Refinance]
[http://mortgageapplicat.fiberia.com | Mortgage Application]
[http://mortgagebrokerr.fiberia.com | Mortgage Broker In California]
[http://mortgageinsurani.fiberia.com | Mortgage Insurance Quote]
[http://mortgagelifein12.fiberia.com | Mortgage Life Insurance]
[http://mortgageloan.fiberia.com | Mortgage Loan]
[http://mortgageloane3.fiberia.com | Mortgage Loan Refinance And Debt Consolidation]
[http://mortgageloanpra.fiberia.com | Mortgage Loan Processor]
[http://mortgageloanrate.fiberia.com | Mortgage Loan Rate]
[http://mortgageohio.fiberia.com | Mortgage Ohio]
[http://mortgagepennsyl.fiberia.com | Mortgage Pennsylvania Refinance]
[http://mortgagerateregs.fiberia.com | Mortgage Rate Refinance]
[http://mortgagerefinan7.fiberia.com | Mortgage Refinancing Company]
[http://mortgagerefinanq.fiberia.com | Mortgage Refinance California]
[http://mortgagerefinanw.fiberia.com | Mortgage Refinance Second]
[http://mortgageresident.fiberia.com | Mortgage Residential]
[http://mortgagesanjosqs.fiberia.com | Mortgage San Jose California]
[http://mortgagesecond6.fiberia.com | Mortgage Second]
[http://nationalcitymota.fiberia.com | National City Mortgage]
[http://ndhomemortg2ag.fiberia.com | 2nd Home Mortgage]
[http://ndloanmortgag2.fiberia.com | 2nd Loan Mortgage]
[http://ndmortgage2.fiberia.com | 2nd Mortgage]
[http://ndmortgageloan2.fiberia.com | 2nd Mortgage Loan]
[http://ndmortgageratge.fiberia.com | 2nd Mortgage Rate]
[http://ndmortgageref21.fiberia.com | 2nd Mortgage Refinance]
[http://newjerseymortg.fiberia.com | New Jersey Mortgage Loan]
[http://ohiomortgage.fiberia.com | Ohio Mortgage]
[http://onlinemortgage1.fiberia.com | Online Mortgage Application]
[http://onlinemortgageyt.fiberia.com | Online Mortgage Advice]
[http://refinance2ndmo.fiberia.com | Refinance 2nd Mortgage]
[http://refinancehomem.fiberia.com | Refinance Home Mortgage Rate]
[http://refinancehomemtg.fiberia.com | Refinance Home Mortgage Interest Rate]
[http://refinancemortga2.fiberia.com | Refinance Mortgage Interest Rate]
[http://refinancemortga7.fiberia.com | Refinance Mortgage Rate]
[http://refinancemortgaw.fiberia.com | Refinance Mortgage Loan]
[http://secondmortgaged.fiberia.com | Second Mortgage Lender]
[http://secondmortgager.fiberia.com | Second Mortgage Bad Credit]
[http://secondmortgages.fiberia.com | Second Mortgage]
[http://secondmortgaget.fiberia.com | Second Mortgage And Home Equity Loan]
[http://secondomemort.fiberia.com | Second Home Mortgage]
[http://washingtonmutuag.fiberia.com | Washington Mutual Mortgage]

Revision as of 03:25, 28 January 2006

In addition to the guidelines provided in the MediaWiki General Editing page, the following rules are suggested:

Page and File Names

  • Prefix a page name with the kwGrid: namespace (lowercase kw). For example, kwGrid:Welcome. Used the piped link notation to hide the namespace when the page is rendered. Namespaces allow separation of different kinds of unrelated content within the same Wiki (i.e. isolate projects like VTK, CMake, ITK, kwGrid). Namespaces also provide facilities to limit searches to a particular area and allow easy exporting of a selection of work.
  • Use spaces at will. For example, use kwGrid:My Own Hardware over kwGrid:MyOwnHardware.
  • Use slashes (/) to provide additional structure and depth. For example, the kwGrid:Partners page provides links to pages describing each partner one by one: use kwGrid:Partners/Argonne National Lab over kwGrid:Partners Argonne National Lab, as it emphasizes that it is a "sub-page" of kwGrid:Partners and mimics the traditional web structure. Furthermore, if the sub-page feature is enabled in the Wiki, a link is automatically created on top of the sub-page to the "parent" page.
  • Use the same rules to upload files, but remove spaces and slashes since they are not allowed in a file name. For example: kwGridPartnersArgonneNationalLab.png. Let the team know about the files, images, PDF or Word documents you upload, so that we can also archive a copy in the CVS repository.

Page Content

  • Start a page with a call to the Header template. Terminate a page with a call to the Footer template. This automatically adds a header and footer to the page. They provide extra navigational links and associate the page to specific searchable categories. Check the top and bottom of this page to see how the templates are rendered.
{{:kwGrid:Template/Header}}
...
{{:kwGrid:Template/Footer}}

Templates

Mail To

The Mail To template can be used to build a mailto: link prefixed with a small mail icon KwGridMailToIcon.png. For example:

{{:kwGrid:Template/Mail To|sebastien.barre@kitware.com|Sebastien Barre}}

...is rendered as: KwGridMailToIcon.png Sebastien Barre

Note Box

The Note Box template can be used to provide a short note:

{{:kwGrid:Template/Note Box|message=This is an example of text inside a Note Box template.}}

...is rendered as:

KwGridInfoIcon.png Note: This is an example of text inside a Note Box template.

Warning Box

The Warning Box template can be used to provide a short warning:

{{:kwGrid:Template/Warning Box|message=This is an example of text inside a Warning Box template.}}

...is rendered as:

KwGridWarningIcon.png Warning: This is an example of text inside a Warning Box template.

Help Box

The Help Box template can be used to provide a short help:

{{:kwGrid:Template/Help Box|message=This is an example of text inside a Help Box template.}}

...is rendered as:

KwGridHelpIcon.png Help: This is an example of text inside a Help Box template.

Tip Box

The Tip Box template can be used to provide a short tip:

{{:kwGrid:Template/Tip Box|message=This is an example of text inside a Tip Box template.}}

...is rendered as:

KwGridWrenchIcon.png Tip: This is an example of text inside a Tip Box template.

Security Box

The Security Box template can be used to provide a short security notice:

{{:kwGrid:Template/Security Box|message=This is an example of text inside a Security Box template.}}

...is rendered as:

KwGridPadlockIcon.png Security Notice: This is an example of text inside a Security Box template.

Extensions

<kw_bread_crumbs>prefix=» |small=1|bgcolor=F9F9F9|trim_prefix=User:|on_top_hack=1</kw_bread_crumbs> MediaWiki, the software that runs this Wiki site, allows developers to write their own extensions to the Wiki markup. An extension defines an HTML/XML-style tag which can be used in the Wiki editor like any other markup. If you want to write your own extensions, check those resources.

So here it goes... <-- The links below give an error message: "Fatal error: Call to undefined function: setshowtoc() in /mounts/raid/projects/KitwareWeb/mediawiki-1.5.7-namic/extensions/kwIncludeFile.php on line 303"/ --JohnMcDonnell 10:46, 9 May 2006 (EDT)

Resources

Cache Problem

As of MediaWiki 1.3 and 1.4, the extension feature is limited by the caching mechanism. If your extension is used to display dynamic contents and therefore needs to be re-executed each time the page is accessed, you will notice pretty early on that it does not work as expected. The problem is that MediaWiki caches the contents of the page the first time it is rendered, and serves that cached output until the corresponding page is modified again. Several parameters are considered when the decision is made to use the cached output instead of re-rendering the page, and most of them deal with comparing the creation time of the cache against the creation time of the page (cur_timestamp/cur_touched is the SQL database). If the cache is older than the page, it is re-rendered.

The code below uses that knowledge to 'touch' the page and invalidate its cache. It is indeed slightly identical to the code in the Title::invalidateCache() method. Sadly invalidateCache() can not be used in an extension: even though it sets cur_touched to 'now', at the time we would be calling this method we would still be in the process of creating and rendering the page itself and the page would be cached anyway once we would be done with our extension. At the end of the day the cache would always end up newer than cur_touched, defeating the whole purpose of calling invalidateCache(). The trick here is to set cur_touched in the future, something not too intrusive, say 'now' + 120 seconds, provided that we expect the whole page (and our extension code) to be executed and rendered within 120 seconds. That way, cur_touched remains 'fresher' than the cache, and the next time the page is accessed, the cache creation time will appear to be older than cur_touched, forcing the page to be re-rendered, and forcing cur_touched to be, again, set in the future and appear fresher than the new cache, etc.

 $ts = mktime();
 $now = gmdate("YmdHis", $ts + 120);
 $ns = $wgTitle->getNamespace();
 $ti = wfStrencode($wgTitle->getDBkey());
 $sql = "UPDATE cur SET cur_touched='$now' WHERE cur_namespace=$ns AND cur_title='$ti'";
 wfQuery($sql, DB_WRITE, "");



kwGrid: [Welcome | Site Map | Editing Help] - [Public Web | Public Wiki | Private Wiki]