Français Contact rss
WordPress from the beginning
Sharing some discoveries about WordPress
 

BoxOffice plugin

This plugin will display a list of all your articles, organised after their view count. See how it works here.

Description

It does only one thing: you put this html comment <!– box office replacement point –> somewhere in a page contents (or in post since 0.2), and boxoffice will replace it with a list of all your articles, organised after their view count with the most viewed on top, with their title, date and rank since 0.2.

Dependency

This plugin requires Popular Posts because it uses its count system and therefore doesn’t store data itself.

Installation

Remember to install Popular Posts before!

Then:

  1. Upload the boxoffice directory to your /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Create a new page or post called `BoxOffice`, or whatever you want
  4. Click on the HTML tab to go in html mode
  5. Copy the comment <!– box office replacement point –> in the html code, in a standalone paragraph (important)
  6. Save and publish your new page or post
  7. Note its ID somewhere
  8. Go to the new option page BoxOffice
  9. Enter the ID, change your options, and save
  10. Go and have a look at your page / post

HTML comment integration

<!-- box office replacement point -->

boxoffice

Upgrade from 0.1 to 0.2

  1. Download and replace all files with the new version
  2. Find the ID of your existing boxoffice page
  3. Go to the new option page “BoxOffice”
  4. Copy the ID
  5. Make changes to the options and save
  6. Copy the css styles into your styles.css and change your colours…
  7. Go a have a look at your new boxoffice

Template Tag

A template tag boxffice() (since 0.2) may also be used for display anywhere.

if(function_exists('boxoffice'))echo boxoffice();

Demo

See a demonstration here.

Translation

French translation provided and .pot file.

CSS

div.boxoffice{
 
}
 
div.boxoffice table {
 
}
 
div.boxoffice table tr {margin:0px;
 
}
div.boxoffice table tr.even{background-color:#E4F2FD;
 
}
 
div.boxoffice table tr.odd{}
 
div.boxoffice table tr td {padding:7px8px4px8px;font-size:12px;}
 
div.boxoffice table tr td.rank{text-align:right;width:50px;font-size:small;color:#BBBBBB;}
 
div.boxoffice table tr td.visits{text-align:right;width:80px;}
 
div.boxoffice table tr td.title{text-align:center;}
 
div.boxoffice table tr td.date{text-align:right;width:150px;font-size:12px;}

Log Changes

Version 0.2

  • added some css classes to improve the look
  • boxoffice can be included in page or post
  • the page or post ID must be indicated in the options page
  • new options page
  • rank displayed
  • possibility to turn on/off rank, visits, date
  • a template tag

Frequently Asked Questions

Does it show posts only ?

- Yes, no comment, page or anything else…

Can I include it in a post ?

- Yes, with version 0.2

What happens if I don’t have Popular Posts?

- Nothing happens, the page remains blank without error.

Does it work with others similar plugins ?

- Not yet, but if you let me know about a plugin and its get_post_views($post_id) function, I will add it in future versions of boxoffice

Download version 0.2

http://wordpress.org/extend/plugins/boxoffice/

Spread this post over the world!

Share/Bookmark

How did you like this post?

Please don't go without leaving a mark!
3 vote(s) 1 Etoile2 Etoiles3 Etoiles4 Etoiles5 Etoiles Loading ... Loading ...

Reactions

comments 10 comments
  1. October 16th, 2009 at 22:01

    Bonjour,

    J’ai découvert votre site aujourd’hui. Une mine d’or. Je viens d’installer BoxOffice, après avoir longtemps cherché une solution pour faire apparaître quelque part sur mon site la liste complète des articles. Il ne me reste plus qu’à me pencher sur la question du css pour travailler un peu le design.

    Merci et bravo, je repasserai :o )

    Like or Dislike: Thumb up 0 Thumb down 0

  2. April 14th, 2009 at 09:12

    Ce n’est pas prévu…

    Like or Dislike: Thumb up 0 Thumb down 0

  3. April 13th, 2009 at 21:37

    Est-ce que je peux trier par date alors plutôt que par visite?

    Like or Dislike: Thumb up 0 Thumb down 0

  4. April 13th, 2009 at 21:26

    Non… peut être un autre plugin le fait !

    Like or Dislike: Thumb up 0 Thumb down 0

  5. April 13th, 2009 at 13:52

    reBonjour, autre petite question… Finalement le tou fonctionne, je voulais savoir s’il était possible d’utiliser le plugin pour savoir combien de temps ils passents sur telle ou telle page car mon site est un blog video et je veux savoir si les gens regardent les vidéos au complet ou non…

    Merci
    Seby
    www.jesusestlaporte.com

    Like or Dislike: Thumb up 0 Thumb down 0

  6. April 12th, 2009 at 13:15

    Il y a un espace avant box et après point

    Like or Dislike: Thumb up 0 Thumb down 0

  7. April 12th, 2009 at 13:06

    @Anthony
    En fait, je l’ai mis tout seul sur la page, tout en haut, je ne peux pas me tromper. Il doit y avoir autre chose que je fais de pas correct. Peut-etre un petit video ou screenshot d’installation serait requise

    Merci

    seby

    Like or Dislike: Thumb up 0 Thumb down 0

  8. April 12th, 2009 at 12:57

    Oui, il faut que je précise ça dans la doc, il faut mettre le commentaire html dans un paragraphe à lui tout seul, soit quand vous êtes dans le code html de l’article, vous avez une ligne vide au dessus et une en dessous. Aussi, il faut bien laisser les espaces avant box et après point.

    Like or Dislike: Thumb up 0 Thumb down 0

  9. April 12th, 2009 at 12:40

    Bonjour, Il doit y avoir quelque chose que je ne fais pas de correct, car cela ne fonctionne pas dutout. J’ai installé popular post et même Post-Plugin Library car popular post le demandais, et meme après avoir my le code dans le html, rien ne se passe.

    Merci de votre aide

    Seby

    Like or Dislike: Thumb up 0 Thumb down 0

  1. August 20th, 2009 at 10:26 | #1
Top
Add/Remove Widgets

Plugin

How to add a plugin??

About this post

  • About this weblog

    "WordPress From the beginning" is written by a French web developer and teacher currently based in Switzerland.

    Originally planned in french, both blog and its functions were developped in this language. This explains why not all functions are available in the English version.

    However, new translated articles are regularly posted for use by the wordpress' web community.

Wordpress from the beginning is a production of Woodymood