REQUEST: BBclone replacement that doesn't rely on Javascript

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

REQUEST: BBclone replacement that doesn't rely on Javascript

Postby janozaurus » Sun Feb 08, 2009 5:40 pm

I prefer websites without any javascript for widest possible compatibility. BBClone seems to use Javascript. However it should be possible to collect usage statistics on the server. Has anyone thought about PHP server side replacement for BBclone?
janozaurus
 
Posts: 38
Joined: Mon Nov 26, 2007 9:03 am

Re: REQUEST: BBclone replacement that doesn't rely on Javascript

Postby hansfn » Mon Feb 09, 2009 1:57 am

There is a very good reason for using Javascript - spam. Anyway, I think I have just created a working non-JS version - download pivotx_hook_bbclone_nojs.zip, unzip, move the file to extensions/bbclone directory and update extensions settings. I'll commit it, if it works OK for you too. (My initial testing turned out OK.)

PS! If you are really pedantic, add

Code: Select all
// If called directly/without using Javascript, we output a 1x1 dummy image.
if (isset($_GET['nojs'])) {
    header("Content-type: image/gif");
    $img = "R0lGODlhAQABAID/AP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";
    echo base64_decode($img);
}

right after

Code: Select all
if (is_readable(COUNTER)) include_once(COUNTER);

in extensions/bbclone/mark.php. (This is optional, but will be part of my official patch.)
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway


Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 2 guests

cron