Skip to content

Commit

Permalink
Creating 2x branch with latest changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjaure committed Apr 9, 2009
2 parents 67e3dd7 + ad02d95 commit 594db4d
Show file tree
Hide file tree
Showing 299 changed files with 113 additions and 27,398 deletions.
2 changes: 1 addition & 1 deletion source/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2008 Chris Jaure, <http://www.jibberbook.com/>
Copyright (c) 2009 Chris Jaure, <http://www.jibberbook.com/>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
37 changes: 6 additions & 31 deletions source/README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-----------------------------------------------------------
JibberBook v2.2
(c) 2008 Chris Jaure
JibberBook v2.3
(c) 2009 Chris Jaure
license: MIT License
website: http://www.jibberbook.com/
-----------------------------------------------------------
Expand All @@ -14,11 +14,11 @@ INSTALLATION:

1. Unpack files.

2. Open /inc/config.php and on line 22, change 'password' to a password of your choice.
2. Open /inc/config.php and on line 33, change 'password' to a password of your choice.

3. Upload the files to your web server.

4. Make sure your server has permission to write to /xml/comments.xml
4. Make sure your server has permission to write to /data_layer/xml/comments.xml

If you plan on using HTML Purifier, your server MUST have permission to write to /libraries/htmlpurifier/standalone/HTMLPurifier/DefinitionCache/Serializer

Expand All @@ -28,32 +28,7 @@ If you want to use a non-supported storage system, just extend /data_layer/datal
CONFIGURATION:

The configuration file contains many options.
You can change (on line number):

12. Type of storage. Accepts xml or mysql.
13. The filename of the comments page. If you rename the file, change it here.
14. How many comments are loaded at a time. A good range is 20-50.
15. The date format. For other date formats, go to http://php.net/manual/en/function.date.php
16. The folder name of the theme to be used.
17. Language pack to be used. Should be the filename of any file in /localization/ without the extension. Uncomment if you need to change it.
18. Location of the emoticon images. Must be an absolute url. Set to false to disable emoticon replacement.
19. Enter your email address here if you want notifications of new comments. Set to false to disable.

22. If you're using xml for storage, the name of the xml file located in /data_layer/xml/

25.-29. If you're using mysql for storage, the information needed to connect to the database

32. The password for the admin section.

35. If true, HTML Purifier will be used to filter HTML. If false, all tags will be stripped. For more information on HTML Purifier, go to http://htmlpurifier.org/
36. The character encoding of your page. Required by HTML Purifier.
37. The doctype of your page. Required by HTML Purifier.
38. Allowed HTML elements and attributes. Required by HTML Purifier.

41. Your Akismet key. If a key is provided, Akismet will be used to filter spam. If a key is not provided, a simple spam filtration technique will be used. For more information on Akismet, go to http://akismet.com/
42. The URL of the guestbook page. Required by Akismet.

45. If emoticon replacement is enabled, the keys will be replaced by the images.
For an up-to-date description of configuration options, visit http://code.google.com/p/jibberbook/wiki/Installation


ADMINISTRATION:
Expand All @@ -74,7 +49,7 @@ INSTALLING THEMES:

Themes should be unzipped and uploaded to the 'theme' directory and should be contained in their own subdirectory.

To enable a theme, in config.inc on line number 19, enter the name of the subdirectory of the theme.
To enable a theme, in config.inc on line number 16, enter the name of the subdirectory of the theme.


CREATING THEMES:
Expand Down
29 changes: 16 additions & 13 deletions source/actions/add.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand All @@ -19,23 +19,20 @@
unset($_SESSION['form_website']);
unset($_SESSION['form_comment']);

$data = $_POST;
$data = array();
$data['name'] = $_POST['name'];
$data['website'] = $_POST['website'];
$data['comment'] = $_POST['comment'];
$data['jbemail'] = $_POST['jbemail'];

if ($data['_ajax'] == 'true'){
$ajax = true;
}
else $ajax = false;
unset($data['_ajax']);
$ajax = ($_POST['_ajax'] == 'true');

foreach ($data as $key => &$datem){ // clean input
if (!($key == 'name' || $key == 'website' || $key == 'comment' || $key == 'jbemail')) {
unset($data[$key]);
continue;
}
if (get_magic_quotes_gpc()) {
$datem = stripslashes($datem);
}
$datem = trim($datem);
$datem = trim($datem);
$datem = iconv("UTF-8", "UTF-8//IGNORE", $datem);
if ($key != 'comment') {
$datem = strip_tags($datem);
$datem = htmlspecialchars($datem, ENT_QUOTES);
Expand All @@ -51,6 +48,12 @@
$message = __('Your comment has been added.');
$value = '1';
validateForm($data);

if (JB_CHAR_LIMIT) {
if (strlen($data['comment']) > JB_CHAR_LIMIT) {
$data['comment'] = substr($data['comment'], 0, JB_CHAR_LIMIT) . '...';
}
}

if (JB_ENABLE_HTML_PURIFIER) {
//HTMLPurifier filtering
Expand Down
4 changes: 2 additions & 2 deletions source/actions/loadcomments.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
6 changes: 3 additions & 3 deletions source/actions/transformxml.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down Expand Up @@ -32,4 +32,4 @@ function replaceEmoticons($matches) {
return $matches[0];
}
}
?>
?>
9 changes: 7 additions & 2 deletions source/actions/validateform.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down Expand Up @@ -58,6 +58,11 @@ function validateForm(&$formData){
$errordesc = __('Please wait a bit before adding another comment.');
}
}

if (!JB_KEEP_SPAM && $formData['spam']) {
$errornum = '6';
$errordesc = __('Your comment was discarded because it was flagged as spam.');
}

// if there's an error, return json object or set session vars, and then stop further actions
if (isset($errornum)) {
Expand Down
6 changes: 3 additions & 3 deletions source/admin/actions/delete.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down Expand Up @@ -32,4 +32,4 @@
$_SESSION['message_type'] = 'confirm';
header("Location: {$_SESSION['referer']}");
}
?>
?>
4 changes: 2 additions & 2 deletions source/admin/actions/load.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
6 changes: 3 additions & 3 deletions source/admin/actions/login.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand All @@ -21,4 +21,4 @@
$url = 'http://' . $_SERVER['HTTP_HOST'] . dirname(dirname($_SERVER['REQUEST_URI'] . 'x')) . '/index.php';
header("Location: $url");
exit();
?>
?>
6 changes: 3 additions & 3 deletions source/admin/actions/logout.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand All @@ -12,4 +12,4 @@
session_unset();
session_destroy();
header("Location: ../index.php");
?>
?>
6 changes: 3 additions & 3 deletions source/admin/actions/reclassify.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand All @@ -24,4 +24,4 @@
header("Location: {$_SESSION['referer']}");
}

?>
?>
6 changes: 3 additions & 3 deletions source/admin/actions/transformxml.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down Expand Up @@ -35,4 +35,4 @@ function transformXML($input, $type){
</div>
<?php
}
?>
?>
4 changes: 2 additions & 2 deletions source/admin/ham.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
4 changes: 2 additions & 2 deletions source/admin/inc/footer.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
4 changes: 2 additions & 2 deletions source/admin/inc/header.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
4 changes: 2 additions & 2 deletions source/admin/inc/jbascript.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
4 changes: 2 additions & 2 deletions source/admin/inc/jbastyle.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
4 changes: 2 additions & 2 deletions source/admin/inc/jbastyle_js.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
6 changes: 3 additions & 3 deletions source/admin/inc/secure.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand All @@ -21,4 +21,4 @@
} else {
$loggedin = true;
}
?>
?>
4 changes: 2 additions & 2 deletions source/admin/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
4 changes: 2 additions & 2 deletions source/admin/login_form.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
4 changes: 2 additions & 2 deletions source/admin/spam.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down
6 changes: 3 additions & 3 deletions source/feed/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
//-------------------------------------------------------------------------------------
// JibberBook v2.1
// (c) 2008 Chris Jaure
// JibberBook v2.3
// (c) 2009 Chris Jaure
// license: MIT License
// website: http://www.jibberbook.com/
//
Expand Down Expand Up @@ -32,4 +32,4 @@
endforeach;
?>
</channel>
</rss>
</rss>
Loading

0 comments on commit 594db4d

Please sign in to comment.