Compare commits
572 Commits
php-gettex
...
master
Author | SHA1 | Date | |
---|---|---|---|
5c2d5b5ad2 | |||
4b5059bfc4 | |||
e567e30ce0 | |||
0600f02a13 | |||
2b4044a26a | |||
02185ad7e4 | |||
7699c685e6 | |||
|
200aa3c793 | ||
|
11e56e5861 | ||
|
f6902bc09d | ||
|
6b3f1d4bb5 | ||
|
af2a061ecd | ||
|
e37b58a15a | ||
|
f095a0bd71 | ||
|
0a5eed2dd3 | ||
|
49f1259c42 | ||
|
c57960623b | ||
|
91cc4a26fb | ||
|
e6494f9767 | ||
|
f309a61b71 | ||
|
f8066ea76a | ||
|
19202ab64c | ||
|
25ae541840 | ||
|
69596125d7 | ||
|
dfaf1d026a | ||
|
5c8833d5f5 | ||
|
1cc149fbd6 | ||
|
26352761d3 | ||
|
20e3b5ebd7 | ||
|
2f865db513 | ||
|
3e2d817fc7 | ||
|
72269aa1d6 | ||
|
c4ba9ef2d2 | ||
|
f8b5ad1cad | ||
|
85e2ccd942 | ||
|
54b5726157 | ||
|
409b7e681d | ||
|
326bca9731 | ||
|
943d149e31 | ||
|
a67a7f761d | ||
|
fc4c79df8a | ||
|
530e0c0541 | ||
|
0a040e2134 | ||
|
d0ed9adec8 | ||
|
defe7c0035 | ||
|
6607747b37 | ||
|
cb4b0469ca | ||
|
e715e41cd9 | ||
|
36c0585fce | ||
|
5aa4f0ae1e | ||
|
2b345be6de | ||
|
6dc5dc9f4a | ||
|
a0ab456798 | ||
|
7b50608138 | ||
|
a484c99273 | ||
|
95a8ca8a99 | ||
|
795de13414 | ||
|
814f99d471 | ||
|
df00540d4c | ||
|
01b91b22f3 | ||
|
1cf83b6732 | ||
|
335d6563b7 | ||
|
6ff4370a20 | ||
|
d6d44c6cfa | ||
|
a9df65da08 | ||
|
22eaa812bf | ||
|
8253c0df48 | ||
|
645f21b1a9 | ||
|
d8ee343473 | ||
|
f8b7d0243c | ||
|
87f495d31b | ||
|
cf80b6c5b8 | ||
|
728d642563 | ||
|
79d1e2de10 | ||
|
39b44229ad | ||
|
1226015681 | ||
|
a0d2750fb2 | ||
|
ab9d41c898 | ||
|
b4a2f0b931 | ||
|
515ef6eaa6 | ||
|
9335708325 | ||
|
d16ca92351 | ||
|
8d9e1665f7 | ||
|
a0f0b2caf7 | ||
|
37a7bd4d31 | ||
|
c45ea5a3c6 | ||
|
8242df8b68 | ||
|
caa9459438 | ||
|
a49bd7222c | ||
|
8f19cdad3d | ||
|
0203feae1c | ||
|
d97b4589ad | ||
|
db60113312 | ||
|
e81599e437 | ||
|
a1b909ceb5 | ||
|
5d929ec8e0 | ||
|
adf2655b23 | ||
|
7a82f3ef2d | ||
|
000daf70ca | ||
|
34600fe502 | ||
|
160ce01f7b | ||
|
cf4036104b | ||
|
11f62ca038 | ||
|
9bfdcd3c2a | ||
|
4eedf216dc | ||
|
1b984c4e4e | ||
|
880b94498a | ||
|
196db46097 | ||
|
a468938a5a | ||
|
ec5ad71342 | ||
|
efe5988df3 | ||
|
057bc0b932 | ||
|
062fe09d43 | ||
|
4c9560cf67 | ||
|
6df5f60e44 | ||
|
fe7c4d4090 | ||
|
08435a517a | ||
|
2a22f9d0a5 | ||
|
dd29ad13eb | ||
|
57d3cc84e5 | ||
|
889ca453ec | ||
|
d2e437b4db | ||
|
097ecf9c51 | ||
|
2807d04083 | ||
|
5571ec0a4d | ||
|
9c18fe1cc7 | ||
|
c1528d1c5b | ||
|
587674b355 | ||
|
6b24f99048 | ||
|
5743a34a6c | ||
|
008b65a1b2 | ||
|
8c9b9a3334 | ||
|
8216ae476c | ||
|
4775d7bf5a | ||
|
2fe213fa49 | ||
|
efd842174f | ||
|
8cd40b3d76 | ||
|
69ec4ee02d | ||
|
bcb863d68a | ||
|
9a8d73db1f | ||
|
81aa17b852 | ||
|
3d78c99636 | ||
|
320d673344 | ||
|
0396dee730 | ||
|
41fed87698 | ||
|
ba6465e310 | ||
|
20530bd5c5 | ||
|
dc69d1ad13 | ||
|
7cb53eb4e5 | ||
|
d970754ff1 | ||
|
6f93d0b020 | ||
|
71b486e533 | ||
|
6a25b80037 | ||
|
62afbfc184 | ||
|
83714e3889 | ||
|
37db60735a | ||
|
82ee59779e | ||
|
846e3a38cf | ||
|
651d5df1f9 | ||
|
ae86aa2b56 | ||
|
25e05c573b | ||
|
9994e92a3c | ||
|
257ea4ff6e | ||
|
38c87907f1 | ||
|
90b6e65b11 | ||
|
3d11286cbc | ||
|
763d394436 | ||
|
673fdc8758 | ||
|
57a5f6864d | ||
|
588d63a2c7 | ||
|
f2ac531f26 | ||
|
6ec3b102aa | ||
|
d2aecd8a76 | ||
|
9eab02af5f | ||
|
f9dbdc6645 | ||
|
045d139d64 | ||
|
74bab13f05 | ||
|
dd34ad3407 | ||
|
5deeecc408 | ||
|
5009535d34 | ||
|
39dfe3f1ac | ||
|
44a65eddac | ||
|
1dc33f4416 | ||
|
cd2756a4d0 | ||
|
032ea9ec25 | ||
|
b628e63e01 | ||
|
84e603aa91 | ||
|
4c8a53c5bc | ||
|
2419885577 | ||
|
5111249347 | ||
|
628260297a | ||
|
fa64fb2a49 | ||
|
d2e4df06c3 | ||
|
4e04131d2f | ||
|
17dcda30e7 | ||
|
b55b3a6c67 | ||
|
df4c6af956 | ||
|
2ddbf1703f | ||
|
324225f10b | ||
|
47005bb1c6 | ||
|
2dc582cfbb | ||
|
bb4b6574bc | ||
|
a396759f22 | ||
|
b56d604e7e | ||
|
189449c0d7 | ||
|
7820014667 | ||
|
18989f97f1 | ||
|
b279ded757 | ||
|
772442eeaf | ||
|
5ba53394fc | ||
|
3e7808a8fd | ||
|
11341abac9 | ||
|
42632fff23 | ||
|
49fa996cd7 | ||
|
a96c038b09 | ||
|
eb3ae40f35 | ||
|
060e731865 | ||
|
63b0a4b8cb | ||
|
1c180e28ff | ||
|
e01c813101 | ||
|
85d201b0ad | ||
|
07656f6724 | ||
|
2e58d5cfa9 | ||
|
74c72b5cab | ||
|
554a358539 | ||
|
3e3c070b31 | ||
|
2d2e7f97e4 | ||
|
581eca06d6 | ||
|
a11432db93 | ||
|
342d1c3205 | ||
|
b105867e75 | ||
|
e0149e24e2 | ||
|
97bba97049 | ||
|
1bbc36f8a4 | ||
|
191f08683e | ||
|
675aa6291a | ||
|
5203848b12 | ||
|
b436b4273d | ||
|
ef23f01eba | ||
|
1c6ff8cea6 | ||
|
920f7fc623 | ||
|
2c3f6338e3 | ||
|
10214c43b5 | ||
|
16791766de | ||
|
6ed90e647a | ||
|
e118a7d97b | ||
|
8d29eaf349 | ||
|
01f21995dd | ||
|
81714ab878 | ||
|
e616b19304 | ||
|
ec345f7a13 | ||
|
d9e7463978 | ||
|
62afb01482 | ||
|
ccb6d8a513 | ||
|
803b83fb7d | ||
|
88d7b9631b | ||
|
fbfbd8d5ca | ||
|
b57c8d4581 | ||
|
aea9c9ddbb | ||
|
f647c48477 | ||
|
0901501fc7 | ||
|
86bfda2564 | ||
|
0ff131fbb1 | ||
|
9cc4b5ffc2 | ||
|
d3615844ae | ||
|
d5c73cd864 | ||
|
708dc19122 | ||
|
1c415919cb | ||
|
b0665b03d1 | ||
|
73792c5807 | ||
|
9d91f1bee1 | ||
|
c13689813e | ||
|
967ba79ece | ||
|
2fba302003 | ||
|
6447ca7186 | ||
|
fc093a5fe5 | ||
|
c7ec370b47 | ||
|
b212c837f0 | ||
|
4e63a9a679 | ||
|
dda05f5cc7 | ||
|
69e58d8632 | ||
|
e2c4b53ecb | ||
|
69d0ef4ff5 | ||
|
c8a5f29677 | ||
|
4a3fdcc4dd | ||
|
fb11021ed7 | ||
|
218ac05e71 | ||
|
2077464d46 | ||
|
8be81abfe6 | ||
|
f629d081dd | ||
|
6b02db7920 | ||
|
3e5cadc764 | ||
|
43b6021be7 | ||
|
8e7138bf1f | ||
|
106bdcec66 | ||
|
da36ba7b7e | ||
|
79e3f4e121 | ||
|
6f04c888bf | ||
|
5d5ca9efdd | ||
|
87eab925e4 | ||
|
f3fdb6ca14 | ||
|
b937d6ee42 | ||
|
3b582fd875 | ||
|
40b4674e47 | ||
|
a1989cff06 | ||
|
0f0a95998e | ||
|
b2c48977bb | ||
|
a25838b267 | ||
|
5d22905ce7 | ||
|
8a87a245b8 | ||
|
dbccc1781e | ||
|
f5ac88ea87 | ||
|
542824a9ba | ||
|
bdebe6598c | ||
|
90f29d6e67 | ||
|
36ff61b38e | ||
|
12c77161ac | ||
|
200cb1d3c5 | ||
|
3306261b3e | ||
|
366987a97d | ||
|
cba0776325 | ||
|
c81566f5d8 | ||
|
1a2b37cc34 | ||
|
988e564ec3 | ||
|
599ac400f2 | ||
|
cbf36891ae | ||
|
705d016301 | ||
|
1527555a96 | ||
|
361c94895d | ||
|
28460d52cb | ||
|
51763183e0 | ||
|
43974a15f2 | ||
|
1aa20d38ca | ||
|
a0ca398372 | ||
|
42942507c4 | ||
|
f072059f2d | ||
|
675eadd584 | ||
|
8cbfef8115 | ||
|
7a45f330a7 | ||
|
ef88147d45 | ||
|
eaa62a6c45 | ||
|
28c8cdaf58 | ||
|
c7c702f544 | ||
|
407daf0bfa | ||
|
24bb9eea92 | ||
|
13fb8739db | ||
|
3f6bf4a5eb | ||
|
5c1d75ae65 | ||
|
833dde3f53 | ||
|
a5bd778929 | ||
|
1dfff5d3d8 | ||
|
a1545004f2 | ||
|
a756799ef4 | ||
|
361c18469a | ||
|
0935c98499 | ||
|
78654369e9 | ||
|
0f9d06c664 | ||
|
6d49b0622d | ||
|
db71e63467 | ||
|
d6e99db40d | ||
|
e667feb0ca | ||
|
d761abb05e | ||
|
e1370d949c | ||
|
30f84b3ca3 | ||
|
3f57237b88 | ||
|
0f481a99ea | ||
|
3828cfe6d6 | ||
|
637e276ac7 | ||
|
cb28cd3371 | ||
|
66c60880d2 | ||
|
5c480c9bab | ||
|
9f46e9f3ff | ||
|
821c17d9e3 | ||
|
7d31d9d165 | ||
|
d4ccb1d3d3 | ||
|
f67250a720 | ||
|
21c583a4cd | ||
|
abc2ca6f79 | ||
|
0717da92ae | ||
|
bc178983b3 | ||
|
8146646a0e | ||
|
975809a834 | ||
|
82ada0d75f | ||
|
3e9e2154a6 | ||
|
65bd4bfab8 | ||
|
4cc46f2686 | ||
|
0dd5540bfb | ||
|
66ee4cbe40 | ||
|
525b509bd2 | ||
|
4b6e2ea2bc | ||
|
96f7172de0 | ||
|
a46146d016 | ||
|
6e46a9329e | ||
|
6d752be4de | ||
|
966fdf808c | ||
|
2c4bf8dacf | ||
|
5a8327be1d | ||
|
29e7cf1aa5 | ||
|
77f4b48f9d | ||
|
9c412f89ff | ||
|
a04938f559 | ||
|
10ee2e79cc | ||
|
548d95d132 | ||
|
d94f6bdd2e | ||
|
c2875e45ab | ||
|
8fd61c0d8d | ||
|
52e65759bd | ||
|
69cac0dd84 | ||
|
5e1b9533ee | ||
|
45cbe47f81 | ||
|
ea3beb1690 | ||
|
001534eb2b | ||
|
2d90851b33 | ||
|
7b56d8c0ad | ||
|
efdcf11bb0 | ||
|
b4f9d3b126 | ||
|
6bf4e76495 | ||
|
1263a62179 | ||
|
c7a77dcb4c | ||
|
6c85981406 | ||
|
129926f1e7 | ||
|
2e89b28ed9 | ||
|
894011dd0f | ||
|
f359fd685f | ||
|
48cd84921f | ||
|
22e46a9b45 | ||
|
aaf293b18d | ||
|
be126cc958 | ||
|
cd023dea53 | ||
|
8e3daac73e | ||
|
20cd1969d1 | ||
|
aa6b6863b8 | ||
|
b812deefa1 | ||
|
24e344f787 | ||
|
df5aca497a | ||
|
bd92516e6f | ||
|
cb1d41054b | ||
|
04d360dadb | ||
|
b53b77d0dc | ||
|
95c05e49a7 | ||
|
2d31b55b24 | ||
|
e1f9d9e3a0 | ||
|
8e2b25a095 | ||
|
66af94feaf | ||
|
3ff661c0e0 | ||
|
da272b5a20 | ||
|
c9398ccd5b | ||
|
2f3b23f96a | ||
|
20ec8b4958 | ||
|
70c39a8eea | ||
|
22c9a01ee8 | ||
|
df8216d607 | ||
|
b31886b67a | ||
|
6b3f1d476e | ||
|
b9256b1437 | ||
|
f20135d16a | ||
|
da20b90bba | ||
|
5565b0695f | ||
|
3f78133df6 | ||
|
8da16ca4a6 | ||
|
15b8b6ab23 | ||
|
42666d0991 | ||
|
a242689285 | ||
|
bcb817c50d | ||
|
ab618a8908 | ||
|
f0456530b4 | ||
|
eb105d379b | ||
|
84224c3294 | ||
|
93e5201658 | ||
|
5c65da5bff | ||
|
daee83fd2c | ||
|
f52cba5cb3 | ||
|
8b45ba9e75 | ||
|
fbf28d0753 | ||
|
a62dfd6d70 | ||
|
647a13499e | ||
|
6fb9201996 | ||
|
b17e8f940c | ||
|
ea4c9fa4f7 | ||
|
e3f7ed95cd | ||
|
4faa30a7e0 | ||
|
4b79fdc6a6 | ||
|
43c7481da2 | ||
|
c7c94fec72 | ||
|
9807c70fb9 | ||
|
b5eee3e761 | ||
|
17a1595b31 | ||
|
930cfd784a | ||
|
7fefe84b2e | ||
|
3ff9d9f574 | ||
|
9b9c592774 | ||
|
1e52fa69c7 | ||
|
603cb2e544 | ||
|
71aaf514b1 | ||
|
19bcf4933f | ||
|
05832245e2 | ||
|
25baf614b8 | ||
|
b243ecd53f | ||
|
8fd5efb7c7 | ||
|
f93aa6c7ac | ||
|
aba3327b5b | ||
|
eaa847a93d | ||
|
4d9b6950cf | ||
|
d51768ab40 | ||
|
8798309bfe | ||
|
95887ff823 | ||
|
0a8dadf87e | ||
|
d80fcf8de6 | ||
|
31570df64c | ||
|
1962e3d2bc | ||
|
7333049082 | ||
|
549cae3de4 | ||
|
54d3ac4a79 | ||
|
a95280c935 | ||
|
b98ba3e0bd | ||
|
1b8977f23a | ||
|
1ccb373871 | ||
|
ea0527fc83 | ||
|
7e6de50232 | ||
|
ccbc63aec4 | ||
|
74dc9ea6a4 | ||
|
90f7d528d3 | ||
|
a518928796 | ||
|
ccabc1cdfa | ||
|
78bac4580c | ||
|
3981208405 | ||
|
b18869f6d7 | ||
|
0f3c51ef7e | ||
|
a42a6eb2ba | ||
|
d249a8ad19 | ||
|
602ec95bbb | ||
|
8c213f0e6e | ||
|
4d3d00ade2 | ||
|
db7a46b235 | ||
|
5a93096431 | ||
|
f9e0714350 | ||
|
e0dff57cbb | ||
|
46c13c46f2 | ||
|
d665bb742e | ||
|
858b188f87 | ||
|
e993e994bb | ||
|
53f0a57de0 | ||
|
17374001b8 | ||
|
6a2f1f4f57 | ||
|
cae9f4de38 | ||
|
41a29f49ee | ||
|
51e844e17e | ||
|
35058ddd07 | ||
|
74614e0f99 | ||
|
ab75c7ff44 | ||
|
edfd04698a | ||
|
01c792a789 | ||
|
40ca013e42 | ||
|
6c9542f24b | ||
|
6a6cba1a4d | ||
|
3e9c2cd0a5 | ||
|
c4b8719b5b | ||
|
0685081d46 | ||
|
512e3a6811 | ||
|
97c3d1ed63 | ||
|
46b96044fb | ||
|
fe522e5719 | ||
|
05c2369507 | ||
|
6b7217daf2 | ||
|
91da444e76 | ||
|
2f13a1c819 | ||
|
57d4892eb3 | ||
|
157adfd7eb | ||
|
e5dab0a740 | ||
|
7f2e347217 | ||
|
0c930607f0 | ||
|
b25290cef4 |
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,2 +1,8 @@
|
|||||||
|
doc/*.html
|
||||||
dist/
|
dist/
|
||||||
build.properties
|
build.properties
|
||||||
|
package.xml
|
||||||
|
semanticscuttle-dump.sql
|
||||||
|
data/config.php
|
||||||
|
data/config.testing.php
|
||||||
|
data/config.testing-tmp.php
|
||||||
|
15
.travis.yml
Normal file
15
.travis.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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
|
12
README.md
Normal file
12
README.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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.
|
||||||
|
|
@ -1 +1,2 @@
|
|||||||
sfuser=FIXME
|
sfuser=FIXME
|
||||||
|
websitedir=FIXME
|
||||||
|
425
build.xml
425
build.xml
@ -7,14 +7,57 @@
|
|||||||
tagging a release, running unit tests etc.
|
tagging a release, running unit tests etc.
|
||||||
-->
|
-->
|
||||||
<property file="build.properties" />
|
<property file="build.properties" />
|
||||||
|
<property file="html.properties" />
|
||||||
|
|
||||||
<property name="version-m" value="0.96" />
|
<property name="version-m" value="0.98" />
|
||||||
<property name="version" value="0.96.1" />
|
<property name="version" value="0.98.5" />
|
||||||
<property name="zipfile" value="${phing.project.name}-${version}.zip" />
|
<property name="stability" value="beta" />
|
||||||
<property name="distfile" value="dist/${zipfile}" />
|
<property name="releasenotes" value="
|
||||||
<property name="sfproject" value="SemanticScuttle" />
|
- Fix bug #109: preserve privacy setting from Delicious export files
|
||||||
<property name="sffilepath" value="s/se/semanticscuttle/" />
|
(Thanks to David Glenck)
|
||||||
<property name="svnpath" value="https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/" />
|
- 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
|
||||||
|
" />
|
||||||
|
<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" />
|
||||||
|
|
||||||
<target name="zip" depends="check"
|
<target name="zip" depends="check"
|
||||||
description="Create zip file for release"
|
description="Create zip file for release"
|
||||||
@ -25,30 +68,265 @@
|
|||||||
|
|
||||||
Test your zip with: unzip -l SemanticScuttle-0.95.0.zip
|
Test your zip with: unzip -l SemanticScuttle-0.95.0.zip
|
||||||
-->
|
-->
|
||||||
<mkdir dir="dist" />
|
|
||||||
<echo msg="Creating distribution zip for SemanticScuttle ${version}"/>
|
<echo msg="Creating distribution zip for SemanticScuttle ${version}"/>
|
||||||
<delete file="${distfile}" failonerror="false"/>
|
<delete file="${distfile}" failonerror="false"/>
|
||||||
<zip destfile="${distfile}" prefix="${phing.project.name}-${version}/">
|
<zip destfile="${distfile}" prefix="${phing.project.name}-${version}/">
|
||||||
<fileset dir=".">
|
<fileset refid="fs.zip"/>
|
||||||
<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>
|
</zip>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<target name="release" depends="check,zip,deploy-sf,svntag"
|
<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="[a-z0-9]{32}" "
|
||||||
|
replace=""
|
||||||
|
/>
|
||||||
|
<!-- remove baseinstalldir for files -->
|
||||||
|
<regexp
|
||||||
|
pattern="<file baseinstalldir="/""
|
||||||
|
replace="<file"
|
||||||
|
/>
|
||||||
|
<!-- install-as for different directories -->
|
||||||
|
<regexp
|
||||||
|
pattern="(<file name="data/(.+?)")"
|
||||||
|
replace="\1 install-as="\2""
|
||||||
|
/>
|
||||||
|
<regexp
|
||||||
|
pattern="(<file name="doc/(.+?)")"
|
||||||
|
replace="\1 install-as="\2""
|
||||||
|
/>
|
||||||
|
<regexp
|
||||||
|
pattern="(<file name="tests/(.+?)")"
|
||||||
|
replace="\1 install-as="\2""
|
||||||
|
/>
|
||||||
|
<regexp
|
||||||
|
pattern="(<file name="www/(.+?)")"
|
||||||
|
replace="\1 install-as="SemanticScuttle/\2""
|
||||||
|
/>
|
||||||
|
<regexp
|
||||||
|
pattern="(<file name="src/(.+?)")"
|
||||||
|
replace="\1 install-as="\2""
|
||||||
|
/>
|
||||||
|
</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"
|
||||||
description="Release the version on sourceforge"
|
description="Release the version on sourceforge"
|
||||||
>
|
>
|
||||||
<!-- meta-target -->
|
<!-- meta-target -->
|
||||||
@ -80,16 +358,105 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<target name="svntag"
|
|
||||||
description="create the svn tag for the current version"
|
<target name="deploy-sf-pear" depends="check,package"
|
||||||
|
description="Update PEAR channel + website on sourceforge"
|
||||||
>
|
>
|
||||||
|
<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
|
<exec
|
||||||
command="svn cp ${svnpath}trunk ${svnpath}/tags/${version} -m 'tag version ${version}'"
|
command="rsync --include-from=.rsync-include-files --delete -avP -e ssh ${sfuser},${sfproject}@web.sourceforge.net:htdocs/ ."
|
||||||
escape="false" checkreturn="true"
|
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="http://semanticscuttle.sourceforge.net/"
|
||||||
|
replace="href=""
|
||||||
|
/>
|
||||||
|
<!-- 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"
|
||||||
/>
|
/>
|
||||||
</target>
|
</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"
|
<target name="check"
|
||||||
description="Check variables"
|
description="Check variables"
|
||||||
>
|
>
|
||||||
@ -97,6 +464,8 @@
|
|||||||
<fail unless="sfuser" message="Sourceforge username not defined!" />
|
<fail unless="sfuser" message="Sourceforge username not defined!" />
|
||||||
<fail unless="sfproject" message="Sourceforge project name not defined!" />
|
<fail unless="sfproject" message="Sourceforge project name not defined!" />
|
||||||
<fail unless="sffilepath" message="Sourceforge project file path not defined!" />
|
<fail unless="sffilepath" message="Sourceforge project file path not defined!" />
|
||||||
|
|
||||||
|
<mkdir dir="dist" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
1
data/.gitignore
vendored
1
data/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
config.php
|
|
@ -14,6 +14,13 @@
|
|||||||
* @link http://sourceforge.net/projects/semanticscuttle/
|
* @link http://sourceforge.net/projects/semanticscuttle/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array for defaults.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
$defaults = array();
|
||||||
|
|
||||||
|
|
||||||
/***************************************************
|
/***************************************************
|
||||||
* HTML output configuration
|
* HTML output configuration
|
||||||
@ -56,6 +63,15 @@ $sidebarTopMessage = '';
|
|||||||
*/
|
*/
|
||||||
$sidebarBottomMessage = '';
|
$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';
|
||||||
|
|
||||||
|
|
||||||
/***************************************************
|
/***************************************************
|
||||||
@ -65,13 +81,15 @@ $sidebarBottomMessage = '';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* SemanticScuttle root directory.
|
* SemanticScuttle root directory.
|
||||||
*
|
|
||||||
* Set to NULL to autodetect the root url of the website.
|
* Set to NULL to autodetect the root url of the website.
|
||||||
*
|
*
|
||||||
* If your installation is in a subdirectory like
|
* If your installation is in a subdirectory like
|
||||||
* "http://www.example.com/semanticscuttle/" then
|
* "http://www.example.com/semanticscuttle/" then
|
||||||
* replace NULL by your address (between "" and with trailing '/')
|
* 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
|
* @var string
|
||||||
*/
|
*/
|
||||||
$root = null;
|
$root = null;
|
||||||
@ -138,7 +156,7 @@ $dbtype = 'mysql4';
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
$dbhost = 'localhost';
|
$dbhost = '127.0.0.1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database port.
|
* Database port.
|
||||||
@ -180,6 +198,15 @@ $dbname = 'scuttle';
|
|||||||
*/
|
*/
|
||||||
$tableprefix = 'sc_';
|
$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;
|
||||||
|
|
||||||
|
|
||||||
/***************************************************
|
/***************************************************
|
||||||
@ -226,10 +253,13 @@ $adminsAreAdvisedTagsFromOtherAdmins = false;
|
|||||||
*
|
*
|
||||||
* @var array
|
* @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
|
* Anti SPAM measures
|
||||||
@ -318,7 +348,7 @@ $index_sidebar_blocks = array(
|
|||||||
* @var string
|
* @var string
|
||||||
* @link http://php.net/date
|
* @link http://php.net/date
|
||||||
*/
|
*/
|
||||||
$shortdate = 'd-m-Y';
|
$shortdate = 'Y-m-d';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format of long dates.
|
* Format of long dates.
|
||||||
@ -453,6 +483,21 @@ $filetypes = array(
|
|||||||
'video' => array('avi', 'mov', 'mp4', 'mpeg', 'mpg', 'wmv')
|
'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
|
* Enable the "common bookmark description" functionality
|
||||||
*
|
*
|
||||||
@ -484,41 +529,43 @@ $votingMode = 2;
|
|||||||
*/
|
*/
|
||||||
$hideBelowVoting = null;
|
$hideBelowVoting = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default privacy setting for bookmarks:
|
||||||
|
* 0 - Public
|
||||||
|
* 1 - Shared with Watchlist
|
||||||
|
* 2 - Private
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
$defaults['privacy'] = 0;
|
||||||
|
|
||||||
|
|
||||||
/****************************
|
/****************************
|
||||||
* Website Thumbnails
|
* Website Thumbnails
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable bookmark website thumbnails.
|
* Which thumbnail service type to use.
|
||||||
*
|
*
|
||||||
* According to artviper.net license, buy a license if you
|
* Currently supported:
|
||||||
* gain profit with your pages.
|
* - null (no screenshots)
|
||||||
*
|
* - 'phancap', see http://cweiske.de/phancap.htm
|
||||||
* @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
|
* @var string
|
||||||
*/
|
*/
|
||||||
$thumbnailsKey = null;
|
$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();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -568,6 +615,13 @@ $menu2Tags = array(
|
|||||||
'menu2', 'tags', 'configurable', 'in', 'data/config.php'
|
'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';
|
||||||
|
|
||||||
|
|
||||||
/****************************
|
/****************************
|
||||||
@ -714,4 +768,24 @@ $authDebug = false;
|
|||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
$authEmailSuffix = null;
|
$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;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -2,11 +2,12 @@
|
|||||||
/**
|
/**
|
||||||
* Configuration for SemanticScuttle.
|
* Configuration for SemanticScuttle.
|
||||||
*
|
*
|
||||||
* Copy this file to config.inc.php and adjust it.
|
* Copy this file to config.php and adjust it.
|
||||||
*
|
*
|
||||||
* See config.default.inc.php for more options.
|
* See config.default.php for more options.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of this site.
|
* The name of this site.
|
||||||
*
|
*
|
||||||
@ -88,7 +89,7 @@ $dbname = 'scuttle';
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
$dbhost = 'localhost';
|
$dbhost = '127.0.0.1';
|
||||||
|
|
||||||
|
|
||||||
/***************************************************
|
/***************************************************
|
||||||
@ -116,6 +117,21 @@ $adminemail = 'admin@example.org';
|
|||||||
$admin_users = array();
|
$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!
|
* You have completed the basic configuration!
|
||||||
* More options can be found in config.default.php.
|
* More options can be found in config.default.php.
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
data/locales/ru_RU/LC_MESSAGES/messages.mo
Normal file
BIN
data/locales/ru_RU/LC_MESSAGES/messages.mo
Normal file
Binary file not shown.
1664
data/locales/ru_RU/LC_MESSAGES/messages.po
Normal file
1664
data/locales/ru_RU/LC_MESSAGES/messages.po
Normal file
File diff suppressed because it is too large
Load Diff
BIN
data/locales/tr_TR/LC_MESSAGES/messages.mo
Executable file
BIN
data/locales/tr_TR/LC_MESSAGES/messages.mo
Executable file
Binary file not shown.
1511
data/locales/tr_TR/LC_MESSAGES/messages.po
Normal file
1511
data/locales/tr_TR/LC_MESSAGES/messages.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
20
data/schema/1.sql
Normal file
20
data/schema/1.sql
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
RENAME TABLE `sc_tags` TO `sc_bookmarks2tags` ;
|
||||||
|
|
||||||
|
CREATE TABLE `sc_searchhistory` (
|
||||||
|
`shId` int(11) NOT NULL auto_increment,
|
||||||
|
`shTerms` varchar(255) NOT NULL default '',
|
||||||
|
`shRange` varchar(32) NOT NULL default '',
|
||||||
|
`shDatetime` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`shNbResults` int(6) NOT NULL default '0',
|
||||||
|
`uId` int(11) NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`shId`)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE `sc_tags` (
|
||||||
|
`tId` int(11) NOT NULL auto_increment,
|
||||||
|
`tag` varchar(32) NOT NULL default '',
|
||||||
|
`uId` int(11) NOT NULL default '0',
|
||||||
|
`tDescription` varchar(255) default NULL,
|
||||||
|
PRIMARY KEY (`tId`),
|
||||||
|
UNIQUE KEY `sc_tags_tag_uId` (`tag`, `uId`)
|
||||||
|
);
|
10
data/schema/2.sql
Normal file
10
data/schema/2.sql
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` VARCHAR( 1500 )
|
||||||
|
CREATE TABLE `sc_tagscache` (
|
||||||
|
`tcId` int(11) NOT NULL auto_increment,
|
||||||
|
`tag1` varchar(100) NOT NULL default '',
|
||||||
|
`tag2` varchar(100) NOT NULL default '',
|
||||||
|
`relationType` varchar(32) NOT NULL default '',
|
||||||
|
`uId` int(11) NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`tcId`),
|
||||||
|
UNIQUE KEY `sc_tagscache_tag1_tag2_type_uId` (`tag1`,`tag2`,`relationType`,`uId`)
|
||||||
|
);
|
85
data/schema/3.sql
Normal file
85
data/schema/3.sql
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
/* modify and add fields */
|
||||||
|
ALTER TABLE `sc_bookmarks` MODIFY `bAddress` varchar(1500) NOT NULL;
|
||||||
|
ALTER TABLE `sc_bookmarks` MODIFY `bDescription` TEXT default NULL;
|
||||||
|
ALTER TABLE `sc_bookmarks` ADD `bPrivateNote` TEXT NULL AFTER `bDescription` ;
|
||||||
|
ALTER TABLE `sc_tags` MODIFY `tDescription` TEXT default NULL;
|
||||||
|
ALTER TABLE `sc_commondescription` MODIFY `cdDescription` TEXT default NULL;
|
||||||
|
|
||||||
|
/* convert to UTF-8 if your table is ISO-something (through BLOB: tips provided by MYSQL documentation)*/
|
||||||
|
/* first need to remove index keys because of BLOB constraints*/
|
||||||
|
ALTER TABLE `sc_tags` DROP INDEX `sc_tags_tag_uId`;
|
||||||
|
ALTER TABLE `sc_bookmarks2tags` DROP INDEX `sc_bookmarks2tags_tag_bId`;
|
||||||
|
ALTER TABLE `sc_bookmarks2tags` DROP INDEX `sc_bookmarks2tags_bId`;
|
||||||
|
ALTER TABLE `sc_tags2tags` DROP INDEX `sc_tags2tags_tag1_tag2_uId`;
|
||||||
|
ALTER TABLE `sc_commondescription` DROP INDEX `sc_commondescription_tag_datetime`;
|
||||||
|
ALTER TABLE `sc_tagscache` DROP INDEX `sc_tagscache_tag1_tag2_type_uId`;
|
||||||
|
ALTER TABLE `sc_tagsstats` DROP INDEX `sc_tagsstats_tag1_type_uId`;
|
||||||
|
|
||||||
|
/* secondly convert through BLOB type */
|
||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bTitle` `bTitle` BLOB;
|
||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bTitle` `bTitle` varchar(255) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bAddress` `bAddress` BLOB;
|
||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bAddress` `bAddress` varchar(1500) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` BLOB;
|
||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bDescription` `bDescription` text CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bPrivateNote` `bPrivateNote` BLOB;
|
||||||
|
ALTER TABLE `sc_bookmarks` CHANGE `bPrivateNote` `bPrivateNote` text CHARACTER SET utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `sc_tags` CHANGE `tag` `tag` BLOB;
|
||||||
|
ALTER TABLE `sc_tags` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_tags` CHANGE `tDescription` `tDescription` BLOB;
|
||||||
|
ALTER TABLE `sc_tags` CHANGE `tDescription` `tDescription` text CHARACTER SET utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `sc_bookmarks2tags` CHANGE `tag` `tag` BLOB;
|
||||||
|
ALTER TABLE `sc_bookmarks2tags` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `sc_users` CHANGE `name` `name` BLOB;
|
||||||
|
ALTER TABLE `sc_users` CHANGE `name` `name` varchar(50) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_users` CHANGE `uContent` `uContent` BLOB;
|
||||||
|
ALTER TABLE `sc_users` CHANGE `uContent` `uContent` text CHARACTER SET utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `sc_tags2tags` CHANGE `tag1` `tag1` BLOB;
|
||||||
|
ALTER TABLE `sc_tags2tags` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_tags2tags` CHANGE `tag2` `tag2` BLOB;
|
||||||
|
ALTER TABLE `sc_tags2tags` CHANGE `tag2` `tag2` varchar(100) CHARACTER SET utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `sc_tagsstats` CHANGE `tag1` `tag1` BLOB;
|
||||||
|
ALTER TABLE `sc_tagsstats` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `sc_tagscache` CHANGE `tag1` `tag1` BLOB;
|
||||||
|
ALTER TABLE `sc_tagscache` CHANGE `tag1` `tag1` varchar(100) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_tagscache` CHANGE `tag2` `tag2` BLOB;
|
||||||
|
ALTER TABLE `sc_tagscache` CHANGE `tag2` `tag2` varchar(100) CHARACTER SET utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `sc_commondescription` CHANGE `tag` `tag` BLOB;
|
||||||
|
ALTER TABLE `sc_commondescription` CHANGE `tag` `tag` varchar(100) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_commondescription` CHANGE `cdTitle` `cdTitle` BLOB;
|
||||||
|
ALTER TABLE `sc_commondescription` CHANGE `cdTitle` `cdTitle` varchar(255) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_commondescription` CHANGE `cdDescription` `cdDescription` BLOB;
|
||||||
|
ALTER TABLE `sc_commondescription` CHANGE `cdDescription` `cdDescription` text CHARACTER SET utf8;
|
||||||
|
|
||||||
|
ALTER TABLE `sc_searchhistory` CHANGE `shTerms` `shTerms` BLOB;
|
||||||
|
ALTER TABLE `sc_searchhistory` CHANGE `shTerms` `shTerms` varchar(255) CHARACTER SET utf8;
|
||||||
|
ALTER TABLE `sc_searchhistory` CHANGE `shRange` `shRange` BLOB;
|
||||||
|
ALTER TABLE `sc_searchhistory` CHANGE `shRange` `shRange` varchar(32) CHARACTER SET utf8;
|
||||||
|
|
||||||
|
/* Thirdly re-add index keys */
|
||||||
|
ALTER TABLE `sc_tags` ADD UNIQUE KEY `sc_tags_tag_uId` (`tag`, `uId`);
|
||||||
|
ALTER TABLE `sc_bookmarks2tags` ADD UNIQUE KEY `sc_bookmarks2tags_tag_bId` (`tag`,`bId`);
|
||||||
|
ALTER TABLE `sc_bookmarks2tags` ADD KEY `sc_bookmarks2tags_bId` (`bId`);
|
||||||
|
ALTER TABLE `sc_tags2tags` ADD UNIQUE KEY `sc_tags2tags_tag1_tag2_uId` (`tag1`,`tag2`,`relationType`,`uId`);
|
||||||
|
ALTER TABLE `sc_commondescription` ADD UNIQUE KEY `sc_commondescription_tag_datetime` (`tag`,`cdDatetime`);
|
||||||
|
ALTER TABLE `sc_tagscache` ADD UNIQUE KEY `sc_tagscache_tag1_tag2_type_uId` (`tag1`,`tag2`,`relationType`,`uId`);
|
||||||
|
ALTER TABLE `sc_tagsstats` ADD UNIQUE KEY `sc_tagsstats_tag1_type_uId` (`tag1`,`relationType`,`uId`);
|
||||||
|
|
||||||
|
/* Change tables to utf-8 charset */
|
||||||
|
ALTER TABLE `sc_bookmarks` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_bookmarks2tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_users` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_watched` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_tags2tags` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_tagsstats` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_tagscache` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_commondescription` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
||||||
|
ALTER TABLE `sc_searchhistory` CHARACTER SET utf8 COLLATE utf8_general_ci;
|
11
data/schema/4.sql
Normal file
11
data/schema/4.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
ALTER TABLE `sc_bookmarks` ADD `bVoting` INT NOT NULL;
|
||||||
|
ALTER TABLE `sc_bookmarks` ADD `bVotes` INT NOT NULL;
|
||||||
|
|
||||||
|
CREATE TABLE `sc_votes` (
|
||||||
|
`bId` INT NOT NULL ,
|
||||||
|
`uId` INT NOT NULL ,
|
||||||
|
`vote` INT( 2 ) NOT NULL ,
|
||||||
|
UNIQUE KEY `bid_2` (`bId`,`uId`),
|
||||||
|
KEY `bid` (`bId`),
|
||||||
|
KEY `uid` (`uId`)
|
||||||
|
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
1
data/schema/5.sql
Normal file
1
data/schema/5.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `sc_bookmarks` ADD `bShort` VARCHAR(16) NULL DEFAULT NULL;
|
19
data/schema/6.sql
Normal file
19
data/schema/6.sql
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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`);
|
||||||
|
|
259
data/tables-postgresql.sql
Normal file
259
data/tables-postgresql.sql
Normal file
@ -0,0 +1,259 @@
|
|||||||
|
-- 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);
|
@ -72,11 +72,23 @@ CREATE TABLE `sc_users` (
|
|||||||
`email` varchar(50) NOT NULL default '',
|
`email` varchar(50) NOT NULL default '',
|
||||||
`homepage` varchar(255) default NULL,
|
`homepage` varchar(255) default NULL,
|
||||||
`uContent` text,
|
`uContent` text,
|
||||||
PRIMARY KEY (`uId`)
|
`privateKey` varchar(33) default NULL,
|
||||||
|
PRIMARY KEY (`uId`),
|
||||||
|
UNIQUE KEY `privateKey` (`privateKey`)
|
||||||
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
) 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`
|
-- Table structure for table `sc_watched`
|
||||||
--
|
--
|
||||||
@ -182,4 +194,10 @@ CREATE TABLE `sc_votes` (
|
|||||||
UNIQUE KEY `bid_2` (`bId`,`uId`),
|
UNIQUE KEY `bid_2` (`bId`,`uId`),
|
||||||
KEY `bid` (`bId`),
|
KEY `bid` (`bId`),
|
||||||
KEY `uid` (`uId`)
|
KEY `uid` (`uId`)
|
||||||
) CHARACTER SET utf8 COLLATE utf8_general_ci ;
|
) 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');
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
<?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.'" />';
|
|
||||||
|
|
||||||
?>
|
|
@ -12,12 +12,12 @@ $this->includeTemplate($GLOBALS['top_include']);
|
|||||||
<h3><?php echo T_('Geek Stuff'); ?></h3>
|
<h3><?php echo T_('Geek Stuff'); ?></h3>
|
||||||
<ul>
|
<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><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://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>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php if(!is_null($currentUser) && $currentUser->isAdmin()): ?>
|
<?php if(!is_null($currentUser) && $currentUser->isAdmin()): ?>
|
||||||
<li>SemanticScuttle v0.96.1</li>
|
<li>SemanticScuttle v0.98.5</li>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -11,7 +11,7 @@ foreach($users as $user) {
|
|||||||
|
|
||||||
echo '<div class="link">';
|
echo '<div class="link">';
|
||||||
echo '<a href="'.createURL('profile', $user->getUsername()).'">'.$user->getUsername().'</a>';
|
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>';
|
echo '</div>';
|
||||||
|
|
||||||
if($user->getUsername() != $currentUser->getUsername()) {
|
if($user->getUsername() != $currentUser->getUsername()) {
|
@ -30,7 +30,8 @@ window.onload = function() {
|
|||||||
if(strlen($description['cdDatetime'])>0) {
|
if(strlen($description['cdDatetime'])>0) {
|
||||||
echo T_('Last modification:').' '.$description['cdDatetime'].', ';
|
echo T_('Last modification:').' '.$description['cdDatetime'].', ';
|
||||||
$lastUser = $userservice->getUser($description['uId']);
|
$lastUser = $userservice->getUser($description['uId']);
|
||||||
echo '<a href="'.createURL('profile', $lastUser['username']).'">'.$lastUser['username'].'</a>';
|
echo '<a href="'.createURL('profile', $lastUser['username']).'">'
|
||||||
|
. SemanticScuttle_Model_UserArray::getName($lastUser) . '</a>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
152
data/templates/default/bookmarklet.inc.php
Normal file
152
data/templates/default/bookmarklet.inc.php
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
<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&address=\'+a+\'&title=\'+t+\'&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&popup=1&address=\'+a+\'&title=\'+t+\'&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&popup=1&width=800&height=470&address=%{url}&title=%{title}&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>
|
18
data/templates/default/bookmarks-thumbnail.inc.tpl.php
Normal file
18
data/templates/default/bookmarks-thumbnail.inc.tpl.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?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>';
|
||||||
|
}
|
||||||
|
?>
|
@ -1,14 +1,30 @@
|
|||||||
<?php
|
<?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 */
|
/* Service creation: only useful services are created */
|
||||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
$bookmarkservice = SemanticScuttle_Service_Factory::get('Bookmark');
|
||||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
$tagservice = SemanticScuttle_Service_Factory::get('Tag');
|
||||||
$cdservice =SemanticScuttle_Service_Factory::get('CommonDescription');
|
$cdservice = SemanticScuttle_Service_Factory::get('CommonDescription');
|
||||||
|
|
||||||
|
|
||||||
$pageName = isset($pageName)?$pageName:"";
|
$pageName = isset($pageName) ? $pageName : '';
|
||||||
$user = isset($user)?$user:"";
|
$user = isset($user) ? $user : '';
|
||||||
$currenttag = isset($currenttag)?$currenttag:"";
|
$currenttag = isset($currenttag) ? $currenttag : '';
|
||||||
|
|
||||||
|
|
||||||
$this->includeTemplate($GLOBALS['top_include']);
|
$this->includeTemplate($GLOBALS['top_include']);
|
||||||
@ -23,7 +39,9 @@ include('search.menu.php');
|
|||||||
|
|
||||||
<?php if($GLOBALS['enableAdminColors']!=false && isset($userid) && $userservice->isAdmin($userid) && $pageName != PAGE_WATCHLIST) : ?>
|
<?php if($GLOBALS['enableAdminColors']!=false && isset($userid) && $userservice->isAdmin($userid) && $pageName != PAGE_WATCHLIST) : ?>
|
||||||
<div style="width:70%;text-align:center;">
|
<div style="width:70%;text-align:center;">
|
||||||
<img src="<?php echo ROOT ?>images/logo_24.gif" width="12px"/> <?php echo T_('Bookmarks on this page are managed by an admin user.'); ?><img src="<?php echo ROOT ?>images/logo_24.gif" width="12px"/>
|
<img src="<?php 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"/>
|
||||||
</div>
|
</div>
|
||||||
<?php endif?>
|
<?php endif?>
|
||||||
|
|
||||||
@ -46,12 +64,16 @@ if($currenttag!= '' && $cdservice->getLastTagDescription($currenttag)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//common tag description edit
|
//common tag description edit
|
||||||
if($userservice->isLoggedOn()) {
|
if ($userservice->isLoggedOn()) {
|
||||||
if($currenttag!= '' && ($GLOBALS['enableCommonTagDescriptionEditedByAll'] || $currentUser->isAdmin())) {
|
if ($currenttag != ''
|
||||||
|
&& ($GLOBALS['enableCommonTagDescriptionEditedByAll']
|
||||||
|
|| $currentUser->isAdmin()
|
||||||
|
)
|
||||||
|
) {
|
||||||
echo ' <a href="'. createURL('tagcommondescriptionedit', $currenttag).'" title="'.T_('Edit the common description of this tag').'">';
|
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 !is_array($cDescription) || strlen($cDescription['cdDescription'])==0?T_('Edit the common description of this tag'):'';
|
||||||
echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
echo ' <img src="' . $theme->resource('images/b_edit.png') . '" /></a>';
|
||||||
} elseif(isset($hash)) {
|
} else if (isset($hash)) {
|
||||||
echo ' (<a href="'.createURL('bookmarkcommondescriptionedit', $hash).'" title="'.T_('Edit the common description of this bookmark').'">';
|
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>)';
|
echo T_('Edit the common description of this bookmark').'</a>)';
|
||||||
}
|
}
|
||||||
@ -75,7 +97,7 @@ if($userservice->isLoggedOn()) {
|
|||||||
if($currenttag!= '') {
|
if($currenttag!= '') {
|
||||||
echo ' <a href="'. createURL('tagedit', $currenttag).'" title="'.T_('Edit your personal description of this tag').'" >';
|
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 strlen($pDescription['tDescription'])==0?T_('Edit your personal description of this tag'):'';
|
||||||
echo ' <img src="'.ROOT.'images/b_edit.png" /></a>';
|
echo ' <img src="' . $theme->resource('images/b_edit.png') . '" /></a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?></p>
|
?></p>
|
||||||
@ -85,7 +107,7 @@ if($userservice->isLoggedOn()) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if (count($bookmarks) > 0) { ?>
|
<?php if (isset($bookmarks) && count($bookmarks) > 0) { ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.onload = playerLoad;
|
window.onload = playerLoad;
|
||||||
</script>
|
</script>
|
||||||
@ -101,54 +123,62 @@ $votingSort = 'voting_desc';
|
|||||||
|
|
||||||
switch(getSortOrder()) {
|
switch(getSortOrder()) {
|
||||||
case 'date_asc':
|
case 'date_asc':
|
||||||
$dateArrow = ' ↑';
|
$dateArrow = ' ↑';
|
||||||
$dateSort = 'date_desc';
|
$dateSort = 'date_desc';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'title_asc':
|
case 'title_asc':
|
||||||
$titleArrow = ' ↑';
|
$titleArrow = ' ↑';
|
||||||
$titleSort = 'title_desc';
|
$titleSort = 'title_desc';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'title_desc':
|
case 'title_desc':
|
||||||
$titleArrow = ' ↓';
|
$titleArrow = ' ↓';
|
||||||
$titleSort = 'title_asc';
|
$titleSort = 'title_asc';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'voting_asc':
|
case 'voting_asc':
|
||||||
$votingArrow = ' ↑';
|
$votingArrow = ' ↑';
|
||||||
$votingSort = 'voting_desc';
|
$votingSort = 'voting_desc';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'voting_desc':
|
case 'voting_desc':
|
||||||
$votingArrow = ' ↓';
|
$votingArrow = ' ↓';
|
||||||
$votingSort = 'voting_asc';
|
$votingSort = 'voting_asc';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'date_desc':
|
case 'date_desc':
|
||||||
default:
|
default:
|
||||||
$dateArrow = ' ↓';
|
$dateArrow = ' ↓';
|
||||||
$dateSort = 'date_asc';
|
$dateSort = 'date_asc';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="?sort=<?php echo $dateSort ?>"><?php echo T_("Date").$dateArrow; ?></a>
|
<a href="?sort=<?php echo $dateSort ?>"><?php echo T_("Date").$dateArrow; ?></a>
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
<a href="?sort=<?php echo $titleSort ?>"><?php echo T_("Title").$titleArrow; ?></a>
|
<a href="?sort=<?php echo $titleSort ?>"><?php echo T_("Title").$titleArrow; ?></a>
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
<?php if ($GLOBALS['enableVoting']) { ?>
|
<?php if ($GLOBALS['enableVoting']) { ?>
|
||||||
<a href="?sort=<?php echo $votingSort ?>"><?php echo T_("Voting").$votingArrow; ?></a>
|
<a href="?sort=<?php echo $votingSort ?>"><?php echo T_("Voting").$votingArrow; ?></a>
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
<?php } ?>
|
<?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
|
<?php
|
||||||
if($currenttag!= '') {
|
if ($currenttag!= '') {
|
||||||
if($user!= '') {
|
if ($user!= '') {
|
||||||
echo ' - ';
|
echo ' - ';
|
||||||
echo '<a href="'. createURL('tags', $currenttag) .'">';
|
echo '<a href="'. createURL('tags', $currenttag) .'">';
|
||||||
echo T_('Bookmarks from other users for this tag').'</a>';
|
echo T_('Bookmarks from other users for this tag').'</a>';
|
||||||
//echo T_(' for these tags');
|
//echo T_(' for these tags');
|
||||||
} else if($userservice->isLoggedOn()){
|
} else if ($userservice->isLoggedOn()){
|
||||||
echo ' - ';
|
echo ' - ';
|
||||||
echo '<a href="'. createURL('bookmarks', $currentUser->getUsername().'/'.$currenttag) .'">';
|
echo '<a href="'. createURL('bookmarks', $currentUser->getUsername().'/'.$currenttag) .'">';
|
||||||
echo T_('Only your bookmarks for this tag').'</a>';
|
echo T_('Only your bookmarks for this tag').'</a>';
|
||||||
@ -156,7 +186,6 @@ if($currenttag!= '') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
?></p>
|
?></p>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// PAGINATION
|
// PAGINATION
|
||||||
|
|
||||||
@ -199,7 +228,13 @@ if($currenttag!= '') {
|
|||||||
$brss = '';
|
$brss = '';
|
||||||
$size = count($rsschannels);
|
$size = count($rsschannels);
|
||||||
for ($i = 0; $i < $size; $i++) {
|
for ($i = 0; $i < $size; $i++) {
|
||||||
$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>';
|
$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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$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";
|
$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";
|
||||||
@ -213,12 +248,28 @@ if($currenttag!= '') {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ol <?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?>
|
<ol<?php echo ($start > 0 ? ' start="'. ++$start .'"' : ''); ?> id="bookmarks">
|
||||||
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()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
<?php
|
if ($userservice->isLoggedOn()) {
|
||||||
foreach(array_keys($bookmarks) as $key) {
|
$watchedNames = $userservice->getWatchNames(
|
||||||
$row =& $bookmarks[$key];
|
$currentUser->getId(), true
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$watchedNames = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($bookmarks as $key => &$row) {
|
||||||
switch ($row['bStatus']) {
|
switch ($row['bStatus']) {
|
||||||
case 0:
|
case 0:
|
||||||
$access = '';
|
$access = '';
|
||||||
@ -234,38 +285,53 @@ if($currenttag!= '') {
|
|||||||
$cats = '';
|
$cats = '';
|
||||||
$tagsForCopy = '';
|
$tagsForCopy = '';
|
||||||
$tags = $row['tags'];
|
$tags = $row['tags'];
|
||||||
foreach(array_keys($tags) as $key) {
|
foreach ($tags as $tkey => &$tag) {
|
||||||
|
$tagcaturl = sprintf(
|
||||||
$tag =& $tags[$key];
|
$cat_url,
|
||||||
$cats .= '<a href="'. sprintf($cat_url, filter($row['username'], 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>, ';
|
filter($row['username'], 'url'),
|
||||||
$tagsForCopy.= $tag.',';
|
filter($tag, 'url')
|
||||||
|
);
|
||||||
|
$cats .= sprintf(
|
||||||
|
'<a href="%s" rel="tag">%s</a>, ',
|
||||||
|
$tagcaturl, filter($tag)
|
||||||
|
);
|
||||||
|
$tagsForCopy .= $tag . ',';
|
||||||
}
|
}
|
||||||
$cats = substr($cats, 0, -2);
|
$cats = substr($cats, 0, -2);
|
||||||
if ($cats != '') {
|
if ($cats != '') {
|
||||||
$cats = ' '.T_('Tags:').' '. $cats;
|
$cats = T_('Tags:') . ' ' . $cats;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edit and delete links
|
// Edit and delete links
|
||||||
$edit = '';
|
$edit = '';
|
||||||
if ($bookmarkservice->editAllowed($row)) {
|
if ($bookmarkservice->editAllowed($row)) {
|
||||||
$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>';
|
$edit = ' - <a href="' . createURL('edit', $row['bId']) . '">'
|
||||||
|
. T_('Edit')
|
||||||
|
. '</a>'
|
||||||
|
. ' <a href="#" onclick="deleteBookmark(this, '. $row['bId'] .'); return false;">'
|
||||||
|
. T_('Delete')
|
||||||
|
.'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Last update
|
// 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
|
// User attribution
|
||||||
$copy = ' '. T_('by'). ' ';
|
$copy = ' ' . T_('by') . ' ';
|
||||||
if($userservice->isLoggedOn() && $currentUser->getUsername() == $row['username']) {
|
if ($userservice->isLoggedOn()
|
||||||
$copy.= T_('you');
|
&& $currentUser->getUsername() == $row['username']
|
||||||
|
) {
|
||||||
|
$copy .= T_('you');
|
||||||
} else {
|
} else {
|
||||||
$copy.= '<a href="'. createURL('bookmarks', $row['username']) .'">'. $row['username'] .'</a>';
|
$copy .= '<a href="' . createURL('bookmarks', $row['username']) . '">'
|
||||||
|
. SemanticScuttle_Model_UserArray::getName($row)
|
||||||
|
. '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Udders!
|
// others
|
||||||
if (!isset($hash)) {
|
if (!isset($hash)) {
|
||||||
$others = $bookmarkservice->countOthers($row['bAddress']);
|
$others = $otherCounts[$row['bAddress']];
|
||||||
$ostart = '<a href="'. createURL('history', $row['bHash']) .'">';
|
$ostart = '<a href="' . createURL('history', $row['bHash']) . '">';
|
||||||
$oend = '</a>';
|
$oend = '</a>';
|
||||||
switch ($others) {
|
switch ($others) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -281,10 +347,13 @@ if($currenttag!= '') {
|
|||||||
// Copy link
|
// Copy link
|
||||||
if ($userservice->isLoggedOn()
|
if ($userservice->isLoggedOn()
|
||||||
&& ($currentUser->getId() != $row['uId'])
|
&& ($currentUser->getId() != $row['uId'])
|
||||||
&& !$bookmarkservice->bookmarkExists($row['bAddress'], $currentUser->getId())
|
&& !$existence[$row['bAddress']]
|
||||||
) {
|
) {
|
||||||
$copy .= ' - <a href="'
|
$copy .= ' - <a href="'
|
||||||
. createURL('bookmarks', $currentUser->getUsername() .'?action=add&copyOf='. $row['bId'])
|
. createURL(
|
||||||
|
'bookmarks',
|
||||||
|
$currentUser->getUsername()
|
||||||
|
. '?action=add&copyOf=' . $row['bId'])
|
||||||
. '" title="'.T_('Copy this bookmark to YOUR bookmarks.').'">'
|
. '" title="'.T_('Copy this bookmark to YOUR bookmarks.').'">'
|
||||||
. T_('Copy')
|
. T_('Copy')
|
||||||
. '</a>';
|
. '</a>';
|
||||||
@ -296,7 +365,7 @@ if($currenttag!= '') {
|
|||||||
$rel = ' rel="nofollow"';
|
$rel = ' rel="nofollow"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$address = filter($row['bAddress']);
|
$address = $row['bAddress'];
|
||||||
$oaddress = $address;
|
$oaddress = $address;
|
||||||
// Redirection option
|
// Redirection option
|
||||||
if ($GLOBALS['useredir']) {
|
if ($GLOBALS['useredir']) {
|
||||||
@ -304,16 +373,26 @@ if($currenttag!= '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Admin specific design
|
// Admin specific design
|
||||||
if($userservice->isAdmin($row['uId'])) {
|
if ($userservice->isAdmin($row['username'])
|
||||||
$adminBgClass = 'class="adminBackground"';
|
&& $GLOBALS['enableAdminColors']
|
||||||
$adminStar = ' <img src="'. ROOT .'images/logo_24.gif" width="12px" title="'. T_('This bookmark is certified by an admin user.') .'" />';
|
) {
|
||||||
|
$adminBgClass = ' class="adminBackground"';
|
||||||
|
$adminStar = ' <img'
|
||||||
|
. ' src="' . $theme->resource('images/logo_24.gif') . '"'
|
||||||
|
. ' width="12px"'
|
||||||
|
. ' title="' . T_('This bookmark is certified by an admin user.') . '"'
|
||||||
|
. '/>';
|
||||||
} else {
|
} else {
|
||||||
$adminBgClass = '';
|
$adminBgClass = '';
|
||||||
$adminStar = '';
|
$adminStar = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private Note (just visible by the owner and his/her contacts)
|
// Private Note (just visible by the owner and his/her contacts)
|
||||||
if($userservice->isLoggedOn() && ($currentUser->getId() == $row['uId'] || in_array($row['username'], $userservice->getWatchNames($currentUser->getId(), true)))) {
|
if ($watchedNames !== null
|
||||||
|
&& ($currentUser->getId() == $row['uId']
|
||||||
|
|| in_array($row['username'], $watchedNames)
|
||||||
|
)
|
||||||
|
) {
|
||||||
$privateNoteField = $row['bPrivateNote'];
|
$privateNoteField = $row['bPrivateNote'];
|
||||||
} else {
|
} else {
|
||||||
$privateNoteField = '';
|
$privateNoteField = '';
|
||||||
@ -326,13 +405,16 @@ if($currenttag!= '') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
echo '<li class="xfolkentry'. $access .'" >'."\n";
|
echo ' <li class="xfolkentry'. $access .'">'."\n";
|
||||||
include 'bookmarks-thumbnail.inc.tpl.php';
|
include 'bookmarks-thumbnail.inc.tpl.php';
|
||||||
include 'bookmarks-vote.inc.tpl.php';
|
include 'bookmarks-vote.inc.tpl.php';
|
||||||
|
|
||||||
echo '<div '.$adminBgClass.' >';;
|
echo ' <div' . $adminBgClass . '>' . "\n";
|
||||||
|
|
||||||
echo '<div class="link"><a href="'. $address .'"'. $rel .' class="taggedlink" target="_blank">'. filter($row['bTitle']) ."</a>" . $adminStar . "</div>\n";
|
echo ' <div class="link">'
|
||||||
|
. '<a href="'. htmlspecialchars($address) .'"'. $rel .' class="taggedlink">'
|
||||||
|
. filter($row['bTitle'])
|
||||||
|
. '</a>' . $adminStar . "</div>\n";
|
||||||
if ($row['bDescription'] == '') {
|
if ($row['bDescription'] == '') {
|
||||||
$bkDescription = $GLOBALS['blankDescription'];
|
$bkDescription = $GLOBALS['blankDescription'];
|
||||||
} else {
|
} else {
|
||||||
@ -342,17 +424,23 @@ if($currenttag!= '') {
|
|||||||
$bkDescription = preg_replace('@((http|https|ftp)://.*?)( |\r|$)@', '<a href="$1" rel="nofollow">$1</a>$3', $bkDescription); // make url clickable
|
$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="description">'. nl2br($bkDescription) ."</div>\n";
|
||||||
//if(!isset($hash)) {
|
echo ' <div class="address">' . htmlspecialchars(shortenString($oaddress)) . "</div>\n";
|
||||||
echo '<div class="address">' . shortenString($oaddress) . '</div>';
|
|
||||||
//}
|
|
||||||
|
|
||||||
echo '<div class="meta">'. $cats . $copy . $edit . $update ."</div>\n";
|
echo ' <div class="meta">'
|
||||||
echo $privateNoteField!=''?'<div class="privateNote" title="'. T_('Private Note on this bookmark') .'">'.$privateNoteField."</div>\n":'';
|
. $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 ' ';
|
||||||
include 'bookmarks-vote-horizontal.inc.tpl.php';
|
include 'bookmarks-vote-horizontal.inc.tpl.php';
|
||||||
echo '</div>';
|
echo " </div>\n";
|
||||||
|
|
||||||
echo "</li>\n";
|
echo " </li>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -6,11 +6,6 @@ echo '<a href="'.createURL('about').'">'.T_('About').'</a>';
|
|||||||
echo ' - ';
|
echo ' - ';
|
||||||
echo T_("Propulsed by ");
|
echo T_("Propulsed by ");
|
||||||
echo " <a href=\"https://sourceforge.net/projects/semanticscuttle/\">SemanticScuttle</a>";
|
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>
|
</div>
|
@ -25,39 +25,51 @@ $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
|
|||||||
$logged_on_userid = $userservice->getCurrentUserId();
|
$logged_on_userid = $userservice->getCurrentUserId();
|
||||||
|
|
||||||
//tags from current user
|
//tags from current user
|
||||||
$userPopularTags =& $b2tservice->getPopularTags($logged_on_userid, 25, $logged_on_userid);
|
$userPopularTags = $b2tservice->getPopularTags($logged_on_userid, 25, $logged_on_userid);
|
||||||
$userPopularTagsCloud =& $b2tservice->tagCloud($userPopularTags, 5, 90, 175);
|
$userPopularTagsCloud = $b2tservice->tagCloud($userPopularTags, 5, 90, 175);
|
||||||
$userPopularTagsCount = count($userPopularTags);
|
$userPopularTagsCount = count($userPopularTags);
|
||||||
|
|
||||||
//tags from all users
|
//tags from all users
|
||||||
$allPopularTags =& $b2tservice->getPopularTags(null, 5, $logged_on_userid);
|
$allPopularTags = $b2tservice->getPopularTags(null, 5, $logged_on_userid);
|
||||||
$allPopularTagsCloud =& $b2tservice->tagCloud($allPopularTags, 5, 90, 175);
|
$allPopularTagsCloud = $b2tservice->tagCloud($allPopularTags, 5, 90, 175);
|
||||||
$allPopularTagsCount = count($allPopularTags);
|
$allPopularTagsCount = count($allPopularTags);
|
||||||
|
|
||||||
|
|
||||||
// function printing the cloud
|
// function printing the cloud
|
||||||
function writeTagsProposition($tagsCloud, $title) {
|
function writeTagsProposition($tagsCloud, $title)
|
||||||
echo 'document.write(\'<div class="collapsible">\');';
|
{
|
||||||
echo 'document.write(\'<h3>'. $title .'<\/h3>\');';
|
static $id = 0;
|
||||||
echo 'document.write(\'<p id="popularTags" class="tags">\');';
|
++$id;
|
||||||
|
|
||||||
|
echo <<<JS
|
||||||
|
$('.edit-tagclouds')
|
||||||
|
.append(
|
||||||
|
'<div class="collapsible" id="edit-tagcloud-$id">'
|
||||||
|
+ ' <h3>$title</h3>'
|
||||||
|
+ ' <p class="popularTags tags"></p>'
|
||||||
|
+ '</div>');
|
||||||
|
JS;
|
||||||
|
|
||||||
$taglist = '';
|
$taglist = '';
|
||||||
foreach(array_keys($tagsCloud) as $key) {
|
foreach (array_keys($tagsCloud) as $key) {
|
||||||
$row =& $tagsCloud[$key];
|
$row = $tagsCloud[$key];
|
||||||
$entries = T_ngettext('bookmark', 'bookmarks', $row['bCount']);
|
$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('
|
||||||
echo 'document.write(\''. $taglist .'\');';
|
. json_encode($taglist)
|
||||||
echo 'document.write(\'<\/p>\');';
|
. ");\n";
|
||||||
echo 'document.write(\'<\/div>\');';
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($allPopularTagsCount > 0 || $userPopularTagsCount > 0 ) { ?>
|
if ($allPopularTagsCount > 0 || $userPopularTagsCount > 0 ) { ?>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
//<![CDATA[
|
||||||
Array.prototype.contains = function (ele) {
|
Array.prototype.contains = function (ele) {
|
||||||
for (var i = 0; i < this.length; i++) {
|
for (var i = 0; i < this.length; i++) {
|
||||||
if (this[i] == ele) {
|
if (this[i] == ele) {
|
||||||
@ -87,20 +99,26 @@ function addonload(addition) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addonload(
|
jQuery(function($) {
|
||||||
function () {
|
<?php
|
||||||
var taglist = document.getElementById('tags');
|
if ($userPopularTagsCount > 0) {
|
||||||
var tags = taglist.value.split(', ');
|
writeTagsProposition($userPopularTagsCloud, T_('Popular Tags'));
|
||||||
|
}
|
||||||
|
if ($allPopularTagsCount > 0) {
|
||||||
|
writeTagsProposition($allPopularTagsCloud, T_('Popular Tags From All Users'));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
var taglist = $('#tags');
|
||||||
|
var tags = taglist.val().split(', ');
|
||||||
|
|
||||||
var populartags = document.getElementById('popularTags').getElementsByTagName('span');
|
var populartags = $('.edit-tagclouds span');
|
||||||
|
|
||||||
for (var i = 0; i < populartags.length; i++) {
|
for (var i = 0; i < populartags.length; i++) {
|
||||||
if (tags.contains(populartags[i].innerHTML)) {
|
if (tags.contains(populartags[i].innerHTML)) {
|
||||||
populartags[i].className = 'selected';
|
populartags[i].className = 'selected';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
function addTag(ele) {
|
function addTag(ele) {
|
||||||
var thisTag = ele.innerHTML;
|
var thisTag = ele.innerHTML;
|
||||||
@ -122,20 +140,9 @@ function addTag(ele) {
|
|||||||
|
|
||||||
document.getElementById('tags').focus();
|
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>
|
</script>
|
||||||
|
<div class="edit-tagclouds"></div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
281
data/templates/default/editbookmark.tpl.php
Normal file
281
data/templates/default/editbookmark.tpl.php
Normal file
@ -0,0 +1,281 @@
|
|||||||
|
<?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']);
|
||||||
|
?>
|
60
data/templates/default/editprofile-sslclientcerts.tpl.php
Normal file
60
data/templates/default/editprofile-sslclientcerts.tpl.php
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<?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 } ?>
|
@ -3,9 +3,7 @@ $this->includeTemplate($GLOBALS['top_include']);
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="<?php echo $formaction; ?>" method="post">
|
<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>
|
<h3><?php echo T_('Account Details'); ?></h3>
|
||||||
|
|
||||||
@ -28,7 +26,15 @@ $this->includeTemplate($GLOBALS['top_include']);
|
|||||||
<tr>
|
<tr>
|
||||||
<th align="left"><?php echo T_('E-mail'); ?></th>
|
<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><input type="text" name="pMail" size="75" value="<?php echo filter($objectUser->getEmail(), 'xml'); ?>" /></td>
|
||||||
<td>← <?php echo T_('Required'); ?></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>
|
||||||
|
<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>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -52,13 +58,15 @@ $this->includeTemplate($GLOBALS['top_include']);
|
|||||||
<td><input type="submit" name="submitted" value="<?php echo T_('Save Changes'); ?>" /></td>
|
<td><input type="submit" name="submitted" value="<?php echo T_('Save Changes'); ?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<?php include 'editprofile-sslclientcerts.tpl.php'; ?>
|
||||||
<h3><?php echo T_('Actions'); ?></h3>
|
<h3><?php echo T_('Actions'); ?></h3>
|
||||||
<table class="profile">
|
<table class="profile">
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left"><?php echo T_('Export bookmarks'); ?></th>
|
<th align="left"><?php echo T_('Export bookmarks'); ?></th>
|
||||||
<td>
|
<td>
|
||||||
<a href="../api/export_html.php"><?php echo T_('HTML file (for browsers)')?></a> /
|
<a href="../api/export_html.php"><?php echo T_('HTML file (for browsers)')?></a> /
|
||||||
<a href="../api/posts/all"><?php echo T_('XML file (like del.icio.us)')?></a> /
|
<a href="../api/posts_all.php"><?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>
|
<a href="../api/export_csv.php"><?php echo T_('CSV file (for spreadsheet tools)')?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
@ -30,7 +30,7 @@ $this->includeTemplate($GLOBALS['top_include']);
|
|||||||
|
|
||||||
<h3><?php echo T_('Instructions'); ?></h3>
|
<h3><?php echo T_('Instructions'); ?></h3>
|
||||||
<ol>
|
<ol>
|
||||||
<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_('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_('Save the resulting <abbr title="Extensible Markup Language">XML</abbr> file to your computer'); ?>.</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_('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>
|
<li><?php echo T_('Select the default privacy setting for your imported bookmarks'); ?>.</li>
|
@ -22,9 +22,14 @@ window.onload = function() {
|
|||||||
<td><input type="password" id="password" name="password" size="20" class="required" /></td>
|
<td><input type="password" id="password" name="password" size="20" class="required" /></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<th align="left"><label for="email"><?php echo T_('E-mail'); ?></label></th>
|
<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" /></td>
|
<td><input type="text" id="email" name="email" size="40" class="required" value="<?php echo htmlspecialchars(POST_MAIL); ?>" /></td>
|
||||||
<td><?php echo '←'.T_(' to send you your password if you forget it')?></td>
|
<td><?php echo '←'.T_(' to send you your password if you forget it')?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -1,10 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n";
|
echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n";
|
||||||
?>
|
?>
|
||||||
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||||
|
>
|
||||||
<channel>
|
<channel>
|
||||||
<title><?php echo htmlspecialchars($feedtitle); ?></title>
|
<title><?php echo $feedtitle; ?></title>
|
||||||
<link><?php echo htmlspecialchars($feedlink); ?></link>
|
<link><?php echo htmlspecialchars($pagelink); ?></link>
|
||||||
|
<atom:link rel="self" type="application/rss+xml" href="<?php echo htmlspecialchars($feedlink); ?>"/>
|
||||||
<description><?php echo htmlspecialchars($feeddescription); ?></description>
|
<description><?php echo htmlspecialchars($feeddescription); ?></description>
|
||||||
<pubDate><?php echo date('r'); ?></pubDate>
|
<pubDate><?php echo date('r'); ?></pubDate>
|
||||||
<lastBuildDate><?php echo $feedlastupdate ?></lastBuildDate>
|
<lastBuildDate><?php echo $feedlastupdate ?></lastBuildDate>
|
||||||
@ -14,6 +17,7 @@ echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n";
|
|||||||
<item>
|
<item>
|
||||||
<title><?php echo htmlspecialchars($bookmark['title']); ?></title>
|
<title><?php echo htmlspecialchars($bookmark['title']); ?></title>
|
||||||
<link><?php echo htmlspecialchars($bookmark['link']); ?></link>
|
<link><?php echo htmlspecialchars($bookmark['link']); ?></link>
|
||||||
|
<guid><?php echo $bookmark['guid']; ?></guid>
|
||||||
<description><?php echo htmlspecialchars($bookmark['description']); ?></description>
|
<description><?php echo htmlspecialchars($bookmark['description']); ?></description>
|
||||||
<dc:creator><?php echo htmlspecialchars($bookmark['creator']); ?></dc:creator>
|
<dc:creator><?php echo htmlspecialchars($bookmark['creator']); ?></dc:creator>
|
||||||
<pubDate><?php echo $bookmark['pubdate']; ?></pubDate>
|
<pubDate><?php echo $bookmark['pubdate']; ?></pubDate>
|
||||||
@ -23,4 +27,4 @@ echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n";
|
|||||||
</item>
|
</item>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||||
$commonTags =& $b2tservice->getRelatedTagsByHash($hash);
|
$commonTags = $b2tservice->getRelatedTagsByHash($hash);
|
||||||
$commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
|
$commonTags = $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
|
||||||
|
|
||||||
if ($commonTags && count($commonTags) > 0) {
|
if ($commonTags && count($commonTags) > 0) {
|
||||||
?>
|
?>
|
66
data/templates/default/sidebar.block.linked.php
Normal file
66
data/templates/default/sidebar.block.linked.php
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<?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>
|
@ -65,13 +65,13 @@ if (sizeof($menuTags) > 0 || ($userid != 0 && $userid === $logged_on_userid)) {
|
|||||||
<?php $cUser = $userservice->getUser($userid); ?>
|
<?php $cUser = $userservice->getUser($userid); ?>
|
||||||
<?php if($userid>0): ?>
|
<?php if($userid>0): ?>
|
||||||
<?php if($userid==$logged_on_userid): ?>
|
<?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> →</p>
|
||||||
<?php else: ?>
|
<?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> →</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php else : ?>
|
<?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> →</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
71
data/templates/default/sidebar.block.menu2.php
Normal file
71
data/templates/default/sidebar.block.menu2.php
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<?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
|
||||||
|
}
|
||||||
|
?>
|
@ -14,8 +14,8 @@ $logged_on_userid = $userservice->getCurrentUserId();
|
|||||||
if ($logged_on_userid === false) {
|
if ($logged_on_userid === false) {
|
||||||
$logged_on_userid = NULL;
|
$logged_on_userid = NULL;
|
||||||
}
|
}
|
||||||
$popularTags =& $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid);
|
$popularTags = $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid);
|
||||||
$popularTags =& $b2tservice->tagCloud($popularTags, 5, 90, 225, 'alphabet_asc');
|
$popularTags = $b2tservice->tagCloud($popularTags, 5, 90, 225, 'alphabet_asc');
|
||||||
|
|
||||||
if ($popularTags && count($popularTags) > 0) {
|
if ($popularTags && count($popularTags) > 0) {
|
||||||
?>
|
?>
|
@ -10,7 +10,7 @@ if ($logged_on_userid === false) {
|
|||||||
$logged_on_userid = NULL;
|
$logged_on_userid = NULL;
|
||||||
}
|
}
|
||||||
$recentTags = $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid, $GLOBALS['defaultRecentDays']);
|
$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) {
|
if ($recentTags && count($recentTags) > 0) {
|
||||||
?>
|
?>
|
||||||
@ -31,7 +31,7 @@ if ($recentTags && count($recentTags) > 0) {
|
|||||||
}
|
}
|
||||||
echo $contents ."</p>\n";
|
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> →</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
51
data/templates/default/sidebar.block.search.php
Normal file
51
data/templates/default/sidebar.block.search.php
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?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
|
||||||
|
}
|
||||||
|
?>
|
@ -18,7 +18,7 @@ if ($lastUsers && count($lastUsers) > 0) {
|
|||||||
foreach ($lastUsers as $row) {
|
foreach ($lastUsers as $row) {
|
||||||
echo '<tr><td>';
|
echo '<tr><td>';
|
||||||
echo '<a href="'.createURL('profile', $row['username']).'">';
|
echo '<a href="'.createURL('profile', $row['username']).'">';
|
||||||
echo $row['username'];
|
echo SemanticScuttle_Model_UserArray::getName($row);
|
||||||
echo '</a>';
|
echo '</a>';
|
||||||
echo ' (<a href="'.createURL('bookmarks', $row['username']).'">'.T_('bookmarks').'</a>)';
|
echo ' (<a href="'.createURL('bookmarks', $row['username']).'">'.T_('bookmarks').'</a>)';
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
@ -27,7 +27,7 @@ foreach ($lastUsers as $row) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</table>
|
</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> →</p>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
@ -16,7 +16,7 @@ foreach($watching as $watchuser) {
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<?php if(count($closeContacts)>0):?>
|
<?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 ' ↔ '. T_('Close contacts'); ?></h2>
|
||||||
<div id="watching">
|
<div id="watching">
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach($closeContacts as $watchuser): ?>
|
<?php foreach($closeContacts as $watchuser): ?>
|
||||||
@ -27,7 +27,7 @@ foreach($watching as $watchuser) {
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
||||||
<h2><?php echo ' → '. T_('Watching'); ?></h2>
|
<h2><?php echo ' → '. T_('Watching'); ?></h2>
|
||||||
<div id="watching">
|
<div id="watching">
|
||||||
<ul>
|
<ul>
|
||||||
<?php if($userservice->isLoggedOn() && $currentUser->getUsername() == $user): ?>
|
<?php if($userservice->isLoggedOn() && $currentUser->getUsername() == $user): ?>
|
||||||
@ -41,7 +41,7 @@ foreach($watching as $watchuser) {
|
|||||||
<?php foreach($watching as $watchuser): ?>
|
<?php foreach($watching as $watchuser): ?>
|
||||||
<li><a href="<?php echo createURL('bookmarks', $watchuser); ?>"><?php echo $watchuser; ?></a>
|
<li><a href="<?php echo createURL('bookmarks', $watchuser); ?>"><?php echo $watchuser; ?></a>
|
||||||
<?php if($userservice->isLoggedOn() && $currentUser->getUsername() == $user): ?>
|
<?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>
|
</li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -49,7 +49,7 @@ foreach($watching as $watchuser) {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2><?php echo ' ← '. T_('Watched By'); ?></h2>
|
<h2><?php echo ' ← '. T_('Watched By'); ?></h2>
|
||||||
<div id="watching">
|
<div id="watching">
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach($watchedBy as $watchuser): ?>
|
<?php foreach($watchedBy as $watchuser): ?>
|
23
data/templates/default/sidebar.tpl.php
Normal file
23
data/templates/default/sidebar.tpl.php
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<?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>
|
@ -4,7 +4,7 @@ $this->includeTemplate($GLOBALS['top_include']);
|
|||||||
|
|
||||||
<form action="<?php echo $formaction; ?>" method="post">
|
<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 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/>
|
<small style="text-align:right"><?php echo T_('Note: use ">" to include one tag in another. e.g.: europe>france>paris')?></small><br/>
|
||||||
</p>
|
</p>
|
@ -20,7 +20,8 @@ window.onload = function() {
|
|||||||
if(strlen($description['cdDatetime'])>0) {
|
if(strlen($description['cdDatetime'])>0) {
|
||||||
echo T_('Last modification:').' '.$description['cdDatetime'].', ';
|
echo T_('Last modification:').' '.$description['cdDatetime'].', ';
|
||||||
$lastUser = $userservice->getUser($description['uId']);
|
$lastUser = $userservice->getUser($description['uId']);
|
||||||
echo '<a href="'.createURL('profile', $lastUser['username']).'">'.$lastUser['username'].'</a>';
|
echo '<a href="' . createURL('profile', $lastUser['username']) . '">'
|
||||||
|
. SemanticScuttle_Model_UserArray::getName($lastUser) . '</a>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -35,7 +36,6 @@ window.onload = function() {
|
|||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php if (isset($referrer)): ?>
|
<?php if (isset($referrer)): ?>
|
||||||
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
|
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
|
@ -21,7 +21,6 @@ window.onload = function() {
|
|||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php if (isset($referrer)): ?>
|
<?php if (isset($referrer)): ?>
|
||||||
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
|
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
|
@ -11,12 +11,12 @@ window.onload = function() {
|
|||||||
<tr>
|
<tr>
|
||||||
<th align="left"><?php echo T_('Old'); ?></th>
|
<th align="left"><?php echo T_('Old'); ?></th>
|
||||||
<td><input type="text" name="old" id="old" value="<?php echo $old; ?>" /></td>
|
<td><input type="text" name="old" id="old" value="<?php echo $old; ?>" /></td>
|
||||||
<td>← <?php echo T_('Required'); ?></td>
|
<td>← <?php echo T_('Required'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left"><?php echo T_('New'); ?></th>
|
<th align="left"><?php echo T_('New'); ?></th>
|
||||||
<td><input type="text" name="new" id="new" value="" /></td>
|
<td><input type="text" name="new" id="new" value="" /></td>
|
||||||
<td>← <?php echo T_('Required'); ?></td>
|
<td>← <?php echo T_('Required'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
@ -28,7 +28,6 @@ window.onload = function() {
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</p>
|
|
||||||
|
|
||||||
<?php if (isset($referrer)): ?>
|
<?php if (isset($referrer)): ?>
|
||||||
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
|
<div><input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /></div>
|
85
data/templates/default/toolbar.inc.php
Normal file
85
data/templates/default/toolbar.inc.php
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<?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
|
||||||
|
}
|
||||||
|
?>
|
84
data/templates/default/top.inc.php
Normal file
84
data/templates/default/top.inc.php
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?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";
|
||||||
|
}
|
||||||
|
?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user