Compare commits

..

1 Commits

Author SHA1 Message Date
Christian Weiske
e133eb38ba update to php-gettext 1.0.9 2010-02-16 07:53:53 +01:00
344 changed files with 13716 additions and 49019 deletions

6
.gitignore vendored
View File

@ -1,8 +1,2 @@
doc/*.html
dist/
build.properties
package.xml
semanticscuttle-dump.sql
data/config.php
data/config.testing.php
data/config.testing-tmp.php

View File

@ -1,15 +0,0 @@
language: php
phps:
- 5.3
script: cd tests && phpunit .
notifications:
irc: "irc.freenode.org#semanticscuttle"
before_script:
- mysql -e 'create database semanticscuttle_test;'
- mysql semanticscuttle_test < data/tables.sql
- cat data/config.php.dist | sed "s/'username'/'root'/" | sed "s/'password'/''/" | sed "s/'scuttle'/'semanticscuttle_test'/" | sed "s/'mysql4'/'mysqli'/" > data/config.php
- pyrus install pear/HTTP_Request2
- pyrus install pear/PEAR
- pyrus install pear/Stream_Var
- phpenv rehash

View File

@ -1,12 +0,0 @@
Patched SemanticScuttle (social bookmarking tool).
================================================
### New :
* Better import for XML bookmark file.
* Support for adding multiple bookmarks at once with my modified Firefox's Scuttle plugin.
* Block everything if global private mode enabled and user not logged on.
* Shoulder surfing protection.
* Batch tagging.
* Search will now look in bookmarks addresses too.

View File

@ -1,2 +1 @@
sfuser=FIXME
websitedir=FIXME

423
build.xml
View File

@ -7,57 +7,14 @@
tagging a release, running unit tests etc.
-->
<property file="build.properties" />
<property file="html.properties" />
<property name="version-m" value="0.98" />
<property name="version" value="0.98.5" />
<property name="stability" value="beta" />
<property name="releasenotes" value="
- Fix bug #109: preserve privacy setting from Delicious export files
(Thanks to David Glenck)
- Fix bug #110: Document solution for &quot;searching slashes&quot;
- Fix bug #111: Comments in config.php mention *.inc.php files
(José María Mateos [rinze])
- Fix bug: Do not use eregi functions anymore
" />
<property name="zipfile" value="${phing.project.name}-${version}.zip" />
<property name="pkgfile" value="${phing.project.name}-${version}.tgz" />
<property name="distfile" value="dist/${zipfile}" />
<property name="distpkgfile" value="dist/pear/${pkgfile}" />
<property name="sfproject" value="SemanticScuttle" />
<property name="sffilepath" value="s/se/semanticscuttle/" />
<property name="svnpath" value="https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/" />
<fileset id="fs.zip" dir=".">
<include name="data/**"/>
<include name="doc/**"/>
<include name="src/**"/>
<include name="www/**"/>
<include name="scripts/avahi-export.php"/>
<include name="scripts/fix-unfiled-tags.php"/>
<exclude name="**/.gitignore/"/>
<exclude name="**/.svn/"/>
<exclude name="data/config.php"/>
<exclude name="data/config.testing.php"/>
<exclude name="data/config.testing-tmp.php"/>
<exclude name="data/locales/messages.po"/>
<exclude name="data/locales/*/LC_MESSAGES/messages.po"/>
<exclude name="src/php-gettext/examples/" />
<exclude name="src/php-gettext/tests/"/>
</fileset>
<fileset id="fs.doc" dir="doc">
<include name="ChangeLog"/>
<include name="**.txt"/>
<include name="**.rst"/>
<include name="**/*.rst"/>
<exclude name="LICENSE.txt"/>
<exclude name="developers/TODO.rst"/>
<exclude name="allinone.rst"/>
</fileset>
<taskdef name="rST" classname="phing.tasks.ext.rSTTask" />
<taskdef name="d51pearpkg2" classname="phing.tasks.ext.d51PearPkg2Task" />
<property name="version-m" value="0.96" />
<property name="version" value="0.96.1" />
<property name="zipfile" value="${phing.project.name}-${version}.zip" />
<property name="distfile" value="dist/${zipfile}" />
<property name="sfproject" value="SemanticScuttle" />
<property name="sffilepath" value="s/se/semanticscuttle/" />
<property name="svnpath" value="https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/" />
<target name="zip" depends="check"
description="Create zip file for release"
@ -68,265 +25,30 @@
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}/">
<fileset refid="fs.zip"/>
<fileset dir=".">
<include name="data/**"/>
<include name="doc/**"/>
<include name="src/**"/>
<include name="www/**"/>
<exclude name="**/.gitignore/"/>
<exclude name="**/.svn/"/>
<exclude name="data/config.php"/>
<exclude name="data/locales/messages.po"/>
<exclude name="data/locales/*/LC_MESSAGES/messages.po"/>
<exclude name="doc/developers/"/>
<exclude name="src/php-gettext/examples/" />
<exclude name="src/php-gettext/bin/"/>
</fileset>
</zip>
</target>
<target name="package" depends="check"
description="Creates the pear package"
>
<d51pearpkg2 dir="." baseinstalldir="/">
<name>SemanticScuttle</name>
<summary>A social bookmarking tool</summary>
<description>
A social bookmarking tool experimenting with new features
like structured tags or collaborative descriptions of tags.
</description>
<channel>semanticscuttle.sourceforge.net</channel>
<lead user="cweiske" name="Christian Weiske" email="cweiske@cweiske.de" />
<license>GPL</license>
<version release="${version}" api="${version}" />
<stability release="${stability}" api="${stability}" />
<notes>${releasenotes}</notes>
<dependencies>
<php minimum_version="5.2.0" />
<pear minimum_version="1.8.1" />
<package name="HTML_QuickForm2"
channel="pear.php.net"
minimum_version="0.4.0"
/>
<!-- unit tests: -->
<package name="HTML_Request2"
channel="pear.php.net"
minimum_version="2.0.0"
/>
<package name="Stream_Var"
channel="pear.php.net"
minimum_version="1.1.0"
/>
</dependencies>
<!-- map directory (key) to role -->
<dirroles key="www">www</dirroles>
<dirroles key="data">data</dirroles>
<dirroles key="doc">doc</dirroles>
<dirroles key="scripts">doc</dirroles>
<dirroles key="src">php</dirroles>
<dirroles key="tests">test</dirroles>
<!-- do not add the following files to the package.
copied from excludes above -->
<ignore>**/.gitignore</ignore>
<ignore>**/.svn</ignore>
<ignore>build*</ignore>
<ignore>data/config.php</ignore>
<ignore>data/config.testing.php</ignore>
<ignore>data/config.testing-tmp.php</ignore>
<ignore>data/locales/messages.po</ignore>
<ignore>data/locales/*/LC_MESSAGES/messages.po</ignore>
<ignore>dist/**</ignore>
<ignore>src/php-gettext/examples/**</ignore>
<ignore>src/php-gettext/tests/**</ignore>
<ignore>*.properties</ignore>
<ignore>semanticscuttle-dump.sql</ignore>
<ignore>*.tgz</ignore>
<replacement path="src/SemanticScuttle/header.php"
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="src/SemanticScuttle/Config.php"
type="pear-config" from="@data_dir@" to="data_dir"
/>
<replacement path="src/SemanticScuttle/Config.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"
/>
<replacement path="tests/prepare.php"
type="pear-config" from="@data_dir@" to="data_dir"
/>
<changelog version="0.98.5" date="2013-03-20" license="GPL">
- Fix bug #109: preserve privacy setting from Delicious export files
(Thanks to David Glenck)
- Fix bug #110: Document solution for "searching slashes"
- Fix bug #111: Comments in config.php mention *.inc.php files
(José María Mateos [rinze])
- Fix bug: Do not use eregi functions anymore
</changelog>
<changelog version="0.98.4" date="2012-01-21" license="GPL">
- Fix bug #3439729: URLs were escaped too often in bookmark list
- Fix bug: Subtitle was not escaped
- Fix bug #3388219: Incorrect URL when cancelling tag2tag-actions
- Fix bug #3393951: Logo images missing on bookmark page
- Fix bug #3399815: PHP error in opensearch API in 0.98.3
- Fix bug #3407728: Can't delete users from admin page
- Fix bug #3431742: open_basedir problems with /etc/ config files
- Fix bug #3436624: Wrong URL for Delicious API when importing
- Fix bug #3463481: RSS feed show warnings in feedvalidator.org
- Fix bug #3384416: Use URL with protocol in bookmarklet
- Fix bug: Invalid HTML when website thumbnails are activated
- Fix bug #3413459: Thumbnails not in one line
- Fix bug #3468293: Delicious import does not preserve private links
- Fix bug #3396727: Title of http://lesscss.org/ not loaded
- Fix bug #3111254: getIdFromUser() always returns an integer now (part 2)
- Implement request #3403609: fr_CA translation update
- Implement patch #3476011: PostgreSQL tables can not be initialized
(Frédéric Fauberteau [triaxx])
</changelog>
<!-- 0.98.3 was not needed -->
<changelog version="0.98.2" date="2011-08-08" license="GPL">
- Fix bug #3385724: Rename tag ends with XML Parsing Error
- Fix bug #3386178: "system:unfiled" secret tag does not work
- Fix bug #3384416: Update documentation to explain HTTP/HTTPS root problem
- Fix bug #3382126: Linked tags does not work for tags with spaces
- Fix delicious API help page link
</changelog>
<changelog version="0.98.1" date="2011-08-01" license="GPL">
- Fix bug #3375635: XML parsing problem in top.inc.php
- Fix bug #3375428: Forgot to remove some old dojo files
- Fix bug #3160512: Make SemanticScuttle work with FastCGI
- Fix bug #3376618: Broken tag completion for private bookmarks
</changelog>
<changelog version="0.98.0" date="2011-07-21" license="GPL">
- Switch to jQuery and drop dojo
- Implement request #2928950: Private keys for RSS feeds (Mark Pemberton)
- Implement request #3164348: Configurable default privacy (Brett Dee)
- Implement request #1989987: Theming support
- Implement request #3054906: Show user's full name instead of nickname
- Implement patch #3059829: update ``FR_CA`` translation
- Fix bug #3187177: Wrong URL / Export XML Bookmarks
- 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
- Fix bug in ``getTagsForBookmarks()`` that fetched all tags
- Fix privacy issue when fetching tags of several users
- Fix Google custom search XML
- Show error message on mysqli connection errors
- Update php-gettext library to 1.0.10
- ``api/posts/add`` respects the 'replace' parameter now
- Only URLs with an allowed protocol may be added to the database
- Support HTTPS connections when ``$root`` is not configured
- SQL schema version table to ease future database upgrades
- Documentation is written with rST (reStructuredText) now
- Support per-host configuration files
</changelog>
<changelog version="0.97.0" date="2010-06-09" license="GPL">
- Many SQL optimizations - SemanticScuttle shows bookmarks 4 times faster now
- New config option to skip "SET NAMES UTF8" call: $dbneedssetnames
- Do not highlight admin bookmarks when $enableAdminColors is disabled
- Add russian translation
- Make HTML export follow the specifications a bit better
- Fix bug #2953732: faulty error message for duplicate bookmarks
- Fix bug #2960663: do not send content-type headers twice for ajax/api scripts
- Fix bug #2976593: fr_FR locale is vietnamese
</changelog>
<!-- <dirroles key="bin">script</dirroles> -->
<!-- <replacement path="bin/doctrine" type="pear-config" from="@php_bin@" to="php_bin" /> -->
<!-- <release>
<install as="doctrine" name="bin/doctrine" />
-->
</d51pearpkg2>
<!-- time to fix the package.xml file since the task does not
allow everything we need:
- strip the base directory names like src, data and www
- remove that dumb baseinstalldir from files
- md5sums are generated automatically when packaging
-->
<!-- yes, we need to generate a 2nd file and move it back -->
<copy file="package.xml" tofile="package2.xml" overwrite="true">
<filterchain>
<replaceregexp>
<!-- remove md5sums -->
<regexp
pattern="md5sum=&quot;[a-z0-9]{32}&quot; "
replace=""
/>
<!-- remove baseinstalldir for files -->
<regexp
pattern="&lt;file baseinstalldir=&quot;/&quot;"
replace="&lt;file"
/>
<!-- install-as for different directories -->
<regexp
pattern="(&lt;file name=&quot;data/(.+?)&quot;)"
replace="\1 install-as=&quot;\2&quot;"
/>
<regexp
pattern="(&lt;file name=&quot;doc/(.+?)&quot;)"
replace="\1 install-as=&quot;\2&quot;"
/>
<regexp
pattern="(&lt;file name=&quot;tests/(.+?)&quot;)"
replace="\1 install-as=&quot;\2&quot;"
/>
<regexp
pattern="(&lt;file name=&quot;www/(.+?)&quot;)"
replace="\1 install-as=&quot;SemanticScuttle/\2&quot;"
/>
<regexp
pattern="(&lt;file name=&quot;src/(.+?)&quot;)"
replace="\1 install-as=&quot;\2&quot;"
/>
</replaceregexp>
</filterchain>
</copy>
<move file="package2.xml" tofile="package.xml" overwrite="true" />
<!-- package up -->
<exec command="pear package" passthru="true" />
<move file="${pkgfile}" todir="dist/pear/" />
<delete file="package.xml" failonerror="true" />
</target>
<target name="build-docs" description="render documentation">
<rST format="html" uptodate="true"
toolparam="--stylesheet=res/docs/style.css"
>
<fileset refid="fs.doc"/>
<mapper type="regexp" from="^doc/(.+?)(.rst|.txt)?$" to="dist/docs/\1.html"/>
<!--
<filterchain>
<replacetokenswithfile dir="res/docs">
<
</replacetokenswithfile>
</filterchain>
-->
</rST>
</target>
<target name="clean-docs" description="delete rendered documentation files">
<delete dir="dist/docs" includeemptydirs="yes"/>
</target>
<target name="release" depends="check,zip,package,deploy-sf"
<target name="release" depends="check,zip,deploy-sf,svntag"
description="Release the version on sourceforge"
>
<!-- meta-target -->
@ -358,105 +80,16 @@
</target>
<target name="deploy-sf-pear" depends="check,package"
description="Update PEAR channel + website on sourceforge"
<target name="svntag"
description="create the svn tag for the current version"
>
<available file="${websitedir}"
type="dir" property="available.websitedir"
/>
<fail unless="available.websitedir"
message="Website directory not set"
/>
<!--
1. rsync channel data from sourceforge to local, deleting
superfluous channel files. Need to do that so pirum knows
all previous releases when adding the new package
2. update channel with pirum update
3. rsync to sourceforge
-->
<exec
command="rsync --include-from=.rsync-include-files --delete -avP -e ssh ${sfuser},${sfproject}@web.sourceforge.net:htdocs/ ."
dir="${websitedir}"
escape="false" checkreturn="false"
passthru="true"
/>
<exec
command="pirum add ${websitedir} ${distpkgfile}"
passthru="true"
/>
<!-- fix the generated html -->
<!-- yes, we need to generate a 2nd file and move it back -->
<copy file="${websitedir}/index.html" tofile="${websitedir}/pirum.html" overwrite="true">
<filterchain>
<replaceregexp>
<!-- make meta links relative -->
<regexp
pattern="href=&quot;http://semanticscuttle.sourceforge.net/"
replace="href=&quot;"
/>
<!-- add sourceforge logo -->
<regexp
pattern="powered by "
replace="powered by ${html.sflogo} and "
/>
</replaceregexp>
</filterchain>
</copy>
<!-- overwrite pirum generated index with our own -->
<copy file="${websitedir}/our-index.html" tofile="${websitedir}/index.html" overwrite="true" />
<!-- add our custom css -->
<append
destFile="${websitedir}/pirum.css"
file="${websitedir}/pirum-custom.css"
/>
<!-- rsync always returns code 23 on sourceforge releases, so we
can't check return values -->
<exec
command="rsync --include-from=.rsync-include-files -avP -e ssh . ${sfuser},${sfproject}@web.sourceforge.net:htdocs/"
dir="${websitedir}"
escape="false" checkreturn="false"
passthru="true"
command="svn cp ${svnpath}trunk ${svnpath}/tags/${version} -m 'tag version ${version}'"
escape="false" checkreturn="true"
/>
</target>
<target name="deploy-docs" depends="build-docs"
description="sync docs to sourceforge website"
>
<copy todir="${websitedir}/docs">
<fileset dir="dist/docs">
<include name="**"/>
</fileset>
</copy>
<exec
command="rsync -avP -e ssh . ${sfuser},${sfproject}@web.sourceforge.net:htdocs/docs"
dir="${websitedir}/docs"
escape="false" checkreturn="false"
passthru="true"
/>
</target>
<target name="deploy-demo"
description="sync demo to sourceforge website"
>
<exec
command="rsync -avP -e ssh . ${sfuser},${sfproject}@web.sourceforge.net:htdocs/demo"
dir="${websitedir}/demo"
escape="false" checkreturn="false"
passthru="true"
/>
</target>
<target name="check"
description="Check variables"
>
@ -464,8 +97,6 @@
<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" />
</target>
</project>

1
data/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
config.php

View File

@ -14,13 +14,6 @@
* @link http://sourceforge.net/projects/semanticscuttle/
*/
/**
* Array for defaults.
*
* @var array
*/
$defaults = array();
/***************************************************
* HTML output configuration
@ -63,15 +56,6 @@ $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';
/***************************************************
@ -81,15 +65,13 @@ $theme = 'default';
/**
* SemanticScuttle root directory.
*
* Set to NULL to autodetect the root url of the website.
*
* If your installation is in a subdirectory like
* "http://www.example.com/semanticscuttle/" then
* replace NULL by your address (between "" and with trailing '/')
*
* The autodetection works for both HTTP and HTTPS urls.
* If you offer HTTP *only*, then set your root url here.
*
* @var string
*/
$root = null;
@ -156,7 +138,7 @@ $dbtype = 'mysql4';
*
* @var string
*/
$dbhost = '127.0.0.1';
$dbhost = 'localhost';
/**
* Database port.
@ -198,15 +180,6 @@ $dbname = 'scuttle';
*/
$tableprefix = 'sc_';
/*
* If the database needs to be switched to UTF8
* manually or not. If true, a "SET NAMES UTF8" query
* will be sent at the beginning. If you need performance,
* save this query and set it in your mysql server options.
*
* @var boolean
*/
$dbneedssetnames = true;
/***************************************************
@ -253,13 +226,10 @@ $adminsAreAdvisedTagsFromOtherAdmins = false;
*
* @var array
*/
$reservedusers = array('all', 'watchlist');
$reservedusers = array('all', 'watchlist');
/**
* If global private mode is enabled (everything will be blocked for unlogged users).
* @var boolean
*/
$privatemode = false;
/***************************************************
* Anti SPAM measures
@ -348,7 +318,7 @@ $index_sidebar_blocks = array(
* @var string
* @link http://php.net/date
*/
$shortdate = 'Y-m-d';
$shortdate = 'd-m-Y';
/**
* Format of long dates.
@ -483,21 +453,6 @@ $filetypes = array(
'video' => array('avi', 'mov', 'mp4', 'mpeg', 'mpg', 'wmv')
);
/**
* Link protocols that are allowed for newly added bookmarks.
* This prevents i.e. adding javascript: links.
*
* @link http://en.wikipedia.org/wiki/URI_scheme
*
* @var array
*/
$allowedProtocols = array(
'ftp', 'ftps',
'http', 'https',
'mailto', 'nntp',
'xmpp'
);
/**
* Enable the "common bookmark description" functionality
*
@ -529,43 +484,41 @@ $votingMode = 2;
*/
$hideBelowVoting = null;
/**
* Default privacy setting for bookmarks:
* 0 - Public
* 1 - Shared with Watchlist
* 2 - Private
*
* @var integer
*/
$defaults['privacy'] = 0;
/****************************
* Website Thumbnails
*/
/**
* Which thumbnail service type to use.
* Enable bookmark website thumbnails.
*
* Currently supported:
* - null (no screenshots)
* - 'phancap', see http://cweiske.de/phancap.htm
* According to artviper.net license, buy a license if you
* gain profit with your pages.
*
* @var boolean
* @link http://www.websitethumbnail.de/
*/
$enableWebsiteThumbnails = false;
/**
* User ID from websitethumbnail.de
*
* You need to register on
* http://www.artviper.net/registerAPI.php
* in order to use thumbnails on your domain
*
* @var string
* @link http://www.artviper.net/registerAPI.php
*/
$thumbnailsUserId = null;
/**
* API key.
* Sent to you by artviper.net after registration.
*
* @var string
*/
$thumbnailsType = null;
/**
* Configuration for thumbnail service.
*
* Phancap requires an array with the following keys:
* - url: URL to phancap's get.php file
* - token: user name (if access protected)
* - secret: password for the user (if access protected)
*
* @var array
*/
$thumbnailsConfig = array();
$thumbnailsKey = null;
@ -615,13 +568,6 @@ $menu2Tags = array(
'menu2', 'tags', 'configurable', 'in', 'data/config.php'
);
/**
* Tag protected from shoulder surfing.
* This tag, his children and the associated bookmarks won't appear anywhere unless enabled in the UI.
*
* @var string
*/
$shoulderSurfingProtectedTag = 's_hidden';
/****************************
@ -768,24 +714,4 @@ $authDebug = false;
* @var string
*/
$authEmailSuffix = null;
/**
* URL unittests are being run against
* Has to have a trailing slash
*
* @var string
*/
$unittestUrl = null;
/**
* Allow "unittestMode=1" in URLs.
* Should only be enabled on development systems
*
* @var boolean
*/
$allowUnittestMode = false;
?>

View File

@ -2,12 +2,11 @@
/**
* Configuration for SemanticScuttle.
*
* Copy this file to config.php and adjust it.
* Copy this file to config.inc.php and adjust it.
*
* See config.default.php for more options.
* See config.default.inc.php for more options.
*/
/**
* The name of this site.
*
@ -89,7 +88,7 @@ $dbname = 'scuttle';
*
* @var string
*/
$dbhost = '127.0.0.1';
$dbhost = 'localhost';
/***************************************************
@ -117,21 +116,6 @@ $adminemail = 'admin@example.org';
$admin_users = array();
/***************************************************
* Bookmarks
*/
/**
* Default privacy setting for bookmarks.
* 0 - Public
* 1 - Shared with Watchlist
* 2 - Private
*
* @var integer
*/
$defaults['privacy'] = 0;
/**
* You have completed the basic configuration!
* More options can be found in config.default.php.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
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`)
);

View File

@ -1,10 +0,0 @@
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`)
);

View File

@ -1,85 +0,0 @@
/* 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;

View File

@ -1,11 +0,0 @@
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 ;

View File

@ -1 +0,0 @@
ALTER TABLE `sc_bookmarks` ADD `bShort` VARCHAR(16) NULL DEFAULT NULL;

View File

@ -1,19 +0,0 @@
CREATE TABLE `sc_version` (
`schema_version` int(11) NOT NULL
) DEFAULT CHARSET=utf8;
INSERT INTO `sc_version` (`schema_version`) VALUES ('6');
CREATE TABLE `sc_users_sslclientcerts` (
`id` INT NOT NULL AUTO_INCREMENT ,
`uId` INT NOT NULL ,
`sslSerial` VARCHAR( 32 ) NOT NULL ,
`sslClientIssuerDn` VARCHAR( 1024 ) NOT NULL ,
`sslName` VARCHAR( 64 ) NOT NULL ,
`sslEmail` VARCHAR( 64 ) NOT NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE (`id`)
) CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `sc_users` ADD `privateKey` VARCHAR(33) NULL;
CREATE UNIQUE INDEX `privateKey` ON `sc_users` (`privateKey`);

View File

@ -1,259 +0,0 @@
-- Semantic Scuttle - Tables creation SQL script
-- ! Dont forget to change table names according to $tableprefix defined in config.php !
--
-- Table structure for table "sc_bookmarks"
--
CREATE SEQUENCE bIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_bookmarks (
bId integer DEFAULT nextval('bIds'::text) PRIMARY KEY,
uId integer NOT NULL,
bIp varchar(40) DEFAULT NULL,
bStatus smallint NOT NULL,
bDatetime timestamp with time zone DEFAULT now() NOT NULL,
bModified timestamp with time zone DEFAULT now() NOT NULL,
bTitle varchar(255) DEFAULT '' NOT NULL,
bAddress varchar(1500) DEFAULT '' NOT NULL,
bDescription text,
bPrivateNote text,
bHash varchar(32) DEFAULT '' NOT NULL,
bVotes integer NOT NULL,
bVoting integer NOT NULL,
bShort varchar(16) DEFAULT NULL
);
CREATE INDEX sc_bookmarks_usd ON sc_bookmarks (uId, bStatus, bDatetime);
CREATE INDEX sc_bookmarks_hui ON sc_bookmarks (bHash, uId, bId);
CREATE INDEX sc_bookmarks_du ON sc_bookmarks (bDatetime, uId);
--
-- Table structure for table "sc_bookmarks2tags"
--
CREATE SEQUENCE b2tIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_bookmarks2tags (
id integer DEFAULT nextval('b2tIds'::text) PRIMARY KEY,
bId integer NOT NULL,
tag varchar(100) DEFAULT '' NOT NULL
);
CREATE UNIQUE INDEX sc_bookmarks2tags_tag_bId on sc_bookmarks2tags (tag, bId);
CREATE INDEX sc_bookmarks2tags_bId on sc_bookmarks2tags (bId);
--
-- Table structure for table "sc_commondescription"
--
CREATE SEQUENCE cdIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_commondescription (
cdId integer DEFAULT nextval('cdIds'::text) PRIMARY KEY,
uId integer NOT NULL,
tag varchar(100) DEFAULT '' NOT NULL,
bHash varchar(32) DEFAULT '' NOT NULL,
cdTitle varchar(255) DEFAULT '' NOT NULL,
cdDescription text,
cdDatetime timestamp with time zone DEFAULT now() NOT NULL
);
CREATE UNIQUE INDEX sc_commondescription_tag_timestamp on sc_commondescription (tag, cdDatetime);
CREATE UNIQUE INDEX sc_commondescription_bookmark_timestamp on sc_commondescription (bHash, cdDatetime);
--
-- Table structure for table "sc_searchhistory"
--
CREATE SEQUENCE shIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_searchhistory (
shId integer DEFAULT nextval('shIds'::text) PRIMARY KEY,
shTerms varchar(255) NOT NULL DEFAULT '',
shRange varchar(32) NOT NULL DEFAULT '',
shDatetime timestamp with time zone DEFAULT now() NOT NULL,
shNbResults integer NOT NULL,
uId integer NOT NULL
);
--
-- Table structure for table "sc_tags"
--
CREATE SEQUENCE tIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_tags (
tId integer DEFAULT nextval('tIds'::text) PRIMARY KEY,
tag varchar(100) NOT NULL DEFAULT '',
uId integer NOT NULL,
tDescription text
);
CREATE UNIQUE INDEX sc_tags_tag_uId on sc_tags (tag, uId);
--
-- Table structure for table "sc_tags2tags"
--
CREATE SEQUENCE ttIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_tags2tags (
ttId integer DEFAULT nextval('ttIds'::text) PRIMARY KEY,
tag1 varchar(100) NOT NULL DEFAULT '',
tag2 varchar(100) NOT NULL DEFAULT '',
relationType varchar(32) NOT NULL DEFAULT '',
uId integer NOT NULL
);
CREATE UNIQUE INDEX sc_tags2tags_tag1_tag2_uId on sc_tags2tags (tag1, tag2, relationType, uId);
--
-- Table structure for table "sc_tagscache"
--
CREATE SEQUENCE tcIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_tagscache (
tcId integer DEFAULT nextval('tcIds'::text) PRIMARY KEY,
tag1 varchar(100) NOT NULL DEFAULT '',
tag2 varchar(100) NOT NULL DEFAULT '',
relationType varchar(32) NOT NULL DEFAULT '',
uId integer NOT NULL DEFAULT '0'
);
CREATE UNIQUE INDEX sc_tagscache_tag1_tag2_type_uId on sc_tagscache (tag1, tag2, relationType, uId);
--
-- Table structure for table "sc_tagsstats"
--
CREATE SEQUENCE tstIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_tagsstats (
tstId integer DEFAULT nextval('tstIds'::text) PRIMARY KEY,
tag1 varchar(100) NOT NULL DEFAULT '',
relationType varchar(32) NOT NULL DEFAULT '',
uId integer NOT NULL,
nb integer NOT NULL,
depth integer NOT NULL,
nbupdate integer NOT NULL
);
CREATE UNIQUE INDEX sc_tagsstats_tag1_type_uId on sc_tagsstats (tag1, relationType, uId);
--
-- Table structure for table "sc_users"
--
CREATE SEQUENCE uIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_users (
uId integer DEFAULT nextval('uIds'::text) PRIMARY KEY,
username varchar(25) NOT NULL DEFAULT '',
password varchar(40) NOT NULL DEFAULT '',
uDatetime timestamp with time zone DEFAULT now() NOT NULL,
uModified timestamp with time zone DEFAULT now() NOT NULL,
name varchar(50) DEFAULT NULL,
email varchar(50) NOT NULL DEFAULT '',
homepage varchar(255) DEFAULT NULL,
uContent text,
privateKey varchar(33) DEFAULT NULL
);
CREATE UNIQUE INDEX privateKey on sc_users (privateKey);
--
-- Table structure for table "sc_users_sslclientcerts"
--
CREATE SEQUENCE ids
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_users_sslclientcerts (
id integer DEFAULT nextval('ids'::text) PRIMARY KEY,
uId integer NOT NULL,
sslSerial varchar(32) DEFAULT '' NOT NULL,
sslClientIssuerDn varchar(1024) DEFAULT '' NOT NULL,
sslName varchar(64) DEFAULT '' NOT NULL,
sslEmail varchar(64) DEFAULT '' NOT NULL
);
--
-- Table structure for table "sc_version"
--
CREATE TABLE sc_version (
schema_version integer NOT NULL
);
--
-- Table structure for table "sc_votes"
--
CREATE TABLE sc_votes (
bId integer NOT NULL,
uId integer NOT NULL,
vote integer NOT NULL
);
CREATE UNIQUE INDEX bid_2 on sc_votes (bId, uId);
CREATE INDEX bid on sc_votes (bId);
CREATE INDEX uid on sc_votes (uId);
--
-- Table structure for table "sc_watched"
--
CREATE SEQUENCE wIds
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
CREATE TABLE sc_watched (
wId integer DEFAULT nextval('wIds'::text) PRIMARY KEY,
uId integer NOT NULL,
watched integer NOT NULL
);
CREATE INDEX sc_watched_uId on sc_watched (uId);

View File

@ -72,23 +72,11 @@ CREATE TABLE `sc_users` (
`email` varchar(50) NOT NULL default '',
`homepage` varchar(255) default NULL,
`uContent` text,
`privateKey` varchar(33) default NULL,
PRIMARY KEY (`uId`),
UNIQUE KEY `privateKey` (`privateKey`)
PRIMARY KEY (`uId`)
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
-- --------------------------------------------------------
CREATE TABLE `sc_users_sslclientcerts` (
`id` INT NOT NULL AUTO_INCREMENT ,
`uId` INT NOT NULL ,
`sslSerial` VARCHAR( 32 ) NOT NULL ,
`sslClientIssuerDn` VARCHAR( 1024 ) NOT NULL ,
`sslName` VARCHAR( 64 ) NOT NULL ,
`sslEmail` VARCHAR( 64 ) NOT NULL ,
PRIMARY KEY ( `id` )
) CHARACTER SET utf8 COLLATE utf8_general_ci;
--
-- Table structure for table `sc_watched`
--
@ -195,9 +183,3 @@ CREATE TABLE `sc_votes` (
KEY `bid` (`bId`),
KEY `uid` (`uId`)
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
CREATE TABLE `sc_version` (
`schema_version` int(11) NOT NULL
) DEFAULT CHARSET=utf8;
INSERT INTO `sc_version` (`schema_version`) VALUES ('6');

View File

@ -12,12 +12,12 @@ $this->includeTemplate($GLOBALS['top_include']);
<h3><?php echo T_('Geek Stuff'); ?></h3>
<ul>
<li><a href="http://sourceforge.net/projects/semanticscuttle/">Semantic Scuttle</a> <?php echo T_('is licensed under the ');?> <a href="http://www.gnu.org/copyleft/gpl.html"><acronym title="GNU\'s Not Unix">GNU</acronym> General Public License</a> (<?php echo T_('you can freely host it on your own web server.'); ?>)</li>
<li><?php echo sprintf(T_('%1$s supports most of the <a href="http://www.delicious.com/help/api">del.icio.us <abbr title="Application Programming Interface">API</abbr></a>. Almost all of the neat tools made for that system can be modified to work with %1$s instead. 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.'), $GLOBALS['sitename']); ?></li>
<li><?php echo sprintf(T_('%1$s supports most of the <a href="http://del.icio.us/doc/api">del.icio.us <abbr title="Application Programming Interface">API</abbr></a>. Almost all of the neat tools made for that system can be modified to work with %1$s instead. 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.'), $GLOBALS['sitename']); ?></li>
<?php if(!is_null($currentUser) && $currentUser->isAdmin()): ?>
<li>SemanticScuttle v0.98.5</li>
<li>SemanticScuttle v0.96.1</li>
<?php endif ?>
</ul>

View File

@ -11,7 +11,7 @@ foreach($users as $user) {
echo '<div class="link">';
echo '<a href="'.createURL('profile', $user->getUsername()).'">'.$user->getUsername().'</a>';
echo ' - <span title="'. T_('Public/Shared/Private') .'">'. $user->getNbBookmarks('public') .' / '. $user->getNbBookmarks('shared') .' / '. $user->getNbBookmarks('private') .' '. T_('bookmark(s)') .'</span>';
echo ' - <span title='. T_('Public/Shared/Private') .'>'. $user->getNbBookmarks('public') .' / '. $user->getNbBookmarks('shared') .' / '. $user->getNbBookmarks('private') .' '. T_('bookmark(s)') .'</span>';
echo '</div>';
if($user->getUsername() != $currentUser->getUsername()) {

View File

@ -30,8 +30,7 @@ window.onload = function() {
if(strlen($description['cdDatetime'])>0) {
echo T_('Last modification:').' '.$description['cdDatetime'].', ';
$lastUser = $userservice->getUser($description['uId']);
echo '<a href="'.createURL('profile', $lastUser['username']).'">'
. SemanticScuttle_Model_UserArray::getName($lastUser) . '</a>';
echo '<a href="'.createURL('profile', $lastUser['username']).'">'.$lastUser['username'].'</a>';
}
?>
</td>

View File

@ -0,0 +1,18 @@
<?php
/**
* Bookmark thumbnail image
* Shows the website thumbnail for the bookmark.
*
* Expects a $row variable with bookmark data.
*/
if (!$GLOBALS['enableWebsiteThumbnails']) {
return;
}
$thumbnailHash = md5(
$address . $GLOBALS['thumbnailsUserId'] . $GLOBALS['thumbnailsKey']
);
//echo '<a href="'. $address .'"'. $rel .' ><img class="thumbnail" src="http://www.artviper.net/screenshots/screener.php?url='.$address.'&w=120&sdx=1280&userID='.$GLOBALS['thumbnailsUserId'].'&hash='.$thumbnailHash.'" />';
echo '<img class="thumbnail" onclick="window.location.href=\''.$address.'\'" src="http://www.artviper.net/screenshots/screener.php?url='.$address.'&w=120&sdx=1280&userID='.$GLOBALS['thumbnailsUserId'].'&hash='.$thumbnailHash.'" />';
?>

View File

@ -1,30 +1,14 @@
<?php
/**
* Show a list of bookmarks.
*
* SemanticScuttle - your social bookmark manager.
*
* PHP version 5.
*
* @category Bookmarking
* @package SemanticScuttle
* @subcategory Templates
* @author Benjamin Huynh-Kim-Bang <mensonge@users.sourceforge.net>
* @author Christian Weiske <cweiske@cweiske.de>
* @author Eric Dane <ericdane@users.sourceforge.net>
* @license GPL http://www.gnu.org/licenses/gpl.html
* @link http://sourceforge.net/projects/semanticscuttle
*/
/* Service creation: only useful services are created */
$bookmarkservice = SemanticScuttle_Service_Factory::get('Bookmark');
$tagservice = SemanticScuttle_Service_Factory::get('Tag');
$cdservice = SemanticScuttle_Service_Factory::get('CommonDescription');
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
$cdservice =SemanticScuttle_Service_Factory::get('CommonDescription');
$pageName = isset($pageName) ? $pageName : '';
$user = isset($user) ? $user : '';
$currenttag = isset($currenttag) ? $currenttag : '';
$pageName = isset($pageName)?$pageName:"";
$user = isset($user)?$user:"";
$currenttag = isset($currenttag)?$currenttag:"";
$this->includeTemplate($GLOBALS['top_include']);
@ -39,9 +23,7 @@ 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 $theme->resource('images/logo_24.gif'); ?>" width="12px"/>
<?php echo T_('Bookmarks on this page are managed by an admin user.'); ?>
<img src="<?php echo $theme->resource('images/logo_24.gif'); ?>" width="12px"/>
<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"/>
</div>
<?php endif?>
@ -64,16 +46,12 @@ if($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
}
//common tag description edit
if ($userservice->isLoggedOn()) {
if ($currenttag != ''
&& ($GLOBALS['enableCommonTagDescriptionEditedByAll']
|| $currentUser->isAdmin()
)
) {
if($userservice->isLoggedOn()) {
if($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) {
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="' . $theme->resource('images/b_edit.png') . '" /></a>';
} else if (isset($hash)) {
echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
} elseif(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>)';
}
@ -97,7 +75,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="' . $theme->resource('images/b_edit.png') . '" /></a>';
echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
}
}
?></p>
@ -107,7 +85,7 @@ if($userservice->isLoggedOn()) {
}
?>
<?php if (isset($bookmarks) && count($bookmarks) > 0) { ?>
<?php if (count($bookmarks) > 0) { ?>
<script type="text/javascript">
window.onload = playerLoad;
</script>
@ -123,62 +101,54 @@ $votingSort = 'voting_desc';
switch(getSortOrder()) {
case 'date_asc':
$dateArrow = ' ';
$dateArrow = ' &uarr;';
$dateSort = 'date_desc';
break;
case 'title_asc':
$titleArrow = ' ';
$titleArrow = ' &uarr;';
$titleSort = 'title_desc';
break;
case 'title_desc':
$titleArrow = ' ';
$titleArrow = ' &darr;';
$titleSort = 'title_asc';
break;
case 'voting_asc':
$votingArrow = ' ';
$votingArrow = ' &uarr;';
$votingSort = 'voting_desc';
break;
case 'voting_desc':
$votingArrow = ' ';
$votingArrow = ' &darr;';
$votingSort = 'voting_asc';
break;
case 'date_desc':
default:
$dateArrow = ' ';
$dateArrow = ' &darr;';
$dateSort = 'date_asc';
break;
}
?>
<a href="?sort=<?php echo $dateSort ?>"><?php echo T_("Date").$dateArrow; ?></a>
<span>/</span>
<a href="?sort=<?php echo $titleSort ?>"><?php echo T_("Title").$titleArrow; ?></a>
<span>/</span>
<a href="?sort=<?php echo $dateSort ?>"><?php echo T_("Date").$dateArrow; ?></a>
<span>/</span>
<a href="?sort=<?php echo $titleSort ?>"><?php echo T_("Title").$titleArrow; ?></a>
<span>/</span>
<?php if ($GLOBALS['enableVoting']) { ?>
<a href="?sort=<?php echo $votingSort ?>"><?php echo T_("Voting").$votingArrow; ?></a>
<span>/</span>
<a href="?sort=<?php echo $votingSort ?>"><?php echo T_("Voting").$votingArrow; ?></a>
<span>/</span>
<?php } ?>
<?php
if ($userservice->isLoggedOn() && $_SERVER['PHP_SELF'] !== "/index.php") {
echo '<form method="get" action="'. $_SERVER['REQUEST_URI'] .'">';
echo '<input type="hidden" name="batch" value="1"/>';
echo '<input type="submit" value="Batch tagging"/>';
echo "</form>";
}
?>
<?php
if ($currenttag!= '') {
if ($user!= '') {
if($currenttag!= '') {
if($user!= '') {
echo ' - ';
echo '<a href="'. createURL('tags', $currenttag) .'">';
echo T_('Bookmarks from other users for this tag').'</a>';
//echo T_(' for these tags');
} else if ($userservice->isLoggedOn()){
} else if($userservice->isLoggedOn()){
echo ' - ';
echo '<a href="'. createURL('bookmarks', $currentUser->getUsername().'/'.$currenttag) .'">';
echo T_('Only your bookmarks for this tag').'</a>';
@ -186,6 +156,7 @@ if ($currenttag!= '') {
}
}
?></p>
<?php
// PAGINATION
@ -228,13 +199,7 @@ if ($currenttag!= '') {
$brss = '';
$size = count($rsschannels);
for ($i = 0; $i < $size; $i++) {
$brss = '<a style="background:#FFFFFF"'
. ' href="'. htmlspecialchars($rsschannels[$i][1]) . '"'
. ' title="' . htmlspecialchars($rsschannels[$i][0]) . '">'
. '<img src="' . $theme->resource('images/rss.gif') . '"'
. ' width="16" height="16"'
. ' alt="' . htmlspecialchars($rsschannels[$i][0]) .'"/>'
. '</a>';
$brss = '<a style="background:#FFFFFF" href="'. $rsschannels[$i][1] .'" title="'. $rsschannels[$i][0] .'"><img src="'. ROOT .'images/rss.gif" width="16" height="16" alt="'. $rsschannels[$i][0] .'" /></a>';
}
$pagesBanner = '<p class="paging">'. $bfirst .'<span> / </span>'. $bprev .'<span> / </span>'. $bnext .'<span> / </span>'. $blast .'<span> / </span>'. sprintf(T_('Page %d of %d'), $page, $totalpages) ." ". $brss ." </p>\n";
@ -248,28 +213,12 @@ if ($currenttag!= '') {
<ol<?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?> id="bookmarks">
<?php
$addresses = array();
foreach ($bookmarks as $key => &$row) {
$addresses[$row['bId']] = $row['bAddress'];
}
$otherCounts = $bookmarkservice->countOthers($addresses);
if ($userservice->isLoggedOn()) {
$existence = $bookmarkservice->bookmarksExist(
$addresses, $currentUser->getId()
);
}
<ol <?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?>
id="bookmarks">
if ($userservice->isLoggedOn()) {
$watchedNames = $userservice->getWatchNames(
$currentUser->getId(), true
);
} else {
$watchedNames = null;
}
foreach ($bookmarks as $key => &$row) {
<?php
foreach(array_keys($bookmarks) as $key) {
$row =& $bookmarks[$key];
switch ($row['bStatus']) {
case 0:
$access = '';
@ -285,53 +234,38 @@ if ($currenttag!= '') {
$cats = '';
$tagsForCopy = '';
$tags = $row['tags'];
foreach ($tags as $tkey => &$tag) {
$tagcaturl = sprintf(
$cat_url,
filter($row['username'], 'url'),
filter($tag, 'url')
);
$cats .= sprintf(
'<a href="%s" rel="tag">%s</a>, ',
$tagcaturl, filter($tag)
);
$tagsForCopy .= $tag . ',';
foreach(array_keys($tags) as $key) {
$tag =& $tags[$key];
$cats .= '<a href="'. sprintf($cat_url, filter($row['username'], 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>, ';
$tagsForCopy.= $tag.',';
}
$cats = substr($cats, 0, -2);
if ($cats != '') {
$cats = T_('Tags:') . ' ' . $cats;
$cats = ' '.T_('Tags:').' '. $cats;
}
// Edit and delete links
$edit = '';
if ($bookmarkservice->editAllowed($row)) {
$edit = ' - <a href="' . createURL('edit', $row['bId']) . '">'
. T_('Edit')
. '</a>'
. ' <a href="#" onclick="deleteBookmark(this, '. $row['bId'] .'); return false;">'
. T_('Delete')
.'</a>';
$edit = ' - <a href="'. createURL('edit', $row['bId']) .'">'. T_('Edit') .'</a><script type="text/javascript">document.write(" - <a href=\"#\" onclick=\"deleteBookmark(this, '. $row['bId'] .'); return false;\">'. T_('Delete') .'<\/a>");</script>';
}
// Last update
$update = ' <small title="'. T_('Last update') .'">('. date($GLOBALS['shortdate'], strtotime($row['bModified'])). ') </small>';
$update = ' <small title="'. T_('Last update') .'">('. date($GLOBALS['shortdate'], strtotime($row['bModified'])). ') </small>';
// User attribution
$copy = ' ' . T_('by') . ' ';
if ($userservice->isLoggedOn()
&& $currentUser->getUsername() == $row['username']
) {
$copy .= T_('you');
$copy = ' '. T_('by'). ' ';
if($userservice->isLoggedOn() && $currentUser->getUsername() == $row['username']) {
$copy.= T_('you');
} else {
$copy .= '<a href="' . createURL('bookmarks', $row['username']) . '">'
. SemanticScuttle_Model_UserArray::getName($row)
. '</a>';
$copy.= '<a href="'. createURL('bookmarks', $row['username']) .'">'. $row['username'] .'</a>';
}
// others
// Udders!
if (!isset($hash)) {
$others = $otherCounts[$row['bAddress']];
$ostart = '<a href="' . createURL('history', $row['bHash']) . '">';
$others = $bookmarkservice->countOthers($row['bAddress']);
$ostart = '<a href="'. createURL('history', $row['bHash']) .'">';
$oend = '</a>';
switch ($others) {
case 0:
@ -347,13 +281,10 @@ if ($currenttag!= '') {
// Copy link
if ($userservice->isLoggedOn()
&& ($currentUser->getId() != $row['uId'])
&& !$existence[$row['bAddress']]
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())
) {
$copy .= ' - <a href="'
. createURL(
'bookmarks',
$currentUser->getUsername()
. '?action=add&amp;copyOf=' . $row['bId'])
. createURL('bookmarks', $currentUser->getUsername() .'?action=add&amp;copyOf='. $row['bId'])
. '" title="'.T_('Copy this bookmark to YOUR bookmarks.').'">'
. T_('Copy')
. '</a>';
@ -365,7 +296,7 @@ if ($currenttag!= '') {
$rel = ' rel="nofollow"';
}
$address = $row['bAddress'];
$address = filter($row['bAddress']);
$oaddress = $address;
// Redirection option
if ($GLOBALS['useredir']) {
@ -373,26 +304,16 @@ if ($currenttag!= '') {
}
// Admin specific design
if ($userservice->isAdmin($row['username'])
&& $GLOBALS['enableAdminColors']
) {
$adminBgClass = ' class="adminBackground"';
$adminStar = ' <img'
. ' src="' . $theme->resource('images/logo_24.gif') . '"'
. ' width="12px"'
. ' title="' . T_('This bookmark is certified by an admin user.') . '"'
. '/>';
if($userservice->isAdmin($row['uId'])) {
$adminBgClass = 'class="adminBackground"';
$adminStar = ' <img src="'. ROOT .'images/logo_24.gif" width="12px" title="'. T_('This bookmark is certified by an admin user.') .'" />';
} else {
$adminBgClass = '';
$adminStar = '';
$adminStar = '';
}
// Private Note (just visible by the owner and his/her contacts)
if ($watchedNames !== null
&& ($currentUser->getId() == $row['uId']
|| in_array($row['username'], $watchedNames)
)
) {
if($userservice->isLoggedOn() && ($currentUser->getId() == $row['uId'] || in_array($row['username'], $userservice->getWatchNames($currentUser->getId(), true)))) {
$privateNoteField = $row['bPrivateNote'];
} else {
$privateNoteField = '';
@ -405,16 +326,13 @@ if ($currenttag!= '') {
}
// Output
echo ' <li class="xfolkentry'. $access .'">'."\n";
echo '<li class="xfolkentry'. $access .'" >'."\n";
include 'bookmarks-thumbnail.inc.tpl.php';
include 'bookmarks-vote.inc.tpl.php';
echo ' <div' . $adminBgClass . '>' . "\n";
echo '<div '.$adminBgClass.' >';;
echo ' <div class="link">'
. '<a href="'. htmlspecialchars($address) .'"'. $rel .' class="taggedlink">'
. filter($row['bTitle'])
. '</a>' . $adminStar . "</div>\n";
echo '<div class="link"><a href="'. $address .'"'. $rel .' class="taggedlink" target="_blank">'. filter($row['bTitle']) ."</a>" . $adminStar . "</div>\n";
if ($row['bDescription'] == '') {
$bkDescription = $GLOBALS['blankDescription'];
} else {
@ -424,23 +342,17 @@ if ($currenttag!= '') {
$bkDescription = preg_replace('@((http|https|ftp)://.*?)( |\r|$)@', '<a href="$1" rel="nofollow">$1</a>$3', $bkDescription); // make url clickable
}
echo ' <div class="description">'. nl2br($bkDescription) ."</div>\n";
echo ' <div class="address">' . htmlspecialchars(shortenString($oaddress)) . "</div>\n";
echo '<div class="description">'. nl2br($bkDescription) ."</div>\n";
//if(!isset($hash)) {
echo '<div class="address">' . shortenString($oaddress) . '</div>';
//}
echo ' <div class="meta">'
. $cats . "\n"
. $copy . "\n"
. $edit . "\n"
. $update . "\n"
. " </div>\n";
echo $privateNoteField != ''
? ' <div class="privateNote" title="'. T_('Private Note on this bookmark') .'">'.$privateNoteField."</div>\n"
: '';
echo ' ';
echo '<div class="meta">'. $cats . $copy . $edit . $update ."</div>\n";
echo $privateNoteField!=''?'<div class="privateNote" title="'. T_('Private Note on this bookmark') .'">'.$privateNoteField."</div>\n":'';
include 'bookmarks-vote-horizontal.inc.tpl.php';
echo " </div>\n";
echo '</div>';
echo " </li>\n";
echo "</li>\n";
}
?>

View File

@ -6,6 +6,11 @@ echo '<a href="'.createURL('about').'">'.T_('About').'</a>';
echo ' - ';
echo T_("Propulsed by ");
echo " <a href=\"https://sourceforge.net/projects/semanticscuttle/\">SemanticScuttle</a>";
if($GLOBALS['enableWebsiteThumbnails']) {
// Licence to the thumbnails provider (OBLIGATORY IF YOU USE ARTVIPER SERVICE)
echo ' (Thumbnails by <script type="text/ecmascript" src="http://www.artviper.net/link.js"></script>)';
}
?>
</div>

View File

@ -1,152 +0,0 @@
<h3><?php echo T_('Bookmarklet'); ?></h3>
<p id="bookmarklet"></p>
<script type="text/javascript">
//<![CDATA[
var browser = navigator.appName;
jQuery(function($) {
if (browser == "Opera") {
$('#bookmarklet').append(
<?php echo json_encode(
sprintf(
T_("Click one of the following bookmarklets to add a button you can click whenever you want to add the page you are on to %s") . ':',
$GLOBALS['sitename']
)
); ?>
);
} else {
$('#bookmarklet').append(
<?php echo json_encode(
sprintf(
T_("Drag one of the following bookmarklets to your browser's bookmarks and click it whenever you want to add the page you are on to %s") . ':',
$GLOBALS['sitename']
)
);
?>
);
}
});
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
var selection = '';
if (window.getSelection) {
selection = 'window.getSelection()';
} else if (document.getSelection) {
selection = 'document.getSelection()';
} else if (document.selection) {
selection = 'document.selection.createRange().text';
}
if (browser == "Opera") {
$('#bookmarklet').append(
'<ul>'
+ '<li>'
+ '<a class="bookmarklet" href="'
+ '<?php
$popupLink = 'javascript:'
. "location.href='"
. addProtocolToUrl(createURL('bookmarks', $GLOBALS['user']))
. '?action=add'
. "&address='+encodeURIComponent(document.location.href)+'"
. "&title='+encodeURIComponent(document.title)+'"
. "&description='+encodeURIComponent(SELECTION)"
. ";";
$link = 'opera:/button/'
//Opera command
. 'Go to page'
//command parameter 1
. ',"' . rawurlencode($popupLink) . '"'
//command parameter 2
. ','
//button title
. ',"Post to ' . fixOperaButtonName($GLOBALS['sitename']) . '"'
//button icon name
. ',"Scuttle"';
echo jsEscTitle(htmlspecialchars($link));
?>'.replace('SELECTION', selection)
+ '"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?></a>'
+ '</li>'
+ '<li>'
+ '<a class="bookmarklet" href="'
+ '<?php
$popupLink = 'javascript:'
. 'open('
. "'" . addProtocolToUrl(createURL('bookmarks', $GLOBALS['user']))
. '?action=add'
. '&popup=1'
. "&address='+encodeURIComponent(document.location.href)+'"
. "&title='+encodeURIComponent(document.title)+'"
. "&description='+encodeURIComponent(SELECTION)"
. ","
. "'" . htmlspecialchars(jsEscTitle($GLOBALS['sitename'])) . "',"
. "'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465"
. ",left='+(screen.width-790)/2+',top='+(screen.height-425)/2"
. ");void 0";
$link = 'opera:/button/'
. 'Go to page'
. ',"' . rawurlencode($popupLink) . '"'
. ','
. ',"Post to ' . fixOperaButtonName($GLOBALS['sitename']) . ' (Pop-up)"'
. ',"Scuttle"';
echo jsEscTitle(htmlspecialchars($link));
?>'.replace('SELECTION', selection)
+ '"><?php echo jsEscTitle(sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename'])); ?></a>'
+ '</li>'
+ '</ul>'
);
} else {
$('#bookmarklet').append(
'<ul>'
+ '<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?>?action=add&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d;void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>'
+ '<li>'
+ '<a class="bookmarklet" href="'
+ 'javascript:x=document;'
+ 'a=encodeURIComponent(x.location.href);'
+ 't=encodeURIComponent(x.title);'
+ 'd=encodeURIComponent('+selection+');'
+ 'open('
+ '\'<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?>?action=add&amp;popup=1&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d,\'<?php echo htmlspecialchars(jsEscTitleDouble($GLOBALS['sitename'])); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2'
+ ');void 0;">'
+ '<?php echo jsEscTitle(sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename'])); ?>'
+ '</a>'
+ '</li>'
+ '</ul>'
);
}
//]]>
</script>
<script type="text/javascript">
function activateSocialApi(node) {
var baseurl = <?php echo json_encode(addProtocolToUrl(createURL())); ?>;
var socialApiData = {
// currently required
"name": <?php echo json_encode($GLOBALS['sitename']); ?>,
"iconURL": baseurl + "themes/default/images/logo.png",
"icon32URL": baseurl + "themes/default/images/logo.png",
"icon64URL": baseurl + "themes/default/images/logo.png",
"markURL": "<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?>?action=add&amp;popup=1&amp;width=800&amp;height=470&amp;address=%{url}&amp;title=%{title}&amp;description=%{description}%{text}",
"markedIcon": baseurl + "themes/default/images/logo.png",
"unmarkedIcon": baseurl + "themes/default/images/logo-empty.png",
// should be available for display purposes
"description": "Self-hosted bookmark manager",
"author": "Christian Weiske",
"homepageURL": "http://semanticscuttle.sf.net/",
// optional
"version": "0.0.3"
};
var event = new CustomEvent("ActivateSocialFeature");
node.setAttribute("data-service", JSON.stringify(socialApiData));
node.dispatchEvent(event);
}
</script>
<p>
<button onclick="activateSocialApi(this)" title="activate semanticscuttle in firefox">
Add SemanticScuttle to Firefox
</button>
</p>

View File

@ -1,18 +0,0 @@
<?php
/**
* Bookmark thumbnail image
* Shows the website thumbnail for the bookmark.
*
* Expects a $row variable with bookmark data.
*/
$thumbnailer = SemanticScuttle_Service_Factory::get('Thumbnails')->getThumbnailer();
$imgUrl = $thumbnailer->getThumbnailUrl($address, 120, 90);
if ($imgUrl !== false) {
echo '<a href="' . htmlspecialchars($address) . '">'
. '<img class="thumbnail" width="120" height="90" src="'
. htmlspecialchars($imgUrl).
'" />'
. '</a>';
}
?>

View File

@ -1,281 +0,0 @@
<?php
$this->includeTemplate($GLOBALS['top_include']);
$accessPublic = '';
$accessShared = '';
$accessPrivate = '';
switch ($row['bStatus']) {
case 0 :
$accessPublic = ' selected="selected"';
break;
case 1 :
$accessShared = ' selected="selected"';
break;
case 2 :
$accessPrivate = ' selected="selected"';
break;
}
function jsEscTitle($title)
{
return addcslashes($title, "'");
}
function jsEscTitleDouble($title)
{
return addcslashes(addcslashes($title, "'"), "'\\");
}
function fixOperaButtonName($name) {
//yes, opera has problems with double quotes in button names
return str_replace('"', "''", $name);
}
if (is_array($row['tags'])) {
$row['tags'] = implode(', ', $row['tags']);
}
if (! is_array($row['bAddress'])) {
$row['bAddress'] = array($row['bAddress']);
}
if (! is_array($row['bTitle'])) {
$row['bTitle'] = array($row['bTitle']);
}
$ajaxUrl = ROOT . 'ajax/'
. (
($GLOBALS['adminsAreAdvisedTagsFromOtherAdmins'] && $currentUser->isAdmin())
? 'getadmintags'
: 'getcontacttags'
) . '.php';
?>
<form onsubmit="var ind = 0; var cb = document.getElementById('checkbox'+ind); while (cb !== null) {var title = document.getElementById('titleField'+ind); var address = document.getElementById('address'+ind); if(cb.checked) {cb.parentNode.removeChild(cb);} else {cb.parentNode.removeChild(cb); title.parentNode.removeChild(title); address.parentNode.removeChild(address);} ind++; cb = document.getElementById('checkbox'+ind);}" action="<?php echo $formaction; ?>" method="post">
<table>
<tr>
<th align="left">
<?php echo T_('Description'); ?>
<a onclick="var nz = document.getElementById('privateNoteZone'); nz.style.display='';this.style.display='none';"><?php echo T_("Add Note"); ?></a>
</th>
<td><textarea name="description" id="description" rows="5" cols="63" ><?php echo filter($row['bDescription'], 'xml'); ?></textarea></td>
<td> <?php echo T_('You can use anchors to delimite attributes. for example: [publisher]blah[/publisher] '); ?>
<?php if(count($GLOBALS['descriptionAnchors'])>0): ?>
<br /><br />
<?php echo T_('Suggested anchors: '); ?>
<?php foreach($GLOBALS['descriptionAnchors'] as $anchorName => $anchorValue): ?>
<?php if(is_numeric($anchorName)) {
$anchorName = $anchorValue;
$anchorValue = '['.$anchorValue.']'.'[/'.$anchorValue.']';
} ?>
<span class="anchor" title="<?php echo $anchorValue ?>" onclick="addAnchor('<?php echo $anchorValue ?>', 'description')"><?php echo $anchorName ?></span>
<?php endforeach; ?>
<?php endif; ?>
</td>
</tr>
<tr id="privateNoteZone" <?php if(strlen($row['bPrivateNote'])==0):?>style="display:none"<?php endif; ?>>
<th align="left"><?php echo T_('Private Note'); ?></th>
<td><textarea name="privateNote" id="privateNote" rows="1" cols="63" ><?php echo filter($row['bPrivateNote'], 'xml'); ?></textarea></td>
<td> <?php echo T_('Just visible by you and your contacts.'); ?>
</td>
</tr>
<?php if(! isset($batch)): ?>
<tr>
<th align="left"><?php echo T_('Tags'); ?></th>
<td class="scuttletheme">
<input type="text" id="tags" class="tags" name="tags" size="75" value="<?php echo filter($row['tags'], 'xml'); ?>"/>
</td>
<td> <?php echo T_('Comma-separated'); ?></td>
</tr>
<?php else: ?>
<tr>
<th align="left"><?php echo 'Common tags'; ?></th>
<td class="scuttletheme">
<span><?php echo filter($commontags, 'xml'); ?></span>
</td>
<td> <?php echo 'Tags common to all those bookmarks'; ?></td>
</tr>
<tr>
<th align="left"><?php echo 'Associated tags'; ?></th>
<td class="scuttletheme">
<span><?php echo filter($alltags, 'xml'); ?></span>
</td>
<td> <?php echo 'All tags associated to those bookmarks'; ?></td>
</tr>
<tr>
<th align="left"><?php echo 'Add those tags'; ?></th>
<td class="scuttletheme">
<input type="text" id="tags" class="tags" name="tags" size="75" value="<?php echo filter($row['tags'], 'xml'); ?>"/>
</td>
<td> <?php echo T_('Comma-separated'); ?></td>
</tr>
<tr>
<th align="left"><?php echo 'Remove those tags'; ?></th>
<td class="scuttletheme">
<input type="text" id="removetags" class="tags" name="removetags" size="75" value="<?php echo filter($row['tags'], 'xml'); ?>"/>
</td>
<td> <?php echo T_('Comma-separated'); ?></td>
</tr>
<?php endif; ?>
<tr>
<th></th>
<td align="right"><small><?php echo htmlspecialchars(T_('Note: use ">" to include one tag in another. e.g.: europe>france>paris'))?></small></td>
</tr>
<tr>
<th></th>
<td align="right"><small><?php echo T_('Note: use "=" to make synonym two tags. e.g.: france=frenchcountry')?></small></td>
</tr>
<tr>
<th align="left"><?php echo T_('Privacy'); ?></th>
<td>
<select name="status">
<option value="0"<?php echo $accessPublic ?>><?php echo T_('Public'); ?></option>
<option value="1"<?php echo $accessShared ?>><?php echo T_('Shared with Watch List'); ?></option>
<option value="2"<?php echo $accessPrivate ?>><?php echo T_('Private'); ?></option>
</select>
</td>
<td></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" name="submitted" value="<?php echo $btnsubmit; ?>" />
<input type="button" name="cancel" value="<?php echo T_('Cancel') ?>" onclick="<?php echo $popup?'window.close();':'javascript: history.go(-1)'; ?>" />
<?php
if (isset($showdelete) && $showdelete) {
?>
<input type="submit" name="delete" value="<?php echo T_('Delete Bookmark'); ?>" />
<?php
}
?>
<button type="button" id="button" title="Invert selection" onclick="var ind = 0; var cb = document.getElementById('checkbox'+ind); while (cb !== null) {var title = document.getElementById('titleField'+ind); var address = document.getElementById('address'+ind); if(cb.checked) {cb.checked=false;} else {cb.checked=true;} ind++; cb = document.getElementById('checkbox'+ind);}">Invert selection</button>
<?php
if (isset($showdelete) && $showdelete) {
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $row['bHash']).'">';
echo T_('edit common description').'</a>)';
}
if ($popup) {
?>
<input type="hidden" name="popup" value="1" />
<?php
} elseif (isset($referrer)) {
?>
<input type="hidden" name="referrer" value="<?php echo filter($referrer, 'xml'); ?>" />
<?php
}
?>
</td>
<td></td>
</tr>
<?php
$ind = 0;
foreach($row['bAddress'] as $index => $address) {
?>
<tr>
<td height="20px"></td>
<td><input type="checkbox" id="checkbox<?php echo $ind; ?>" checked="checked" /></td>
<td></td>
</tr>
<tr>
<th align="left"><?php echo T_('Address'); ?></th>
<td><input type="text" id="address<?php echo $ind; ?>" name="address[<?php echo $index; ?>]" size="75" maxlength="65535" value="<?php echo filter($address, 'xml'); ?>" onblur="useAddress(this)" /></td>
<td> <?php echo T_('Required'); ?></td>
</tr>
<tr>
<th align="left"><?php echo T_('Title'); ?></th>
<td><input type="text" id="titleField<?php echo $ind; ?>" name="title[<?php echo $index; ?>]" size="75" maxlength="255" value="<?php echo filter($row['bTitle'][$index], 'xml'); ?>" onkeypress="this.style.backgroundImage = 'none';" /></td>
<td> <?php echo T_('Required'); ?></td>
</tr>
<tr>
<td height="20px"></td>
<td></td>
<td></td>
</tr>
<?php
$ind++;
}
?>
</table>
</form>
<link href="<?php echo ROOT ?>js/jquery-ui-1.8.11/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<?php echo ROOT ?>js/jquery-ui-1.8.11/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?php echo ROOT ?>js/jquery-ui-1.8.11/jquery.ui.widget.js"></script>
<script type="text/javascript" src="<?php echo ROOT ?>js/jquery-ui-1.8.11/jquery.ui.position.js"></script>
<script type="text/javascript" src="<?php echo ROOT ?>js/jquery-ui-1.8.11/jquery.ui.autocomplete.js"></script>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function() {
function split(val)
{
return val.split(/[,=><]\s*/);
}
function extractLast(term)
{
return split(term).pop();
}
//var availableTags = ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"];
//jQuery("input#tags").autocomplete({
jQuery("input.tags").autocomplete({
autoFocus: true,
minLength: 1,
source: function(request, response) {
// delegate back to autocomplete, but extract the last term
var term = extractLast(request.term);
if (term.length < this.options.minLength) {
return;
}
response(
/*
$.ui.autocomplete.filter(
availableTags, extractLast(request.term)
)
*/
$.getJSON(
"<?php echo $ajaxUrl; ?>",
{ beginsWith: term },
response
)
);
},
focus: function() {
// prevent value inserted on focus
return false;
},
select: function(event, ui) {
var terms = split(this.value);
// remove the current input
terms.pop();
// add the selected item
terms.push(ui.item.value);
// add placeholder to get the comma-and-space at the end
terms.push("");
this.value = terms.join(", ");
return false;
}
});
});
//]]>
</script>
<?php
// Dynamic tag selection
$this->includeTemplate('dynamictags.inc');
// Bookmarklets and import links
if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) {
$this->includeTemplate('bookmarklet.inc.php');
?>
<h3><?php echo T_('Import'); ?></h3>
<ul>
<li><a href="<?php echo createURL('importNetscape'); ?>"><?php echo T_('Import bookmarks from bookmark file'); ?></a> (<?php echo T_('Internet Explorer, Mozilla Firefox and Netscape'); ?>)</li>
<li><a href="<?php echo createURL('import'); ?>"><?php echo T_('Import bookmarks from del.icio.us'); ?></a></li>
</ul>
<?php
}
$this->includeTemplate($GLOBALS['bottom_include']);
?>

View File

@ -1,60 +0,0 @@
<?php
/**
* User's own profile page: SSL client certificate settings
*
* @param array $sslClientCerts Array of SSL client certificate objects
* @param string $formaction URL where to send the forms to
* @param SemanticScuttle_Model_User_SslClientCert
* $currentCert Current SSL client certificate (may be null)
*/
?>
<h3><?php echo T_('SSL client certificates'); ?></h3>
<?php if (count($sslClientCerts)) { ?>
<table>
<thead>
<tr>
<th>Options</th>
<th><?php echo T_('Serial'); ?></th>
<th><?php echo T_('Name'); ?></th>
<th><?php echo T_('Email'); ?></th>
<th><?php echo T_('Issuer'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach($sslClientCerts as $cert) { ?>
<tr <?php if ($cert->isCurrent()) { echo 'class="ssl-current"'; } ?>>
<td>
<form method="post" action="<?php echo $formaction; ?>">
<input type="hidden" name="certId" value="<?php echo $cert->id; ?>"/>
<button type="submit" name="action" value="deleteClientCert">
<?php echo T_('delete'); ?>
</button>
</form>
</td>
<td><?php echo htmlspecialchars($cert->sslSerial); ?></td>
<td><?php echo htmlspecialchars($cert->sslName); ?></td>
<td><?php echo htmlspecialchars($cert->sslEmail); ?></td>
<td><?php echo htmlspecialchars($cert->sslClientIssuerDn); ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<?php } else { ?>
<p><?php echo T_('No certificates registered'); ?></p>
<?php } ?>
<?php if ($currentCert) { ?>
<?php if ($currentCert->isRegistered($sslClientCerts)) { ?>
<p><?php echo T_('Your current certificate is already registered with your account.'); ?></p>
<?php } else { ?>
<p>
<form method="post" action="<?php echo $formaction; ?>">
<button type="submit" name="action" value="registerCurrentCert">
<?php echo T_('Register current certificate to automatically login.'); ?>
</button>
</form>
</p>
<?php } ?>
<?php } else { ?>
<p><?php echo T_('Your browser does not provide a certificate.'); ?></p>
<?php } ?>

View File

@ -1,66 +0,0 @@
<?php
/*
* Used in:
* - populartags.php
* - bookmarks.php
* - alltags.php
* - tags.php
*/
/* Service creation: only useful services are created */
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
require_once('sidebar.linkedtags.inc.php');
/* Manage input */
$user = isset($user)?$user:'';
$userid = isset($userid)?$userid:0;
$currenttag = isset($currenttag) ? str_replace('+', ',', $currenttag) : '';
//$summarizeLinkedTags = isset($summarizeLinkedTags)?$summarizeLinkedTags:false;
$logged_on_userid = $userservice->getCurrentUserId();
$editingMode = $logged_on_userid !== false;
?>
<h2><?php echo T_('Linked Tags'); ?></h2>
<div id="related">
<?php
if ($editingMode) {
echo '<p style="margin-bottom: 13px;text-align:center;">';
echo ' (<a href="'. createURL('tag2tagadd','') .'" rel="tag">'.T_('Add new link').'</a>) ';
echo ' (<a href="'. createURL('tag2tagdelete','') .'" rel="tag">'.T_('Delete link').'</a>)';
echo '</p>';
}
?>
<div id="related-content"></div>
<script type="text/javascript">//<![CDATA[
jQuery("#related-content")
.jstree({
"themes" : {
"theme": "default",
"dots": false,
"icons": true,
"url": '<?php echo ROOT_JS ?>themes/default/style.css'
},
"json_data" : {
"ajax" : {
"url": function(node) {
//-1 is root
parentparam = "";
if (node == -1 ) {
node = <?php echo json_encode($currenttag); ?>;
parentparam = "&parent=true";
} else if (node.attr('rel')) {
node = node.attr('rel');
} else {
return;
}
return "<?php echo ROOT ?>ajax/getlinkedtags.php?tag=" + node
+ parentparam;
}
}
},
plugins : [ "themes", "json_data"]
});
//]]>
</script>
</div>

View File

@ -1,71 +0,0 @@
<?php
require_once('sidebar.linkedtags.inc.php');
/* Manage input */
$userid = isset($userid)?$userid:0;
$user = isset($user)?$user:null;
$logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) {
$logged_on_userid = NULL;
}
$cat_url = createURL('tags', '%s');
$menu2Tags = $GLOBALS['menu2Tags'];
if (count($menu2Tags) > 0) {
?>
<h2><?php echo T_('Featured Menu Tags');?></h2>
<div id="maintagsmenu"
<?php echo 'title="'.T_('This menu is composed of keywords (tags) organized by admins.').'"'?>>
<ul>
<?php
//this is unneeded and replaced by the ajax tree anyway. we keep it for
// non-js browsers
foreach ($menu2Tags as $menu2Tag) {
echo ' <li>'
. sprintf(
'<a href="%s">%s</a>',
sprintf($cat_url, $menu2Tag),
$menu2Tag
)
. '</li>' . "\n";
}
?>
</ul>
</div>
<script type="text/javascript">
jQuery("#maintagsmenu")
.jstree({
"themes" : {
"theme": "default",
"dots": false,
"icons": true,
"url": '<?php echo ROOT_JS ?>themes/default/style.css'
},
"json_data" : {
"ajax" : {
"url": function(node) {
//-1 is root
if (node == -1 ) {
node = "";
} else if (node.attr('rel')) {
node = node.attr('rel');
} else {
return;
}
return "<?php echo ROOT ?>ajax/getadminlinkedtags.php?tag=" + node;
}
}
},
plugins : [ "themes", "json_data"]
});
</script>
<?php
}
?>

View File

@ -1,51 +0,0 @@
<?php
/**
* Show a list of the last searches.
*
* SemanticScuttle - your social bookmark manager.
*
* PHP version 5.
*
* @category Bookmarking
* @package SemanticScuttle
* @subcategory Templates
* @author Benjamin Huynh-Kim-Bang <mensonge@users.sourceforge.net>
* @author Christian Weiske <cweiske@cweiske.de>
* @author Eric Dane <ericdane@users.sourceforge.net>
* @license GPL http://www.gnu.org/licenses/gpl.html
* @link http://sourceforge.net/projects/semanticscuttle
*/
/* Service creation: only useful services are created */
$searchhistoryservice = SemanticScuttle_Service_Factory::get('SearchHistory');
$lastSearches = $searchhistoryservice->getAllSearches(
'all', NULL, 3, NULL, true, false
);
if ($lastSearches && count($lastSearches) > 0) {
?>
<h2><?php echo T_('Last Searches'); ?></h2>
<div id="searches">
<table>
<?php
foreach ($lastSearches as $row) {
echo ' <tr><td>';
echo '<a href="'
. htmlspecialchars(createURL('search', $range.'/'.$row['shTerms']))
. '">';
echo htmlspecialchars($row['shTerms']);
echo '</a>';
echo ' <span title="'
. T_('Number of bookmarks for this query')
. '">(' . $row['shNbResults'] . ')</span>';
echo '</td></tr>' . "\n";
}
//echo '<tr><td><a href="'.createURL('users').'">...</a></td></tr>';
?>
</table>
</div>
<?php
}
?>

View File

@ -1,23 +0,0 @@
<?php if ($GLOBALS['enableAdminColors'] != false
&& isset($userid) && $userservice->isAdmin($userid)
): ?>
<div id="sidebar" class="adminBackground">
<?php else: ?>
<div id="sidebar">
<?php endif ?>
<?php
echo $GLOBALS['sidebarTopMessage'].' ';
if (isset($sidebar_blocks) && count($sidebar_blocks)) {
$size = count($sidebar_blocks);
for ($i = 0; $i < $size; $i++) {
$this->includeTemplate('sidebar.block.'. $sidebar_blocks[$i]);
}
}
echo $GLOBALS['sidebarBottomMessage'];
?>
</div>

View File

@ -1,85 +0,0 @@
<?php
if ($userservice->isLoggedOn() && is_object($currentUser)) {
$cUserId = $userservice->getCurrentUserId();
$cUsername = $currentUser->getUsername();
?>
<ul id="navigation">
<li><a href="<?php echo createURL(''); ?>"><?php echo T_('Home'); ?></a></li>
<li><a href="<?php echo createURL('bookmarks', $cUsername); ?>"><?php echo T_('Bookmarks'); ?></a></li>
<li><a href="<?php echo createURL('alltags', $cUsername); ?>"><?php echo T_('Tags'); ?></a></li>
<li><a href="<?php echo createURL('watchlist', $cUsername); ?>"><?php echo T_('Watchlist'); ?></a></li>
<li><a href="<?php echo $userservice->getProfileUrl($cUserId, $cUsername); ?>"><?php echo T_('Profile'); ?></a></li>
<li><a href="<?php echo createURL('bookmarks', $cUsername . '?action=add'); ?>"><?php echo T_('Add a Bookmark'); ?></a></li>
<?php if (isset($loadjs)) :?>
<li class="access"><button type="button" id="button" title="shoulder surfing protection" onclick="if(! $.cookie('noshoulderSurfingProtection')) {toggle();} else {$.removeCookie('noshoulderSurfingProtection', { path: '/' }); location.reload();}"><?php if(! isset($_COOKIE["noshoulderSurfingProtection"])) {echo "Protected";} else {echo "Unprotected";} ?></button></li>
<?php endif ?>
<li class="access"><?php echo $cUsername?><a href="<?php echo ROOT ?>?action=logout">(<?php echo T_('Log Out'); ?>)</a></li>
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
<?php if($currentUser->isAdmin()): ?>
<li><a href="<?php echo createURL('admin', ''); ?>"><?php echo '['.T_('Admin').']'; ?></a></li>
<?php endif; ?>
</ul>
<?php if (isset($loadjs)) :?>
<div id="password-form" style="background:white; z-index: 2; position:absolute; top:55px; right:10px; visibility:hidden;">
<form id="noshoulderSurfingProtectionPassword">
<input type="password" name="password" id="password" size="40" placeholder="Type your password then press Enter to unprotect."/>
<!-- Allow form submission with keyboard without duplicating the dialog button -->
<input type="submit" tabindex="-1" style="position:absolute; top:-1000px"/>
</form>
</div>
<script>
// Prevents browser autocompletion. autocomplete="off" as input type="password" attribute only works with HTML5.
setTimeout(
clear(),
1000 //1,000 milliseconds = 1 second
);
function clear() {
$('#password').val('');
}
function toggle() {
if ($("#password-form").css("visibility") == "visible") {
$("#password-form").css("visibility", "hidden");
}
else {
clear();
$("#password-form").css("visibility", "visible");
}
}
$( "#noshoulderSurfingProtectionPassword" ).submit(function( event ) {
$.post(
'<?php echo ROOT ?>ajax/checkpassword.php',
{
password : $("#password").val(),
},
function(data) {
if(data == 'true') {
$.cookie('noshoulderSurfingProtection', 'null', { path: '/' });
location.reload();
}
},
'text'
);
event.preventDefault();
});
</script>
<?php endif ?>
<?php
} else {
?>
<ul id="navigation">
<li><a href="<?php echo createURL(''); ?>"><?php echo T_('Home'); ?></a></li>
<li><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a></li>
<li><a href="<?php echo createURL('about'); ?>"><?php echo T_('About'); ?></a></li>
<li class="access"><a href="<?php echo createURL('login'); ?>"><?php echo T_('Log In'); ?></a></li>
<?php if ($GLOBALS['enableRegistration']) { ?>
<li class="access"><a href="<?php echo createURL('register'); ?>"><?php echo T_('Register'); ?></a></li>
<?php } ?>
</ul>
<?php
}
?>

View File

@ -1,84 +0,0 @@
<?php echo '<'; ?>?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="'. htmlspecialchars($rsschannels[$i][1]) .'" />' . "\n";
}
}
?>
<?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>
<script type="text/javascript" src="<?php echo ROOT_JS ?>jquery.cookie-1.4.1.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>
<script type="text/javascript" src="<?php echo ROOT_JS ?>jquery.cookie-1.4.1.js"></script>
<?php endif ?>
<script type="text/javascript" src="<?php echo ROOT ?>jsScuttle.php"></script>
<?php endif ?>
</head>
<?php
$bodystyle = '';
if (isset($_GET['popup'])) {
if (isset($_GET['height'])) {
$bodystyle .= 'height:' . intval($_GET['height']) . 'px;';
}
if (isset($_GET['width'])) {
$bodystyle .= 'width:' . intval($_GET['width']) . 'px;';
}
if ($bodystyle != '') {
$bodystyle = ' style="' . $bodystyle . '"';
}
}
?>
<body<?php echo $bodystyle; ?>>
<?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($subtitlehtml)) {
echo '<h2>' . $subtitlehtml . "</h2>\n";
} else if (isset($subtitle)) {
echo '<h2>' . htmlspecialchars($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";
}
?>

View File

@ -0,0 +1,35 @@
<?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
***************************************************************************/
?>
<?php if (isset($loadjs)) :?>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/dojo/1.2/dojo/dojo.xd.js"
djConfig="parseOnLoad:true, isDebug:<?php echo DEBUG_MODE?'true':'false' ?>, usePlainJson:true, baseUrl: '<?php echo ROOT ?>', modulePaths: {'js': 'js'}"></script>
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("js.MultiComboBox"); // DOJO module adapted for SemanticScuttle
dojo.require("dijit.Tree");
</script>
<?php endif ?>

View File

@ -25,51 +25,39 @@ $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
$logged_on_userid = $userservice->getCurrentUserId();
//tags from current user
$userPopularTags = $b2tservice->getPopularTags($logged_on_userid, 25, $logged_on_userid);
$userPopularTagsCloud = $b2tservice->tagCloud($userPopularTags, 5, 90, 175);
$userPopularTags =& $b2tservice->getPopularTags($logged_on_userid, 25, $logged_on_userid);
$userPopularTagsCloud =& $b2tservice->tagCloud($userPopularTags, 5, 90, 175);
$userPopularTagsCount = count($userPopularTags);
//tags from all users
$allPopularTags = $b2tservice->getPopularTags(null, 5, $logged_on_userid);
$allPopularTagsCloud = $b2tservice->tagCloud($allPopularTags, 5, 90, 175);
$allPopularTags =& $b2tservice->getPopularTags(null, 5, $logged_on_userid);
$allPopularTagsCloud =& $b2tservice->tagCloud($allPopularTags, 5, 90, 175);
$allPopularTagsCount = count($allPopularTags);
// function printing the cloud
function writeTagsProposition($tagsCloud, $title)
{
static $id = 0;
++$id;
echo <<<JS
$('.edit-tagclouds')
.append(
'<div class="collapsible" id="edit-tagcloud-$id">'
+ ' <h3>$title</h3>'
+ ' <p class="popularTags tags"></p>'
+ '</div>');
JS;
function writeTagsProposition($tagsCloud, $title) {
echo 'document.write(\'<div class="collapsible">\');';
echo 'document.write(\'<h3>'. $title .'<\/h3>\');';
echo 'document.write(\'<p id="popularTags" class="tags">\');';
$taglist = '';
foreach (array_keys($tagsCloud) as $key) {
$row = $tagsCloud[$key];
foreach(array_keys($tagsCloud) as $key) {
$row =& $tagsCloud[$key];
$entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
$taglist .= '<span'
. ' title="'. $row['bCount'] . ' ' . $entries . '"'
. ' style="font-size:' . $row['size'] . '"'
. ' onclick="addTag(this)">'
. filter($row['tag'])
. '</span> ';
$taglist .= '<span title="'. $row['bCount'] .' '. $entries .'" style="font-size:'. $row['size'] .'" onclick="addTag(this)">'. filter($row['tag']) .'<\/span> ';
}
echo '$(\'#edit-tagcloud-' . $id . ' p\').append('
. json_encode($taglist)
. ");\n";
echo 'document.write(\''. $taglist .'\');';
echo 'document.write(\'<\/p>\');';
echo 'document.write(\'<\/div>\');';
}
if ($allPopularTagsCount > 0 || $userPopularTagsCount > 0 ) { ?>
<script type="text/javascript">
//<![CDATA[
Array.prototype.contains = function (ele) {
for (var i = 0; i < this.length; i++) {
if (this[i] == ele) {
@ -99,26 +87,20 @@ function addonload(addition) {
}
}
jQuery(function($) {
<?php
if ($userPopularTagsCount > 0) {
writeTagsProposition($userPopularTagsCloud, T_('Popular Tags'));
}
if ($allPopularTagsCount > 0) {
writeTagsProposition($allPopularTagsCloud, T_('Popular Tags From All Users'));
}
?>
var taglist = $('#tags');
var tags = taglist.val().split(', ');
addonload(
function () {
var taglist = document.getElementById('tags');
var tags = taglist.value.split(', ');
var populartags = $('.edit-tagclouds span');
var populartags = document.getElementById('popularTags').getElementsByTagName('span');
for (var i = 0; i < populartags.length; i++) {
if (tags.contains(populartags[i].innerHTML)) {
populartags[i].className = 'selected';
}
}
});
}
);
function addTag(ele) {
var thisTag = ele.innerHTML;
@ -140,9 +122,20 @@ function addTag(ele) {
document.getElementById('tags').focus();
}
//]]>
<?php
if( $userPopularTagsCount > 0) {
writeTagsProposition($userPopularTagsCloud, T_('Popular Tags'));
}
if( $allPopularTagsCount > 0) {
writeTagsProposition($allPopularTagsCloud, T_('Popular Tags From All Users'));
}
?>
</script>
<div class="edit-tagclouds"></div>
<?php
}
?>

View File

@ -0,0 +1,182 @@
<?php
$this->includeTemplate($GLOBALS['top_include']);
$accessPublic = '';
$accessShared = '';
$accessPrivate = '';
switch ($row['bStatus']) {
case 0 :
$accessPublic = ' selected="selected"';
break;
case 1 :
$accessShared = ' selected="selected"';
break;
case 2 :
$accessPrivate = ' selected="selected"';
break;
}
$this->includeTemplate("dojo.inc");
function jsEscTitle($title)
{
return addcslashes($title, "'");
}
?>
<script type="text/javascript">
//window.onload = function() {
// document.getElementById("address").focus();
//}
</script>
<form action="<?php echo $formaction; ?>" method="post">
<table>
<tr>
<th align="left"><?php echo T_('Address'); ?></th>
<td><input type="text" id="address" name="address" size="75" maxlength="65535" value="<?php echo filter($row['bAddress'], 'xml'); ?>" onblur="useAddress(this)" /></td>
<td>&larr; <?php echo T_('Required'); ?></td>
</tr>
<tr>
<th align="left"><?php echo T_('Title'); ?></th>
<td><input type="text" id="titleField" name="title" size="75" maxlength="255" value="<?php echo filter($row['bTitle'], 'xml'); ?>" onkeypress="this.style.backgroundImage = 'none';" /></td>
<td>&larr; <?php echo T_('Required'); ?></td>
</tr>
<tr>
<th align="left">
<?php echo T_('Description'); ?>
<a onclick="var nz = document.getElementById('privateNoteZone'); nz.style.display='';this.style.display='none';"><?php echo T_("Add Note"); ?></a>
</th>
<td><textarea name="description" id="description" rows="5" cols="63" ><?php echo filter($row['bDescription'], 'xml'); ?></textarea></td>
<td>&larr; <?php echo T_('You can use anchors to delimite attributes. for example: [publisher]blah[/publisher] '); ?>
<?php if(count($GLOBALS['descriptionAnchors'])>0): ?>
<br /><br />
<?php echo T_('Suggested anchors: '); ?>
<?php foreach($GLOBALS['descriptionAnchors'] as $anchorName => $anchorValue): ?>
<?php if(is_numeric($anchorName)) {
$anchorName = $anchorValue;
$anchorValue = '['.$anchorValue.']'.'[/'.$anchorValue.']';
} ?>
<span class="anchor" title="<?php echo $anchorValue ?>" onclick="addAnchor('<?php echo $anchorValue ?>', 'description')"><?php echo $anchorName ?></span>
<?php endforeach; ?>
<?php endif; ?>
</td>
</tr>
<tr id="privateNoteZone" <?php if(strlen($row['bPrivateNote'])==0):?>style="display:none"<?php endif; ?>>
<th align="left"><?php echo T_('Private Note'); ?></th>
<td><textarea name="privateNote" id="privateNote" rows="1" cols="63" ><?php echo filter($row['bPrivateNote'], 'xml'); ?></textarea></td>
<td>&larr; <?php echo T_('Just visible by you and your contacts.'); ?>
</td>
</tr>
<tr>
<th align="left"><?php echo T_('Tags'); ?></th>
<td class="scuttletheme">
<span dojoType="dojo.data.ItemFileReadStore" jsId="memberTagStore" url="<?php echo ROOT?>ajax/<?php echo ($GLOBALS['adminsAreAdvisedTagsFromOtherAdmins'] && $currentUser->isAdmin())?'getadmintags':'getcontacttags'?>.php"></span>
<input type="text" dojoType="js.MultiComboBox" id="tags" name="tags" size="75" value="<?php echo filter(implode(', ', $row['tags']), 'xml'); ?>" store="memberTagStore" delimiter="," searchAttr="tag" hasDownArrow="false" queryExpr="*${0}*" autoComplete="false" highlightMatch="all"/></td>
<td>&larr; <?php echo T_('Comma-separated'); ?></td>
</tr>
<tr>
<th></th>
<td align="right"><small><?php echo T_('Note: use ">" to include one tag in another. e.g.: europe>france>paris')?><small></td>
</tr>
<tr>
<th></th>
<td align="right"><small><?php echo T_('Note: use "=" to make synonym two tags. e.g.: france=frenchcountry')?><small></td>
</tr>
<tr>
<th align="left"><?php echo T_('Privacy'); ?></th>
<td>
<select name="status">
<option value="0"<?php echo $accessPublic ?>><?php echo T_('Public'); ?></option>
<option value="1"<?php echo $accessShared ?>><?php echo T_('Shared with Watch List'); ?></option>
<option value="2"<?php echo $accessPrivate ?>><?php echo T_('Private'); ?></option>
</select>
</td>
<td></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" name="submitted" value="<?php echo $btnsubmit; ?>" />
<input type="button" name="cancel" value="<?php echo T_('Cancel') ?>" onclick="<?php echo $popup?'window.close();':'javascript: history.go(-1)'; ?>" />
<?php
if (isset($showdelete) && $showdelete) {
?>
<input type="submit" name="delete" value="<?php echo T_('Delete Bookmark'); ?>" />
<?php
}
if (isset($showdelete) && $showdelete) {
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $row['bHash']).'">';
echo T_('edit common description').'</a>)';
}
if ($popup) {
?>
<input type="hidden" name="popup" value="1" />
<?php
} elseif (isset($referrer)) {
?>
<input type="hidden" name="referrer" value="<?php echo $referrer; ?>" />
<?php
}
?>
</td>
<td></td>
</tr>
</table>
</form>
<?php
// Dynamic tag selection
$this->includeTemplate('dynamictags.inc');
// Bookmarklets and import links
if (empty($_REQUEST['popup']) && (!isset($showdelete) || !$showdelete)) {
?>
<h3><?php echo T_('Bookmarklet'); ?></h3>
<p>
<script type="text/javascript">
var browser=navigator.appName;
if (browser == "Opera")
{
document.write('<?php echo sprintf(T_("Click one of the following bookmarklets to add a button you can click whenever you want to add the page you are on to %s"), jsEscTitle($GLOBALS['sitename'])); ?>:</p>');
}
else
{
document.write('<?php echo sprintf(T_("Drag one of the following bookmarklets to your browser's bookmarks and click it whenever you want to add the page you are on to %s"), jsEscTitle($GLOBALS['sitename'])); ?>:</p>');
}
var selection = '';
if (window.getSelection) {
selection = 'window.getSelection()';
} else if (document.getSelection) {
selection = 'document.getSelection()';
} else if (document.selection) {
selection = 'document.selection.createRange().text';
}
document.write('<ul>');
if (browser == "Opera")
{
document.write('<li><a class="bookmarklet" href="opera:/button/Go%20to%20page,%20%22javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d;void 0%22;,,%22Post%20to%20<?php echo jsEscTitle($GLOBALS['sitename']); ?>%22,%22Scuttle%22"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>');
document.write('<li><a class="bookmarklet" href="opera:/button/Go%20to%20page,%20%22javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');open(\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&amp;popup=1&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d,\'<?php echo jsEscTitle($GLOBALS['sitename']); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2);void 0;%22,,%22Post%20to%20<?php echo urlencode($GLOBALS['sitename']); ?>%20(Pop-up)%22,%22Scuttle%22"><?php echo jsEscTitle(sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename'])); ?><\/a><\/li>');
}
else
{
document.write('<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d;void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>');
document.write('<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');open(\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&amp;popup=1&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d,\'<?php echo jsEscTitle($GLOBALS['sitename']); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2);void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename'])); ?><\/a><\/li>');
}
document.write('<\/ul>');
</script>
<h3><?php echo T_('Import'); ?></h3>
<ul>
<li><a href="<?php echo createURL('importNetscape'); ?>"><?php echo T_('Import bookmarks from bookmark file'); ?></a> (<?php echo T_('Internet Explorer, Mozilla Firefox and Netscape'); ?>)</li>
<li><a href="<?php echo createURL('import'); ?>"><?php echo T_('Import bookmarks from del.icio.us'); ?></a></li>
</ul>
<?php
}
$this->includeTemplate($GLOBALS['bottom_include']);
?>

View File

@ -3,7 +3,9 @@ $this->includeTemplate($GLOBALS['top_include']);
?>
<form action="<?php echo $formaction; ?>" method="post">
<input type="hidden" name="token" value="<?php echo $token; ?>"/>
<input type="hidden" name="token" value="<?php echo $token; ?>">
</table>
<h3><?php echo T_('Account Details'); ?></h3>
@ -26,15 +28,7 @@ $this->includeTemplate($GLOBALS['top_include']);
<tr>
<th align="left"><?php echo T_('E-mail'); ?></th>
<td><input type="text" name="pMail" size="75" value="<?php echo filter($objectUser->getEmail(), 'xml'); ?>" /></td>
<td> <?php echo T_('Required'); ?></td>
</tr>
<tr>
<th align="left"><?php echo T_('Private RSS Feed'); ?></th>
<td><input type="checkbox" id="pEnablePrivateKey" name="pEnablePrivateKey" value="true" <?php echo $privateKeyIsEnabled;?> />
<label for="pEnablePrivateKey"><?php echo T_('Enable'); ?></label>&nbsp;&nbsp;&nbsp;
<input type="text" id="pPrivateKey" name="pPrivateKey" size="40" value="<?php echo $privateKey;?>" readonly="readonly" />
<a onclick="getNewPrivateKey(this); return false;"><button type="submit" name="submittedPK" value="1"><?php echo T_('Generate New Key'); ?></button></a>
</td>
<td>&larr; <?php echo T_('Required'); ?></td>
</tr>
</table>
@ -58,15 +52,13 @@ $this->includeTemplate($GLOBALS['top_include']);
<td><input type="submit" name="submitted" value="<?php echo T_('Save Changes'); ?>" /></td>
</tr>
</table>
<?php include 'editprofile-sslclientcerts.tpl.php'; ?>
<h3><?php echo T_('Actions'); ?></h3>
<table class="profile">
<tr>
<th align="left"><?php echo T_('Export bookmarks'); ?></th>
<td>
<a href="../api/export_html.php"><?php echo T_('HTML file (for browsers)')?></a> /
<a href="../api/posts_all.php"><?php echo T_('XML file (like del.icio.us)')?></a> /
<a href="../api/posts/all"><?php echo T_('XML file (like del.icio.us)')?></a> /
<a href="../api/export_csv.php"><?php echo T_('CSV file (for spreadsheet tools)')?></a>
</td>
</tr>

View File

@ -30,7 +30,7 @@ $this->includeTemplate($GLOBALS['top_include']);
<h3><?php echo T_('Instructions'); ?></h3>
<ol>
<li><?php echo T_('Log in to the <a href="https://api.del.icio.us/v1/posts/all">export page at del.icio.us</a>'); ?>.</li>
<li><?php echo T_('Log in to the <a href="http://del.icio.us/api/posts/all">export page at del.icio.us</a>'); ?>.</li>
<li><?php echo T_('Save the resulting <abbr title="Extensible Markup Language">XML</abbr> file to your computer'); ?>.</li>
<li><?php echo T_('Click <kbd>Browse...</kbd> to find this file on your computer. The maximum size the file can be is 1MB'); ?>.</li>
<li><?php echo T_('Select the default privacy setting for your imported bookmarks'); ?>.</li>

View File

@ -22,14 +22,9 @@ window.onload = function() {
<td><input type="password" id="password" name="password" size="20" class="required" /></td>
<td></td>
</tr>
<tr>
<th align="left"><label for="password2"><?php echo T_('Repeat Password'); ?></label></th>
<td><input type="password" id="password2" name="password2" size="20" class="required" /></td>
<td></td>
</tr>
<tr>
<th align="left"><label for="email"><?php echo T_('E-mail'); ?></label></th>
<td><input type="text" id="email" name="email" size="40" class="required" value="<?php echo htmlspecialchars(POST_MAIL); ?>" /></td>
<td><input type="text" id="email" name="email" size="40" class="required" /></td>
<td><?php echo '←'.T_(' to send you your password if you forget it')?></td>
</tr>

View File

@ -1,13 +1,10 @@
<?php
echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n";
?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title><?php echo $feedtitle; ?></title>
<link><?php echo htmlspecialchars($pagelink); ?></link>
<atom:link rel="self" type="application/rss+xml" href="<?php echo htmlspecialchars($feedlink); ?>"/>
<title><?php echo htmlspecialchars($feedtitle); ?></title>
<link><?php echo htmlspecialchars($feedlink); ?></link>
<description><?php echo htmlspecialchars($feeddescription); ?></description>
<pubDate><?php echo date('r'); ?></pubDate>
<lastBuildDate><?php echo $feedlastupdate ?></lastBuildDate>
@ -17,7 +14,6 @@ echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n";
<item>
<title><?php echo htmlspecialchars($bookmark['title']); ?></title>
<link><?php echo htmlspecialchars($bookmark['link']); ?></link>
<guid><?php echo $bookmark['guid']; ?></guid>
<description><?php echo htmlspecialchars($bookmark['description']); ?></description>
<dc:creator><?php echo htmlspecialchars($bookmark['creator']); ?></dc:creator>
<pubDate><?php echo $bookmark['pubdate']; ?></pubDate>

View File

@ -1,7 +1,7 @@
<?php
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
$commonTags = $b2tservice->getRelatedTagsByHash($hash);
$commonTags = $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
$commonTags =& $b2tservice->getRelatedTagsByHash($hash);
$commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
if ($commonTags && count($commonTags) > 0) {
?>

View File

@ -0,0 +1,105 @@
<?php
/* Service creation: only useful services are created */
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
require_once('sidebar.linkedtags.inc.php');
/* Manage input */
$user = isset($user)?$user:'';
$userid = isset($userid)?$userid:0;
$currenttag = isset($currenttag)?$currenttag:'';
$summarizeLinkedTags = isset($summarizeLinkedTags)?$summarizeLinkedTags:false;
$logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) {
$logged_on_userid = NULL;
}
$explodedTags = array();
if (strlen($currenttag)>0) {
$explodedTags = explode('+', $currenttag);
} else {
if($summarizeLinkedTags == true) {
$orphewTags = $tag2tagservice->getOrphewTags('>', $userid, 4, "nb");
} else {
$orphewTags = $tag2tagservice->getOrphewTags('>', $userid);
}
foreach($orphewTags as $orphewTag) {
$explodedTags[] = $orphewTag['tag'];
}
}
?>
<?php
if(($logged_on_userid != null) && ($userid === $logged_on_userid)) {
$editingMode = true;
} else {
$editingMode = false;
}
$this->includeTemplate("dojo.inc");
?>
<?php if(count($explodedTags)>0 || $editingMode):?>
<h2><?php
echo T_('Linked Tags').' ';
//if($userid != null) {
$cUser = $userservice->getUser($userid);
//echo '<small><a href="'.createURL('alltags', $cUser['username']).'">('.T_('all tags').')</a></small>';
//}
?></h2>
<?php //endif?>
<div id="related"> <?php
if($editingMode) {
echo '<p style="margin-bottom: 13px;text-align:center;">';
echo ' (<a href="'. createURL('tag2tagadd','') .'" rel="tag">'.T_('Add new link').'</a>) ';
echo ' (<a href="'. createURL('tag2tagdelete','') .'" rel="tag">'.T_('Delete link').'</a>)';
echo '</p>';
}
if(strlen($user)==0) {
$cat_url = createURL('tags', '%2$s');
}
$stopList = array();
foreach($explodedTags as $explodedTag) {
if(!in_array($explodedTag, $stopList)) {
// fathers tag
$fatherTags = $tag2tagservice->getLinkedTags($explodedTag, '>', $userid, true);
if(count($fatherTags)>0) {
foreach($fatherTags as $fatherTag) {
echo '<a href="'. sprintf($cat_url, filter($user, 'url'), filter($fatherTag, 'url')) .'" rel="tag">('. filter($fatherTag) .')</a> ';
}
}
/*
$displayLinkedTags = displayLinkedTags($explodedTag, '>', $userid, $cat_url, $user, $editingMode, null, 1);
echo $displayLinkedTags['output'];
if(is_array($displayLinkedTags['stopList'])) {
$stopList = array_merge($stopList, $displayLinkedTags['stopList']);
}*/
echo '<div dojoType="dojo.data.ItemFileReadStore" url="'.ROOT.'ajax/getlinkedtags.php?tag='.filter($explodedTag, 'url').'&amp;uId='.$userid.'" jsid="linkedTagStore" ></div>';
echo '<div dojoType="dijit.Tree" store="linkedTagStore" labelAttr="name" >';
echo '<script type="dojo/method" event="onClick" args="item">';
$returnUrl = sprintf($cat_url, filter($user, 'url'), filter('', 'url'));
echo 'window.location = "'.$returnUrl.'"+item.name';
echo '</script>';
echo '<script type="dojo/method" event="getLabelClass" args="item">';
echo 'return \'treeTag\';';
echo '</script>';
echo '</div>';
}
}
?> </div>
<?php endif?>

View File

@ -65,13 +65,13 @@ if (sizeof($menuTags) > 0 || ($userid != 0 && $userid === $logged_on_userid)) {
<?php $cUser = $userservice->getUser($userid); ?>
<?php if($userid>0): ?>
<?php if($userid==$logged_on_userid): ?>
<p style="text-align:right"><a href="<?php echo createURL('alltags', $cUser['username']); ?>" title="<?php echo T_('See all your tags')?>"><?php echo T_('all your tags'); ?></a> </p>
<p style="text-align:right"><a href="<?php echo createURL('alltags', $cUser['username']); ?>" title="<?php echo T_('See all your tags')?>"><?php echo T_('all your tags'); ?></a> &rarr;</p>
<?php else: ?>
<p style="text-align:right"><a href="<?php echo createURL('alltags', $cUser['username']); ?>" title="<?php echo T_('See all tags from this user')?>"><?php echo T_('all tags from this user'); ?></a> </p>
<p style="text-align:right"><a href="<?php echo createURL('alltags', $cUser['username']); ?>" title="<?php echo T_('See all tags from this user')?>"><?php echo T_('all tags from this user'); ?></a> &rarr;</p>
<?php endif; ?>
<?php else : ?>
<p style="text-align:right"><a href="<?php echo createURL('populartags', $cUser['username']); ?>" title="<?php echo T_('See popular tags')?>"><?php echo T_('Popular Tags'); ?></a> </p>
<p style="text-align:right"><a href="<?php echo createURL('populartags', $cUser['username']); ?>" title="<?php echo T_('See popular tags')?>"><?php echo T_('Popular Tags'); ?></a> &rarr;</p>
<?php endif; ?>
</div>

View File

@ -0,0 +1,58 @@
<?php
/* Service creation: only useful services are created */
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
require_once('sidebar.linkedtags.inc.php');
/* Manage input */
$userid = isset($userid)?$userid:0;
$user = isset($user)?$user:null;
$logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) {
$logged_on_userid = NULL;
}
$cat_url = createURL('tags', '%2$s');
$menu2Tags = $GLOBALS['menu2Tags'];
if (sizeOf($menu2Tags) > 0) {
$this->includeTemplate("dojo.inc");
?>
<h2><?php echo T_('Featured Menu Tags');?></h2>
<div id="maintagsmenu"
<?php echo 'title="'.T_('This menu is composed of keywords (tags) organized by admins.').'"'?>>
<?php
foreach($menu2Tags as $menu2Tag) {
echo '<div dojoType="dojo.data.ItemFileReadStore" url="'.ROOT.'ajax/getadminlinkedtags.php?tag='.filter($menu2Tag, 'url').'" jsid="linkedTagStore" ></div>';
echo '<div dojoType="dijit.Tree" store="linkedTagStore" labelAttr="name" >';
echo '<script type="dojo/method" event="onClick" args="item">';
$returnUrl = sprintf($cat_url, filter($user, 'url'), filter('', 'url'));
echo 'window.location = "'.$returnUrl.'"+item.name';
echo '</script>';
//echo '<script type="dojo/method" event="getLabel" args="item">';
//echo 'return item.name + "...";';
//echo '</script>';
//echo '<script type="dojo/method" event="onMouseOver" args="item">';
//echo 'i = item.relatedTarget;';
//echo 'if(i.innerHTML.charAt(i.innerHTML)=="a") alert(i.innerHTML)';
//echo '</script>';
//echo '<script type="dojo/method" event="getLabelClass" args="item">';
//echo 'return \'treeTag\';';
//echo '</script>';
echo '</div>';
}
?>
</div>
<?php
}
?>

View File

@ -14,8 +14,8 @@ $logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) {
$logged_on_userid = NULL;
}
$popularTags = $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid);
$popularTags = $b2tservice->tagCloud($popularTags, 5, 90, 225, 'alphabet_asc');
$popularTags =& $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid);
$popularTags =& $b2tservice->tagCloud($popularTags, 5, 90, 225, 'alphabet_asc');
if ($popularTags && count($popularTags) > 0) {
?>

View File

@ -10,7 +10,7 @@ if ($logged_on_userid === false) {
$logged_on_userid = NULL;
}
$recentTags = $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid, $GLOBALS['defaultRecentDays']);
$recentTags = $b2tservice->tagCloud($recentTags, 5, 90, 225, 'alphabet_asc');
$recentTags =& $b2tservice->tagCloud($recentTags, 5, 90, 225, 'alphabet_asc');
if ($recentTags && count($recentTags) > 0) {
?>
@ -31,7 +31,7 @@ if ($recentTags && count($recentTags) > 0) {
}
echo $contents ."</p>\n";
?>
<p style="text-align:right"><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a> </p>
<p style="text-align:right"><a href="<?php echo createURL('populartags'); ?>"><?php echo T_('Popular Tags'); ?></a> &rarr;</p>
</div>
<?php

View File

@ -0,0 +1,34 @@
<?php
/* Service creation: only useful services are created */
$searchhistoryservice =SemanticScuttle_Service_Factory::get('SearchHistory');
$logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) {
$logged_on_userid = NULL;
}
$lastSearches = $searchhistoryservice->getAllSearches('all', NULL, 3, NULL, true, false);
if ($lastSearches && count($lastSearches) > 0) {
?>
<h2><?php echo T_('Last Searches'); ?></h2>
<div id="searches">
<table>
<?php
foreach ($lastSearches as $row) {
echo '<tr><td>';
echo '<a href="'.createURL('search', $range.'/'.$row['shTerms']).'">';
echo $row['shTerms'];
echo '</a>';
echo ' <span title="'.T_('Number of bookmarks for this query').'">('.$row['shNbResults'].')</span>';
echo '</td></tr>';
}
//echo '<tr><td><a href="'.createURL('users').'">...</a></td></tr>';
?>
</table>
</div>
<?php
}
?>

View File

@ -18,7 +18,7 @@ if ($lastUsers && count($lastUsers) > 0) {
foreach ($lastUsers as $row) {
echo '<tr><td>';
echo '<a href="'.createURL('profile', $row['username']).'">';
echo SemanticScuttle_Model_UserArray::getName($row);
echo $row['username'];
echo '</a>';
echo ' (<a href="'.createURL('bookmarks', $row['username']).'">'.T_('bookmarks').'</a>)';
echo '</td></tr>';
@ -27,7 +27,7 @@ foreach ($lastUsers as $row) {
?>
</table>
<p style="text-align:right"><a href="<?php echo createURL('users'); ?>" title="<?php echo T_('See all users')?>"><?php echo T_('All users'); ?></a> </p>
<p style="text-align:right"><a href="<?php echo createURL('users'); ?>" title="<?php echo T_('See all users')?>"><?php echo T_('All users'); ?></a> &rarr;</p>
</div>
<?php
}

View File

@ -16,7 +16,7 @@ foreach($watching as $watchuser) {
?>
<?php if(count($closeContacts)>0):?>
<h2 title="<?php echo T_('Close contacts are mutual contacts');?>"><?php echo ' '. T_('Close contacts'); ?></h2>
<h2 title="<?php echo T_('Close contacts are mutual contacts');?>"><?php echo ' &harr; '. T_('Close contacts'); ?></h2>
<div id="watching">
<ul>
<?php foreach($closeContacts as $watchuser): ?>
@ -27,7 +27,7 @@ foreach($watching as $watchuser) {
<?php endif; ?>
<h2><?php echo ' '. T_('Watching'); ?></h2>
<h2><?php echo ' &rarr; '. T_('Watching'); ?></h2>
<div id="watching">
<ul>
<?php if($userservice->isLoggedOn() && $currentUser->getUsername() == $user): ?>
@ -41,7 +41,7 @@ foreach($watching as $watchuser) {
<?php foreach($watching as $watchuser): ?>
<li><a href="<?php echo createURL('bookmarks', $watchuser); ?>"><?php echo $watchuser; ?></a>
<?php if($userservice->isLoggedOn() && $currentUser->getUsername() == $user): ?>
- <a href="<?php echo createUrl('watch','?contact='.$watchuser); ?>" title="<?php echo T_('Remove this contact'); ?>">x</a>
- <a href="<?php echo createUrl('watch','?contact='.$watchuser); ?>" title="<?php echo T_('Remove this contact'); ?>">x<a/>
</li>
<?php endif; ?>
<?php endforeach; ?>
@ -49,7 +49,7 @@ foreach($watching as $watchuser) {
</ul>
</div>
<h2><?php echo ' '. T_('Watched By'); ?></h2>
<h2><?php echo ' &larr; '. T_('Watched By'); ?></h2>
<div id="watching">
<ul>
<?php foreach($watchedBy as $watchuser): ?>

View File

@ -0,0 +1,19 @@
<?php if($GLOBALS['enableAdminColors']!=false && isset($userid) && $userservice->isAdmin($userid)): ?>
<div id="sidebar" class="adminBackground">
<?php else: ?>
<div id="sidebar">
<?php endif ?>
<?php
echo $GLOBALS['sidebarTopMessage'].' ';
$size = count($sidebar_blocks);
for ($i = 0; $i < $size; $i++) {
$this->includeTemplate('sidebar.block.'. $sidebar_blocks[$i]);
}
echo $GLOBALS['sidebarBottomMessage'];
?>
</div>

View File

@ -4,7 +4,7 @@ $this->includeTemplate($GLOBALS['top_include']);
<form action="<?php echo $formaction; ?>" method="post">
<p align="right" style="float:right">
<p align=right" style="float:right">
<small style="text-align:right"><?php echo T_('Note: use "=" to make synonym two tags. e.g.: france=frenchcountry')?></small><br/>
<small style="text-align:right"><?php echo T_('Note: use ">" to include one tag in another. e.g.: europe>france>paris')?></small><br/>
</p>

Some files were not shown because too many files have changed in this diff Show More