summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.xml60
-rw-r--r--data/config.default.php9
-rw-r--r--data/schema/1.sql20
-rw-r--r--data/schema/2.sql10
-rw-r--r--data/schema/3.sql85
-rw-r--r--data/schema/4.sql11
-rw-r--r--data/schema/5.sql1
-rw-r--r--data/templates/default/about.tpl.php (renamed from data/templates/about.tpl.php)0
-rw-r--r--data/templates/default/admin.tpl.php (renamed from data/templates/admin.tpl.php)0
-rw-r--r--data/templates/default/bookmarkcommondescriptionedit.tpl.php (renamed from data/templates/bookmarkcommondescriptionedit.tpl.php)0
-rw-r--r--data/templates/default/bookmarklet.inc.php (renamed from data/templates/bookmarklet.inc.php)0
-rw-r--r--data/templates/default/bookmarks-thumbnail.inc.tpl.php (renamed from data/templates/bookmarks-thumbnail.inc.tpl.php)0
-rw-r--r--data/templates/default/bookmarks-vote-horizontal.inc.tpl.php (renamed from data/templates/bookmarks-vote-horizontal.inc.tpl.php)0
-rw-r--r--data/templates/default/bookmarks-vote.inc.tpl.php (renamed from data/templates/bookmarks-vote.inc.tpl.php)0
-rw-r--r--data/templates/default/bookmarks.tpl.php (renamed from data/templates/bookmarks.tpl.php)18
-rw-r--r--data/templates/default/bottom.inc.php (renamed from data/templates/bottom.inc.php)0
-rw-r--r--data/templates/default/dojo.inc.php (renamed from data/templates/dojo.inc.php)0
-rw-r--r--data/templates/default/dynamictags.inc.php (renamed from data/templates/dynamictags.inc.php)0
-rw-r--r--data/templates/default/editbookmark.tpl.php (renamed from data/templates/editbookmark.tpl.php)0
-rw-r--r--data/templates/default/editprofile-sslclientcerts.tpl.php (renamed from data/templates/editprofile-sslclientcerts.tpl.php)0
-rw-r--r--data/templates/default/editprofile.tpl.php (renamed from data/templates/editprofile.tpl.php)0
-rw-r--r--data/templates/default/error.404.tpl.php (renamed from data/templates/error.404.tpl.php)0
-rw-r--r--data/templates/default/error.500.tpl.php (renamed from data/templates/error.500.tpl.php)0
-rw-r--r--data/templates/default/importDelicious.tpl.php (renamed from data/templates/importDelicious.tpl.php)0
-rw-r--r--data/templates/default/importNetscape.tpl.php (renamed from data/templates/importNetscape.tpl.php)0
-rw-r--r--data/templates/default/importStructure.tpl.php (renamed from data/templates/importStructure.tpl.php)0
-rw-r--r--data/templates/default/login.tpl.php (renamed from data/templates/login.tpl.php)0
-rw-r--r--data/templates/default/password.tpl.php (renamed from data/templates/password.tpl.php)0
-rw-r--r--data/templates/default/profile.tpl.php (renamed from data/templates/profile.tpl.php)0
-rw-r--r--data/templates/default/register.tpl.php (renamed from data/templates/register.tpl.php)0
-rw-r--r--data/templates/default/rss.tpl.php (renamed from data/templates/rss.tpl.php)0
-rw-r--r--data/templates/default/search.menu.php (renamed from data/templates/search.menu.php)0
-rw-r--r--data/templates/default/sidebar.block.common.php (renamed from data/templates/sidebar.block.common.php)0
-rw-r--r--data/templates/default/sidebar.block.linked.php (renamed from data/templates/sidebar.block.linked.php)0
-rw-r--r--data/templates/default/sidebar.block.menu.php (renamed from data/templates/sidebar.block.menu.php)0
-rw-r--r--data/templates/default/sidebar.block.menu2.php (renamed from data/templates/sidebar.block.menu2.php)0
-rw-r--r--data/templates/default/sidebar.block.popular.php (renamed from data/templates/sidebar.block.popular.php)0
-rw-r--r--data/templates/default/sidebar.block.recent.php (renamed from data/templates/sidebar.block.recent.php)0
-rw-r--r--data/templates/default/sidebar.block.related.php (renamed from data/templates/sidebar.block.related.php)0
-rw-r--r--data/templates/default/sidebar.block.search.php (renamed from data/templates/sidebar.block.search.php)0
-rw-r--r--data/templates/default/sidebar.block.tagactions.php (renamed from data/templates/sidebar.block.tagactions.php)0
-rw-r--r--data/templates/default/sidebar.block.users.php (renamed from data/templates/sidebar.block.users.php)0
-rw-r--r--data/templates/default/sidebar.block.watchlist.php (renamed from data/templates/sidebar.block.watchlist.php)0
-rw-r--r--data/templates/default/sidebar.block.watchstatus.php (renamed from data/templates/sidebar.block.watchstatus.php)0
-rw-r--r--data/templates/default/sidebar.linkedtags.inc.php (renamed from data/templates/sidebar.linkedtags.inc.php)0
-rw-r--r--data/templates/default/sidebar.tpl.php (renamed from data/templates/sidebar.tpl.php)0
-rw-r--r--data/templates/default/tag2tagadd.tpl.php (renamed from data/templates/tag2tagadd.tpl.php)0
-rw-r--r--data/templates/default/tag2tagdelete.tpl.php (renamed from data/templates/tag2tagdelete.tpl.php)0
-rw-r--r--data/templates/default/tag2tagedit.tpl.php (renamed from data/templates/tag2tagedit.tpl.php)0
-rw-r--r--data/templates/default/tagcommondescriptionedit.tpl.php (renamed from data/templates/tagcommondescriptionedit.tpl.php)1
-rw-r--r--data/templates/default/tagdelete.tpl.php (renamed from data/templates/tagdelete.tpl.php)0
-rw-r--r--data/templates/default/tagedit.tpl.php (renamed from data/templates/tagedit.tpl.php)1
-rw-r--r--data/templates/default/tagrename.tpl.php (renamed from data/templates/tagrename.tpl.php)0
-rw-r--r--data/templates/default/tags.tpl.php (renamed from data/templates/tags.tpl.php)0
-rw-r--r--data/templates/default/toolbar.inc.php (renamed from data/templates/toolbar.inc.php)0
-rw-r--r--data/templates/default/top.inc.php66
-rw-r--r--data/templates/default/users.tpl.php (renamed from data/templates/users.tpl.php)0
-rw-r--r--data/templates/testdummy/top.inc.php (renamed from data/templates/top.inc.php)6
-rw-r--r--doc/ChangeLog26
-rw-r--r--doc/INSTALL.txt50
-rw-r--r--doc/README.rst67
-rw-r--r--doc/README.txt91
-rw-r--r--doc/UPGRADE.txt269
-rw-r--r--doc/authentication.rst213
-rw-r--r--doc/authentication.txt197
-rw-r--r--doc/developers/TODO.rst (renamed from doc/developers/TODO)0
-rw-r--r--doc/developers/api.rst (renamed from doc/developers/api)0
-rw-r--r--doc/developers/debugging20
-rw-r--r--doc/developers/debugging.rst24
-rw-r--r--doc/developers/doc-TODO.rst (renamed from doc/developers/doc-TODO)0
-rw-r--r--doc/developers/release-new-version.rst (renamed from doc/developers/release-new-version)0
-rw-r--r--doc/developers/rules.rst (renamed from doc/developers/rules)0
-rw-r--r--doc/developers/running-unit-tests21
-rw-r--r--doc/developers/running-unit-tests.rst26
-rw-r--r--doc/developers/translation40
-rw-r--r--doc/developers/translation.rst47
-rw-r--r--doc/index.rst45
-rw-r--r--doc/themes.rst48
-rw-r--r--src/SemanticScuttle/Model/Template.php3
-rw-r--r--src/SemanticScuttle/Model/Theme.php97
-rw-r--r--src/SemanticScuttle/Service/Template.php29
-rw-r--r--src/SemanticScuttle/header.php3
-rw-r--r--www/ajaxGetTitle.php5
-rw-r--r--www/jsScuttle.php5
-rw-r--r--www/themes/default/icon.png (renamed from www/icon.png)bin771 -> 771 bytes
-rw-r--r--www/themes/default/images/b_edit.png (renamed from www/images/b_edit.png)bin451 -> 451 bytes
-rw-r--r--www/themes/default/images/bg_admin.png (renamed from www/images/bg_admin.png)bin1212 -> 1212 bytes
-rw-r--r--www/themes/default/images/bg_bar.png (renamed from www/images/bg_bar.png)bin873 -> 873 bytes
-rw-r--r--www/themes/default/images/bg_header.png (renamed from www/images/bg_header.png)bin684 -> 684 bytes
-rw-r--r--www/themes/default/images/bg_sidebar.png (renamed from www/images/bg_sidebar.png)bin726 -> 726 bytes
-rw-r--r--www/themes/default/images/loading.gif (renamed from www/images/loading.gif)bin1582 -> 1582 bytes
-rw-r--r--www/themes/default/images/logo.png (renamed from www/images/logo.png)bin2973 -> 2973 bytes
-rw-r--r--www/themes/default/images/logo_24.gif (renamed from www/images/logo_24.gif)bin1530 -> 1530 bytes
-rw-r--r--www/themes/default/images/rss.gif (renamed from www/images/rss.gif)bin401 -> 401 bytes
-rw-r--r--www/themes/default/images/thumbs_up.orig.png (renamed from www/images/thumbs_up.orig.png)bin19257 -> 19257 bytes
-rw-r--r--www/themes/default/images/vote-against-voted.png (renamed from www/images/vote-against-voted.png)bin419 -> 419 bytes
-rw-r--r--www/themes/default/images/vote-against.png (renamed from www/images/vote-against.png)bin495 -> 495 bytes
-rw-r--r--www/themes/default/images/vote-for-voted.png (renamed from www/images/vote-for-voted.png)bin415 -> 415 bytes
-rw-r--r--www/themes/default/images/vote-for.png (renamed from www/images/vote-for.png)bin625 -> 625 bytes
-rw-r--r--www/themes/default/scuttle.css (renamed from www/scuttle.css)0
-rw-r--r--www/themes/testdummy/images/logo.pngbin0 -> 2890 bytes
-rw-r--r--www/themes/testdummy/scuttle.css12
102 files changed, 1025 insertions, 601 deletions
diff --git a/build.xml b/build.xml
index 9773a63..d0637c7 100644
--- a/build.xml
+++ b/build.xml
@@ -41,7 +41,6 @@
Test your zip with: unzip -l SemanticScuttle-0.95.0.zip
-->
- <mkdir dir="dist" />
<echo msg="Creating distribution zip for SemanticScuttle ${version}"/>
<delete file="${distfile}" failonerror="false"/>
<zip destfile="${distfile}" prefix="${phing.project.name}-${version}/">
@@ -121,18 +120,19 @@
<replacement
path="src/SemanticScuttle/header.php"
- type="pear-config"
- from="@data_dir@" to="data_dir"
+ type="pear-config" from="@data_dir@" to="data_dir"
+ />
+ <replacement
+ path="src/SemanticScuttle/header.php"
+ type="pear-config" from="@www_dir@" to="www_dir"
/>
<replacement
path="www/www-header.php"
- type="pear-config"
- from="@data_dir@" to="data_dir"
+ type="pear-config" from="@data_dir@" to="data_dir"
/>
<replacement
path="tests/prepare.php"
- type="pear-config"
- from="@data_dir@" to="data_dir"
+ type="pear-config" from="@data_dir@" to="data_dir"
/>
<changelog version="0.97" date="2010-06-09" license="GPL">
@@ -207,6 +207,48 @@
</target>
+ <!-- you need to have the python docutils package installed, since
+ we use the rst2html tool -->
+ <target name="build-docs">
+ <foreach param="fname" absparam="abs-fname" target="build-doc-file">
+ <fileset dir=".">
+ <include name="doc/ChangeLog"/>
+ <include name="doc/**.txt"/>
+ <include name="doc/**.rst"/>
+ <include name="doc/**/*.rst"/>
+ <exclude name="doc/LICENSE.txt"/>
+ <exclude name="doc/developers/TODO.rst"/>
+ </fileset>
+ </foreach>
+ </target>
+
+
+ <target name="build-doc-file" depends="check"
+ description="Builds a single documentation file. Pass file path as $fname"
+ >
+ <echo msg="${fname}"/>
+ <php function="preg_replace" returnProperty="outfile">
+ <param value="/^(.+)(.rst|.txt)$/"/>
+ <param value="dist/\1.html"/>
+ <param value="${fname}"/>
+ </php>
+
+ <!-- only render file if the doc file is newer than the html file -->
+ <property name="isuptodate" value="false"/>
+ <uptodate property="isuptodate" srcfile="${fname}" targetfile="${outfile}" />
+ <if>
+ <not><istrue value="${isuptodate}"/></not>
+ <then>
+ <exec
+ command="rst2html --exit-status=2 ${fname} ${outfile}"
+ checkreturn="1"
+ />
+ </then>
+ </if>
+
+ </target>
+
+
<target name="release" depends="check,zip,package,deploy-sf"
description="Release the version on sourceforge"
@@ -314,6 +356,10 @@
<fail unless="sfuser" message="Sourceforge username not defined!" />
<fail unless="sfproject" message="Sourceforge project name not defined!" />
<fail unless="sffilepath" message="Sourceforge project file path not defined!" />
+
+ <mkdir dir="dist" />
+ <mkdir dir="dist/doc" />
+ <mkdir dir="dist/doc/developers" />
</target>
</project>
diff --git a/data/config.default.php b/data/config.default.php
index 8c47e0b..c850521 100644
--- a/data/config.default.php
+++ b/data/config.default.php
@@ -63,6 +63,15 @@ $sidebarTopMessage = '';
*/
$sidebarBottomMessage = '';
+/**
+ * The HTML theme to use. With themes, you can give your semanticscuttle
+ * installation a new look.
+ *
+ * Themes are the folders in data/templates/
+ *
+ * @var string
+ */
+$theme = 'default';
/***************************************************
diff --git a/data/schema/1.sql b/data/schema/1.sql
new file mode 100644
index 0000000..e09a210
--- /dev/null
+++ b/data/schema/1.sql
@@ -0,0 +1,20 @@
+RENAME TABLE `sc_tags` TO `sc_bookmarks2tags` ;
+
+ CREATE TABLE `sc_searchhistory` (
+ `shId` int(11) NOT NULL auto_increment,
+ `shTerms` varchar(255) NOT NULL default '',
+ `shRange` varchar(32) NOT NULL default '',
+ `shDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
+ `shNbResults` int(6) NOT NULL default '0',
+ `uId` int(11) NOT NULL default '0',
+ PRIMARY KEY (`shId`)
+ );
+
+ CREATE TABLE `sc_tags` (
+ `tId` int(11) NOT NULL auto_increment,
+ `tag` varchar(32) NOT NULL default '',
+ `uId` int(11) NOT NULL default '0',
+ `tDescription` varchar(255) default NULL,
+ PRIMARY KEY (`tId`),
+ UNIQUE KEY `sc_tags_tag_uId` (`tag`, `uId`)
+ );
diff --git a/data/schema/2.sql b/data/schema/2.sql
new file mode 100644
index 0000000..6c3bfaf
--- /dev/null
+++ b/data/schema/2.sql
@@ -0,0 +1,10 @@
+ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` VARCHAR( 1500 )
+CREATE TABLE `sc_tagscache` (
+ `tcId` int(11) NOT NULL auto_increment,
+ `tag1` varchar(100) NOT NULL default '',
+ `tag2` varchar(100) NOT NULL default '',
+ `relationType` varchar(32) NOT NULL default '',
+ `uId` int(11) NOT NULL default '0',
+ PRIMARY KEY (`tcId`),
+ UNIQUE KEY `sc_tagscache_tag1_tag2_type_uId` (`tag1`,`tag2`,`relationType`,`uId`)
+);
diff --git a/data/schema/3.sql b/data/schema/3.sql
new file mode 100644
index 0000000..32431b9
--- /dev/null
+++ b/data/schema/3.sql
@@ -0,0 +1,85 @@
+/* modify and add fields */
+ALTER TABLE `sc_bookmarks` MODIFY `bAddress` varchar(1500) NOT NULL;
+ALTER TABLE `sc_bookmarks` MODIFY `bDescription` TEXT default NULL;
+ALTER TABLE `sc_bookmarks` ADD `bPrivateNote` TEXT NULL AFTER `bDescription` ;
+ALTER TABLE `sc_tags` MODIFY `tDescription` TEXT default NULL;
+ALTER TABLE `sc_commondescription` MODIFY `cdDescription` TEXT default NULL;
+
+/* convert to UTF-8 if your table is ISO-something (through BLOB: tips provided by MYSQL documentation)*/
+/* first need to remove index keys because of BLOB constraints*/
+ALTER TABLE `sc_tags` DROP INDEX `sc_tags_tag_uId`;
+ALTER TABLE `sc_bookmarks2tags` DROP INDEX `sc_bookmarks2tags_tag_bId`;
+ALTER TABLE `sc_bookmarks2tags` DROP INDEX `sc_bookmarks2tags_bId`;
+ALTER TABLE `sc_tags2tags` DROP INDEX `sc_tags2tags_tag1_tag2_uId`;
+ALTER TABLE `sc_commondescription` DROP INDEX `sc_commondescription_tag_datetime`;
+ALTER TABLE `sc_tagscache` DROP INDEX `sc_tagscache_tag1_tag2_type_uId`;
+ALTER TABLE `sc_tagsstats` DROP INDEX `sc_tagsstats_tag1_type_uId`;
+
+/* secondly convert through BLOB type */
+ALTER TABLE `sc_bookmarks` CHANGE `bTitle` `bTitle` BLOB;
+ALTER TABLE `sc_bookmarks` CHANGE `bTitle` `bTitle` varchar(255) CHARACTER SET utf8;
+ALTER TABLE `sc_bookmarks` CHANGE `bAddress` `bAddress` BLOB;
+ALTER TABLE `sc_bookmarks` CHANGE `bAddress` `bAddress` varchar(1500) CHARACTER SET utf8;
+ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` BLOB;
+ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` text CHARACTER SET utf8;
+ALTER TABLE `sc_bookmarks` CHANGE `bPrivateNote` `bPrivateNote` BLOB;
+ALTER TABLE `sc_bookmarks` CHANGE `bPrivateNote` `bPrivateNote` text CHARACTER SET utf8;
+
+ALTER TABLE `sc_tags` CHANGE `tag` `tag` BLOB;
+ALTER TABLE `sc_tags` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
+ALTER TABLE `sc_tags` CHANGE `tDescription` `tDescription` BLOB;
+ALTER TABLE `sc_tags` CHANGE `tDescription` `tDescription` text CHARACTER SET utf8;
+
+ALTER TABLE `sc_bookmarks2tags` CHANGE `tag` `tag` BLOB;
+ALTER TABLE `sc_bookmarks2tags` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
+
+ALTER TABLE `sc_users` CHANGE `name` `name` BLOB;
+ALTER TABLE `sc_users` CHANGE `name` `name` varchar(50) CHARACTER SET utf8;
+ALTER TABLE `sc_users` CHANGE `uContent` `uContent` BLOB;
+ALTER TABLE `sc_users` CHANGE `uContent` `uContent` text CHARACTER SET utf8;
+
+ALTER TABLE `sc_tags2tags` CHANGE `tag1` `tag1` BLOB;
+ALTER TABLE `sc_tags2tags` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
+ALTER TABLE `sc_tags2tags` CHANGE `tag2` `tag2` BLOB;
+ALTER TABLE `sc_tags2tags` CHANGE `tag2` `tag2` varchar(100) CHARACTER SET utf8;
+
+ALTER TABLE `sc_tagsstats` CHANGE `tag1` `tag1` BLOB;
+ALTER TABLE `sc_tagsstats` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
+
+ALTER TABLE `sc_tagscache` CHANGE `tag1` `tag1` BLOB;
+ALTER TABLE `sc_tagscache` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
+ALTER TABLE `sc_tagscache` CHANGE `tag2` `tag2` BLOB;
+ALTER TABLE `sc_tagscache` CHANGE `tag2` `tag2` varchar(100) CHARACTER SET utf8;
+
+ALTER TABLE `sc_commondescription` CHANGE `tag` `tag` BLOB;
+ALTER TABLE `sc_commondescription` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
+ALTER TABLE `sc_commondescription` CHANGE `cdTitle` `cdTitle` BLOB;
+ALTER TABLE `sc_commondescription` CHANGE `cdTitle` `cdTitle` varchar(255) CHARACTER SET utf8;
+ALTER TABLE `sc_commondescription` CHANGE `cdDescription` `cdDescription` BLOB;
+ALTER TABLE `sc_commondescription` CHANGE `cdDescription` `cdDescription` text CHARACTER SET utf8;
+
+ALTER TABLE `sc_searchhistory` CHANGE `shTerms` `shTerms` BLOB;
+ALTER TABLE `sc_searchhistory` CHANGE `shTerms` `shTerms` varchar(255) CHARACTER SET utf8;
+ALTER TABLE `sc_searchhistory` CHANGE `shRange` `shRange` BLOB;
+ALTER TABLE `sc_searchhistory` CHANGE `shRange` `shRange` varchar(32) CHARACTER SET utf8;
+
+/* Thirdly re-add index keys */
+ALTER TABLE `sc_tags` ADD UNIQUE KEY `sc_tags_tag_uId` (`tag`, `uId`);
+ALTER TABLE `sc_bookmarks2tags` ADD UNIQUE KEY `sc_bookmarks2tags_tag_bId` (`tag`,`bId`);
+ALTER TABLE `sc_bookmarks2tags` ADD KEY `sc_bookmarks2tags_bId` (`bId`);
+ALTER TABLE `sc_tags2tags` ADD UNIQUE KEY `sc_tags2tags_tag1_tag2_uId` (`tag1`,`tag2`,`relationType`,`uId`);
+ALTER TABLE `sc_commondescription` ADD UNIQUE KEY `sc_commondescription_tag_datetime` (`tag`,`cdDatetime`);
+ALTER TABLE `sc_tagscache` ADD UNIQUE KEY `sc_tagscache_tag1_tag2_type_uId` (`tag1`,`tag2`,`relationType`,`uId`);
+ALTER TABLE `sc_tagsstats` ADD UNIQUE KEY `sc_tagsstats_tag1_type_uId` (`tag1`,`relationType`,`uId`);
+
+/* Change tables to utf-8 charset */
+ALTER TABLE `sc_bookmarks` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_bookmarks2tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_users` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_watched` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_tags2tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_tagsstats` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_tagscache` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_commondescription` CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `sc_searchhistory` CHARACTER SET utf8 COLLATE utf8_general_ci;
diff --git a/data/schema/4.sql b/data/schema/4.sql
new file mode 100644
index 0000000..022aaf0
--- /dev/null
+++ b/data/schema/4.sql
@@ -0,0 +1,11 @@
+ALTER TABLE `sc_bookmarks` ADD `bVoting` INT NOT NULL;
+ALTER TABLE `sc_bookmarks` ADD `bVotes` INT NOT NULL;
+
+CREATE TABLE `sc_votes` (
+ `bId` INT NOT NULL ,
+ `uId` INT NOT NULL ,
+ `vote` INT( 2 ) NOT NULL ,
+ UNIQUE KEY `bid_2` (`bId`,`uId`),
+ KEY `bid` (`bId`),
+ KEY `uid` (`uId`)
+) CHARACTER SET utf8 COLLATE utf8_general_ci ;
diff --git a/data/schema/5.sql b/data/schema/5.sql
new file mode 100644
index 0000000..d4c9afc
--- /dev/null
+++ b/data/schema/5.sql
@@ -0,0 +1 @@
+ALTER TABLE `sc_bookmarks` ADD `bShort` VARCHAR(16) NULL DEFAULT NULL;
diff --git a/data/templates/about.tpl.php b/data/templates/default/about.tpl.php
index 7bff98d..7bff98d 100644
--- a/data/templates/about.tpl.php
+++ b/data/templates/default/about.tpl.php
diff --git a/data/templates/admin.tpl.php b/data/templates/default/admin.tpl.php
index 50680f6..50680f6 100644
--- a/data/templates/admin.tpl.php
+++ b/data/templates/default/admin.tpl.php
diff --git a/data/templates/bookmarkcommondescriptionedit.tpl.php b/data/templates/default/bookmarkcommondescriptionedit.tpl.php
index 807c58b..807c58b 100644
--- a/data/templates/bookmarkcommondescriptionedit.tpl.php
+++ b/data/templates/default/bookmarkcommondescriptionedit.tpl.php
diff --git a/data/templates/bookmarklet.inc.php b/data/templates/default/bookmarklet.inc.php
index 9867745..9867745 100644
--- a/data/templates/bookmarklet.inc.php
+++ b/data/templates/default/bookmarklet.inc.php
diff --git a/data/templates/bookmarks-thumbnail.inc.tpl.php b/data/templates/default/bookmarks-thumbnail.inc.tpl.php
index 200b8f7..200b8f7 100644
--- a/data/templates/bookmarks-thumbnail.inc.tpl.php
+++ b/data/templates/default/bookmarks-thumbnail.inc.tpl.php
diff --git a/data/templates/bookmarks-vote-horizontal.inc.tpl.php b/data/templates/default/bookmarks-vote-horizontal.inc.tpl.php
index c4a9f8e..c4a9f8e 100644
--- a/data/templates/bookmarks-vote-horizontal.inc.tpl.php
+++ b/data/templates/default/bookmarks-vote-horizontal.inc.tpl.php
diff --git a/data/templates/bookmarks-vote.inc.tpl.php b/data/templates/default/bookmarks-vote.inc.tpl.php
index 41572d5..41572d5 100644
--- a/data/templates/bookmarks-vote.inc.tpl.php
+++ b/data/templates/default/bookmarks-vote.inc.tpl.php
diff --git a/data/templates/bookmarks.tpl.php b/data/templates/default/bookmarks.tpl.php
index 42aaa95..27118f5 100644
--- a/data/templates/bookmarks.tpl.php
+++ b/data/templates/default/bookmarks.tpl.php
@@ -39,7 +39,9 @@ include('search.menu.php');
<?php if($GLOBALS['enableAdminColors']!=false && isset($userid) && $userservice->isAdmin($userid) && $pageName != PAGE_WATCHLIST) : ?>
<div style="width:70%;text-align:center;">
-<img src="<?php echo ROOT ?>images/logo_24.gif" width="12px"/> <?php echo T_('Bookmarks on this page are managed by an admin user.'); ?><img src="<?php echo ROOT ?>images/logo_24.gif" width="12px"/>
+ <img src="<?php $theme->resource('images/logo_24.gif'); ?>" width="12px"/>
+ <?php echo T_('Bookmarks on this page are managed by an admin user.'); ?>
+ <img src="<?php $theme->resource('images/logo_24.gif'); ?>" width="12px"/>
</div>
<?php endif?>
@@ -70,7 +72,7 @@ if ($userservice->isLoggedOn()) {
) {
echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'" title="'.T_('Edit the common description of this tag').'">';
echo !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
- echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
+ echo ' <img src="' . $theme->resource('images/b_edit.png') . '" /></a>';
} else if (isset($hash)) {
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'" title="'.T_('Edit the common description of this bookmark').'">';
echo T_('Edit the common description of this bookmark').'</a>)';
@@ -95,7 +97,7 @@ if($userservice->isLoggedOn()) {
if($currenttag!= '') {
echo ' <a href="'. createURL('tagedit', $currenttag).'" title="'.T_('Edit your personal description of this tag').'" >';
echo strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):'';
- echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
+ echo ' <img src="' . $theme->resource('images/b_edit.png') . '" /></a>';
}
}
?></p>
@@ -361,9 +363,15 @@ if ($currenttag!= '') {
}
// Admin specific design
- if ($userservice->isAdmin($row['username']) && $GLOBALS['enableAdminColors']) {
+ if ($userservice->isAdmin($row['username'])
+ && $GLOBALS['enableAdminColors']
+ ) {
$adminBgClass = ' class="adminBackground"';
- $adminStar = ' <img src="'. ROOT .'images/logo_24.gif" width="12px" title="'. T_('This bookmark is certified by an admin user.') .'" />';
+ $adminStar = ' <img'
+ . ' src="' . $theme->resource('images/logo_24.gif') . '"'
+ . ' width="12px"'
+ . ' title="' . T_('This bookmark is certified by an admin user.') . '"'
+ . '/>';
} else {
$adminBgClass = '';
$adminStar = '';
diff --git a/data/templates/bottom.inc.php b/data/templates/default/bottom.inc.php
index 0c966a2..0c966a2 100644
--- a/data/templates/bottom.inc.php
+++ b/data/templates/default/bottom.inc.php
diff --git a/data/templates/dojo.inc.php b/data/templates/default/dojo.inc.php
index 366dcfe..366dcfe 100644
--- a/data/templates/dojo.inc.php
+++ b/data/templates/default/dojo.inc.php
diff --git a/data/templates/dynamictags.inc.php b/data/templates/default/dynamictags.inc.php
index 8cf07c1..8cf07c1 100644
--- a/data/templates/dynamictags.inc.php
+++ b/data/templates/default/dynamictags.inc.php
diff --git a/data/templates/editbookmark.tpl.php b/data/templates/default/editbookmark.tpl.php
index 8b71230..8b71230 100644
--- a/data/templates/editbookmark.tpl.php
+++ b/data/templates/default/editbookmark.tpl.php
diff --git a/data/templates/editprofile-sslclientcerts.tpl.php b/data/templates/default/editprofile-sslclientcerts.tpl.php
index 900c193..900c193 100644
--- a/data/templates/editprofile-sslclientcerts.tpl.php
+++ b/data/templates/default/editprofile-sslclientcerts.tpl.php
diff --git a/data/templates/editprofile.tpl.php b/data/templates/default/editprofile.tpl.php
index 25dc3a4..25dc3a4 100644
--- a/data/templates/editprofile.tpl.php
+++ b/data/templates/default/editprofile.tpl.php
diff --git a/data/templates/error.404.tpl.php b/data/templates/default/error.404.tpl.php
index fe9401d..fe9401d 100644
--- a/data/templates/error.404.tpl.php
+++ b/data/templates/default/error.404.tpl.php
diff --git a/data/templates/error.500.tpl.php b/data/templates/default/error.500.tpl.php
index 1d7f7ae..1d7f7ae 100644
--- a/data/templates/error.500.tpl.php
+++ b/data/templates/default/error.500.tpl.php
diff --git a/data/templates/importDelicious.tpl.php b/data/templates/default/importDelicious.tpl.php
index bc4d892..bc4d892 100644
--- a/data/templates/importDelicious.tpl.php
+++ b/data/templates/default/importDelicious.tpl.php
diff --git a/data/templates/importNetscape.tpl.php b/data/templates/default/importNetscape.tpl.php
index 627a5af..627a5af 100644
--- a/data/templates/importNetscape.tpl.php
+++ b/data/templates/default/importNetscape.tpl.php
diff --git a/data/templates/importStructure.tpl.php b/data/templates/default/importStructure.tpl.php
index 9c54612..9c54612 100644
--- a/data/templates/importStructure.tpl.php
+++ b/data/templates/default/importStructure.tpl.php
diff --git a/data/templates/login.tpl.php b/data/templates/default/login.tpl.php
index e67808d..e67808d 100644
--- a/data/templates/login.tpl.php
+++ b/data/templates/default/login.tpl.php
diff --git a/data/templates/password.tpl.php b/data/templates/default/password.tpl.php
index 55dbed6..55dbed6 100644
--- a/data/templates/password.tpl.php
+++ b/data/templates/default/password.tpl.php
diff --git a/data/templates/profile.tpl.php b/data/templates/default/profile.tpl.php
index 1e2003a..1e2003a 100644
--- a/data/templates/profile.tpl.php
+++ b/data/templates/default/profile.tpl.php
diff --git a/data/templates/register.tpl.php b/data/templates/default/register.tpl.php
index 62cebad..62cebad 100644
--- a/data/templates/register.tpl.php
+++ b/data/templates/default/register.tpl.php
diff --git a/data/templates/rss.tpl.php b/data/templates/default/rss.tpl.php
index 6be5425..6be5425 100644
--- a/data/templates/rss.tpl.php
+++ b/data/templates/default/rss.tpl.php
diff --git a/data/templates/search.menu.php b/data/templates/default/search.menu.php
index 5a8f027..5a8f027 100644
--- a/data/templates/search.menu.php
+++ b/data/templates/default/search.menu.php
diff --git a/data/templates/sidebar.block.common.php b/data/templates/default/sidebar.block.common.php
index 951ed80..951ed80 100644
--- a/data/templates/sidebar.block.common.php
+++ b/data/templates/default/sidebar.block.common.php
diff --git a/data/templates/sidebar.block.linked.php b/data/templates/default/sidebar.block.linked.php
index 9aa3cc0..9aa3cc0 100644
--- a/data/templates/sidebar.block.linked.php
+++ b/data/templates/default/sidebar.block.linked.php
diff --git a/data/templates/sidebar.block.menu.php b/data/templates/default/sidebar.block.menu.php
index 94a9fa2..94a9fa2 100644
--- a/data/templates/sidebar.block.menu.php
+++ b/data/templates/default/sidebar.block.menu.php
diff --git a/data/templates/sidebar.block.menu2.php b/data/templates/default/sidebar.block.menu2.php
index 1c177a5..1c177a5 100644
--- a/data/templates/sidebar.block.menu2.php
+++ b/data/templates/default/sidebar.block.menu2.php
diff --git a/data/templates/sidebar.block.popular.php b/data/templates/default/sidebar.block.popular.php
index 50756c0..50756c0 100644
--- a/data/templates/sidebar.block.popular.php
+++ b/data/templates/default/sidebar.block.popular.php
diff --git a/data/templates/sidebar.block.recent.php b/data/templates/default/sidebar.block.recent.php
index 1ffeb4d..1ffeb4d 100644
--- a/data/templates/sidebar.block.recent.php
+++ b/data/templates/default/sidebar.block.recent.php
diff --git a/data/templates/sidebar.block.related.php b/data/templates/default/sidebar.block.related.php
index 60ee486..60ee486 100644
--- a/data/templates/sidebar.block.related.php
+++ b/data/templates/default/sidebar.block.related.php
diff --git a/data/templates/sidebar.block.search.php b/data/templates/default/sidebar.block.search.php
index d3cd8a5..d3cd8a5 100644
--- a/data/templates/sidebar.block.search.php
+++ b/data/templates/default/sidebar.block.search.php
diff --git a/data/templates/sidebar.block.tagactions.php b/data/templates/default/sidebar.block.tagactions.php
index 3351866..3351866 100644
--- a/data/templates/sidebar.block.tagactions.php
+++ b/data/templates/default/sidebar.block.tagactions.php
diff --git a/data/templates/sidebar.block.users.php b/data/templates/default/sidebar.block.users.php
index 58fdfb7..58fdfb7 100644
--- a/data/templates/sidebar.block.users.php
+++ b/data/templates/default/sidebar.block.users.php
diff --git a/data/templates/sidebar.block.watchlist.php b/data/templates/default/sidebar.block.watchlist.php
index 3af9c5a..3af9c5a 100644
--- a/data/templates/sidebar.block.watchlist.php
+++ b/data/templates/default/sidebar.block.watchlist.php
diff --git a/data/templates/sidebar.block.watchstatus.php b/data/templates/default/sidebar.block.watchstatus.php
index 99574aa..99574aa 100644
--- a/data/templates/sidebar.block.watchstatus.php
+++ b/data/templates/default/sidebar.block.watchstatus.php
diff --git a/data/templates/sidebar.linkedtags.inc.php b/data/templates/default/sidebar.linkedtags.inc.php
index 020d0f0..020d0f0 100644
--- a/data/templates/sidebar.linkedtags.inc.php
+++ b/data/templates/default/sidebar.linkedtags.inc.php
diff --git a/data/templates/sidebar.tpl.php b/data/templates/default/sidebar.tpl.php
index e823af5..e823af5 100644
--- a/data/templates/sidebar.tpl.php
+++ b/data/templates/default/sidebar.tpl.php
diff --git a/data/templates/tag2tagadd.tpl.php b/data/templates/default/tag2tagadd.tpl.php
index 9482007..9482007 100644
--- a/data/templates/tag2tagadd.tpl.php
+++ b/data/templates/default/tag2tagadd.tpl.php
diff --git a/data/templates/tag2tagdelete.tpl.php b/data/templates/default/tag2tagdelete.tpl.php
index 8018374..8018374 100644
--- a/data/templates/tag2tagdelete.tpl.php
+++ b/data/templates/default/tag2tagdelete.tpl.php
diff --git a/data/templates/tag2tagedit.tpl.php b/data/templates/default/tag2tagedit.tpl.php
index 4745ad2..4745ad2 100644
--- a/data/templates/tag2tagedit.tpl.php
+++ b/data/templates/default/tag2tagedit.tpl.php
diff --git a/data/templates/tagcommondescriptionedit.tpl.php b/data/templates/default/tagcommondescriptionedit.tpl.php
index f938f93..207cfd2 100644
--- a/data/templates/tagcommondescriptionedit.tpl.php
+++ b/data/templates/default/tagcommondescriptionedit.tpl.php
@@ -36,7 +36,6 @@ window.onload = function() {
<td></td>
</tr>
</table>
-</p>
<?php if (isset($referrer)): ?>
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
diff --git a/data/templates/tagdelete.tpl.php b/data/templates/default/tagdelete.tpl.php
index e787ff5..e787ff5 100644
--- a/data/templates/tagdelete.tpl.php
+++ b/data/templates/default/tagdelete.tpl.php
diff --git a/data/templates/tagedit.tpl.php b/data/templates/default/tagedit.tpl.php
index 5edfbc7..860c933 100644
--- a/data/templates/tagedit.tpl.php
+++ b/data/templates/default/tagedit.tpl.php
@@ -21,7 +21,6 @@ window.onload = function() {
<td></td>
</tr>
</table>
-</p>
<?php if (isset($referrer)): ?>
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
diff --git a/data/templates/tagrename.tpl.php b/data/templates/default/tagrename.tpl.php
index 894b964..894b964 100644
--- a/data/templates/tagrename.tpl.php
+++ b/data/templates/default/tagrename.tpl.php
diff --git a/data/templates/tags.tpl.php b/data/templates/default/tags.tpl.php
index d6259cc..d6259cc 100644
--- a/data/templates/tags.tpl.php
+++ b/data/templates/default/tags.tpl.php
diff --git a/data/templates/toolbar.inc.php b/data/templates/default/toolbar.inc.php
index fb6638d..fb6638d 100644
--- a/data/templates/toolbar.inc.php
+++ b/data/templates/default/toolbar.inc.php
diff --git a/data/templates/default/top.inc.php b/data/templates/default/top.inc.php
new file mode 100644
index 0000000..9eed6ff
--- /dev/null
+++ b/data/templates/default/top.inc.php
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+ <title><?php echo filter($GLOBALS['sitename'] .(isset($pagetitle) ? ' » ' . $pagetitle : '')); ?></title>
+ <link rel="icon" type="image/png" href="<?php echo $theme->resource('icon.png');?>" />
+ <link rel="stylesheet" type="text/css" href="<?php echo $theme->resource('scuttle.css');?>" />
+ <link rel="search" type="application/opensearchdescription+xml" href="<?php echo ROOT ?>api/opensearch.php" title="<?php echo htmlspecialchars($GLOBALS['sitename']) ?>"/>
+<?php
+if (isset($rsschannels)) {
+ $size = count($rsschannels);
+ for ($i = 0; $i < $size; $i++) {
+ echo ' <link rel="alternate" type="application/rss+xml" title="'
+ . htmlspecialchars($rsschannels[$i][0]) . '"'
+ . ' href="'. $rsschannels[$i][1] .'" />';
+ }
+}
+?>
+
+<?php if (isset($loadjs)) :?>
+<?php if (DEBUG_MODE) : ?>
+ <script type="text/javascript" src="<?php echo ROOT_JS ?>jquery-1.4.2.js"></script>
+ <script type="text/javascript" src="<?php echo ROOT_JS ?>jquery.jstree.js"></script>
+<?php else: ?>
+ <script type="text/javascript" src="<?php echo ROOT_JS ?>jquery-1.4.2.min.js"></script>
+ <script type="text/javascript" src="<?php echo ROOT_JS ?>jquery.jstree.min.js"></script>
+<?php endif ?>
+ <script type="text/javascript" src="<?php echo ROOT ?>jsScuttle.php"></script>
+<?php endif ?>
+
+ </head>
+ <body>
+
+<?php
+$headerstyle = '';
+if(isset($_GET['popup'])) {
+ $headerstyle = ' class="popup"';
+}
+?>
+
+<div id="header" <?php echo $headerstyle; ?>>
+<h1><a href="<?php echo ROOT ?>"><?php echo $GLOBALS['sitename']; ?></a></h1>
+<?php
+if(!isset($_GET['popup'])) {
+ $this->includeTemplate('toolbar.inc');
+}
+?></div>
+
+<?php
+if (isset($subtitle)) {
+ echo '<h2>'. $subtitle ."</h2>\n";
+}
+if(DEBUG_MODE) {
+ echo '<p class="error">'. T_('Admins, your installation is in "Debug Mode" ($debugMode = true). To go in "Normal Mode" and hide debugging messages, change $debugMode to false into config.php.') ."</p>\n";
+}
+if (isset($error) && $error!='') {
+ echo '<p class="error">'. $error ."</p>\n";
+}
+if (isset($msg) && $msg!='') {
+ echo '<p class="success">'. $msg ."</p>\n";
+}
+if (isset($tipMsg) && $tipMsg!='') {
+ echo '<p class="tipMsg">'. $tipMsg ."</p>\n";
+}
+?>
diff --git a/data/templates/users.tpl.php b/data/templates/default/users.tpl.php
index fa92bef..fa92bef 100644
--- a/data/templates/users.tpl.php
+++ b/data/templates/default/users.tpl.php
diff --git a/data/templates/top.inc.php b/data/templates/testdummy/top.inc.php
index 738b71e..b85a1ae 100644
--- a/data/templates/top.inc.php
+++ b/data/templates/testdummy/top.inc.php
@@ -4,8 +4,8 @@
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<title><?php echo filter($GLOBALS['sitename'] .(isset($pagetitle) ? ' » ' . $pagetitle : '')); ?></title>
- <link rel="icon" type="image/png" href="<?php echo ROOT ?>icon.png" />
- <link rel="stylesheet" type="text/css" href="<?php echo ROOT ?>scuttle.css" />
+ <link rel="icon" type="image/png" href="<?php echo $theme->resource('icon.png');?>" />
+ <link rel="stylesheet" type="text/css" href="<?php echo $theme->resource('scuttle.css');?>" />
<link rel="search" type="application/opensearchdescription+xml" href="<?php echo ROOT ?>api/opensearch.php" title="<?php echo htmlspecialchars($GLOBALS['sitename']) ?>"/>
<?php
if (isset($rsschannels)) {
@@ -40,7 +40,7 @@ if(isset($_GET['popup'])) {
?>
<div id="header" <?php echo $headerstyle; ?>>
-<h1><a href="<?php echo ROOT ?>"><?php echo $GLOBALS['sitename']; ?></a></h1>
+<h1><a href="<?php echo ROOT ?>">.</a></h1>
<?php
if(!isset($_GET['popup'])) {
$this->includeTemplate('toolbar.inc');
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 3c4e939..cde9e61 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,23 +1,28 @@
ChangeLog for SemantiScuttle
============================
+
0.98.0 - 2011-XX-XX
-------------------
- Switch to jQuery and drop dojo
- Fix bug #3187177: Wrong URL / Export XML Bookmarks
-- Fix bug in getTagsForBookmarks() that fetched all tags
+- Fix bug in ``getTagsForBookmarks()`` that fetched all tags
- Fix bug #3097187: Using opensearch with two tags does not work in Firefox
- Fix bug #3251877: French translation JavaScript Bug when editing bookmarks
+- Fix bug #3168521: Title of tag-filtered RSS Feed is broken
+- Fix bug #2853627: Javascript warning
+- Implement request #1989987: Theming support
- Implement request #3054906: Show user's full name instead of nickname
-- Implement patch #3059829: update FR_CA translation
+- Implement patch #3059829: update ``FR_CA`` translation
- Show error message on mysqli connection errors
- Update php-gettext library to 1.0.10
-- api/posts/add respects the "replace" parameter now
+- ``api/posts/add`` respects the "replace" parameter now
- Fix privacy issue when fetching tags of several users
- Fix Google custom search XML
- Only URLs with an allowed protocol may be added to the database
-- Support HTTPS connections when $root is not configured
+- Support HTTPS connections when ``$root`` is not configured
- SQL schema version table to ease future database upgrades
+- Documentation is written with rST (reStructuredText) now
0.97.2 - 2011-02-17
@@ -68,11 +73,13 @@ your SemanticScuttle installations!
- Fix several SQL injection possibilities
- Fix E_NOTICE when calling alltags.php without any parameter
- Implement part of request #2928950:
+
- User adjustable entry count: rss.php?count=20
- Fix HTTP content type header for RSS
- Add config option to allow sorting by bookmark creation date
instead of modification date
-- Implement request #2833793: Export to avahi config files
+
+ - Implement request #2833793: Export to avahi config files
- we support zeroconf networking!
- Implement request #2934868: Do not display full redirection URL
Patch by fnorder@users.sourceforge.net
@@ -181,7 +188,7 @@ your SemanticScuttle installations!
- Major Refactoring: add a tag cache improving query processing
(knowledge inference on tag relations) [DB modified]
- Interface fix: allows to remove a tag from the selection into
- subtitle bar thanks to a *.
+ subtitle bar thanks to a \*.
- New Feature: authorizes anchors with brackets into descriptions
of bookmark. For example: "[city]Paris[/city]".
This text between anchors will be highlighted when the
@@ -219,6 +226,7 @@ your SemanticScuttle installations!
0.90 - 2008-06-05
-----------------
The main improvements of this new version are:
+
- menu tags (tags which are included into the "menu" tag and
thus which appear on the main page)
- connexion with Google Custom Search Engine which allows to
@@ -227,6 +235,7 @@ The main improvements of this new version are:
All the changes:
+
- New feature: add Google Custom Search Engine into
gsearch/ folder and looking into all bookmarks [Config modified]
- Interface design: antispam question is hidden when
@@ -279,6 +288,7 @@ The main change of this release is the possibility to preview websites
through thumbnails (thanks to artviper.net).
All the changes:
+
- Interface design: display SemanticScuttle version number
on "about" page
- Bug fix: allow clean urls thanks to .htaccess
@@ -298,6 +308,7 @@ All the changes:
0.87 - 2008-02-14
-----------------
This new version brings two major features to SemanticScuttle:
+
1) You can now create a synonym link between tags.
For example, by linking the tags "monument" and "monuments",
you can find resources tagged with the first one when you navigate
@@ -310,6 +321,7 @@ This new version brings two major features to SemanticScuttle:
ones (more difficult but more powerful).
All the changes:
+
- Interface design: allow to access to users' bookmarks from last
user sidebox. (Currently, we can just access to their profiles).
- Interface design: hide multiple URLs repeated into history page
@@ -335,9 +347,11 @@ All the changes:
-----------------
- New feature: Add stats (nb children, nb descendants, depth,
nb update) to structured tags
+
- Allow to visualize structured tags according to stats
- Add admin page to update stats from the existing structured
tags in the database
+
- Translation: improve French translation (add missing translations,
transform "labels" into "tags")
- New feature: List all users in a users page and users block on
diff --git a/doc/INSTALL.txt b/doc/INSTALL.txt
index b2dd3b2..5afc732 100644
--- a/doc/INSTALL.txt
+++ b/doc/INSTALL.txt
@@ -1,51 +1,60 @@
+============================
SemanticScuttle installation
============================
Prerequisites
--------------
+=============
To run SemanticScuttle, you need:
+
- PHP5 with filter functions enabled
- A web server, for example Apache
Installation instructions
--------------------------
+=========================
1. Create a new MySQL database
-2. Import tables.sql into that database, i.e.
- run
- > mysql -umyusername semanticscuttle < data/tables.sql
+2. Import ``data/tables.sql`` into that database, i.e.
+ run ::
+
+ $ mysql -umyusername semanticscuttle < data/tables.sql
+
on the shell ("semanticscuttle" being the database name)
-3. Copy data/config.php.dist to data/config.php and modify it as
+
+3. Copy ``data/config.php.dist`` to ``data/config.php`` and modify it as
necessary.
4. Make the cache directory writable by your web server.
- For example, run
- > chmod 0777 cache
+ For example, run ::
+
+ $ chmod 0777 cache
+
on the shell.
-5. Set the www/ directory as document root in your web server,
+5. Set the ``www/`` directory as document root in your web server,
restart the web server.
Ugly www directory in URLs
---------------------------
+==========================
In case point 5 of the installation instructions cannot be put into
practice by you because you are not able to change the web server
configuration, you are not lost! There is a way to get rid of
-www/ in your URL!
+``www/`` in your URL!
+
+Imagine following directory layout: ::
-Imagine following directory layout:
/home/customer123/
www/
subdomain1/
subdomain2/
subdomain3/
-Create a SemanticScuttle directory somewhere outside www if possible
-and put all directories except www/ in there. Move all files and
-directories from www/ into your subdomain directory. Then modify
-subdomain/www-header.php to include the correct file path.
+Create a SemanticScuttle directory somewhere outside ``www`` if possible
+and put all directories except ``www/`` in there. Move all files and
+directories from ``www/`` into your subdomain directory. Then modify
+``subdomain/www-header.php`` to include the correct file path.
+
+The new directory layout should look that way: ::
-The new directory layout should look that way:
/home/customer123/
semanticscuttle/
doc/
@@ -60,8 +69,11 @@ The new directory layout should look that way:
www-header.php
subdomain3/
-Now open www-header.php and replace
+Now open www-header.php and replace ::
+
require_once '../src/SemanticScuttle/header.php';
-with
+
+with ::
+
require_once '../../semanticscuttle/src/SemanticScuttle/header.php';
diff --git a/doc/README.rst b/doc/README.rst
new file mode 100644
index 0000000..0c7befe
--- /dev/null
+++ b/doc/README.rst
@@ -0,0 +1,67 @@
+====================
+SemanticScuttle 0.98
+====================
+A social bookmarking tool experimenting with new features
+like structured tags or collaborative descriptions of tags.
+
+https://sourceforge.net/projects/semanticscuttle/
+
+Available under the GNU General Public License
+
+
+Installation
+============
+See `INSTALL.rst`__
+
+
+__ INSTALL.html
+
+
+Upgrading from a previous version
+=================================
+See `UPGRADE.txt`__
+
+__ UPGRADE.html
+
+
+Public API
+==========
+SemanticScuttle supports most of the `del.icio.us API`__.
+Almost all of the neat tools made for that system can be modified
+to work with your SemanticScuttle installation. If you find a tool
+that won't let you change the API address, ask the creator to add
+this setting. You never know, they might just do it.
+
+__ http://del.icio.us/doc/api
+
+
+
+Links
+-----
+- `further documentation`__
+- `support and help questions`__
+- `development mailing list instructions`__
+- `suggestions`_ for SemanticScuttle
+- `bug reports`_
+- `feature requests`_
+- `patches`_
+
+__ http://semanticscuttle.wiki.sourceforge.net/
+__ http://sourceforge.net/forum/forum.php?forum_id=759510
+__ https://sourceforge.net/mailarchive/forum.php?forum_name=semanticscuttle-devel
+.. _suggestions: http://sourceforge.net/forum/forum.php?forum_id=759511
+.. _bug reports: http://sourceforge.net/tracker/?group_id=211356&atid=1017430
+.. _feature requests: https://sourceforge.net/tracker/?group_id=211356&atid=1017433
+.. _patches: https://sourceforge.net/tracker/?group_id=211356&atid=1017432
+
+
+
+
+Known issues
+============
+
+Number of bookmarks always 0: "0 bookmark(s)"
+---------------------------------------------
+This issue occurs when debug mode is enabled.
+Technically, this is because the database layers ``DEBUG_EXTRA`` gets
+enabled through debug mode.
diff --git a/doc/README.txt b/doc/README.txt
deleted file mode 100644
index 97387d2..0000000
--- a/doc/README.txt
+++ /dev/null
@@ -1,91 +0,0 @@
-SemanticScuttle 0.94
-====================
-A social bookmarking tool experimenting with new features
-like structured tags or collaborative descriptions of tags.
-
-https://sourceforge.net/projects/semanticscuttle/
-
-Available under the GNU General Public License
-
-
-Installation
-------------
-See INSTALL.txt
-
-
-Upgrading from a previous version
----------------------------------
-See UPGRADE.txt
-
-
-Public API
-----------
-Scuttle supports most of the del.icio.us API [1].
-Almost all of the neat tools made for that system can be modified
-to work with your SemanticScuttle installation. If you find a tool
-that won't let you change the API address, ask the creator to add
-this setting. You never know, they might just do it.
-
-[1] http://del.icio.us/doc/api
-
-
-Translations
-------------
-Scuttle is available in the following languages :
-
-English en-GB 100% (Default)
-Chinese zh-CN 86%
-Danish dk-DK 100%
-Dutch nl-NL 68%
-French fr-FR 100%
-German de-DE 100%
-Hindi hi-IN 100%
-Italian it-IT 89%
-Japanese ja-JP 100%
-Lithuanian lt-LT 100%
-Portuguese pt-BR 100%
-Spanish es-ES 94%
-
-Translations are managed with gettext <includes/php-gettext>.
-
-To provide additional translations:
-- execute of of the scripts in <includes/php-gettext/bin/>
- for example to complete french (France) translation on a
- GNU/Linux system, type
- ./gettexts.sh fr_FR
-- then edit the file <locales/fr_FR/LC_MESSAGES/messages.po>
- with poedit
- (that will update <locales/fr_FR/LC_MESSAGES/messages.mo>)
-
-
-Links
------
-http://semanticscuttle.wiki.sourceforge.net/
- - further documentation
-
-http://sourceforge.net/forum/forum.php?forum_id=759510
- - support and help questions
-
-https://sourceforge.net/mailarchive/forum.php?forum_name=semanticscuttle-devel
- - development mailing list instructions
-
-http://sourceforge.net/forum/forum.php?forum_id=759511
- - suggestions for SemanticScuttle
-
-http://sourceforge.net/tracker/?group_id=211356&atid=1017430
- - bug reports
-
-https://sourceforge.net/tracker/?group_id=211356&atid=1017433
- - feature requests
-
-https://sourceforge.net/tracker/?group_id=211356&atid=1017432
- - patches
-
-
-Known issues
-------------
-
-Number of bookmarks always 0: "0 bookmark(s)"
- This issue occurs when debug mode is enabled.
- Technically, this is because the database layers DEBUG_EXTRA gets
- enabled through debug mode.
diff --git a/doc/UPGRADE.txt b/doc/UPGRADE.txt
index 53ccbf4..1a0b964 100644
--- a/doc/UPGRADE.txt
+++ b/doc/UPGRADE.txt
@@ -1,266 +1,165 @@
+=================================================
Upgrading SemanticScuttle from a previous version
=================================================
From version 0.97 to 0.98
--------------------------
-Database updates: Apply data/schema/6.sql or do the following:
-
- CREATE TABLE `sc_version` (
- `schema_version` int(11) NOT NULL
- ) DEFAULT CHARSET=utf8;
-
- INSERT INTO `sc_version` (`schema_version`) VALUES ('6');
+=========================
+Database updates
+----------------
+Apply ``data/schema/6.sql``
ALTER TABLE `sc_users` ADD `privateKey` VARCHAR(33) NULL;
CREATE UNIQUE INDEX `privateKey` ON `sc_users` (`privateKey`);
From version 0.96 to 0.97
--------------------------
+=========================
No database changes necessary.
From version 0.95 to 0.96
--------------------------
-Update your database:
-- ALTER TABLE `sc_bookmarks` ADD `bShort` VARCHAR(16) NULL DEFAULT NULL;
+=========================
+Database updates
+----------------
+Apply ``data/schema/5.sql``
-API:
-The method signatures of addBookmark() and updateBookmark()
-changed due to the addition of the $short parameter.
+API
+---
+The method signatures of ``addBookmark()`` and ``updateBookmark()``
+changed due to the addition of the ``$short`` parameter.
We got complaints about the changed file structure, and people told
-us that they just cannot set the document root to www/, because they
-are not admins on their http server. This is a valid point, and
-with 0.96.0 you can easily change it. See INSTALL.txt for more information
-about moving www/.
+us that they just cannot set the document root to ``www/``, because they
+are not admins on their HTTP server. This is a valid point, and
+with 0.96.0 you can easily change it. See `INSTALL.txt`_ for more information
+about moving ``www/``.
+
+.. _INSTALL.txt: INSTALL.html
From version 0.94 to 0.95
---------------------------
+=========================
The file structure completely changed in 0.95.0 compared
to previous versions. We recommend that you start with a
-fresh installation, just copying over your config.php file.
-Set your web server document root directory to www/.
+fresh installation, just copying over your ``config.php`` file.
+Set your web server document root directory to ``www/``.
Yes, we kind of lost the ability to run SemanticScuttle
in a subdirectory of a hostname. This functionality will
be back in one of the next releases, but for now, you have
to live with it.
-Update your database:
-- ALTER TABLE `sc_bookmarks` ADD `bVoting` INT NOT NULL;
-- ALTER TABLE `sc_bookmarks` ADD `bVotes` INT NOT NULL;
-- Add the new votes database table. See data/tables.sql.
+Update your database
+--------------------
+Apply ``data/schema/4.sql``.
Currently, only MySQL can be used as database backend.
All other DBMS (database management systems) have not been
tested except for PostgreSQL, and SemanticScuttle fails there.
-The de_AT translation has been re-added. This is because
-de_AT provides a rather ugly "official German" style,
-while the normal de_DE is friendlier. Choose what you like.
+Translation
+-----------
+The ``de_AT`` translation has been re-added. This is because
+``de_AT`` provides a rather ugly "official German" style,
+while the normal ``de_DE`` is friendlier. Choose what you like.
From version 0.93 to 0.94
--------------------------
+=========================
- Nothing changed except for the default configuration file.
It is recommended to start with a fresh config file,
but not neccesary. Old config files still work.
-- If you used translation de_AT, please switch to de_DE.
- de_AT was moved to de_DE and de_AT has been removed.
+- If you used translation ``de_AT``, please switch to ``de_DE``.
+ ``de_AT`` was moved to ``de_DE`` and ``de_AT`` has been removed.
From version 0.92 to 0.93
--------------------------
+=========================
- Backup your database
- Make a copy from your SemanticScuttle Web directory
-- Upgrade your database by following instructions ONE after ONE (order is important) :
-#NOTHING TO CHANGE IN DB
-- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
-$footerMessage = ''; #HTML message appearing at the bottom of the page (just above SemanticScuttle credits)
-$sidebarTopMessage = ''; #HTML message appearing at the top of the sidebar
-$sidebarBottomMessage = ''; #HTML message appearing at the bottom of the sidebar
-$adminsCanModifyBookmarksFromOtherUsers = true; # 'true' if admin users can edit or delete bookmarks belonging to other users. Else 'false'.
-$adminsAreAdvisedTagsFromOtherAdmins = false; # 'true' if tags from other admins are proposed to each admin (in add/edit a bookmark page). Else 'false'.
-$defaultPerPageForAdmins = 20; # default number of bookmarks per page for admins (-1 means no limit)
+- Upgrade your current configuration file (``config.inc.php``) with respect to ``config.inc.php.example`` ::
+
+ $footerMessage = ''; #HTML message appearing at the bottom of the page (just above SemanticScuttle credits)
+ $sidebarTopMessage = ''; #HTML message appearing at the top of the sidebar
+ $sidebarBottomMessage = ''; #HTML message appearing at the bottom of the sidebar
+ $adminsCanModifyBookmarksFromOtherUsers = true; # 'true' if admin users can edit or delete bookmarks belonging to other users. Else 'false'.
+ $adminsAreAdvisedTagsFromOtherAdmins = false; # 'true' if tags from other admins are proposed to each admin (in add/edit a bookmark page). Else 'false'.
+ $defaultPerPageForAdmins = 20; # default number of bookmarks per page for admins (-1 means no limit)
From version 0.91 to 0.92
--------------------------
+=========================
Message: this version modifies the database to UTF-8 charset. The idea is to convert the content (through BLOB type) and then to change the tables' charsets.
- Backup your database
- Make a copy from your SemanticScuttle Web directory
-- Upgrade your database by following instructions ONE after ONE (order is important) :
-
-/* modify and add fields */
-ALTER TABLE `sc_bookmarks` MODIFY `bAddress` varchar(1500) NOT NULL;
-ALTER TABLE `sc_bookmarks` MODIFY `bDescription` TEXT default NULL;
-ALTER TABLE `sc_bookmarks` ADD `bPrivateNote` TEXT NULL AFTER `bDescription` ;
-ALTER TABLE `sc_tags` MODIFY `tDescription` TEXT default NULL;
-ALTER TABLE `sc_commondescription` MODIFY `cdDescription` TEXT default NULL;
-
-/* convert to UTF-8 if your table is ISO-something (through BLOB: tips provided by MYSQL documentation)*/
-/* first need to remove index keys because of BLOB constraints*/
-ALTER TABLE `sc_tags` DROP INDEX `sc_tags_tag_uId`;
-ALTER TABLE `sc_bookmarks2tags` DROP INDEX `sc_bookmarks2tags_tag_bId`;
-ALTER TABLE `sc_bookmarks2tags` DROP INDEX `sc_bookmarks2tags_bId`;
-ALTER TABLE `sc_tags2tags` DROP INDEX `sc_tags2tags_tag1_tag2_uId`;
-ALTER TABLE `sc_commondescription` DROP INDEX `sc_commondescription_tag_datetime`;
-ALTER TABLE `sc_tagscache` DROP INDEX `sc_tagscache_tag1_tag2_type_uId`;
-ALTER TABLE `sc_tagsstats` DROP INDEX `sc_tagsstats_tag1_type_uId`;
-
-/* secondly convert through BLOB type */
-ALTER TABLE `sc_bookmarks` CHANGE `bTitle` `bTitle` BLOB;
-ALTER TABLE `sc_bookmarks` CHANGE `bTitle` `bTitle` varchar(255) CHARACTER SET utf8;
-ALTER TABLE `sc_bookmarks` CHANGE `bAddress` `bAddress` BLOB;
-ALTER TABLE `sc_bookmarks` CHANGE `bAddress` `bAddress` varchar(1500) CHARACTER SET utf8;
-ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` BLOB;
-ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` text CHARACTER SET utf8;
-ALTER TABLE `sc_bookmarks` CHANGE `bPrivateNote` `bPrivateNote` BLOB;
-ALTER TABLE `sc_bookmarks` CHANGE `bPrivateNote` `bPrivateNote` text CHARACTER SET utf8;
-
-ALTER TABLE `sc_tags` CHANGE `tag` `tag` BLOB;
-ALTER TABLE `sc_tags` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
-ALTER TABLE `sc_tags` CHANGE `tDescription` `tDescription` BLOB;
-ALTER TABLE `sc_tags` CHANGE `tDescription` `tDescription` text CHARACTER SET utf8;
-
-ALTER TABLE `sc_bookmarks2tags` CHANGE `tag` `tag` BLOB;
-ALTER TABLE `sc_bookmarks2tags` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
-
-ALTER TABLE `sc_users` CHANGE `name` `name` BLOB;
-ALTER TABLE `sc_users` CHANGE `name` `name` varchar(50) CHARACTER SET utf8;
-ALTER TABLE `sc_users` CHANGE `uContent` `uContent` BLOB;
-ALTER TABLE `sc_users` CHANGE `uContent` `uContent` text CHARACTER SET utf8;
-
-ALTER TABLE `sc_tags2tags` CHANGE `tag1` `tag1` BLOB;
-ALTER TABLE `sc_tags2tags` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
-ALTER TABLE `sc_tags2tags` CHANGE `tag2` `tag2` BLOB;
-ALTER TABLE `sc_tags2tags` CHANGE `tag2` `tag2` varchar(100) CHARACTER SET utf8;
-
-ALTER TABLE `sc_tagsstats` CHANGE `tag1` `tag1` BLOB;
-ALTER TABLE `sc_tagsstats` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
-
-ALTER TABLE `sc_tagscache` CHANGE `tag1` `tag1` BLOB;
-ALTER TABLE `sc_tagscache` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
-ALTER TABLE `sc_tagscache` CHANGE `tag2` `tag2` BLOB;
-ALTER TABLE `sc_tagscache` CHANGE `tag2` `tag2` varchar(100) CHARACTER SET utf8;
-
-ALTER TABLE `sc_commondescription` CHANGE `tag` `tag` BLOB;
-ALTER TABLE `sc_commondescription` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
-ALTER TABLE `sc_commondescription` CHANGE `cdTitle` `cdTitle` BLOB;
-ALTER TABLE `sc_commondescription` CHANGE `cdTitle` `cdTitle` varchar(255) CHARACTER SET utf8;
-ALTER TABLE `sc_commondescription` CHANGE `cdDescription` `cdDescription` BLOB;
-ALTER TABLE `sc_commondescription` CHANGE `cdDescription` `cdDescription` text CHARACTER SET utf8;
-
-ALTER TABLE `sc_searchhistory` CHANGE `shTerms` `shTerms` BLOB;
-ALTER TABLE `sc_searchhistory` CHANGE `shTerms` `shTerms` varchar(255) CHARACTER SET utf8;
-ALTER TABLE `sc_searchhistory` CHANGE `shRange` `shRange` BLOB;
-ALTER TABLE `sc_searchhistory` CHANGE `shRange` `shRange` varchar(32) CHARACTER SET utf8;
-
-/* Thirdly re-add index keys */
-ALTER TABLE `sc_tags` ADD UNIQUE KEY `sc_tags_tag_uId` (`tag`, `uId`);
-ALTER TABLE `sc_bookmarks2tags` ADD UNIQUE KEY `sc_bookmarks2tags_tag_bId` (`tag`,`bId`);
-ALTER TABLE `sc_bookmarks2tags` ADD KEY `sc_bookmarks2tags_bId` (`bId`);
-ALTER TABLE `sc_tags2tags` ADD UNIQUE KEY `sc_tags2tags_tag1_tag2_uId` (`tag1`,`tag2`,`relationType`,`uId`);
-ALTER TABLE `sc_commondescription` ADD UNIQUE KEY `sc_commondescription_tag_datetime` (`tag`,`cdDatetime`);
-ALTER TABLE `sc_tagscache` ADD UNIQUE KEY `sc_tagscache_tag1_tag2_type_uId` (`tag1`,`tag2`,`relationType`,`uId`);
-ALTER TABLE `sc_tagsstats` ADD UNIQUE KEY `sc_tagsstats_tag1_type_uId` (`tag1`,`relationType`,`uId`);
-
-/* Change tables to utf-8 charset */
-ALTER TABLE `sc_bookmarks` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_bookmarks2tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_users` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_watched` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_tags2tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_tagsstats` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_tagscache` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_commondescription` CHARACTER SET utf8 COLLATE utf8_general_ci;
-ALTER TABLE `sc_searchhistory` CHARACTER SET utf8 COLLATE utf8_general_ci;
+- Upgrade your database by applying ``data/schema/3.sql``
+- Upgrade your current configuration file (``config.inc.php``) with respect to ``config.inc.php.example``
-- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
-* Add variable : $descriptionAnchors = array("author", "isbn", "address"=>"[address][street][/street][city][/city][/address]"); #add a possible anchor (structured content) for bookmarks' description field
-* Add variable : $enableCommonTagDescriptionEditedByAll = true; #true mean everybody can edit common description. Else just the admins can do it.
-* Add variable : $googleAnalyticsCode = ''; #Allow GoogleAnalytics tracker https://www.google.com/analytics/
+ - Add variable ::
+
+ $descriptionAnchors = array("author", "isbn", "address"=>"[address][street][/street][city][/city][/address]"); #add a possible anchor (structured content) for bookmarks' description field
+
+ - Add variable ::
+
+ $enableCommonTagDescriptionEditedByAll = true; #true mean everybody can edit common description. Else just the admins can do it.
+ - Add variable ::
+
+ $googleAnalyticsCode = ''; #Allow GoogleAnalytics tracker https://www.google.com/analytics/
From version 0.90 to 0.91
--------------------------
+=========================
- Backup you database
- Make a copy from your SemanticScuttle Web directory
-- Upgrade your database by following instructions ONE after ONE (order is important) :
- * ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` VARCHAR( 1500 )
- * CREATE TABLE `sc_tagscache` (
- `tcId` int(11) NOT NULL auto_increment,
- `tag1` varchar(100) NOT NULL default '',
- `tag2` varchar(100) NOT NULL default '',
- `relationType` varchar(32) NOT NULL default '',
- `uId` int(11) NOT NULL default '0',
- PRIMARY KEY (`tcId`),
- UNIQUE KEY `sc_tagscache_tag1_tag2_type_uId` (`tag1`,`tag2`,`relationType`,`uId`)
-);
-- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
- * Delete last line : include_once('debug.inc.php');
- * Add variable: $menu2Tags = array('example', 'of', 'menu', 'tags');
- * Add variable: $debugMode = true; # if true, show debug messages
+- Upgrade your database by applying ``data/schema/2.sql``
+- Upgrade your current configuration file (``config.inc.php``) with respect to ``config.inc.php.example``
+ - Delete last line ::
-From version 0.89 to 0.90
--------------------------
+ include_once('debug.inc.php');
-- Backup you database
-- Make a copy from your SemanticScuttle Web directory
+ - Add variable::
-- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
-# add these lines under $enableWebsiteThumbnails = false; # enableWebsiteThumbnails {true|false}:
-$thumbnailsUserId = '';
-$thumbnailsKey = '';
+ $menu2Tags = array('example', 'of', 'menu', 'tags');
+ - Add variable::
+ $debugMode = true; # if true, show debug messages
-From version 0.88 to 0.89
--------------------------
+
+From version 0.89 to 0.90
+=========================
- Backup you database
- Make a copy from your SemanticScuttle Web directory
-- Upgrade your database by following instructions ONE after ONE (order is important) :
+- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
-* change the table called 'sc_tags' into 'sc_bookmarks2tags' by executing the following SQL commands (after changing 'yourdatabasename' and adapting its name prefix 'sc_' to your convenience):
+ add these lines under ``$enableWebsiteThumbnails = false; # enableWebsiteThumbnails {true|false}``::
- RENAME TABLE `yourdatabasename`.`sc_tags` TO `yourdatabasename`.`sc_bookmarks2tags` ;
+ $thumbnailsUserId = '';
+ $thumbnailsKey = '';
-* add the following table (adapt its name prefix to your convenience) executing the following SQL commands:
+From version 0.88 to 0.89
+=========================
- CREATE TABLE `sc_searchhistory` (
- `shId` int(11) NOT NULL auto_increment,
- `shTerms` varchar(255) NOT NULL default '',
- `shRange` varchar(32) NOT NULL default '',
- `shDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
- `shNbResults` int(6) NOT NULL default '0',
- `uId` int(11) NOT NULL default '0',
- PRIMARY KEY (`shId`)
- );
+- Backup you database
+- Make a copy from your SemanticScuttle Web directory
+- Upgrade your database by applying ``data/schema/1.sql``
+- Upgrade your current configuration file (``config.inc.php``) with respect to ``config.inc.php.example``
- CREATE TABLE `sc_tags` (
- `tId` int(11) NOT NULL auto_increment,
- `tag` varchar(32) NOT NULL default '',
- `uId` int(11) NOT NULL default '0',
- `tDescription` varchar(255) default NULL,
- PRIMARY KEY (`tId`),
- UNIQUE KEY `sc_tags_tag_uId` (`tag`, `uId`)
- );
+ - add line::
-- Upgrade your current configuration file (config.inc.php) with respect to config.inc.php.example
- # add line:
$sizeSearchHistory = 10;
- # add sidebar block index line:
+
+ - add sidebar block index line::
+
$index_sidebar_blocks = array('search','menu','users','popular');
- # add line:
+
+ - add line::
$enableGoogleCustomSearch = true;
diff --git a/doc/authentication.rst b/doc/authentication.rst
new file mode 100644
index 0000000..c3ccb47
--- /dev/null
+++ b/doc/authentication.rst
@@ -0,0 +1,213 @@
+============================================
+External authentication with SemanticScuttle
+============================================
+
+Most times, one piece of software is only a part in the big puzzle
+that makes the software landscape of a company or organization.
+SemanticScuttle is not different and should integrate as nicely as
+possible with all other systems.
+
+One of the basic tasks of integration is user authentication against
+a central database - be it a central user database, an LDAP or a
+active directory server.
+
+Since version 0.96, SemanticScuttle supports user authentication against
+external systems. To provide a wide range of supported systems, we chose
+to utilize PEAR's `Authentication package`__.
+It does this by providing different "`authentication containers`__",
+for example Database, IMAP, LDAP, POP3, RADIUS, SAP and SOAP.
+
+Please be aware of the fact that, after successful authentication, the user
+and his scrambled password are stored in the SemanticScuttle database.
+This is required for proper functioning of the software. It does not mean
+that you will be able to login if your external authentication provider
+is offline - you won't, execpt you switch it off in the SemanticScuttle
+configuration.
+
+
+__ http://pear.php.net/package/Auth
+__ http://pear.php.net/manual/en/package.authentication.auth.intro-storage.php
+
+
+Basic configuration
+===================
+The default configuration file ``data/config.default.php`` has an own section
+on auth options and an explanation of the single entries.
+
+To utilize the external authentication, you need to install the
+PEAR Auth package: ::
+
+ $ pear install auth
+
+If you do not have a PEAR installation available, you can try to manually
+install the files in the src/ directory. If you choose to do that, the
+src/ directory should look similar to that: ::
+
+ src/
+ Auth.php
+ Auth/
+ Anonymous.php
+ Container.php
+ Container/
+ ..
+ SemanticScuttle/
+ header.php
+ ..
+
+After that, modify your ``data/config.php`` file. The most important change
+is to use ::
+
+ $serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
+
+which tells SemanticScuttle to switch to the special authentication service.
+
+Now that's done, you can configure the single auth options:
+
+``$authType = 'MDB2';``
+ selects the authentication container.
+
+``$authOptions``
+ is an array of options specific to the authentication container. Please
+ consult the PEAR Auth documentation for more information.
+
+``$authDebug = true;``
+ should be used when setup fails, since it may give important hints
+ where it fails.
+
+ Please note that login will seem to fail with
+ debugging activated. Going back to the main page after that will
+ show that you are logged in.
+
+
+
+Authentication examples
+=======================
+
+General database authentification
+---------------------------------
+Here you also need the PEAR `MDB2 package`_.
+The "``new_link``" option is important!
+
+``config.php`` settings: ::
+
+ $serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
+ $authType = 'MDB2';
+ $authOptions = array(
+ 'dsn' => array(
+ 'phptype' => 'mysql',
+ 'hostspec' => 'FIXME',
+ 'username' => 'FIXME',
+ 'password' => 'FIXME',
+ 'database' => 'FIXME',
+ 'new_link' => true,
+ ),
+ 'table' => 'usersFIXME',
+ 'usernamecol' => 'usernameFIXME',
+ 'passwordcol' => 'passwordFIXME',
+ 'cryptType' => 'md5',
+ );
+
+
+Mantis Bugtracker
+-----------------
+Here you also need the PEAR `MDB2 package`_.
+
+``config.php`` settings: ::
+
+ $serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
+ $authType = 'MDB2';
+ $authOptions = array(
+ 'dsn' => array(
+ 'phptype' => 'mysql',
+ 'hostspec' => 'FIXME',
+ 'username' => 'FIXME',
+ 'password' => 'FIXME',
+ 'database' => 'FIXME',
+ 'new_link' => true,
+ ),
+ 'table' => 'mantis_user_table',
+ 'usernamecol' => 'username',
+ 'passwordcol' => 'password',
+ 'cryptType' => 'md5',
+ );
+
+.. _MDB2 package: http://pear.php.net/package/MDB2
+
+
+MediaWiki
+---------
+Unfortunately, the password column does not contain a simple hashed
+password - for good reasons as described on
+http://www.mediawiki.org/wiki/Manual_talk:User_table#user_password_column
+
+If you configure your MediaWiki_ to use passwords without salt, you
+can make it work nevertheless:
+
+MediaWiki ``LocalSettings.php``: ::
+
+ $wgPasswordSalt = false;
+
+\- after that, users need to change/update their passwords to get them
+unsalted in the database. You can verify if the passwords are unhashed
+if you do ::
+
+ SELECT CAST( user_password AS CHAR ) FROM user
+
+on your MediaWiki database. Passwords prefixed with "``:A:``" can be used.
+
+Another problem is that mediawiki user names begin with an uppercase letter.
+You need to modify ``www/login.php`` and remove the "``utf8_strtolower``" function
+call: ::
+
+ $posteduser = trim(utf8_strtolower(POST_USERNAME));
+
+becomes ::
+
+ $posteduser = trim(POST_USERNAME);
+
+
+``config.php`` settings: ::
+
+ $serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
+ $authType = 'MDB2';
+ $authOptions = array(
+ 'dsn' => array(
+ 'phptype' => 'mysql',
+ 'hostspec' => 'FIXME',
+ 'username' => 'FIXME',
+ 'password' => 'FIXME',
+ 'database' => 'FIXME',
+ 'new_link' => true,
+ ),
+ 'table' => 'user',
+ 'usernamecol' => 'user_name',
+ 'passwordcol' => 'user_password',
+ 'cryptType' => 'md5_mediawiki',
+ );
+ function md5_mediawiki($password) {
+ return ':A:' . md5($password);
+ }
+
+
+.. _MediaWiki: http://www.mediawiki.org/wiki/MediaWiki
+
+Active Directory / LDAP
+-----------------------
+Here we authenticate against an active directory server.
+
+``config.php`` settings: ::
+
+ $serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
+ $authType = 'LDAP';
+ $authOptions = array(
+ 'host' => '192.168.1.4',
+ 'version' => 3,
+ 'basedn' => 'DC=EXAMPLE,DC=ORG',
+ 'binddn' => 'readuser',
+ 'bindpw' => 'readuser',
+ 'userattr' => 'sAMAccountName',
+ 'userfilter' => '(objectClass=user)',
+ 'attributes' => array(''),
+ );
+ $authEmailSuffix = '@example.org';
+
diff --git a/doc/authentication.txt b/doc/authentication.txt
deleted file mode 100644
index da49e5a..0000000
--- a/doc/authentication.txt
+++ /dev/null
@@ -1,197 +0,0 @@
-External authentication with SemanticScuttle
-============================================
-
-Most times, one piece of software is only a part in the big puzzle
-that makes the software landscape of a company or organization.
-SemanticScuttle is not different and should integrate as nicely as
-possible with all other systems.
-
-One of the basic tasks of integration is user authentication against
-a central database - be it a central user database, an LDAP or a
-active directory server.
-
-Since version 0.96, SemanticScuttle supports user authentication against
-external systems. To provide a wide range of supported systems, we chose
-to utilize PEAR's Authentication package [1].
-It does this by providing different "authentication containers" [2],
-for example Database, IMAP, LDAP, POP3, RADIUS, SAP and SOAP.
-
-Please be aware of the fact that, after successful authentication, the user
-and his scrambled password are stored in the SemanticScuttle database.
-This is required for proper functioning of the software. It does not mean
-that you will be able to login if your external authentication provider
-is offline - you won't, execpt you switch it off in the SemanticScuttle
-configuration.
-
-
-[1] http://pear.php.net/package/Auth
-[2] http://pear.php.net/manual/en/package.authentication.auth.intro-storage.php
-
-
-Basic configuration
-===================
-The default configuration file data/config.default.php has an own section
-on auth options and an explanation of the single entries.
-
-To utilize the external authentication, you need to install the
-PEAR Auth package:
- $ pear install auth
-If you do not have a PEAR installation available, you can try to manually
-install the files in the src/ directory. If you choose to do that, the
-src/ directory should look similar to that:
-
- src/
- Auth.php
- Auth/
- Anonymous.php
- Container.php
- Container/
- ..
- SemanticScuttle/
- header.php
- ..
-
-After that, modify your data/config.php file. The most important change
-is to use
- $serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
-which tells SemanticScuttle to switch to the special authentication service.
-
-Now that's done, you can configure the single auth options:
- $authType = 'MDB2';
-selects the authentication container.
-
- $authOptions
-is an array of options specific to the authentication container. Please
-consult the PEAR Auth documentation for more information.
-
- $authDebug = true;
-should be used when setup fails, since it may give important hints
-where it fails. Please note that login will seem to fail with
-debugging activated. Going back to the main page after that will
-show that you are logged in.
-
-
-
-Authentication examples
-=======================
-
-General database authentification
----------------------------------
-Here you also need the PEAR MDB2 package.
-The "new_link" option is important!
-
-config.php settings:
--8<------------------
-$serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
-$authType = 'MDB2';
-$authOptions = array(
- 'dsn' => array(
- 'phptype' => 'mysql',
- 'hostspec' => 'FIXME',
- 'username' => 'FIXME',
- 'password' => 'FIXME',
- 'database' => 'FIXME',
- 'new_link' => true,
- ),
- 'table' => 'usersFIXME',
- 'usernamecol' => 'usernameFIXME',
- 'passwordcol' => 'passwordFIXME',
- 'cryptType' => 'md5',
-);
--8<------------------
-
-
-Mantis Bugtracker
------------------
-Here you also need the PEAR MDB2 package.
-
-config.php settings:
--8<------------------
-$serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
-$authType = 'MDB2';
-$authOptions = array(
- 'dsn' => array(
- 'phptype' => 'mysql',
- 'hostspec' => 'FIXME',
- 'username' => 'FIXME',
- 'password' => 'FIXME',
- 'database' => 'FIXME',
- 'new_link' => true,
- ),
- 'table' => 'mantis_user_table',
- 'usernamecol' => 'username',
- 'passwordcol' => 'password',
- 'cryptType' => 'md5',
-);
--8<------------------
-
-
-MediaWiki
----------
-Unfortunately, the password column does not contain a simple hashed
-password - for good reasons as described on
-http://www.mediawiki.org/wiki/Manual_talk:User_table#user_password_column
-
-If you configure your mediawiki to use passwords without salt, you
-can make it work nevertheless:
-
-MediaWiki LocalSettings.php:
- $wgPasswordSalt = false;
-- after that, users need to change/update their passwords to get them
-unsalted in the database. You can verify if the passwords are unhashed
-if you do
- SELECT CAST( user_password AS CHAR ) FROM user
-on your MediaWiki database. Passwords prefixed with ":A:" can be used.
-
-Another problem is that mediawiki user names begin with an uppercase letter.
-You need to modify www/login.php and remove the "utf8_strtolower" function
-call:
- $posteduser = trim(utf8_strtolower(POST_USERNAME));
-becomes
- $posteduser = trim(POST_USERNAME);
-
-
-config.php settings:
--8<------------------
-$serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
-$authType = 'MDB2';
-$authOptions = array(
- 'dsn' => array(
- 'phptype' => 'mysql',
- 'hostspec' => 'FIXME',
- 'username' => 'FIXME',
- 'password' => 'FIXME',
- 'database' => 'FIXME',
- 'new_link' => true,
- ),
- 'table' => 'user',
- 'usernamecol' => 'user_name',
- 'passwordcol' => 'user_password',
- 'cryptType' => 'md5_mediawiki',
-);
-function md5_mediawiki($password) {
- return ':A:' . md5($password);
-}
--8<------------------
-
-
-Active Directory / LDAP
------------------------
-Here we authenticate against an active directory server.
-
-config.php settings:
--8<------------------
-$serviceoverrides['User'] = 'SemanticScuttle_Service_AuthUser';
-$authType = 'LDAP';
-$authOptions = array(
- 'host' => '192.168.1.4',
- 'version' => 3,
- 'basedn' => 'DC=EXAMPLE,DC=ORG',
- 'binddn' => 'readuser',
- 'bindpw' => 'readuser',
- 'userattr' => 'sAMAccountName',
- 'userfilter' => '(objectClass=user)',
- 'attributes' => array(''),
-);
-$authEmailSuffix = '@example.org';
--8<------------------
diff --git a/doc/developers/TODO b/doc/developers/TODO.rst
index 59dd655..59dd655 100644
--- a/doc/developers/TODO
+++ b/doc/developers/TODO.rst
diff --git a/doc/developers/api b/doc/developers/api.rst
index efa05fe..efa05fe 100644
--- a/doc/developers/api
+++ b/doc/developers/api.rst
diff --git a/doc/developers/debugging b/doc/developers/debugging
deleted file mode 100644
index 7f84da6..0000000
--- a/doc/developers/debugging
+++ /dev/null
@@ -1,20 +0,0 @@
-How to debug SemanticScuttle
-============================
-
-
-Database queries
-----------------
-In config.php, enable debugMode.
-Further, add the following there:
--------
-register_shutdown_function(
- create_function('', <<<FNC
-\$GLOBALS['db'] = SemanticScuttle_Service_Factory::getDb();
-\$GLOBALS['db']->sql_report('display');
-FNC
- )
-);
-------
-To see database queries in SemanticScuttle, add
-> ?explain=1
-to your URL.
diff --git a/doc/developers/debugging.rst b/doc/developers/debugging.rst
new file mode 100644
index 0000000..6bee309
--- /dev/null
+++ b/doc/developers/debugging.rst
@@ -0,0 +1,24 @@
+How to debug SemanticScuttle
+============================
+
+
+Database queries
+----------------
+
+In ``data/config.php``, enable ``debugMode``.
+Further, add the following afterwards: ::
+
+ register_shutdown_function(
+ create_function('', <<<FNC
+ \$GLOBALS['db'] = SemanticScuttle_Service_Factory::getDb();
+ \$GLOBALS['db']->sql_report('display');
+ FNC
+ )
+ );
+
+
+To see database queries in SemanticScuttle, add ::
+
+ ?explain=1
+
+to your URL.
diff --git a/doc/developers/doc-TODO b/doc/developers/doc-TODO.rst
index 4fac4ab..4fac4ab 100644
--- a/doc/developers/doc-TODO
+++ b/doc/developers/doc-TODO.rst
diff --git a/doc/developers/release-new-version b/doc/developers/release-new-version.rst
index 4b2540a..4b2540a 100644
--- a/doc/developers/release-new-version
+++ b/doc/developers/release-new-version.rst
diff --git a/doc/developers/rules b/doc/developers/rules.rst
index 701a215..701a215 100644
--- a/doc/developers/rules
+++ b/doc/developers/rules.rst
diff --git a/doc/developers/running-unit-tests b/doc/developers/running-unit-tests
deleted file mode 100644
index 556055f..0000000
--- a/doc/developers/running-unit-tests
+++ /dev/null
@@ -1,21 +0,0 @@
-Running unit tests
-==================
-
-Go to the SemanticScuttle main directory and run
- $ php tests/AllTests.php
-or
- $ phpunit tests/AllTests.php
-also remember the --verbose parameter to PHPUnit.
-
-If you want to run a specific test class only:
- $ phpunit tests/BookmarksTest.php
-
-If you need to test one method only:
- $ phpunit --filter BookmarkTest::testUnificationOfBookmarks tests/BookmarkTest.php
-
-
-Caveats
--------
-Having debugging enabled and database driver "mysql4" activated
-will lead to failing tests because of FOUND_ROWS() usage, which
-does not work nicely with database debugging.
diff --git a/doc/developers/running-unit-tests.rst b/doc/developers/running-unit-tests.rst
new file mode 100644
index 0000000..8b0fa0d
--- /dev/null
+++ b/doc/developers/running-unit-tests.rst
@@ -0,0 +1,26 @@
+Running unit tests
+==================
+
+Go to the SemanticScuttle ``tests`` directory and run ``phpunit``::
+
+ $ cd tests
+ $ phpunit .
+
+also remember the ``--verbose`` parameter to PHPUnit.
+
+If you want to run a specific test class only: ::
+
+ $ cd tests
+ $ phpunit BookmarksTest.php
+
+If you need to test one method only: ::
+
+ $ cd tests
+ $ phpunit --filter BookmarkTest::testUnificationOfBookmarks tests/BookmarkTest.php
+
+
+Caveats
+-------
+Having debugging enabled and database driver "``mysql4``" activated
+will lead to failing tests because of ``FOUND_ROWS()`` usage, which
+does not work nicely with database debugging.
diff --git a/doc/developers/translation b/doc/developers/translation
deleted file mode 100644
index 776b5d7..0000000
--- a/doc/developers/translation
+++ /dev/null
@@ -1,40 +0,0 @@
-Translating SemanticScuttle
-===========================
-
-SemanticScuttle uses gnu gettext for translation. It does not
-rely on the php extension but ships with a pure php implementation,
-php-gettext[1].
-
-Using gettext from within the code is really easy:
-Enclose the string you want to translate in a "T_" function call.
-
-For example, to translate
-> echo "Vote for";
-just write
-> echo T_("Vote for");
-
-
-Translation basics
-------------------
-
-We keep one base translation file, data/locales/messages.po.
-This file is auto-generated via xgettext from all our php source files.
-In case you added a new string to the code that needs translation,
-update the base translation file by running
-> php scripts/update-translation-base.php
-
-After that has been done, the changes to the base messages.po file
-need to be merged into the single language translation files,
-for example data/locales/de_DE/LC_MESSAGES/messages.po.
-
-Updating them from the master file is as easy as running
-> php scripts/update-translation.php de_DE
-
-When the translation is ready, the .po file needs to be compiled
-in a machine-readable .mo file. Use
-> php scripts/compile-translation.php de_DE
-to achieve that.
-
-
-
-[1] https://launchpad.net/php-gettext/ \ No newline at end of file
diff --git a/doc/developers/translation.rst b/doc/developers/translation.rst
new file mode 100644
index 0000000..008f66e
--- /dev/null
+++ b/doc/developers/translation.rst
@@ -0,0 +1,47 @@
+===========================
+Translating SemanticScuttle
+===========================
+
+SemanticScuttle uses gnu gettext for translation. It does not
+rely on the php extension but ships with a pure php implementation,
+php-gettext_.
+
+Using gettext from within the code is really easy:
+Enclose the string you want to translate in a "``T_``" function call.
+
+For example, to translate::
+
+ echo "Vote for";
+
+just write ::
+
+ echo T_("Vote for");
+
+.. _php-gettext: https://launchpad.net/php-gettext/
+
+Translation basics
+==================
+
+We keep one base translation file, ``data/locales/messages.po``.
+This file is auto-generated via ``xgettext`` from all our php source files.
+In case you added a new string to the code that needs translation,
+update the base translation file by running ::
+
+ $ php scripts/update-translation-base.php
+
+After that has been done, the changes to the base ``messages.po`` file
+need to be merged into the single language translation files,
+for example ``data/locales/de_DE/LC_MESSAGES/messages.po``.
+
+Updating them from the master file is as easy as running::
+
+ $ php scripts/update-translation.php de_DE
+
+When the translation is ready, the ``.po`` file needs to be compiled
+in a machine-readable ``.mo`` file. Use ::
+
+ $ php scripts/compile-translation.php de_DE
+
+to achieve that.
+
+
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644
index 0000000..1b8feea
--- /dev/null
+++ b/doc/index.rst
@@ -0,0 +1,45 @@
+=============================
+SemanticScuttle documentation
+=============================
+
+
+First reads
+===========
+- README_
+- `installation guide`_
+- `upgrade instructions`_
+
+.. _README: README.html
+.. _installation guide: INSTALL.html
+.. _upgrade instructions: UPGRADE.html
+
+
+
+Features
+========
+- `Custom user authentication`__
+- `SSL Client certificates`__
+- Themes__
+
+__ authentication.html
+__ ssl-client-certificates.html
+__ themes.html
+
+
+
+Developer documentation
+=======================
+- `General development rules`__
+- `Delicious API`__
+- `Debugging HowTo`__
+- `How to release a new version`__
+- `Running unit testes`__
+- `How to translate SemanticScuttle`__
+
+__ developers/rules.html
+__ developers/api.html
+__ developers/debugging.html
+__ developers/release-new-version.html
+__ developers/running-unit-tests.html
+__ developers/translation.html
+
diff --git a/doc/themes.rst b/doc/themes.rst
new file mode 100644
index 0000000..6f34a36
--- /dev/null
+++ b/doc/themes.rst
@@ -0,0 +1,48 @@
+======================
+SemanticScuttle Themes
+======================
+SemanticScuttle may be changed visually by supplying custom "themes" (skins)
+that modify the visual appearance.
+
+
+Changing the current theme
+==========================
+In ``data/config.php``, set your theme like this: ::
+
+ $theme = 'darkmood';
+
+The available themes are the folders in ``www/themes/``.
+By default, SemanticScuttle ships only one usable theme ("default") and one
+to demonstrate how to create your own theme ("testdummy").
+
+
+Creating your own theme
+=======================
+Have a look at the "testdummy" theme in ``www/themes/testdummy/``.
+
+CSS and image files
+-------------------
+Since both file types need to be accessible via the web server directly,
+they are located in the ``www/`` folder: ::
+
+ www/themes/$themename/
+
+The main CSS file that automatically gets included is ::
+
+ www/themes/$themename/scuttle.css
+
+Several template files in SemanticScuttle include image files. If they do not
+exist in your theme, the default ones are used automatically.
+Note that this is not true for images that are specified in the CSS files.
+
+
+Template files
+--------------
+The templates of the default file are located in ::
+
+ data/templates/default/
+
+You may put your theme template files into ::
+
+ data/templates/$themename/
+
diff --git a/src/SemanticScuttle/Model/Template.php b/src/SemanticScuttle/Model/Template.php
index ff5fbbe..234e23f 100644
--- a/src/SemanticScuttle/Model/Template.php
+++ b/src/SemanticScuttle/Model/Template.php
@@ -76,6 +76,9 @@ class SemanticScuttle_Model_Template
* Sets variables and includes the template file,
* causing it to be rendered.
*
+ * Does not take care of themes and so.
+ * The include path must be set so the correct theme is used.
+ *
* @return void
*/
public function parse()
diff --git a/src/SemanticScuttle/Model/Theme.php b/src/SemanticScuttle/Model/Theme.php
new file mode 100644
index 0000000..65861b8
--- /dev/null
+++ b/src/SemanticScuttle/Model/Theme.php
@@ -0,0 +1,97 @@
+<?php
+/**
+ * SemanticScuttle - your social bookmark manager.
+ *
+ * PHP version 5.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @license AGPL v3 or later http://www.gnu.org/licenses/agpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+
+/**
+ * A theme, the visual representation of SemanticScuttle.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @license AGPL v3 or later http://www.gnu.org/licenses/agpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+class SemanticScuttle_Model_Theme
+{
+ /**
+ * Theme name. Also the path part of template and resource files
+ *
+ * @var string
+ */
+ protected $name = null;
+
+ /**
+ * Local path to the www themes directory.
+ * Needs to have a trailing slash.
+ *
+ * @var string
+ */
+ protected $wwwThemeDir = null;
+
+
+
+ /**
+ * Create a new theme instance.
+ *
+ * @param string $name Theme name "data/templates/(*)/"
+ */
+ public function __construct($name = 'default')
+ {
+ $this->name = $name;
+ $this->wwwThemeDir = $GLOBALS['wwwdir'] . '/themes/';
+ //TODO: implement theme hierarchies with parent fallback
+ }
+
+
+
+ /**
+ * Returns the URL path to a resource file (www/themes/$name/$file).
+ * Automatically falls back to the parent theme if the file does not exist
+ * in the theme.
+ *
+ * Must always be used when adding i.e. images to the output.
+ *
+ * @param string $file File name to find the path for, i.e. "scuttle.css".
+ *
+ * @return string Full path
+ */
+ public function resource($file)
+ {
+ $themeFile = $this->wwwThemeDir . $this->name . '/' . $file;
+ if (file_exists($themeFile)) {
+ return ROOT . 'themes/' . $this->name . '/' . $file;
+ }
+
+ $defaultFile = $this->wwwThemeDir . 'default/' . $file;
+ if (file_exists($defaultFile)) {
+ return ROOT . 'themes/default/' . $file;
+ }
+
+ //file does not exist. fall back to the theme file
+ // to guide the theme author a bit.
+ // TODO: logging. in admin mode, there should be a message
+ return ROOT . 'themes/' . $this->name . '/' . $file;
+ }
+
+
+
+ /**
+ * Returns the theme name.
+ *
+ * @return string Theme name
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+}
+?> \ No newline at end of file
diff --git a/src/SemanticScuttle/Service/Template.php b/src/SemanticScuttle/Service/Template.php
index efa8d28..b5d4cfa 100644
--- a/src/SemanticScuttle/Service/Template.php
+++ b/src/SemanticScuttle/Service/Template.php
@@ -14,6 +14,7 @@
*/
require_once 'SemanticScuttle/Model/Template.php';
+require_once 'SemanticScuttle/Model/Theme.php';
/**
* SemanticScuttle template service.
@@ -38,6 +39,14 @@ class SemanticScuttle_Service_Template extends SemanticScuttle_Service
*/
protected $basedir;
+ /**
+ * The template theme to use.
+ * Set in constructor based on $GLOBALS['theme']
+ *
+ * @var SemanticScuttle_Model_Theme
+ */
+ protected $theme;
+
/**
@@ -64,6 +73,8 @@ class SemanticScuttle_Service_Template extends SemanticScuttle_Service
protected function __construct()
{
$this->basedir = $GLOBALS['TEMPLATES_DIR'];
+ $this->theme = new SemanticScuttle_Model_Theme($GLOBALS['theme']);
+ //FIXME: verify the theme exists
}
@@ -74,19 +85,33 @@ class SemanticScuttle_Service_Template extends SemanticScuttle_Service
* @param string $template Template filename relative
* to template dir
* @param array $vars Array of template variables.
+ * The current theme object will be added
+ * automatically with name "theme".
*
* @return SemanticScuttle_Model_Template Template object
*/
- function loadTemplate($template, $vars = null)
+ public function loadTemplate($template, $vars = null)
{
if (substr($template, -4) != '.php') {
$template .= '.php';
}
+
+ $oldIncPath = get_include_path();
+ set_include_path(
+ $this->basedir . $this->theme->getName()
+ . PATH_SEPARATOR . $this->basedir . 'default'
+ //needed since services are instantiated in templates
+ . PATH_SEPARATOR . $oldIncPath
+ );
+
+ $vars['theme'] = $this->theme;
$tpl = new SemanticScuttle_Model_Template(
- $this->basedir .'/'. $template, $vars, $this
+ $template, $vars, $this
);
$tpl->parse();
+ set_include_path($oldIncPath);
+
return $tpl;
}
}
diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php
index 098e5c3..6c0d4df 100644
--- a/src/SemanticScuttle/header.php
+++ b/src/SemanticScuttle/header.php
@@ -18,9 +18,12 @@
if ('@data_dir@' == '@' . 'data_dir@') {
//non pear-install
$datadir = dirname(__FILE__) . '/../../data/';
+ $wwwdir = dirname(__FILE__) . '/../../www/';
} else {
//pear installation; files are in include path
$datadir = '@data_dir@/SemanticScuttle/';
+ //FIXME: when you have multiple installations, the www_dir will be wrong
+ $wwwdir = '@www_dir@/SemanticScuttle/';
}
if (!file_exists($datadir . '/config.php')) {
diff --git a/www/ajaxGetTitle.php b/www/ajaxGetTitle.php
index b4f44ca..8e5d92c 100644
--- a/www/ajaxGetTitle.php
+++ b/www/ajaxGetTitle.php
@@ -38,9 +38,12 @@ function getTitle($url) {
preg_match_all('/<title>(.*)<\/title>/si', $html, $matches);
$title = $matches[1][0];
+ $encoding = 'utf-8';
// Get encoding from charset attribute
preg_match_all('/<meta.*charset=([^;"]*)">/i', $html, $matches);
- $encoding = strtoupper($matches[1][0]);
+ if (isset($matches[1][0])) {
+ $encoding = strtoupper($matches[1][0]);
+ }
// Convert to UTF-8 from the original encoding
if (function_exists("mb_convert_encoding")) {
diff --git a/www/jsScuttle.php b/www/jsScuttle.php
index 3ca41ec..de97fd2 100644
--- a/www/jsScuttle.php
+++ b/www/jsScuttle.php
@@ -3,6 +3,7 @@ $GLOBALS['saveInLastUrl'] = false;
$httpContentType = 'text/javascript';
require_once 'www-header.php';
require_once 'SemanticScuttle/functions.php';
+$theme = new SemanticScuttle_Model_Theme($GLOBALS['theme']);
$player_root = ROOT .'includes/player/';
?>
@@ -62,7 +63,7 @@ function isAvailable(input, response){
username = username.trim();
var availability = document.getElementById("availability");
if (username != '') {
- usernameField.style.backgroundImage = 'url(<?php echo ROOT; ?>images/loading.gif)';
+ usernameField.style.backgroundImage = 'url(<?php echo $theme->resource('images/loading.gif'); ?>)';
if (response != '') {
usernameField.style.backgroundImage = 'none';
if (response == 'true') {
@@ -110,7 +111,7 @@ function getNewPrivateKey(input, response){
function getTitle(input, response){
var title = document.getElementById('titleField');
if (title.value == '') {
- title.style.backgroundImage = 'url(<?php echo ROOT; ?>images/loading.gif)';
+ title.style.backgroundImage = 'url(<?php echo $theme->resource('images/loading.gif');?>)';
if (response != null) {
title.style.backgroundImage = 'none';
title.value = response;
diff --git a/www/icon.png b/www/themes/default/icon.png
index be864a7..be864a7 100644
--- a/www/icon.png
+++ b/www/themes/default/icon.png
Binary files differ
diff --git a/www/images/b_edit.png b/www/themes/default/images/b_edit.png
index 05711a0..05711a0 100644
--- a/www/images/b_edit.png
+++ b/www/themes/default/images/b_edit.png
Binary files differ
diff --git a/www/images/bg_admin.png b/www/themes/default/images/bg_admin.png
index c707779..c707779 100644
--- a/www/images/bg_admin.png
+++ b/www/themes/default/images/bg_admin.png
Binary files differ
diff --git a/www/images/bg_bar.png b/www/themes/default/images/bg_bar.png
index 7152ba1..7152ba1 100644
--- a/www/images/bg_bar.png
+++ b/www/themes/default/images/bg_bar.png
Binary files differ
diff --git a/www/images/bg_header.png b/www/themes/default/images/bg_header.png
index 6fa4161..6fa4161 100644
--- a/www/images/bg_header.png
+++ b/www/themes/default/images/bg_header.png
Binary files differ
diff --git a/www/images/bg_sidebar.png b/www/themes/default/images/bg_sidebar.png
index 0edb153..0edb153 100644
--- a/www/images/bg_sidebar.png
+++ b/www/themes/default/images/bg_sidebar.png
Binary files differ
diff --git a/www/images/loading.gif b/www/themes/default/images/loading.gif
index 859126e..859126e 100644
--- a/www/images/loading.gif
+++ b/www/themes/default/images/loading.gif
Binary files differ
diff --git a/www/images/logo.png b/www/themes/default/images/logo.png
index 4afe565..4afe565 100644
--- a/www/images/logo.png
+++ b/www/themes/default/images/logo.png
Binary files differ
diff --git a/www/images/logo_24.gif b/www/themes/default/images/logo_24.gif
index d5af64d..d5af64d 100644
--- a/www/images/logo_24.gif
+++ b/www/themes/default/images/logo_24.gif
Binary files differ
diff --git a/www/images/rss.gif b/www/themes/default/images/rss.gif
index 094ba10..094ba10 100644
--- a/www/images/rss.gif
+++ b/www/themes/default/images/rss.gif
Binary files differ
diff --git a/www/images/thumbs_up.orig.png b/www/themes/default/images/thumbs_up.orig.png
index 1a89d0e..1a89d0e 100644
--- a/www/images/thumbs_up.orig.png
+++ b/www/themes/default/images/thumbs_up.orig.png
Binary files differ
diff --git a/www/images/vote-against-voted.png b/www/themes/default/images/vote-against-voted.png
index 740dfc8..740dfc8 100644
--- a/www/images/vote-against-voted.png
+++ b/www/themes/default/images/vote-against-voted.png
Binary files differ
diff --git a/www/images/vote-against.png b/www/themes/default/images/vote-against.png
index f15ea4d..f15ea4d 100644
--- a/www/images/vote-against.png
+++ b/www/themes/default/images/vote-against.png
Binary files differ
diff --git a/www/images/vote-for-voted.png b/www/themes/default/images/vote-for-voted.png
index 5abd43e..5abd43e 100644
--- a/www/images/vote-for-voted.png
+++ b/www/themes/default/images/vote-for-voted.png
Binary files differ
diff --git a/www/images/vote-for.png b/www/themes/default/images/vote-for.png
index 5973ae9..5973ae9 100644
--- a/www/images/vote-for.png
+++ b/www/themes/default/images/vote-for.png
Binary files differ
diff --git a/www/scuttle.css b/www/themes/default/scuttle.css
index 9e87857..9e87857 100644
--- a/www/scuttle.css
+++ b/www/themes/default/scuttle.css
diff --git a/www/themes/testdummy/images/logo.png b/www/themes/testdummy/images/logo.png
new file mode 100644
index 0000000..4a8f8ba
--- /dev/null
+++ b/www/themes/testdummy/images/logo.png
Binary files differ
diff --git a/www/themes/testdummy/scuttle.css b/www/themes/testdummy/scuttle.css
new file mode 100644
index 0000000..c62cd19
--- /dev/null
+++ b/www/themes/testdummy/scuttle.css
@@ -0,0 +1,12 @@
+@import url(../default/scuttle.css);
+
+body {
+ background-color: #FEA;
+}
+
+html > body h1 {
+ background: url('images/logo.png') no-repeat 10px;
+}
+div#header {
+ background: #FEA;
+}