Administrator Help - RC v3.3
Search for:  by:     Edit Help
 Chapter - 6.6 Counter and Statistics

Navigate to Board Statistics admin page. There are 3 sections at this page. First 2 sections display user accounts and ads statistics respectively. Daily statistics presented with graphical chart (spanned from 3 to 30 days depending on your selection from a drop down box).

Third and last section helps to create and configure counter/statistics image button, which could be available for display to site visitors. Next paragraphs provide some specific details about statistics gathering methods.

Rapid Classified internally maintains statistical data. This data could be displayed to site visitors by the mean of inserting a special code into pages and templates.

To enable statistics gathering, you must turn it [on] in Admin Preferences by checking Enable Statistics box and saving configuration.

6.6.1 HTML representation

There are four statistical values stored in special ASP variables:

  1. <%= stat_ta %> - Number of totally posted ads at classified (less expired and disabled).
  2. <%= stat_tu %> - Number of active user accounts created at classified.
  3. <%= stat_tv %> - All time visits counter.
  4. <%= stat_cv %> - Number of visitors currently online (or rather people visited the site in the past 2 hours).

Variables contain numerical values only. You may need to accompany values with a meaningful text.

To avoid constant database polling, the above values are stored in server memory and updated only when the following occur:

  1. A new visitor comes to the default site page. New visitor "state” could be simulated by closing and reopening browser (completely – not only the browser Tab with your site), or by clearing browser cookies.
  2. Web server resets or recycles an application pool as scheduled (you do not have control over this process).
  3. When you go to "Admin Preferences” and click "Reset Server Cache” button.

In other words, when new ads or accounts created at classified, the statistics data does NOT immediately reflect the change. In most of the cases, there is a delay with update until some new visitor comes to the default site page and triggers the update.

Any one of 4 variables could be inserted into any page or template for the display.

Exception, are the database driven templates such as main_page_center and custom1-6. If you need to display statistics at the main page, then you need to convert main_page_center template into custom inclusive page template (or otherwise ASP page - see chapter 5.10 > Main Page Center).

The code below could be placed directly into footer.asp page, right after the last closing </div> tag:

<div class="footer c" style="margin-top:5px;">
Posted ads <b>[
<%= stat_ta %>]</b>
User Accounts <b>[<%= stat_tu %>]</b>
All time visits <b>[<%= stat_tv %>]</b>
Currently browsing site <b>[<%= stat_cv %>]</b>

Statistics data in this case would appear below footer menu and copyright info. You could also place this code into menu_bottom template in Content Management.

Replace class="footer c" with class=" c" in this case.

You may separate values for display. Place for instance the code with ads and users statistical values to the top in logo_table or menu_top_xl and counter to the bottom in menu_bottom or copyright as well as side bars or portals… and so on.

6.6.2 Graphical representation

While HTML code might need to be properly formatted and styled with css for an attractive display, the image representation is quite convenient, if you do not wish to spend too much time with the task. A single line of code with <img> HTML tag could be place anywhere within the classified to display an image with all available statistics pasted over it.

There is a section at the bottom of Board Statistics admin page, where you may configure an image generator.

There are 2 instances of graphical statistics. Each instance could be configured separately. This means you may have 2 image buttons with 2 different configurations placed into various locations within classified.

The code for instance 1 is: <img border="0" src="rc_stats.aspx?i=1" alt="">
The code for instance 2 is: <img border="0" src="rc_stats.aspx?i=2" alt="">

Place any related keywords into alt property between double-quotes within the tag. This is a permanent code and does not change when you change configurations.

Configuration of instances switched by clicking respective links at the top of the configuration section.

You may for example configure instances with different styles, background image, type of statistics to display …etc.

Note: The fact, that by default 2 instances configured on different backgrounds does not mean that you may not present both instances on the same background and with similar configurations. You may very well use the same background for both instances by updating Background Image field with the same image name for both instances.

Embed the code into any template or a page. To display statistics at the very bottom of the site, place the code directly into footer.asp page, right after the last closing </div> tag.

Note: Unlike HTML code representation, the image code could be placed into any templates including main_page_center and custom1-6.

Image generator works as following. It takes a png image and uses it as a background for pasting statistical values and accompanied text. Background image for each instance was generated in OGIM. So they could be easily customized. 

Background image for instance 1

Background image for instance 2

Edit Image

Edit Image

You may edit background images by clicking Edit Image link. Image would open in OGIM, where colors, gradient, shape, size, border, ...etc could be customized. After you finish, click "Download" button, save the image and upload into img folder at classified. At the end, you may also click "Reference" tab at the OGIM generator, and then bookmark the page - thus saving your work.

You could also use your own custom image. It must be a PNG type image and be located in img folder at the RC site. In this case, specify custom image name within Background Image field at the configuration page.

Color, size, style, offset and other attributes for pasted text – all configured and saved at the Board Statistics admin page. Instant preview is available.

You may enable or disable certain types of statistical data. If button should hold 2 out of 4 available statistics for instance, then you may need to create and save a background image with smaller height.

©2003-2010  Rapid Classified v3.3  GA Soft