Tag Gallery added in Posting…

I have implemented a new tag in any post…

The tag <gallery>AlbumID|Count|Size</gallery> !

This in conjunction with the “psnGallery.php” addon allows you to display within a post “Count” random pictures from the Coppermine Album “AlbumID” in the “Size” (1= small, 2=normal).

For example, to get 4 random small pictures from the Album 6 (Boussole), the following command <gallery>6|4|1</gallery> will give :

Easy no ? In my-hacks.php, you have to add…
Continue reading “Tag Gallery added in Posting…”

Back from Senegal

As you noticed, I was not really active those last few days. In fact, I was very busy at work and finally I took one week of holidays to calm down a little bit my life… ;o)

So my wife and I went to Senegal for a “farniente” week !

What a wonderfull week we had ! We burnt our bones…What a pleasure ! Of course, we took few pictures. Few of them are in the Gallery area of this site.

“Aldiana 04/2004” album :

“Sénégal 2004” album (Peinture sur soie)

If you refresh this window, you will get other pictures from those albums….

TFS Statistic in 3D PieCharts

I have created a new plugin to TFS, it generates PieCharts for Top x Most used Operating Systems, Browsers and Countries. It is in fact an extension to the psnStat module.

Samples of graphical 3D PieChart for TFS Statistic….(figures for those last 7 days)

echo TFStatOSPie3D(‘thisweek’,5,1,400,200,true,’idaho_stat’); echo TFStatBrowserPie3D(‘thisweek’,5,1,400,200,true,’idaho_stat’); echo TFStatCountryPie3D(‘thisweek’,5,1,400,200,true,’idaho_stat’);

It uses the fabulous “jpgraph” library.

Three functions have been created for this :

  • TFStatOSPie3D($Frequency = “today”, $nMax = 5, $Header=2, $Width=400, $Height=200, $Legend=true, $dbname = ” )
  • TFStatBrowserPie3D($Frequency = “today”, $nMax = 5, $Header=2, $Width=400, $Height=200, $Legend=true,$dbname = ” )
  • TFStatCountryPie3D($Frequency = “today”, $nMax = 5, $Header=2, $Width=400, $Height=200, $Legend=true,$dbname = ” )

I will package and document those new functions and they will be available for download very soon.

new TFS 1.0.8 is out since yesterday

A new version of the original TFS script has been published yesterday, the changes i have made are :

  • minutediff changed in hourdiff
  • added browser version support
  • added database installation script
  • new bots/browsers and searchengines
  • time calculation is now done in SQL

there is a “full version” and “upgrade version” available in the “oplossing.net” download section.

Normally I will install it here tonight. As I can see, I have nearly nothing to do on my addons…. 😉 Anyway, I will release a new version…Fully XHTML compliant.

User Tracking Usage Hack

I will create a “User Tracking” addon to WordPress. As confirmed by a post : PHP User Tracking, it seems that could interesting to have that functionnality available.

So as I already thought about that kind of tools. I gonna integrate the TFS tools and wp-stat from GamerZ.

This hack will allow you to “track” a user. By “track”, I mean know what a specific user (according a cookie) has view (which posts), from which country (s)he is coming from, which browser (s)he is using, which operating system, ….

Let’s say normal website statistics AND also WP dedicated statistics.

For the “view” part, I think that the best location for that is the “Admin” Area.

It is still under analysis so keep my posted if you see something else, don’t hesitate ! ;o)

Hack: Pure CSS for B2Calendar

Pure CSS to display the calendar! No more need of that “table” thing !

.dayword
{
z-index: 100;
position: absolute;
width: 20px;
text-align: center;
vertical-align: middle;
font-family: Arial;
font-size: xx-small;
font-weight: 900;
background: #6495ED;
color: Black;
}

.daynum
{
z-index: 200;
position: absolute;
width: 20px;
text-align: center;
vertical-align: middle;
color: #000;
font-size: xx-small;
font-style: oblique;
font-weight: 900;
font-family: Arial;
margin: 0px 0px 0px 0px;
}

.day
{
width: 20px;
height: 15px;
text-align: right;
background-color: #F8F8FF;
vertical-align: middle;
float: left;
margin: 0px 0px 0px 0px;
}

.daynow
{
background-color: #1E90FF;
color: white;
}
.week
{
text-align: center;
clear: both;
}

.month {
background-color: #4682B4;
vertical-align: middle;
text-align: center;
font-size: 12px;
margin: 0px 0px 0px 0px;
width: 150px;
}
.cal
{
width: 150px;
background-color: #F8F8FF;
}

Drop me a line to have the PHP code hacked.

Random info to display from table

After a small delay, the promised hacks are out !

I wrote something very generic in order to be able to fill nearly all requirements !
This hack can handle what you want ! for the usual “Quote of the day”, the current “Book”, the “Movie”, the “link” as I said what ever ou want !

The function to call is :

the_genRandom(
$cTag, // Tag Type
$count=1, // Number of rows to display
$cCollectBefore=”, // Thing to display before anything else
$cCollectAfter=”, // Thing to display after everything
$cItemBefore=”, // Thing to display before each row
$cItemAfter=”, // Thing to display after each row
$cValBefore=”, // Thing to display before main value
$cValAfter=”, // Thing to display after main value
$cAssBefore=”, // Thing to display before the associated value
$cAssAfter=”) // Thing to display after the associated value

The table used must have at least the following structure :

id int(11) NOT NULL auto_increment,
KeyField varchar(15) NOT NULL default ”,
KeyValue tinytext NOT NULL,
KeyAssociated tinytext,
KeyCreated timestamp(14) NOT NULL,
PRIMARY KEY (id),
KEY KeyField (KeyField)
) ENGINE=MyISAM;

The PHP code is very very difficult… ( less than 10 lines !!!!!!) 😉
Continue reading “Random info to display from table”

WP: “Who Are You” Hack

This hack provide to the user his/her IP, the country associated with the “hostname” and finally the browser used. Of course this can be used to Monitoring / Statistic purpose…

In the “index.php”, you have to add : require_once(‘b2whoareyou.php’);
To get the country : < ?php echo WAY_country(); ?>
To get the Browser: < ?php echo WAY_browser(); ?>

Easy, no ?

Ce hack fournit

All around Tunisia

Few weeks ago, Cline and me went to Tunisia. We did a round-trip there all accross the country. The most beautiful part is the South (of course!) with the Desert !