This is the source code of admin/settingsForm.cfm.
This file is part of the Mangoblog viewCount plugin!
The code is colored using the Coldfusion code coloring component by Paul Klinkenberg.
<cfoutput><cftry> <form method="post" action="#cgi.script_name#"> <p> <label for="excludeSearchEngines">Count views from web spiders/crawlers?</label> <span class="hint">These are page requests done by search engines like Google, to index your website. <br />To be honest, this isn't a real view, but it <em>is</em> a request.</span> <span class="field"><select name="excludeSearchEngines"> <option value="1">No (default)</option> <option value="0"<cfif getSetting('excludeSearchEngines') eq 0> selected="selected"</cfif>>Yes</option> </select></span> </p> <p> <label for="maxHours">How many hours inbetween a count for the same IP address?</label> <span class="hint">ViewCount remembers the time and IP address for each counted view. After how many hours should we consider a page view from the same IP to the same post a new view?</span> <span class="field"><input type="text" id="maxHours" name="maxHours" value="#getSetting('maxHours')#" size="3" maxlength="4" /> <em>(numeric; 0 = count each page view)</em> </span> </p> <p> <label for="showPublicly">Show viewCount in website?</label> <span class="field"><select name="showPublicly"> <option value="1">Yes</option> <option value="0"<cfif getSetting('showPublicly') eq 0> selected="selected"</cfif>>No</option> </select></span> </p> <p> <label for="appearance">Text to show</label> <span class="hint">By default, the plugin will show "View count: $viewcount$". Here, you can change the text which will be shown.<br /> You can use a placeholder for the viewcount number by adding $viewcount$.<br /> Examples: "viewed $viewcount$ times", "$viewcount$ views", or "| $viewcount$ keer bekeken".<br /> If you leave the $viewcount$ out, then it will be added to the end of the text. And yes, you can add html. </span> <cfoutput><span class="field"> <input type="text" name="appearance" id="appearance" size="40" value="#htmleditformat(getSetting('appearance'))#" /> </span></cfoutput> </p> <div class="actions"> <input type="submit" class="primaryAction" value="Submit"/> <input type="hidden" value="event" name="action" /> <input type="hidden" value="showViewCountSettings" name="event" /> <input type="hidden" value="true" name="apply" /> <input type="hidden" value="ViewCount" name="selected" /> </div> </form> <cfparam name="data.externaldata.viewCountsOrder" default="page" /> <cfparam name="data.externaldata.viewCountsOrderDir" default="ASC" /> <cfset viewCounts_qry = getViewCounts(order=data.externaldata.viewCountsOrder, dir=data.externaldata.viewCountsOrderDir) /> <hr /> <h3>View Counts so far</h3> <form method="post" action="#cgi.script_name#"> <table> <thead> <tr> <th><a href="?event=showViewCountSettings&owner=ViewCount&selected=showViewCountSettings&viewCountsOrder=date<cfif data.externaldata.viewCountsOrder neq 'date' or data.externaldata.viewCountsOrderDir eq 'ASC'>&viewCountsOrderDir=DESC</cfif>" title="Order on this column">Publish date</a></th> <th><a href="?event=showViewCountSettings&owner=ViewCount&selected=showViewCountSettings&viewCountsOrder=page<cfif data.externaldata.viewCountsOrder eq 'page' and data.externaldata.viewCountsOrderDir eq 'ASC'>&viewCountsOrderDir=DESC</cfif>" title="Order on this column">Page</a></th> <th><a href="?event=showViewCountSettings&owner=ViewCount&selected=showViewCountSettings&viewCountsOrder=viewCount&viewCountsOrderDir=<cfif data.externaldata.viewCountsOrder neq 'viewCount' or data.externaldata.viewCountsOrderDir eq 'ASC'>DESC<cfelse>ASC</cfif>" title="Order on this column">viewCount</a> <span style="float:right">(<a href="?event=showViewCountSettings&owner=ViewCount&selected=showViewCountSettings&editViewCounts=1">edit</a>)</span> </th> </tr> </thead> <tbody> <cfloop query="viewCounts_qry"><tr<cfif not viewCounts_qry.currentrow mod 2> class="alternate"</cfif>> <td>#lsdateFormat(viewCounts_qry.posted_on, 'medium')#</td> <td><a href="/post.cfm/#viewCounts_qry.name#" target="_blank">#viewCounts_qry.title#</a></td> <td>#viewCounts_qry.viewCount# <cfif structKeyExists(data.externaldata, 'editViewCounts')> <input type="text" name="viewCount_#viewCounts_qry.id#" value="#viewCounts_qry.viewCount#" size="4" style="float:right" /> </cfif> </td> </tr></cfloop> </tbody> <tfoot> <tr style="border-top:1px solid ##000;"> <td colspan="2" style="text-align:right;"><strong>Total:</strong></td> <td><strong>#evaluate(valueList(viewCounts_qry.viewCount, '+'))#</strong> <cfif structKeyExists(data.externaldata, 'editViewCounts')> <input type="submit" class="primaryAction" value="Submit" style="float:right" /> <input type="hidden" value="event" name="action" /> <input type="hidden" value="showViewCountSettings" name="event" /> <input type="hidden" value="true" name="saveViewCounts" /> <input type="hidden" value="ViewCount" name="selected" /> </cfif> </td> </tr> </tfoot> </table> </form> <cfcatch><cfdump var="#cfcatch#" /></cfcatch> </cftry></cfoutput>