Permalink
Browse files

Restructure repository

  • Loading branch information...
0 parents commit c20b44263a89d8bf1a78bfa632daaae3cb4f1da2 @scronide committed Dec 5, 2006
Showing with 24,407 additions and 0 deletions.
  1. +4 −0 .cvsignore
  2. +7 −0 .htaccess
  3. +18 −0 AUTHORS
  4. +27 −0 about.php
  5. +40 −0 ajaxDelete.php
  6. +66 −0 ajaxGetTitle.php
  7. +37 −0 ajaxIsAvailable.php
  8. +85 −0 alltags.php
  9. +10 −0 api/.htaccess
  10. +22 −0 api/httpauth.inc.php
  11. +83 −0 api/posts_add.php
  12. +50 −0 api/posts_all.php
  13. +42 −0 api/posts_dates.php
  14. +33 −0 api/posts_delete.php
  15. +62 −0 api/posts_get.php
  16. +63 −0 api/posts_recent.php
  17. +26 −0 api/posts_update.php
  18. +25 −0 api/tags_get.php
  19. +37 −0 api/tags_rename.php
  20. BIN bg_bar.png
  21. BIN bg_header.png
  22. BIN bg_sidebar.png
  23. +228 −0 bookmarks.php
  24. +1 −0 cache/.cvsignore
  25. +2 −0 cache/.htaccess
  26. +120 −0 config.inc.php.example
  27. +16 −0 debug.inc.php
  28. +93 −0 edit.php
  29. +160 −0 functions.inc.php
  30. +34 −0 header.inc.php
  31. +90 −0 history.php
  32. BIN icon.png
  33. +109 −0 import.php
  34. +85 −0 importNetscape.php
  35. +417 −0 includes/db/db2.php
  36. +527 −0 includes/db/firebird.php
  37. +10 −0 includes/db/index.htm
  38. +576 −0 includes/db/mssql-odbc.php
  39. +551 −0 includes/db/mssql.php
  40. +552 −0 includes/db/mysql.php
  41. +552 −0 includes/db/mysql4.php
  42. +566 −0 includes/db/mysqli.php
  43. +468 −0 includes/db/oracle.php
  44. +597 −0 includes/db/postgres.php
  45. +387 −0 includes/db/sqlite.php
  46. +3 −0 includes/php-gettext/AUTHORS
  47. +340 −0 includes/php-gettext/COPYING
  48. +144 −0 includes/php-gettext/ChangeLog
  49. +32 −0 includes/php-gettext/Makefile
  50. +189 −0 includes/php-gettext/README
  51. +20 −0 includes/php-gettext/bin/gettexts.bat
  52. +27 −0 includes/php-gettext/examples/index.php
  53. BIN includes/php-gettext/examples/locale/de_CH/LC_MESSAGES/messages.mo
  54. +30 −0 includes/php-gettext/examples/locale/de_CH/LC_MESSAGES/messages.po
  55. BIN includes/php-gettext/examples/locale/sr_CS/LC_MESSAGES/messages.mo
  56. +29 −0 includes/php-gettext/examples/locale/sr_CS/LC_MESSAGES/messages.po
  57. +87 −0 includes/php-gettext/examples/pigs_dropin.php
  58. +86 −0 includes/php-gettext/examples/pigs_fallback.php
  59. +14 −0 includes/php-gettext/examples/update
  60. +318 −0 includes/php-gettext/gettext.inc
  61. +358 −0 includes/php-gettext/gettext.php
  62. +166 −0 includes/php-gettext/streams.php
  63. BIN includes/player/error.swf
  64. +10 −0 includes/player/license.txt
  65. BIN includes/player/load.swf
  66. BIN includes/player/musicplayer_f6.swf
  67. BIN includes/player/play.swf
  68. BIN includes/player/stop.swf
  69. +478 −0 includes/utf8.php
  70. +87 −0 index.php
  71. +141 −0 jsScuttle.php
  72. +340 −0 licence.txt
  73. BIN loading.gif
  74. BIN locales/de_DE/LC_MESSAGES/messages.mo
  75. +808 −0 locales/de_DE/LC_MESSAGES/messages.po
  76. BIN locales/dk_DK/LC_MESSAGES/messages.mo
  77. +808 −0 locales/dk_DK/LC_MESSAGES/messages.po
  78. BIN locales/en_GB/LC_MESSAGES/messages.mo
  79. +808 −0 locales/en_GB/LC_MESSAGES/messages.po
  80. BIN locales/es_ES/LC_MESSAGES/messages.mo
  81. +826 −0 locales/es_ES/LC_MESSAGES/messages.po
  82. BIN locales/fr_FR/LC_MESSAGES/messages.mo
  83. +835 −0 locales/fr_FR/LC_MESSAGES/messages.po
  84. BIN locales/hi_IN/LC_MESSAGES/messages.mo
  85. +812 −0 locales/hi_IN/LC_MESSAGES/messages.po
  86. BIN locales/it_IT/LC_MESSAGES/messages.mo
  87. +853 −0 locales/it_IT/LC_MESSAGES/messages.po
  88. BIN locales/ja_JP/LC_MESSAGES/messages.mo
  89. +808 −0 locales/ja_JP/LC_MESSAGES/messages.po
  90. BIN locales/lt_LT/LC_MESSAGES/messages.mo
  91. +808 −0 locales/lt_LT/LC_MESSAGES/messages.po
  92. +825 −0 locales/messages.po
  93. BIN locales/nl_NL/LC_MESSAGES/messages.mo
  94. +851 −0 locales/nl_NL/LC_MESSAGES/messages.po
  95. BIN locales/pt_BR/LC_MESSAGES/messages.mo
  96. +814 −0 locales/pt_BR/LC_MESSAGES/messages.po
  97. BIN locales/zh_CN/LC_MESSAGES/messages.mo
  98. +827 −0 locales/zh_CN/LC_MESSAGES/messages.po
  99. +53 −0 login.php
  100. BIN logo.png
  101. BIN logo_24.png
  102. +72 −0 password.php
  103. +86 −0 populartags.php
  104. +107 −0 profile.php
  105. +86 −0 readme.txt
  106. +64 −0 register.php
  107. BIN rss.gif
  108. +115 −0 rss.php
  109. +436 −0 scuttle.css
  110. +44 −0 search.inc.php
  111. +113 −0 search.php
  112. +416 −0 services/bookmarkservice.php
  113. +38 −0 services/cacheservice.php
  114. +33 −0 services/servicefactory.php
  115. +363 −0 services/tagservice.php
  116. +46 −0 services/templateservice.php
  117. +362 −0 services/userservice.php
  118. +68 −0 tables.sql
  119. +48 −0 tagdelete.php
  120. +88 −0 tags.php
  121. +20 −0 templates/about.tpl.php
  122. +166 −0 templates/bookmarks.tpl.php
  123. +2 −0 templates/bottom.inc.php
  124. +120 −0 templates/dynamictags.inc.php
  125. +120 −0 templates/editbookmark.tpl.php
  126. +56 −0 templates/editprofile.tpl.php
  127. +9 −0 templates/error.404.tpl.php
  128. +9 −0 templates/error.500.tpl.php
  129. +42 −0 templates/importDelicious.tpl.php
  130. +50 −0 templates/importNetscape.tpl.php
  131. +35 −0 templates/login.tpl.php
  132. +26 −0 templates/password.tpl.php
  133. +67 −0 templates/profile.tpl.php
  134. +40 −0 templates/register.tpl.php
  135. +28 −0 templates/rss.tpl.php
  136. +25 −0 templates/sidebar.block.common.php
  137. +31 −0 templates/sidebar.block.popular.php
  138. +16 −0 templates/sidebar.block.profile.php
  139. +30 −0 templates/sidebar.block.recent.php
  140. +29 −0 templates/sidebar.block.related.php
  141. +27 −0 templates/sidebar.block.tagactions.php
  142. +19 −0 templates/sidebar.block.watchlist.php
  143. +27 −0 templates/sidebar.block.watchstatus.php
  144. +13 −0 templates/sidebar.tpl.php
  145. +20 −0 templates/tagdelete.tpl.php
  146. +27 −0 templates/tags.tpl.php
  147. +27 −0 templates/toolbar.inc.php
  148. +47 −0 templates/top.inc.php
  149. +56 −0 watch.php
  150. +125 −0 watchlist.php
@@ -0,0 +1,4 @@
+*.~*~
+#*#
+*.project
+config.inc.php
@@ -0,0 +1,7 @@
+Options +FollowSymlinks
+AcceptPathInfo On
+RewriteEngine On
+RewriteBase /
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^([^/]+)/?(.*) $1.php/$2 [L]
@@ -0,0 +1,18 @@
+Scuttle contains code from the following applications:
+
+------------
+GPL Licenced
+------------
+
+phpBB2 (database abstraction layer)
+http://www.phpbb.com/
+
+php-gettext
+Danilo Segan <danilo@kvota.net>
+http://savannah.nongnu.org/projects/php-gettext/
+
+UTF8 Helper Functions
+Andreas Gohr <andi@splitbrain.org>
+
+XSPF Web Music Player (Flash)
+http://musicplayer.sourceforge.net/
@@ -0,0 +1,27 @@
+<?php
+/***************************************************************************
+Copyright (C) 2004, 2005 Scuttle project
+http://sourceforge.net/projects/scuttle/
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+***************************************************************************/
+
+require_once('header.inc.php');
+$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
+
+$tplVars = array();
+$tplVars['subtitle'] = T_('About');
+$templateservice->loadTemplate('about.tpl', $tplVars);
+?>
@@ -0,0 +1,40 @@
+<?php
+/***************************************************************************
+Copyright (C) 2005 - 2006 Scuttle project
+http://sourceforge.net/projects/scuttle/
+http://scuttle.org/
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+***************************************************************************/
+
+header('Content-Type: text/xml; charset=UTF-8');
+header('Last-Modified: '. gmdate("D, d M Y H:i:s") .' GMT');
+header('Cache-Control: no-cache, must-revalidate');
+require_once('header.inc.php');
+
+$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
+$bookmark = intval($_GET['id']);
+if (!$bookmarkservice->editAllowed($bookmark)) {
+ $result = T_('You are not allowed to delete this bookmark');
+} elseif ($bookmarkservice->deleteBookmark($bookmark)) {
+ $result = 'true';
+} else {
+ $result = T_('Failed to delete bookmark');
+}
+?>
+<response>
+ <method>deleteConfirmed</method>
+ <result><?php echo $result; ?></result>
+</response>
@@ -0,0 +1,66 @@
+<?php
+/***************************************************************************
+Copyright (C) 2005 - 2006 Scuttle project
+http://sourceforge.net/projects/scuttle/
+http://scuttle.org/
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+***************************************************************************/
+
+header('Content-Type: text/xml; charset=UTF-8');
+header("Last-Modified: ". gmdate("D, d M Y H:i:s") ." GMT");
+header("Cache-Control: no-cache, must-revalidate");
+
+require_once('header.inc.php');
+
+function getTitle($url) {
+ $fd = @fopen($url, 'r');
+ if ($fd) {
+ $html = fread($fd, 1750);
+ fclose($fd);
+
+ // Get title from title tag
+ preg_match_all('/<title>(.*)<\/title>/si', $html, $matches);
+ $title = $matches[1][0];
+
+ // Get encoding from charset attribute
+ preg_match_all('/<meta.*charset=([^;"]*)">/i', $html, $matches);
+ $encoding = strtoupper($matches[1][0]);
+
+ // Convert to UTF-8 from the original encoding
+ if (function_exists('mb_convert_encoding') {
+ $title = @mb_convert_encoding($title, 'UTF-8', $encoding);
+ }
+
+ if (utf8_strlen($title) > 0) {
+ return $title;
+ } else {
+ // No title, so return filename
+ $uriparts = explode('/', $url);
+ $filename = end($uriparts);
+ unset($uriparts);
+
+ return $filename;
+ }
+ } else {
+ return false;
+ }
+}
+echo '<?xml version="1.0" encoding="utf-8"?>';
+?>
+<response>
+ <method>getTitle</method>
+ <result><?php echo getTitle($_GET['url']); ?></result>
+</response>
@@ -0,0 +1,37 @@
+<?php
+/***************************************************************************
+Copyright (C) 2006 Scuttle project
+http://sourceforge.net/projects/scuttle/
+http://scuttle.org/
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+***************************************************************************/
+
+header('Content-Type: text/xml; charset=UTF-8');
+header("Last-Modified: ". gmdate("D, d M Y H:i:s") ." GMT");
+header("Cache-Control: no-cache, must-revalidate");
+
+require_once('header.inc.php');
+$userservice = & ServiceFactory :: getServiceInstance('UserService');
+if ($userservice->isReserved($_GET['username'])) {
+ $result = 'false';
+} else {
+ $result = $userservice->getUserByUsername($_GET['username']) ? 'false' : 'true';
+}
+?>
+<response>
+ <method>isAvailable</method>
+ <result><?php echo $result; ?></result>
+</response>
@@ -0,0 +1,85 @@
+<?php
+/***************************************************************************
+Copyright (C) 2004 - 2006 Scuttle project
+http://sourceforge.net/projects/scuttle/
+http://scuttle.org/
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+***************************************************************************/
+
+require_once('header.inc.php');
+$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
+$tagservice =& ServiceFactory::getServiceInstance('TagService');
+$userservice =& ServiceFactory::getServiceInstance('UserService');
+$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+
+list($url, $user) = explode('/', $_SERVER['PATH_INFO']);
+if (!$user) {
+ header('Location: '. createURL('populartags'));
+ exit;
+}
+
+if ($usecache) {
+ // Generate hash for caching on
+ $hashtext = $_SERVER['REQUEST_URI'];
+ if ($userservice->isLoggedOn()) {
+ $hashtext .= $userservice->getCurrentUserID();
+ }
+ $hash = md5($hashtext);
+
+ // Cache for an hour
+ $cacheservice->Start($hash, 3600);
+}
+
+// Header variables
+$tplvars = array();
+$pagetitle = T_('All Tags');
+
+if (isset($user) && $user != '') {
+ if (is_int($user)) {
+ $userid = intval($user);
+ } else {
+ if ($userinfo = $userservice->getUserByUsername($user)) {
+ $userid =& $userinfo[$userservice->getFieldName('primary')];
+ } else {
+ $tplVars['error'] = sprintf(T_('User with username %s was not found'), $user);
+ $templateservice->loadTemplate('error.404.tpl', $tplVars);
+ //throw a 404 error
+ exit();
+ }
+ }
+ $pagetitle .= ': '. ucfirst($user);
+} else {
+ $userid = NULL;
+}
+
+$tags =& $tagservice->getTags($userid);
+$tplVars['tags'] =& $tagservice->tagCloud($tags, 5, 90, 225, getSortOrder());
+$tplVars['user'] = $user;
+
+if (isset($userid)) {
+ $tplVars['cat_url'] = createURL('bookmarks', '%s/%s');
+} else {
+ $tplVars['cat_url'] = createURL('tags', '%2$s');
+}
+
+$tplVars['subtitle'] = $pagetitle;
+$templateservice->loadTemplate('tags.tpl', $tplVars);
+
+if ($usecache) {
+ // Cache output if existing copy has expired
+ $cacheservice->End($hash);
+}
+?>
@@ -0,0 +1,10 @@
+RewriteEngine On
+RewriteRule ^tags/get tags_get.php
+RewriteRule ^posts/dates posts_dates.php
+RewriteRule ^posts/get posts_get.php
+RewriteRule ^posts/recent posts_recent.php
+RewriteRule ^posts/all posts_all.php
+RewriteRule ^posts/update posts_update.php
+RewriteRule ^posts/add posts_add.php
+RewriteRule ^posts/delete posts_delete.php
+RewriteRule ^tags/rename tags_rename.php
@@ -0,0 +1,22 @@
+<?php
+// Provides HTTP Basic authentication of a user, and sets two variables, sId and username,
+// with the user's info.
+
+function authenticate() {
+ header('WWW-Authenticate: Basic realm="del.icio.us API"');
+ header('HTTP/1.0 401 Unauthorized');
+ die("Use of the API calls requires authentication.");
+}
+
+if (!isset($_SERVER['PHP_AUTH_USER'])) {
+ authenticate();
+} else {
+ require_once('../header.inc.php');
+ $userservice =& ServiceFactory::getServiceInstance('UserService');
+
+ $login = $userservice->login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
+ if (!$login) {
+ authenticate();
+ }
+}
+?>
Oops, something went wrong.

0 comments on commit c20b442

Please sign in to comment.