Compare commits
261 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ce9570d6fb | ||
|
727c83ba90 | ||
|
448993a379 | ||
|
012c2669b9 | ||
|
b36c248277 | ||
|
badbbbda87 | ||
|
b214c9bcbe | ||
|
1e88957526 | ||
|
e4a4aea077 | ||
|
c60c23a94e | ||
|
fb0fdfcb8b | ||
|
5a719ece2d | ||
|
0440d0c0c8 | ||
|
bd9feba714 | ||
|
e6a578b8a7 | ||
|
6463bfe723 | ||
|
3dfb294b25 | ||
|
ac0e17fbe4 | ||
|
9831201224 | ||
|
8418af7535 | ||
|
be234a4b9f | ||
|
72cc886a4e | ||
|
6768ab5363 | ||
|
34623ae194 | ||
|
71649250ca | ||
|
9781ea96b7 | ||
|
a27fa8f54f | ||
|
965c5b8466 | ||
|
fd28b2e7bd | ||
|
473ca28c62 | ||
|
016a572542 | ||
|
7c93ed1343 | ||
|
4051402895 | ||
|
0fdd28f5ab | ||
|
df98b67e0f | ||
|
c01ba0e802 | ||
|
cb138c237c | ||
|
c00bfe8499 | ||
|
d18f5bb167 | ||
|
72964e12ac | ||
|
36f8d3df6d | ||
|
463c45945d | ||
|
ce6d917324 | ||
|
c714cd8db1 | ||
|
920faa774d | ||
|
e261c6ca39 | ||
|
61c6dcecad | ||
|
f930dd2ce6 | ||
|
411e2cfffd | ||
|
319cbcc192 | ||
|
9a508048fd | ||
|
8242f64f61 | ||
|
deafb2e4a6 | ||
|
f257d04cef | ||
|
fa92641baf | ||
|
e191493d08 | ||
|
7277a3434f | ||
|
04c65079d2 | ||
|
c33d83fae9 | ||
|
c3732fffba | ||
|
da8177e024 | ||
|
61588c3b71 | ||
|
1926a41008 | ||
|
b77ec2b14a | ||
|
45635467ee | ||
|
6bd42a4f8e | ||
|
9c55a12dd7 | ||
|
2c7df929c2 | ||
|
b1ca9f48ec | ||
|
827eb2428f | ||
|
a9df296015 | ||
|
18742e0d51 | ||
|
a2635c8c62 | ||
|
ffc1390747 | ||
|
a01ec14c18 | ||
|
dc9c9376b4 | ||
|
5cfe02bd8b | ||
|
cb5892983f | ||
|
3ca80e11c5 | ||
|
4e837f9df1 | ||
|
2b98549abd | ||
|
70411bed0c | ||
|
53eac36cd2 | ||
|
5d2998efa1 | ||
|
5d552889e6 | ||
|
7d681028c4 | ||
|
7227afd103 | ||
|
d600f91fd9 | ||
|
b52047a6a7 | ||
|
9ff781f011 | ||
|
2b6d478b54 | ||
|
9594818e9c | ||
|
6a94cc7988 | ||
|
16003af8d7 | ||
|
55d4b004ae | ||
|
e86e993aab | ||
|
b00d1b974c | ||
|
308827143c | ||
|
75e0afa1b8 | ||
|
30a96092c4 | ||
|
ba722d3d9d | ||
|
9fe17960ba | ||
|
82a6858e69 | ||
|
85b81c2d6e | ||
|
389e800a2f | ||
|
2362992949 | ||
|
b46a1212be | ||
|
5b43efdcba | ||
|
134a4f8fc2 | ||
|
36babe429e | ||
|
8fbe924bee | ||
|
9bb9f8bf0a | ||
|
306ef30751 | ||
|
01fd1ac1bd | ||
|
b93c73d9e5 | ||
|
eeee56fd0d | ||
|
0c1223fe60 | ||
|
b8446d2878 | ||
|
afca71f88d | ||
|
add18da0d0 | ||
|
998eb24b6f | ||
|
370c022857 | ||
|
5448bc1016 | ||
|
7085337bb9 | ||
|
786187e877 | ||
|
08125bf055 | ||
|
81afba529f | ||
|
a409ad4418 | ||
|
7b8aee161f | ||
|
1ec928bc3a | ||
|
1485e7d9b2 | ||
|
ff72929ef7 | ||
|
7876d40ac4 | ||
|
bbd4de1879 | ||
|
1eedd7d1f1 | ||
|
6397fe9eba | ||
|
e51dad433b | ||
|
4ffa8bb162 | ||
|
8f1389c9c6 | ||
|
ddc88f8d15 | ||
|
edc5f4f477 | ||
|
c4c3f6f3de | ||
|
ac189096dd | ||
|
e4e81bf226 | ||
|
7a1b2d4c26 | ||
|
f847b5333b | ||
|
bd228df341 | ||
|
daa98fb80c | ||
|
fff8df6517 | ||
|
90356bcaaa | ||
|
2e0eaf1d22 | ||
|
be9bdc41c5 | ||
|
2c66abf960 | ||
|
a3dd19e208 | ||
|
7692471592 | ||
|
62921bc5c0 | ||
|
a60cab1254 | ||
|
7c1ab41a92 | ||
|
09186ee810 | ||
|
d2bb83595f | ||
|
52b77be84e | ||
|
bb497367cb | ||
|
3b2d51012a | ||
|
6de432b3da | ||
|
c1cb2bf505 | ||
|
6d41bd85ae | ||
|
302c96e599 | ||
|
04b6f26123 | ||
|
0ff6c48ea9 | ||
|
3137cc0464 | ||
|
a9874b50c5 | ||
|
ee426cf597 | ||
|
43fa2be8b4 | ||
|
c04a991dfd | ||
|
3f8171e4db | ||
|
53eb164f5d | ||
|
89e40fe897 | ||
|
95de4bdd3e | ||
|
42105d6b4c | ||
|
8e1e42bee7 | ||
|
12bfcd35d3 | ||
|
552a3ecd16 | ||
|
8ac9c816f0 | ||
|
e971e3fb1e | ||
|
06fd6c8f4c | ||
|
7e3aee8f69 | ||
|
cdbd8260c5 | ||
|
de301f7474 | ||
|
39b6add614 | ||
|
14938ddac5 | ||
|
a10fcb55f3 | ||
|
5a73f2215a | ||
|
6e00ca26be | ||
|
469c3c9970 | ||
|
b335425dde | ||
|
fbc2b1cf21 | ||
|
5fe7a9626f | ||
|
dc521a6b36 | ||
|
ae4fdb8ef1 | ||
|
83147a41c0 | ||
|
bef975a84e | ||
|
cfec751601 | ||
|
5e204c0120 | ||
|
b0b74215a7 | ||
|
eb2644bc53 | ||
|
e6db8752cb | ||
|
fa34fa35e1 | ||
|
2c75dc7d4f | ||
|
13aeecc0a8 | ||
|
16df3a8d66 | ||
|
d2162b0135 | ||
|
203e57a85b | ||
|
a03efb51dc | ||
|
8bce8bed4f | ||
|
bb9d01f924 | ||
|
a37ad9a625 | ||
|
72aa256cb4 | ||
|
e3261df332 | ||
|
14ad8d3140 | ||
|
48235e8a0c | ||
|
bdf7869571 | ||
|
c9030cda62 | ||
|
101c9d4f3e | ||
|
c60693e6e7 | ||
|
5becea3a8f | ||
|
632a20f8b9 | ||
|
beb72949e7 | ||
|
0aa3940ba6 | ||
|
c98860e989 | ||
|
aea14dd3df | ||
|
84f6a679b8 | ||
|
b872fce5cc | ||
|
5e90e63199 | ||
|
9e44b0dc6a | ||
|
19bb32bda3 | ||
|
b56ac99375 | ||
|
b616a5cace | ||
|
6f1afea151 | ||
|
0a26e9262f | ||
|
7f8547c407 | ||
|
04dfa535c8 | ||
|
b009bb77ad | ||
|
48b182b2f6 | ||
|
6e77aa849f | ||
|
9632bd9283 | ||
|
eb78266bee | ||
|
bf96cc0e28 | ||
|
193938b72c | ||
|
84723bd486 | ||
|
367ea4ce0b | ||
|
f62efc97f7 | ||
|
b3dcc13d0c | ||
|
61b48d0ca1 | ||
|
536a1f907b | ||
|
87d622468f | ||
|
6ea152bdaf | ||
|
64da0446d5 | ||
|
898fed861e | ||
|
7865238e89 | ||
|
708bddfe04 | ||
|
88716f7b6e |
3
.gitignore
vendored
Executable file → Normal file
|
@ -5,7 +5,8 @@
|
|||
/public/data
|
||||
/tmp/*
|
||||
/vendor/*
|
||||
/composer.lock
|
||||
!/vendor/assets
|
||||
!/vendor/Horde
|
||||
!/vendor/ZipStream.php
|
||||
!/vendor/htmLawed
|
||||
!/vendor/htmLawed
|
2
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,2 @@
|
|||
Please create a new branch when ever you want to make a contribution as i use automated pull on all my nodes to keep them up-to-date.
|
||||
You are free to do anything you would like to the project but you must get my approval before you can merge to my branch.
|
84
README.md
Executable file → Normal file
|
@ -1,37 +1,47 @@
|
|||
# MyImouto
|
||||
|
||||
MyImouto is a clone of [Moebooru](https://github.com/moebooru/moebooru) for PHP and MySQL. In order for this clone to be as exact as possible, MyImouto uses a custom framework that is based on Ruby on Rails, thus the code from Moebooru was transcribed to PHP with some small modifications to fit the target language and framework.
|
||||
|
||||
MyImouto development stopped around 2014. By then, the port was mostly complete, with some bugs here and there. For more information about its features, changes and additions compared to Moebooru, please refer to the [About MyImouto](https://github.com/myimouto/myimouto/wiki/About-MyImouto) wiki.
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
* PHP 5.4 or higher.
|
||||
* MySQL v5.5 or higher.
|
||||
* PHP libraries:
|
||||
* GD2
|
||||
* PDO
|
||||
* cURL
|
||||
* Imagick (recommended)
|
||||
* Memcached (recommended)
|
||||
* Composer (Dependency Management for PHP).
|
||||
* If running under Apache, the Rewrite mod must be enabled. Also, to serve gzipped CSS and JS files, the Headers mod is needed.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
For an explained, step-by-step guide, please check the [How to Install](https://github.com/myimouto/myimouto/wiki/How-to-install) guide. Otherwise, here's the quick guide for advanced users:
|
||||
|
||||
* Install system dependencies: `composer install`.
|
||||
* Create a database for the booru.
|
||||
* Create `config/config.php` and `config/database.yml` by copying their respective _.example_ files.
|
||||
* Set your database configuration in `config/database.yml`.
|
||||
* Configure the booru by editing `config/config.php`. For a minimum configuration, both `server_host` and `url_base` options must be correctly set.
|
||||
* Run the installer: `php install.php`. Enter a name and password for the admin account when asked, then wait for the installation to finish.
|
||||
* Finally, point the document root of your web server to the `public` folder. That's where the index.php file is.
|
||||
|
||||
|
||||
## Updating
|
||||
|
||||
Every time you update the files, don't forget to run `composer update` to update dependencies, specially for the framework, and also run `php config/boot.php db:migrate` to run database migrations (if any).
|
||||
![Logo](https://code.acr.moe/kazari/sequenzia/raw/master/public/images/logo.png "Logo")
|
||||
# Sequenzia LTS (MyImouto LTS - ACR Rev.)
|
||||
|
||||
MyImouto is a clone of [Moebooru](https://github.com/moebooru/moebooru) for PHP and MySQL. In order for this clone to be as exact as possible, MyImouto uses a custom framework that is based on Ruby on Rails, thus the code from Moebooru was transcribed to PHP with some small modifications to fit the target language and framework.
|
||||
|
||||
MyImouto development stopped around 2014. By then, the port was mostly complete, with some bugs here and there. For more information about its features, changes and additions compared to Moebooru, please refer to the [About MyImouto](https://github.com/myimouto/myimouto/wiki/About-MyImouto) wiki.
|
||||
|
||||
This Project has now been taken in by ACR to support the LTS project [Sequenzia Project](https://acr.moe/index.php?title=Sequenzia_Project). Its completely open for remixing and branching. Some things are moddifed to fit our setup so
|
||||
|
||||
Very big thanks to Parziphal for his efforts in mantaing this project before we picked it up, his efforts are one of the reason this still works today!
|
||||
|
||||
|
||||
## Requirements
|
||||
|
||||
* PHP 5.4 or higher.
|
||||
* MySQL v5.5 or higher.
|
||||
* PHP libraries:
|
||||
* GD2
|
||||
* PDO
|
||||
* cURL
|
||||
* Imagick (recommended)
|
||||
* Memcached (recommended)
|
||||
* Composer (Dependency Management for PHP).
|
||||
* If running under Apache, the Rewrite mod must be enabled. Also, to serve gzipped CSS and JS files, the Headers mod is needed.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
For an explained, step-by-step guide, please check the following guides:
|
||||
|
||||
* [How to Install (Decentralized)](https://acr.moe/index.php/Build_a_Sequenzia_Booru) - Multiple Servers and with Off-Server Storage and Database
|
||||
* [How to Install (Centralized)](https://code.acr.moe/kazari/sequenzia/wikis/ubuntu-centralized-installation-guide) - All-In-One Setup
|
||||
|
||||
Otherwise, here's the quick guide for advanced users:
|
||||
|
||||
* Install system dependencies: `composer install`.
|
||||
* Create a database for the booru.
|
||||
* Create `config/config.php` and `config/database.yml` by copying their respective _.example_ files.
|
||||
* Set your database configuration in `config/database.yml`.
|
||||
* Configure the booru by editing `config/config.php`. For a minimum configuration, both `server_host` and `url_base` options must be correctly set.
|
||||
* Run the installer: `php install.php`. Enter a name and password for the admin account when asked, then wait for the installation to finish.
|
||||
* Finally, point the document root of your web server to the `public` folder. That's where the index.php file is.
|
||||
|
||||
|
||||
## Updating
|
||||
|
||||
Every time you update the files, don't forget to run `composer update` to update dependencies, specially for the framework, and also run `php config/boot.php db:migrate` to run database migrations (if any).
|
||||
|
|
|
@ -1328,6 +1328,10 @@ a.directlink {
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
a.extremeimg {
|
||||
background: #111;
|
||||
}
|
||||
|
||||
a.largeimg {
|
||||
background: #111;
|
||||
}
|
||||
|
@ -1344,6 +1348,22 @@ a.largeimg:hover {
|
|||
background-image: none;
|
||||
}
|
||||
|
||||
a.rating-e:hover {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
a.rating-q:hover {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
a.rating-s:hover {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
a.extremeimg:hover {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
a.directlink > span.directlink-res {
|
||||
display: none;
|
||||
margin: 0;
|
||||
|
@ -1371,14 +1391,25 @@ a.directlink:hover > .directlink-info {
|
|||
.pending-display { display: none; height: 16px; width: 14px; }
|
||||
.pending .pending-display { display: inline; }
|
||||
|
||||
.has-children .directlink-icon { display: none; }
|
||||
.has-parent .directlink-icon { display: none; }
|
||||
.flagged .directlink-icon { display: none; }
|
||||
.pending .directlink-icon { display: none; }
|
||||
.largeimg .directlink-icon-small { display: none; }
|
||||
.smallimg .directlink-icon-large { display: none; }
|
||||
.extremeimg .directlink-icon-small { display: none; }
|
||||
.extremeimg .directlink-icon-large { display: none; }
|
||||
|
||||
.similar .directlink-icon { display: none; }
|
||||
.largeimg .directlink-icon-small { display: none; }
|
||||
.largeimg .directlink-icon-uhd { display: none; }
|
||||
|
||||
.smallimg .directlink-icon-large { display: none; }
|
||||
.smallimg .directlink-icon-uhd { display: none; }
|
||||
|
||||
.file-jpg .file-type-png,.file-jpg .file-type-gif,.file-jpg .file-type-mp4,.file-jpg .file-type-flv,.file-jpg .file-type-webm { display: none; }
|
||||
.file-png .file-type-jpg,.file-png .file-type-gif,.file-png .file-type-mp4,.file-png .file-type-flv,.file-png .file-type-webm { display: none; }
|
||||
.file-gif .file-type-jpg,.file-gif .file-type-png,.file-gif .file-type-mp4,.file-gif .file-type-flv,.file-gif .file-type-webm { display: none; }
|
||||
.file-mp4 .file-type-jpg,.file-mp4 .file-type-png,.file-mp4 .file-type-gif,.file-mp4 .file-type-flv,.file-mp4 .file-type-webm { display: none; }
|
||||
.file-flv .file-type-jpg,.file-flv .file-type-png,.file-flv .file-type-gif,.file-flv .file-type-mp4,.file-flv .file-type-webm { display: none; }
|
||||
.file-webm .file-type-jpg,.file-webm .file-type-png,.file-webm .file-type-gif,.file-webm .file-type-mp4,.file-webm .file-type-flv { display: none; }
|
||||
|
||||
.rating-e .image-rating-s,.rating-e .image-rating-q { display: none; }
|
||||
.rating-q .image-rating-s,.rating-q .image-rating-e { display: none; }
|
||||
.rating-s .image-rating-q,.rating-s .image-rating-e { display: none; }
|
||||
|
||||
.top-corner-float {
|
||||
position: fixed;
|
||||
|
|
|
@ -5,7 +5,7 @@ class CommentController extends ApplicationController
|
|||
{
|
||||
$this->helper('Avatar', 'Post');
|
||||
}
|
||||
|
||||
|
||||
protected function filters()
|
||||
{
|
||||
return array(
|
||||
|
@ -52,12 +52,12 @@ class CommentController extends ApplicationController
|
|||
}
|
||||
|
||||
$user_id = current_user()->id;
|
||||
|
||||
|
||||
$comment = new Comment(array_merge($this->params()->comment, array('ip_addr' => $this->request()->remoteIp(), 'user_id' => $user_id)));
|
||||
if ($this->params()->commit == "Post without bumping") {
|
||||
$comment->do_not_bump_post = true;
|
||||
}
|
||||
|
||||
|
||||
if ($comment->save()) {
|
||||
$this->respond_to_success("Comment created", '#index');
|
||||
} else {
|
||||
|
@ -75,7 +75,7 @@ class CommentController extends ApplicationController
|
|||
public function index()
|
||||
{
|
||||
$this->set_title('Comments');
|
||||
|
||||
|
||||
if ($this->request()->format() == "json" || $this->request()->format() == "xml") {
|
||||
$this->comments = Comment::generate_sql($this->params()->all())->order("id DESC")->paginate($this->page_number(), 25);
|
||||
$this->respond_to_list("comments");
|
||||
|
@ -99,30 +99,30 @@ class CommentController extends ApplicationController
|
|||
$query = Comment::order('id desc');
|
||||
$search_query = explode(' ', $this->params()->query);
|
||||
$search_terms = array();
|
||||
|
||||
$user_search = false;
|
||||
|
||||
foreach ($search_query as $s) {
|
||||
if (!$s) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strpos($s, 'user:') === 0 && strlen($s) > 5) {
|
||||
|
||||
if (!$user_search && strpos($s, 'user:') === 0 && strlen($s) > 5) {
|
||||
list($search_type, $param) = explode(':', $s);
|
||||
|
||||
|
||||
if ($user = User::where(['name' => $param])->first()) {
|
||||
$query->where('user_id = ?', $user->id);
|
||||
} else {
|
||||
$query->where('false');
|
||||
$user_search = true;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$search_terms[] = $s;
|
||||
}
|
||||
|
||||
|
||||
if ($search_terms) {
|
||||
$query->where('body LIKE ?', '%' . implode('%', $search_terms) . '%');
|
||||
} else {
|
||||
# MI: this query makes no sense, it will return nothing.
|
||||
} elseif (!$user_search) {
|
||||
$query->where('false');
|
||||
}
|
||||
|
||||
|
|
|
@ -66,21 +66,17 @@ class DmailController extends ApplicationController
|
|||
$this->dmail->mark_as_read($this->current_user);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function confirmMarkAllRead()
|
||||
{
|
||||
}
|
||||
|
||||
public function markAllRead()
|
||||
{
|
||||
if ($this->params()->commit == "Yes") {
|
||||
foreach (Dmail::where("to_id = ? and has_seen = false", $this->current_user->id)->take() as $dmail)
|
||||
$dmail->updateAttribute('has_seen', true);
|
||||
foreach (Dmail::where("to_id = ? and has_seen = false", $this->current_user->id)->take() as $dmail)
|
||||
$dmail->updateAttribute('has_seen', true);
|
||||
|
||||
$this->current_user->updateAttribute('has_mail', false);
|
||||
$this->respond_to_success("All messages marked as read", ['action' => "inbox"]);
|
||||
} else {
|
||||
$this->redirectTo("#inbox");
|
||||
}
|
||||
$this->current_user->updateAttribute('has_mail', false);
|
||||
$this->respond_to_success("All messages marked as read", ['action' => "inbox"]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@ class JobTaskController extends ApplicationController
|
|||
{
|
||||
public function index()
|
||||
{
|
||||
$this->job_tasks = JobTask::order("id DESC")->paginate($this->page_number(), 25);
|
||||
$activeTypes = "'" . implode("', '", CONFIG()->active_job_tasks) . "'";
|
||||
$this->job_tasks = JobTask::order("id DESC")->where("task_type IN ($activeTypes)")->paginate($this->page_number(), 25);
|
||||
}
|
||||
|
||||
public function show()
|
||||
|
@ -34,7 +35,7 @@ class JobTaskController extends ApplicationController
|
|||
$this->redirectTo(['action' => "show", 'id' => $this->job_task->id]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function filters()
|
||||
{
|
||||
return [
|
||||
|
|
|
@ -15,7 +15,7 @@ class PostController extends ApplicationController
|
|||
public function upload()
|
||||
{
|
||||
$this->set_title('Upload');
|
||||
|
||||
|
||||
$this->deleted_posts = FlaggedPostDetail::new_deleted_posts(current_user());
|
||||
# if $this->params()->url
|
||||
# $this->post = Post.find(:first, 'conditions' => ["source = ?", $this->params()->url])
|
||||
|
@ -48,9 +48,9 @@ class PostController extends ApplicationController
|
|||
} else {
|
||||
$user_id = current_user()->id;
|
||||
}
|
||||
|
||||
|
||||
// $is_upload = array_key_exists('post', $_FILES);
|
||||
|
||||
|
||||
# iTODO
|
||||
$post_params = array_merge($this->params()->post ?: array(), array(
|
||||
'updater_user_id' => current_user()->id,
|
||||
|
@ -65,9 +65,9 @@ class PostController extends ApplicationController
|
|||
// 'tempfile_name' => $is_upload ? $_FILES['post']['name']['file'] : null,
|
||||
// 'is_upload' => $is_upload,
|
||||
));
|
||||
|
||||
|
||||
$this->post = Post::create($post_params);
|
||||
|
||||
|
||||
if ($this->post->errors()->blank()) {
|
||||
if ($this->params()->md5 && $this->post->md5 != strtolower($this->params()->md5)) {
|
||||
$this->post->destroy();
|
||||
|
@ -95,7 +95,7 @@ class PostController extends ApplicationController
|
|||
}
|
||||
} elseif ($this->post->errors()->on('md5')) {
|
||||
$p = Post::where(['md5' => $this->post->md5])->first();
|
||||
|
||||
|
||||
$update = array('tags' => $p->cached_tags . " " . (isset($this->params()->post['tags']) ? $this->params()->post['tags'] : ''), 'updater_user_id' => $this->session()->user_id, 'updater_ip_addr' => $this->request()->remoteIp());
|
||||
if (!$p->source && $this->post->source)
|
||||
$update['source'] = $this->post->source;
|
||||
|
@ -114,36 +114,36 @@ class PostController extends ApplicationController
|
|||
public function moderate()
|
||||
{
|
||||
$this->set_title('Moderation Queue');
|
||||
|
||||
|
||||
if ($this->request()->isPost()) {
|
||||
$posts = new Rails\ActiveRecord\Collection();
|
||||
|
||||
|
||||
if ($this->params()->ids) {
|
||||
foreach (array_keys($this->params()->ids) as $post_id) {
|
||||
$post = Post::find($post_id);
|
||||
|
||||
|
||||
if ($this->params()->commit == "Approve")
|
||||
$post->approve(current_user()->id);
|
||||
elseif ($this->params()->commit == "Delete") {
|
||||
$post->destroy_with_reason(($this->params()->reason ? $this->params()->reason : $this->params()->reason2), current_user());
|
||||
|
||||
|
||||
# Include post data for the parent: deleted posts aren't counted as children, so
|
||||
# their has_children attribute may change.
|
||||
if ($post->parent_id)
|
||||
$posts[] = $post->get_parent();
|
||||
}
|
||||
|
||||
|
||||
# Post may have been permanently deleted.
|
||||
if (!CONFIG()->delete_posts_permanently) {
|
||||
$post->reload();
|
||||
}
|
||||
|
||||
|
||||
$posts[] = $post;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$posts->unique();
|
||||
|
||||
|
||||
if ($this->request()->format() == "json" || $this->request()->format() == "xml")
|
||||
$api_data = Post::batch_api_data($posts->members());
|
||||
else
|
||||
|
@ -153,7 +153,7 @@ class PostController extends ApplicationController
|
|||
$this->respond_to_success("Post approved", "#moderate", array('api' => $api_data));
|
||||
elseif ($this->params()->commit == "Delete")
|
||||
$this->respond_to_success("Post deleted", "#moderate", array('api' => $api_data));
|
||||
|
||||
|
||||
} else {
|
||||
if ($this->params()->query) {
|
||||
list($sql, $params) = Post::generate_sql($this->params()->query, array('pending' => true, 'order' => "id desc"));
|
||||
|
@ -175,13 +175,13 @@ class PostController extends ApplicationController
|
|||
return;
|
||||
}
|
||||
$user_id = current_user()->id;
|
||||
|
||||
|
||||
$post = $this->params()->post;
|
||||
Post::filter_api_changes($post);
|
||||
|
||||
|
||||
$post['updater_user_id'] = current_user()->id;
|
||||
$post['updater_ip_addr'] = $this->request()->remoteIp();
|
||||
|
||||
|
||||
if ($this->post->updateAttributes($post)) {
|
||||
# Reload the post to send the new status back; not all changes will be reflected in
|
||||
# $this->post due to after_save changes.
|
||||
|
@ -200,7 +200,7 @@ class PostController extends ApplicationController
|
|||
public function updateBatch()
|
||||
{
|
||||
$user_id = current_user()->id;
|
||||
|
||||
|
||||
$ids = array();
|
||||
if (!is_array($this->params()->post))
|
||||
$this->params()->post = [];
|
||||
|
@ -217,7 +217,7 @@ class PostController extends ApplicationController
|
|||
|
||||
$p = Post::find($post_id);
|
||||
$ids[] = $p->id;
|
||||
|
||||
|
||||
# If an entry has only an ID, it was just included in the list to receive changes to
|
||||
# a post without changing it (for example, to receive the parent's data after reparenting
|
||||
# a post under it).
|
||||
|
@ -226,7 +226,7 @@ class PostController extends ApplicationController
|
|||
$old_parent_id = $p->parent_id;
|
||||
|
||||
Post::filter_api_changes($post);
|
||||
|
||||
|
||||
if ($p->updateAttributes(array_merge($post, array('updater_user_id' => $user_id, 'updater_ip_addr' => $this->request()->remoteIp())))) {
|
||||
// post.merge(:updater_user_id => user_id, :updater_ip_addr => request.remoteIp))
|
||||
# Reload the post to send the new status back; not all changes will be reflected in
|
||||
|
@ -261,7 +261,7 @@ class PostController extends ApplicationController
|
|||
else
|
||||
$this->post_parent = null;
|
||||
}
|
||||
|
||||
|
||||
public function destroy()
|
||||
{
|
||||
if ($this->params()->commit == "Cancel") {
|
||||
|
@ -290,7 +290,7 @@ class PostController extends ApplicationController
|
|||
$options = ['api' => Post::batch_api_data([$this->post])];
|
||||
else
|
||||
$options = [];
|
||||
|
||||
|
||||
$this->respond_to_success($notice, array('#show', 'id' => $this->params()->id), $options);
|
||||
}
|
||||
} else {
|
||||
|
@ -305,13 +305,13 @@ class PostController extends ApplicationController
|
|||
}
|
||||
|
||||
$page = $this->page_number();
|
||||
|
||||
|
||||
$query = Post::order("flagged_post_details.created_at DESC")
|
||||
->select('posts.*')
|
||||
->group('posts.id')
|
||||
->joins("JOIN flagged_post_details ON flagged_post_details.post_id = posts.id")
|
||||
->page($page)->perPage(25);
|
||||
|
||||
|
||||
if ($this->params()->user_id) {
|
||||
$user_id = (int)$this->params()->user_id;
|
||||
$this->posts = $query->where("posts.status = 'deleted' AND posts.user_id = ? ", $user_id)->paginate();
|
||||
|
@ -319,14 +319,14 @@ class PostController extends ApplicationController
|
|||
$this->posts = $query->where("posts.status = 'deleted'")->paginate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function acknowledgeNewDeletedPosts()
|
||||
{
|
||||
if (!current_user()->is_anonymous())
|
||||
current_user()->updateAttribute('last_deleted_post_seen_at', date('Y-m-d H:i:s'));
|
||||
$this->respond_to_success("Success", array());
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
$tags = $this->params()->tags;
|
||||
|
@ -334,7 +334,7 @@ class PostController extends ApplicationController
|
|||
$page = $this->page_number();
|
||||
$this->tag_suggestions = $this->searching_pool = array();
|
||||
|
||||
/* if $this->current_user.is_member_or_lower? && count(split_tags) > 2
|
||||
/* if $this->current_user.is_member_or_lower? && count(split_tags) > 2
|
||||
# $this->respond_to_error("You can only search up to two tags at once with a basic account", 'action' => "error")
|
||||
# return;
|
||||
# elseif count(split_tags) > 6
|
||||
|
@ -352,9 +352,9 @@ class PostController extends ApplicationController
|
|||
$limit > 1000 && $limit = 1000;
|
||||
|
||||
$count = 0;
|
||||
|
||||
|
||||
$this->set_title("/" . str_replace("_", " ", $tags));
|
||||
|
||||
|
||||
// try {
|
||||
$count = Post::fast_count($tags);
|
||||
// vde($count);
|
||||
|
@ -363,7 +363,7 @@ class PostController extends ApplicationController
|
|||
// return;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
$this->ambiguous_tags = Tag::select_ambiguous($split_tags);
|
||||
if (isset($q['pool']) and is_int($q['pool']))
|
||||
$this->searching_pool = Pool::where(['id' => $q['pool']])->first();
|
||||
|
@ -372,13 +372,13 @@ class PostController extends ApplicationController
|
|||
|
||||
// $this->posts = Post::find_all(array('page' => $page, 'per_page' => $limit, $count));
|
||||
// $this->posts = WillPaginate::Collection.new(page, limit, count);
|
||||
|
||||
|
||||
// $offset = $this->posts->offset();
|
||||
// $posts_to_load = $this->posts->per_page();
|
||||
$per_page = $limit;
|
||||
$offset = ($page - 1) * $per_page;
|
||||
$posts_to_load = $per_page;
|
||||
|
||||
|
||||
if (!$from_api) {
|
||||
# For forward preloading:
|
||||
// $posts_to_load += $this->posts->per_page();
|
||||
|
@ -398,16 +398,16 @@ class PostController extends ApplicationController
|
|||
|
||||
$this->showing_holds_only = isset($q['show_holds']) && $q['show_holds'] == 'only';
|
||||
list ($sql, $params) = Post::generate_sql($q, array('original_query' => $tags, 'from_api' => $from_api, 'order' => "p.id DESC", 'offset' => $offset, 'limit' => $posts_to_load));
|
||||
|
||||
|
||||
$results = Post::findBySql($sql, $params);
|
||||
|
||||
|
||||
$this->preload = new Rails\ActiveRecord\Collection();
|
||||
if (!$from_api) {
|
||||
if ($page && $page > 1) {
|
||||
$this->preload = $results->slice(0, $limit);
|
||||
$results = $results->slice($limit);
|
||||
}
|
||||
|
||||
|
||||
$this->preload->merge($results->slice($limit));
|
||||
|
||||
$results = $results->slice(0, $limit);
|
||||
|
@ -425,7 +425,7 @@ class PostController extends ApplicationController
|
|||
return;
|
||||
}
|
||||
$this->posts = new Rails\ActiveRecord\Collection($results->members(), ['page' => $page, 'perPage' => $per_page, 'totalRows' => $count]);
|
||||
|
||||
|
||||
if ($count < CONFIG()->post_index_default_limit && count($split_tags) == 1) {
|
||||
$this->tag_suggestions = Tag::find_suggestions($tags);
|
||||
}
|
||||
|
@ -448,21 +448,21 @@ class PostController extends ApplicationController
|
|||
$this->render(array('json' => array_map(function($p){return $p->api_attributes();}, $this->posts->members())));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$api_data = Post::batch_api_data($this->posts->members(), array(
|
||||
'exclude_tags' => $this->params()->include_tags != "1",
|
||||
'exclude_votes' => $this->params()->include_votes != "1",
|
||||
'exclude_pools' => $this->params()->include_pools != "1",
|
||||
'fake_sample_url' => CONFIG()->fake_sample_url
|
||||
));
|
||||
|
||||
|
||||
$this->render(array('json' => json_encode($api_data)));
|
||||
}
|
||||
// ,
|
||||
// 'atom'
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
// private function is_mobile_browser()
|
||||
// {
|
||||
// if ($agent = $this->request()->get("HTTP_USER_AGENT")) {
|
||||
|
@ -499,28 +499,28 @@ class PostController extends ApplicationController
|
|||
public function show()
|
||||
{
|
||||
$this->helper('Avatar');
|
||||
|
||||
|
||||
try {
|
||||
if ($this->params()->cache)
|
||||
$this->response()->headers()->add("Cache-Control", "max-age=300");
|
||||
$this->cache = $this->params()->cache; # temporary
|
||||
$this->body_only = (int)$this->params()->body == 1;
|
||||
|
||||
|
||||
if ($this->params()->md5) {
|
||||
if (!$this->post = Post::where(['md5' => strtolower($this->params())])->first())
|
||||
throw Rails\ActiveRecord\Exception\RecordNotFoundException();
|
||||
} else {
|
||||
$this->post = Post::find($this->params()->id);
|
||||
}
|
||||
|
||||
|
||||
$this->pools = Pool::where("pools_posts.post_id = {$this->post->id} AND pools_posts.active")->joins("JOIN pools_posts ON pools_posts.pool_id = pools.id")->order("pools.name")->select("pools.name, pools.id")->take();
|
||||
|
||||
|
||||
if ($this->params()->pool_id) {
|
||||
$this->following_pool_post = PoolPost::where("pool_id = ? AND post_id = ?", $this->params()->pool_id, $this->post->id)->first();
|
||||
} else {
|
||||
$this->following_pool_post = PoolPost::where("post_id = ?", $this->post->id)->first();
|
||||
}
|
||||
|
||||
|
||||
$this->tags = array('include' => $this->post->tags());
|
||||
$this->include_tag_reverse_aliases = true;
|
||||
$this->set_title(str_replace('_', ' ', $this->post->title_tags()));
|
||||
|
@ -570,12 +570,11 @@ class PostController extends ApplicationController
|
|||
}
|
||||
|
||||
$this->post_params = $this->params()->all();
|
||||
$end = time();
|
||||
$this->start = strtotime('-'.$period);
|
||||
|
||||
$this->set_title('Exploring ' . $this->period_name);
|
||||
|
||||
$this->posts = Post::where("status <> 'deleted' AND posts.index_timestamp >= ? AND posts.index_timestamp <= ? ", date('Y-m-d', $this->start), date('Y-m-d', $end))->order("score DESC")->limit(20)->take();
|
||||
|
||||
$this->posts = Post::where("status <> 'deleted' AND posts.index_timestamp >= ? AND posts.index_timestamp <= ? ", date('Y-m-d', $this->start), date('Y-m-d H:i:s'))->order("score DESC")->limit(20)->take();
|
||||
|
||||
$this->respond_to_list("posts");
|
||||
}
|
||||
|
@ -588,9 +587,9 @@ class PostController extends ApplicationController
|
|||
}
|
||||
|
||||
$this->set_title('Exploring '.date('Y', $this->day).'/'.date('m', $this->day).'/'.date('d', $this->day));
|
||||
|
||||
|
||||
$this->posts = Post::available()->where('created_at BETWEEN ? AND ?', date('Y-m-d', $this->day), date('Y-m-d', strtotime('+1 day', $this->day)))->order("score DESC")->limit(20)->take();
|
||||
|
||||
|
||||
$this->respond_to_list("posts");
|
||||
}
|
||||
|
||||
|
@ -602,7 +601,7 @@ class PostController extends ApplicationController
|
|||
}
|
||||
|
||||
$this->end = strtotime('next week', $this->start);
|
||||
|
||||
|
||||
$this->set_title('Exploring '.date('Y', $this->start).'/'.date('m', $this->start).'/'.date('d', $this->start) . ' - '.date('Y', $this->end).'/'.date('m', $this->end).'/'.date('d', $this->end));
|
||||
|
||||
$this->posts = Post::available()->where('created_at BETWEEN ? AND ?', date('Y-m-d', $this->start), date('Y-m-d', $this->end))->order('score DESC')->limit(20)->take();
|
||||
|
@ -617,7 +616,7 @@ class PostController extends ApplicationController
|
|||
}
|
||||
|
||||
$this->end = strtotime('+1 month', $this->start);
|
||||
|
||||
|
||||
$this->set_title('Exploring '.date('Y', $this->start).'/'.date('m', $this->start));
|
||||
|
||||
$this->posts = Post::available()->where('created_at BETWEEN ? AND ?', date('Y-m-d', $this->start), date('Y-m-d', $this->end))->order('score DESC')->limit(20)->take();
|
||||
|
@ -642,7 +641,7 @@ class PostController extends ApplicationController
|
|||
$this->respond_to_success("", array(), array('vote' => $score));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$p = Post::find($this->params()->id);
|
||||
$score = (int)$this->params()->score;
|
||||
|
||||
|
@ -669,7 +668,7 @@ class PostController extends ApplicationController
|
|||
if ($this->params()->unflag == '1') {
|
||||
# Allow the user who flagged a post to unflag it.
|
||||
#
|
||||
# posts
|
||||
# posts
|
||||
# "approve" is used both to mean "unflag post" and "approve pending post".
|
||||
if ($post->status != "flagged") {
|
||||
$this->respond_to_error("Can only unflag flagged posts", array("#show", 'id' => $this->params()->id));
|
||||
|
@ -709,13 +708,13 @@ class PostController extends ApplicationController
|
|||
|
||||
foreach(range(1, 10) as $i) {
|
||||
$post = Post::where("id = ? AND status <> 'deleted'", rand(1, $max_id) + 1)->first();
|
||||
|
||||
|
||||
if ($post && $post->can_be_seen_by(current_user())) {
|
||||
$this->redirectTo(array('#show', 'id' => $post->id, 'tag_title' => $post->tag_title()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->notice("Couldn't find a post in 10 tries. Try again.");
|
||||
$this->redirectTo("#index");
|
||||
}
|
||||
|
@ -734,10 +733,10 @@ class PostController extends ApplicationController
|
|||
'width' => null,
|
||||
'height' => null
|
||||
], $this->params()->toArray());
|
||||
|
||||
|
||||
if (!empty($params['data_search']) && !current_user()->is_mod_or_higher())
|
||||
unset($params['data_search']);
|
||||
|
||||
|
||||
if (!SimilarImages::valid_saved_search($params['search_id'])) $params['search_id'] = null;
|
||||
if (!empty($params['width'])) $params['width'] = (int)$params['width'];
|
||||
if (!empty($params['height'])) $params['height'] = (int)$params['height'];
|
||||
|
@ -748,18 +747,18 @@ class PostController extends ApplicationController
|
|||
}
|
||||
|
||||
$this->services = SimilarImages::get_services($params['services']);
|
||||
|
||||
|
||||
if ($this->params()->id) {
|
||||
$this->compared_post = Post::find($this->params()->id);
|
||||
} else {
|
||||
$this->compared_post = new Post();
|
||||
}
|
||||
|
||||
|
||||
$this->errors = null;
|
||||
$this->posts = Post::emptyCollection();
|
||||
$this->similar = [];
|
||||
$similarity = [];
|
||||
|
||||
|
||||
if ($this->compared_post && $this->compared_post->is_deleted()) {
|
||||
$this->respond_to_error("Post deleted", ['post#show', 'id' => $this->params()->id, 'tag_title' => $this->compared_post->tag_title()]);
|
||||
return;
|
||||
|
@ -846,11 +845,11 @@ class PostController extends ApplicationController
|
|||
|
||||
return SimilarImages::similar_images($options);
|
||||
};
|
||||
|
||||
|
||||
$this->searched = false;
|
||||
if ($this->params()->url || $this->params()->id || (!empty($_FILES['file']) && empty($_FILES['file']['error'])) || !empty($this->params()->search_id)) {
|
||||
$res = $search($params);
|
||||
|
||||
|
||||
# Error when no service was selected and/or local search isn't supported
|
||||
if (is_string($res['errors'])) {
|
||||
$this->notice($res['errors']);
|
||||
|
@ -866,13 +865,13 @@ class PostController extends ApplicationController
|
|||
$res = [];
|
||||
$this->errors = [];
|
||||
}
|
||||
|
||||
|
||||
if ($res && $this->searched) {
|
||||
!empty($res['posts']) && $this->posts = $res['posts'];
|
||||
$this->similar = $res;
|
||||
!empty($res['similarity']) && $similarity = $res['similarity'];
|
||||
}
|
||||
|
||||
|
||||
if ($this->request()->format() == "json" || $this->request()->format() == "xml") {
|
||||
if (!empty($this->errors['error'])) {
|
||||
$this->respond_to_error($this->errors['error'], ['#index'], ['status' => 503]);
|
||||
|
@ -931,7 +930,7 @@ class PostController extends ApplicationController
|
|||
$api_data['source'] = $res['external_source'];
|
||||
else
|
||||
$api_data['source'] = '';
|
||||
|
||||
|
||||
if (!empty($res['errors'])) {
|
||||
$api_data['error'] = [];
|
||||
foreach ($res['errors'] as $server => $error) {
|
||||
|
@ -939,10 +938,10 @@ class PostController extends ApplicationController
|
|||
$api_data['error'][] = [ 'server' => $server, 'message' => $error['message'], 'services' => $services ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->respond_to_success('', [], ['api' => $api_data]);
|
||||
}
|
||||
|
||||
|
||||
// fmt.xml do
|
||||
// x = Builder::XmlMarkup.new('indent' => 2)
|
||||
// x.instruct!
|
||||
|
@ -975,19 +974,19 @@ class PostController extends ApplicationController
|
|||
// }
|
||||
// }
|
||||
]);
|
||||
|
||||
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
public function undelete()
|
||||
{
|
||||
$post = Post::where(['id' => $this->params()->id])->first();
|
||||
|
||||
|
||||
if (!$post) {
|
||||
$this->respond_to_error("Post not found", ['#show', 'id' => $this->params()->id]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$post->undelete();
|
||||
|
||||
$affected_posts = [$post];
|
||||
|
@ -1008,7 +1007,7 @@ class PostController extends ApplicationController
|
|||
{
|
||||
throw new Exception();
|
||||
}
|
||||
|
||||
|
||||
public function import()
|
||||
{
|
||||
$import_dir = Rails::publicPath() . '/data/import/';
|
||||
|
@ -1024,18 +1023,18 @@ class PostController extends ApplicationController
|
|||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$resp = !empty($error) ? array('reason' => 'Some files could not be deleted') : array('success' => true);
|
||||
$this->render(array('json' => $resp));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$this->setLayout(false);
|
||||
$this->errors = $this->dupe = false;
|
||||
$post = $this->params()->post;
|
||||
$post['filename'] = stripslashes(utf8_decode($post['filename']));
|
||||
$filepath = $import_dir . $post['filename'];
|
||||
|
||||
|
||||
# Take folders as tags
|
||||
if (is_int(strpos($post['filename'], '/'))) {
|
||||
$folders = str_replace('#', ':', $post['filename']);
|
||||
|
@ -1043,7 +1042,7 @@ class PostController extends ApplicationController
|
|||
array_pop($tags);
|
||||
$post['tags'] = trim($post['tags'].' '.implode(' ', $tags));
|
||||
}
|
||||
|
||||
|
||||
$post = array_merge($post, array(
|
||||
'ip_addr' => $this->request()->remoteIp(),
|
||||
'user_id' => current_user()->id,
|
||||
|
@ -1053,9 +1052,9 @@ class PostController extends ApplicationController
|
|||
'is_import' => true,
|
||||
));
|
||||
unset($post['filename'], $post['i']);
|
||||
|
||||
|
||||
$this->post = Post::create($post);
|
||||
|
||||
|
||||
if ($this->post->errors()->blank()) {
|
||||
$this->import_status = 'Posted';
|
||||
} elseif ($this->post->errors()->invalid('md5')) {
|
||||
|
@ -1070,11 +1069,11 @@ class PostController extends ApplicationController
|
|||
} else {
|
||||
$this->set_title('Import');
|
||||
$this->invalid_files = $this->files = [];
|
||||
|
||||
|
||||
list($this->files, $this->invalid_files, $this->invalid_folders) = Post::get_import_files($import_dir);
|
||||
|
||||
|
||||
$pools = Pool::where('is_active')->take();
|
||||
|
||||
|
||||
if ($pools) {
|
||||
$this->pool_list = '<datalist id="pool_list">';
|
||||
foreach ($pools as $pool)
|
||||
|
@ -1084,12 +1083,12 @@ class PostController extends ApplicationController
|
|||
$this->pool_list = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function searchExternalData()
|
||||
{
|
||||
if (!CONFIG()->enable_find_external_data)
|
||||
throw new Rails\ActiveRecord\Exception\RecordNotFoundException();
|
||||
|
||||
|
||||
if ($this->params()->ids) {
|
||||
$ids = $this->params()->ids;
|
||||
!is_array($ids) && $ids = [$ids];
|
||||
|
@ -1097,7 +1096,7 @@ class PostController extends ApplicationController
|
|||
} else {
|
||||
$this->posts = new Rails\ActiveRecord\Collection();
|
||||
}
|
||||
|
||||
|
||||
$this->services = SimilarImages::get_services('all');
|
||||
}
|
||||
|
||||
|
@ -1124,7 +1123,7 @@ class PostController extends ApplicationController
|
|||
{
|
||||
$this->helper('Avatar', 'Wiki', 'Tag', 'Comment', 'Pool', 'Favorite', 'Advertisements');
|
||||
}
|
||||
|
||||
|
||||
protected function filters()
|
||||
{
|
||||
return [
|
||||
|
@ -1145,4 +1144,4 @@ class PostController extends ApplicationController
|
|||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,21 +10,21 @@ class TagSubscriptionController extends ApplicationController
|
|||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->response()->headers()->setContentType('text/javascript');
|
||||
$this->setLayout(false);
|
||||
|
||||
|
||||
if ($this->request()->isPost()) {
|
||||
if (current_user()->tag_subscriptions->size() >= CONFIG()->max_tag_subscriptions) {
|
||||
$this->tag_subscription = null;
|
||||
} else {
|
||||
$this->tag_subscription = TagSubscription::create(['user_id' => current_user()->id, 'tag_query' => '']);
|
||||
$this->tag_subscription = TagSubscription::create(['user_id' => current_user()->id, 'tag_query' => '', 'name' => 'new tagsub']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function update()
|
||||
{
|
||||
if ($this->request()->isPost()) {
|
||||
|
@ -37,24 +37,24 @@ class TagSubscriptionController extends ApplicationController
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->notice("Tag subscriptions updated");
|
||||
$this->redirectTo('user#edit');
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
$this->tag_subscriptions = current_user()->tag_subscriptions;
|
||||
}
|
||||
|
||||
|
||||
public function destroy()
|
||||
{
|
||||
$this->response()->headers()->setContentType('text/javascript');
|
||||
$this->setLayout(false);
|
||||
|
||||
|
||||
if ($this->request()->isPost()) {
|
||||
$this->tag_subscription = TagSubscription::find($this->params()->id);
|
||||
|
||||
|
||||
if (current_user()->has_permission($this->tag_subscription)) {
|
||||
$this->tag_subscription->destroy();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
class HistoryHelper extends Rails\ActionView\Helper
|
||||
{
|
||||
protected $att_options;
|
||||
|
||||
|
||||
# :all: By default, some changes are not displayed. When displaying details
|
||||
# for a single change, set :all=>true to display all changes.
|
||||
#
|
||||
|
@ -11,12 +11,12 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
{
|
||||
return [ 'suppress_fields' => [] ];
|
||||
}
|
||||
|
||||
|
||||
public function get_attribute_options()
|
||||
{
|
||||
if ($this->att_options)
|
||||
return $this->att_options;
|
||||
|
||||
|
||||
$att_options = [
|
||||
# :suppress_fields => If this attribute was changed, don't display changes to specified
|
||||
# fields to the same object in the same change.
|
||||
|
@ -52,16 +52,16 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
],
|
||||
'never_obsolete' => ['cached_tags' => true] # tags handle obsolete themselves per-tag
|
||||
],
|
||||
|
||||
|
||||
'Pool' => [
|
||||
'primary_order' => 0,
|
||||
|
||||
|
||||
'fields' => [
|
||||
'description' => [ 'primary_order' => 5 ] # we don't handle commas correctly if this isn't last
|
||||
],
|
||||
'never_obsolete' => [ 'description' => true ] # changes to description aren't obsolete just because the text has changed again
|
||||
],
|
||||
|
||||
|
||||
'PoolPost' => [
|
||||
'fields' => [
|
||||
'sequence' => [ 'max_to_display' => 5],
|
||||
|
@ -73,14 +73,14 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
],
|
||||
'cached_tags' => [ ],
|
||||
],
|
||||
|
||||
|
||||
'Tag' => [
|
||||
],
|
||||
|
||||
|
||||
'Note' => [
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
foreach (array_keys($att_options) as $classname) {
|
||||
$att_options[$classname] = array_merge([
|
||||
'fields' => [],
|
||||
|
@ -88,20 +88,20 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
'never_obsolete' => [],
|
||||
'force_show_initial' => []
|
||||
], $att_options[$classname]);
|
||||
|
||||
|
||||
$c = $att_options[$classname]['fields'];
|
||||
foreach (array_keys($c) as $field) {
|
||||
$c[$field] = array_merge($this->get_default_field_options(), $c[$field]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function format_changes($history, array $options = [])
|
||||
{
|
||||
$html = '';
|
||||
|
||||
|
||||
$changes = $history->history_changes;
|
||||
|
||||
|
||||
# Group the changes by class and field.
|
||||
$change_groups = [];
|
||||
foreach ($changes as $c) {
|
||||
|
@ -111,9 +111,9 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$change_groups[$c->table_name][$c->column_name] = [];
|
||||
$change_groups[$c->table_name][$c->column_name][] = $c;
|
||||
}
|
||||
|
||||
|
||||
$att_options = $this->get_attribute_options();
|
||||
|
||||
|
||||
# Number of changes hidden (not including suppressions):
|
||||
$hidden = 0;
|
||||
$parts = [];
|
||||
|
@ -126,14 +126,14 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$field_options = isset($table_options['fields']['field']) ? $table_options['fields']['field'] : $this->get_default_field_options();
|
||||
$to_suppress = array_merge($to_suppress, $field_options['suppress_fields']);
|
||||
}
|
||||
|
||||
|
||||
foreach ($to_suppress as $suppress)
|
||||
unset($fields[$suppress]);
|
||||
|
||||
|
||||
foreach ($fields as $field => $group) {
|
||||
$class_name = $group[0]->master_class();
|
||||
$field_options = isset($table_options['fields']['field']) ? $table_options['fields']['field'] : $this->get_default_field_options();
|
||||
|
||||
|
||||
# Check for entry limits.
|
||||
if (empty($options['specific_history'])) {
|
||||
$max = isset($field_options['max_to_display']) ? $field_options['max_to_display'] : null;
|
||||
|
@ -142,29 +142,29 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$group = array_slice($group, $max);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Format the rest.
|
||||
foreach ($group as $c) {
|
||||
if (!$c->previous && $c->changes_to_default() && empty($table_options['force_show_initial']['field']))
|
||||
continue;
|
||||
|
||||
|
||||
$part = $this->format_change($history, $c, $options, $table_options);
|
||||
if (!$part)
|
||||
continue;
|
||||
|
||||
|
||||
if (!empty($field_options['primary_order']))
|
||||
$primary_order = $field_options['primary_order'];
|
||||
elseif (!empty($table_options['primary_order']))
|
||||
$primary_order = $table_options['primary_order'];
|
||||
else
|
||||
$primary_order = null;
|
||||
|
||||
|
||||
$part = array_merge($part, ['primary_order' => $primary_order]);
|
||||
$parts[] = $part;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
usort($parts, function($a, $b) {
|
||||
$comp = 0;
|
||||
foreach (['primary_order', 'field', 'sort_key'] as $field) {
|
||||
|
@ -174,55 +174,55 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$comp = 0;
|
||||
else
|
||||
$comp = 1;
|
||||
|
||||
|
||||
if ($comp != 0)
|
||||
break;
|
||||
}
|
||||
return $comp;
|
||||
});
|
||||
|
||||
|
||||
foreach (array_keys($parts) as $idx) {
|
||||
if (!$idx || $parts[$idx]['field'] == $parts[$idx - 1]['field'])
|
||||
continue;
|
||||
$parts[$idx-1]['html'] .= ', ';
|
||||
}
|
||||
|
||||
|
||||
$html = '';
|
||||
|
||||
|
||||
if (empty($options['show_name']) && $history->group_by_table == 'tags') {
|
||||
$tag = $history->history_changes[0]->obj();
|
||||
$html .= $this->tag_link($tag->name);
|
||||
$html .= ': ';
|
||||
}
|
||||
|
||||
|
||||
if (!empty($history->aux()->note_body)) {
|
||||
$body = $history->aux()->note_body;
|
||||
if (strlen($body) > 20)
|
||||
$body = substr($body, 0, 20) . '...';
|
||||
$html .= 'note ' . $this->h($body) . ' ';
|
||||
}
|
||||
|
||||
|
||||
$html .= implode(' ', array_map(function($part) { return $part['html']; }, $parts));
|
||||
|
||||
|
||||
if ($hidden > 0) {
|
||||
$html .= ' (' . $this->linkTo($hidden . ' more...', ['search' => 'change:' . $history->id]) . ')';
|
||||
}
|
||||
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
public function format_change($history, $change, $options, $table_options)
|
||||
{
|
||||
$html = '';
|
||||
|
||||
|
||||
$classes = [];
|
||||
if (empty($table_options['never_obsolete'][$change->column_name]) && $change->is_obsolete()) {
|
||||
$classes[] = 'obsolete';
|
||||
}
|
||||
|
||||
|
||||
$added = '<span class="added">+</span>';
|
||||
$removed = '<span class="removed">-</span>';
|
||||
|
||||
|
||||
$sort_key = $change->remote_id;
|
||||
$primary_order = 1;
|
||||
switch ($change->table_name) {
|
||||
|
@ -237,7 +237,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
}
|
||||
$html .= '</span>';
|
||||
break;
|
||||
|
||||
|
||||
case 'parent_id':
|
||||
$html .= 'parent:';
|
||||
if ($change->value) {
|
||||
|
@ -250,7 +250,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
} else {
|
||||
$html .= 'none';
|
||||
}
|
||||
|
||||
|
||||
if ($change->previous) {
|
||||
$html .= '←';
|
||||
if ($change->previous->value) {
|
||||
|
@ -265,7 +265,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'source':
|
||||
if ($change->previous) {
|
||||
$html .= sprintf("source changed from <span class='name-change'>%s</span> to <span class='name-change'>%s</span>", $this->source_link($change->previous->value, false), $this->source_link($change->value, false));
|
||||
|
@ -273,32 +273,38 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$html .= sprintf("source: <span class='name-change'>%s</span>", $this->source_link($change->value, false));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'frames_pending':
|
||||
$html .= 'frames changed: ' . $this->h($change->value ?: '(none)');
|
||||
break;
|
||||
|
||||
|
||||
case 'is_rating_locked':
|
||||
# Trueish: if a value equals true or 't'
|
||||
$html .= $change->value || $change->value == 't' ? $added : $removed;
|
||||
$html .= 'rating-locked';
|
||||
break;
|
||||
|
||||
case 'is_note_locked':
|
||||
# Trueish
|
||||
$html .= $change->value || $change->value == 't' ? $added : $removed;
|
||||
$html .= 'note-locked';
|
||||
break;
|
||||
|
||||
|
||||
case 'is_shown_in_index':
|
||||
# Trueish
|
||||
$html .= $change->value || $change->value == 't' ? $added : $removed;
|
||||
$html .= 'shown';
|
||||
break;
|
||||
|
||||
|
||||
case 'cached_tags':
|
||||
$previous = $change->previous;
|
||||
|
||||
|
||||
$changes = Post::tag_changes($change, $previous, $change->latest());
|
||||
|
||||
|
||||
$list = [];
|
||||
$list[] = $this->tag_list($changes['added_tags'], ['obsolete' => $changes['obsolete_added_tags'], 'prefix' => '+', 'class' => 'added']);
|
||||
$list[] = $this->tag_list($changes['removed_tags'], ['obsolete' => $changes['obsolete_removed_tags'], 'prefix' => '-', 'class' => 'removed']);
|
||||
|
||||
|
||||
if (!empty($options['show_all_tags']))
|
||||
$list[] = $this->tag_list($changes['unchanged_tags'], ['prefix' => '', 'class' => 'unchanged']);
|
||||
$html .= trim(implode(' ', $list));
|
||||
|
@ -308,7 +314,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
|
||||
case 'pools':
|
||||
$primary_order = 0;
|
||||
|
||||
|
||||
switch ($change->column_name) {
|
||||
case 'name':
|
||||
if ($change->previous) {
|
||||
|
@ -317,7 +323,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$html .= sprintf("name: <span class='name-change'>%s</span>", $this->h($change->value));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'description':
|
||||
if ($change->value === '') {
|
||||
$html .= 'description removed';
|
||||
|
@ -328,7 +334,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$html .= 'description added: ';
|
||||
else
|
||||
$html .= 'description changed: ';
|
||||
|
||||
|
||||
# Show a diff if there's a previous description and it's not blank. Otherwise,
|
||||
# just show the new text.
|
||||
$show_diff = $change->previous && $change->previous->value !== '';
|
||||
|
@ -336,11 +342,11 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$text = Moebooru\Diff::generate($change->previous->value, $change->value);
|
||||
else
|
||||
$text = $this->h($change->value);
|
||||
|
||||
|
||||
# If there's only one line in the output, just show it inline. Otherwise, show it
|
||||
# as a separate block.
|
||||
$multiple_lines = is_int(strpos($text, '<br>')) || is_int(strpos($text, '<br />'));
|
||||
|
||||
|
||||
$show_in_detail = !empty($options['specific_history']) || !empty($options['specific_object']);
|
||||
if (!$multiple_lines)
|
||||
$display = $text;
|
||||
|
@ -348,20 +354,20 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$display = "<div class='diff text-block'>${text}</div>";
|
||||
else
|
||||
$display = "<div class='initial-diff text-block'>${text}</div>";
|
||||
|
||||
|
||||
if ($multiple_lines && !$show_in_detail)
|
||||
$html .= "<a onclick='$(this).hide(); $(this).next().show()' href='#'>(show changes)</a><div style='display: none;'>${display}</div>";
|
||||
else
|
||||
$html .= $display;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'is_public':
|
||||
# Trueish
|
||||
$html .= $change->value || $change->value == 't' ? $added : $removed;
|
||||
$html .= 'public';
|
||||
break;
|
||||
|
||||
|
||||
case 'is_active':
|
||||
# Trueish
|
||||
$html .= $change->value || $change->value == 't' ? $added : $removed;
|
||||
|
@ -369,7 +375,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'pools_posts':
|
||||
# Sort the output by the post id.
|
||||
$sort_key = $change->obj()->post->id;
|
||||
|
@ -377,10 +383,10 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
case 'active':
|
||||
# Trueish
|
||||
$html .= $change->value || $change->value == 't' ? $added : $removed;
|
||||
|
||||
|
||||
$html .= $this->linkTo('post #' . $change->obj()->post_id, ['post#show', 'id' => $change->obj()->post_id]);
|
||||
break;
|
||||
|
||||
|
||||
case 'sequence':
|
||||
/**
|
||||
* MI: For some reason the sequence is shown in the first HistoryChange created,
|
||||
|
@ -388,7 +394,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
*/
|
||||
if (!$change->previous)
|
||||
return null;
|
||||
|
||||
|
||||
$seq = 'order:' . $change->obj()->post_id . ':' . $change->value;
|
||||
$seq .= '←' . $change->previous->value;
|
||||
$html .= $this->linkTo($seq, ['post#show', 'id' => $change->obj()->post_id]);
|
||||
|
@ -407,7 +413,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$html .= '←<span class="tag-type-' . $tag_type . '">' . $tag_type . '</span>';
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'is_ambiguous':
|
||||
# Trueish
|
||||
$html .= $change->value || $change->value == 't' ? $added : $removed;
|
||||
|
@ -415,7 +421,7 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'notes':
|
||||
switch($change->column_name) {
|
||||
case 'body':
|
||||
|
@ -425,14 +431,14 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
$html .= sprintf("body: <span class='name-change'>%s</span>", $this->h($change->value));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case 'x':
|
||||
case 'y':
|
||||
case 'width':
|
||||
case 'height':
|
||||
$html .= $change->column_name . ':' . $this->h($change->value);
|
||||
break;
|
||||
|
||||
|
||||
case 'is_active':
|
||||
# Trueish
|
||||
if ($change->value || $change->value == 't') {
|
||||
|
@ -447,33 +453,33 @@ class HistoryHelper extends Rails\ActionView\Helper
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$span = '<span class="' . implode(' ', $classes) . '">' . $html . '</span>';
|
||||
|
||||
|
||||
return [
|
||||
'html' => $span,
|
||||
'field' => $change->column_name,
|
||||
'sort_key' => $sort_key
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function tag_list($tags, array $options = [])
|
||||
{
|
||||
if (!$tags)
|
||||
return '';
|
||||
|
||||
|
||||
$html = '<span class="' . (!empty($options['class']) ? $options['class'] : '') . '">';
|
||||
|
||||
|
||||
$tags_html = [];
|
||||
foreach ($tags as $name) {
|
||||
$tags_html[] = $this->tag_link($name, $options);
|
||||
}
|
||||
|
||||
|
||||
if (!$tags_html)
|
||||
return '';
|
||||
|
||||
|
||||
$html .= implode(' ', $tags_html);
|
||||
$html .= '</span>';
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class PostHelper extends Rails\ActionView\Helper
|
|||
|
||||
$image_id = isset($options['image_id']) ? 'id="'.$options['image_id'].'"' : null;
|
||||
|
||||
$image_title = $is_post ? $this->h("Rating: ".$post->pretty_rating()." Score: ".$post->score." Tags: ".$this->h($post->cached_tags." User: ".$post->author())) : null;
|
||||
$image_title = $is_post ? $this->h("Rating: ".$post->pretty_rating()." / Score: ".$post->score." / Tags: ".$this->h($post->cached_tags." / User: ".$post->author())) : null;
|
||||
|
||||
$link_onclick = isset($options['onclick']) ? 'onclick="'.$options['onclick'].'"' : null;
|
||||
|
||||
|
@ -80,19 +80,55 @@ class PostHelper extends Rails\ActionView\Helper
|
|||
|
||||
$directlink_info = '
|
||||
<span class="directlink-info">
|
||||
<img class="directlink-icon directlink-icon-uhd" src="/images/ddl_uhd.gif" alt="">
|
||||
<img class="directlink-icon directlink-icon-large" src="/images/ddl_large.gif" alt="">
|
||||
<img class="directlink-icon directlink-icon-small" src="/images/ddl.gif" alt="">
|
||||
<img class="directlink-icon file-type-jpg" src="/images/type-jpg.gif" alt="">
|
||||
<img class="directlink-icon file-type-png" src="/images/type-png.gif" alt="">
|
||||
<img class="directlink-icon file-type-gif" src="/images/type-gif.gif" alt="">
|
||||
<img class="directlink-icon file-type-mp4" src="/images/type-mp4.gif" alt="">
|
||||
<img class="directlink-icon file-type-webm" src="/images/type-webm.gif" alt="">
|
||||
<img class="directlink-icon file-type-flv" src="/images/type-flv.gif" alt="">
|
||||
<img class="directlink-icon image-rating-s" src="/images/rate-s.gif" alt="">
|
||||
<img class="directlink-icon image-rating-q" src="/images/rate-q.gif" alt="">
|
||||
<img class="directlink-icon image-rating-e" src="/images/rate-e.gif" alt="">
|
||||
<img class="parent-display" src="/images/post-star-parent.gif" alt="">
|
||||
<img class="child-display" src="/images/post-star-child.gif" alt="">
|
||||
<img class="flagged-display" src="/images/post-star-flagged.gif" alt="">
|
||||
<img class="flagged-display" src="/images/post-star-flagged.gif" alt="">
|
||||
<img class="pending-display" src="/images/post-star-pending.gif" alt="">
|
||||
</span>
|
||||
';
|
||||
$li_class = "";
|
||||
|
||||
$ddl_class = "directlink";
|
||||
$ddl_class .= ($post->width > 1500 || $post->height > 1500)? " largeimg":" smallimg";
|
||||
|
||||
|
||||
if ($post->width >= 3500 || $post->height >= 2600 )
|
||||
$ddl_class .= " extremeimg";
|
||||
else
|
||||
$ddl_class .= ($post->width > 1920 || $post->height > 1500 )? " largeimg":" smallimg";
|
||||
|
||||
if ($post->file_ext == "jpg" || $post->file_ext == "jpeg")
|
||||
$ddl_class .= " file-jpg";
|
||||
if ($post->file_ext == "png")
|
||||
$ddl_class .= " file-png";
|
||||
if ($post->file_ext == "gif")
|
||||
$ddl_class .= " file-gif";
|
||||
if ($post->file_ext == "flv" || $post->file_ext == "swf")
|
||||
$ddl_class .= " file-flv";
|
||||
if ($post->file_ext == "mp4")
|
||||
$ddl_class .= " file-mp4";
|
||||
if ($post->file_ext == "webm")
|
||||
$ddl_class .= " file-webm";
|
||||
|
||||
if ($post->rating == "s")
|
||||
$ddl_class .= " rating-s";
|
||||
|
||||
if ($post->rating == "q")
|
||||
$ddl_class .= " rating-q";
|
||||
|
||||
if ($post->rating == "e")
|
||||
$ddl_class .= " rating-e";
|
||||
|
||||
if (!empty($options['similarity'])) {
|
||||
$icon = '<img src="'.$post->service_icon().'" alt="'.$post->service().'" class="service-icon" id="source">';
|
||||
$ddl_class .= " similar similar-directlink";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
class BatchUpload extends Rails\ActiveRecord\Base
|
||||
{
|
||||
public $data;
|
||||
|
||||
|
||||
/**
|
||||
* Flag to know the upload is 100% finished.
|
||||
*/
|
||||
|
@ -18,15 +18,10 @@ class BatchUpload extends Rails\ActiveRecord\Base
|
|||
$this->save();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
# Ugly: set the current user ID to the one set in the batch, so history entries
|
||||
# will be created as that user.
|
||||
// $old_thread_user = Thread::current["danbooru-user"];
|
||||
// $old_thread_user_id = Thread::current["danbooru-user_id"];
|
||||
// $old_ip_addr = Thread::current["danbooru-ip_addr"];
|
||||
// Thread::current["danbooru-user"] = User::find_by_id(self.user_id)
|
||||
// Thread::current["danbooru-user_id"] = $this->user_id
|
||||
// Thread::current["danbooru-ip_addr"] = $this->ip
|
||||
User::set_current_user(User::find($this->user_id));
|
||||
|
||||
$this->active = true;
|
||||
$this->save();
|
||||
|
@ -46,14 +41,12 @@ class BatchUpload extends Rails\ActiveRecord\Base
|
|||
$this->data->success = true;
|
||||
$this->data->post_id = $post->id;
|
||||
} elseif ($post->errors()->on('md5')) {
|
||||
// $p = $post->errors();
|
||||
$p = Post::where(['md5' => $post->md5])->first();
|
||||
|
||||
|
||||
$this->data->success = false;
|
||||
$this->data->error = "Post already exists";
|
||||
$this->data->post_id = $p->id;
|
||||
} else {
|
||||
// p $post.errors
|
||||
$this->data->success = false;
|
||||
$this->data->error = $post->errors()->fullMessages(", ");
|
||||
}
|
||||
|
@ -65,15 +58,12 @@ class BatchUpload extends Rails\ActiveRecord\Base
|
|||
}
|
||||
|
||||
$this->active = false;
|
||||
|
||||
|
||||
$this->save();
|
||||
|
||||
$this->finished = true;
|
||||
// Thread::current["danbooru-user"] = old_thread_user
|
||||
// Thread::current["danbooru-user_id"] = old_thread_user_id
|
||||
// Thread::current["danbooru-ip_addr"] = old_ip_addr
|
||||
}
|
||||
|
||||
|
||||
protected function associations()
|
||||
{
|
||||
return [
|
||||
|
@ -87,12 +77,12 @@ class BatchUpload extends Rails\ActiveRecord\Base
|
|||
{
|
||||
$this->data = json_decode($this->data_as_json) ?: new stdClass();
|
||||
}
|
||||
|
||||
|
||||
protected function encode_data()
|
||||
{
|
||||
$this->data_as_json = json_encode($this->data);
|
||||
}
|
||||
|
||||
|
||||
// protected function data_setter($hoge)
|
||||
// {
|
||||
// $this->data_as_json = json_encode($hoge);
|
||||
|
@ -106,4 +96,4 @@ class BatchUpload extends Rails\ActiveRecord\Base
|
|||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
class JobTask extends Rails\ActiveRecord\Base
|
||||
{
|
||||
protected $data;
|
||||
|
||||
|
||||
static public function execute_once()
|
||||
{
|
||||
foreach (self::where('status = "pending" AND task_type IN (?)', CONFIG()->active_job_tasks)->order("id desc")->take() as $task) {
|
||||
|
@ -10,7 +10,7 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function pretty_data()
|
||||
{
|
||||
switch ($this->task_type) {
|
||||
|
@ -18,10 +18,10 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
$start = $this->data["start_tags"];
|
||||
$result = $this->data["result_tags"];
|
||||
$user = User::find_name($this->data["updater_id"]);
|
||||
|
||||
|
||||
return "start: ".$start.", result: ".$result.", user: ".$user;
|
||||
break;
|
||||
|
||||
|
||||
case "approve_tag_alias":
|
||||
$ta = TagAlias::where('id', $this->data->id)->first();
|
||||
if (!$ta) {
|
||||
|
@ -31,7 +31,7 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
}
|
||||
return "start: " . $ta->name . ", result: " . $ta->alias_name();
|
||||
break;
|
||||
|
||||
|
||||
case "approve_tag_implication":
|
||||
$ti = TagImplication::where('id', $this->data->id)->first();
|
||||
if (!$ti) {
|
||||
|
@ -41,10 +41,17 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
}
|
||||
return "start: " . $ti->predicate->name . ", result: " . $ti->consequent->name;
|
||||
break;
|
||||
|
||||
|
||||
case "calculate_tag_subscriptions":
|
||||
return "last run: " . (isset($this->data->last_run) ? $this->data->last_run : 'never');
|
||||
break;
|
||||
if (CONFIG()->tag_subscription_delay && isset($this->data->last_run)) {
|
||||
$nextRun = date('Y-m-d H:i:s', strtotime('+' . CONFIG()->tag_subscription_delay, strtotime($this->data->last_run)));
|
||||
} else {
|
||||
$nextRun = 'imminent';
|
||||
}
|
||||
|
||||
$lastRun = (isset($this->data->last_run) ? $this->data->last_run : 'never');
|
||||
|
||||
return "last run: " . $lastRun . '; next run: ' . $nextRun;
|
||||
|
||||
// case "upload_posts_to_mirrors"
|
||||
// ret = ""
|
||||
|
@ -57,7 +64,7 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
// end
|
||||
// ret << (" (%i left) " % data["left"]) if data["left"]
|
||||
// ret
|
||||
|
||||
|
||||
case "periodic_maintenance":
|
||||
if ($this->status == "processing")
|
||||
return !empty($this->data->step) ? $this->data->step : 'unknown';
|
||||
|
@ -75,7 +82,7 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
case "external_data_search":
|
||||
return 'last updated post id: ' . (isset($this->data->last_post_id) ? $this->data->last_post_id : '(none)');
|
||||
break;
|
||||
|
||||
|
||||
case "upload_batch_posts":
|
||||
if ($this->status == "pending")
|
||||
return "idle";
|
||||
|
@ -93,28 +100,35 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
// end
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function execute()
|
||||
{
|
||||
if ($this->repeat_count > 0)
|
||||
$count = $this->repeat_count - 1;
|
||||
else
|
||||
$count = $this->repeat_count;
|
||||
|
||||
|
||||
Rails::systemExit()->register(function(){
|
||||
if ($this->status == 'processing')
|
||||
$this->updateAttribute('status', 'pending');
|
||||
}, 'job_task');
|
||||
|
||||
|
||||
try {
|
||||
$this->updateAttribute('status', "processing");
|
||||
$task_method = 'execute_'.$this->task_type;
|
||||
$this->$task_method();
|
||||
|
||||
|
||||
if ($count == 0)
|
||||
$this->updateAttribute('status', "finished");
|
||||
else
|
||||
else {
|
||||
// This is necessary due to a bug with Rails that won't clear changed attributes,
|
||||
// so when 'status' is changed back to 'pending', the system will think the attribute
|
||||
// is being reversed to its previous value, and will remove it from the changedAttributes,
|
||||
// array, therefore the new value 'pending' won't be set and will stay as 'processing'.
|
||||
$this->clearChangedAttributes();
|
||||
|
||||
$this->updateAttributes(array('status' => "pending", 'repeat_count' => $count));
|
||||
}
|
||||
} catch (Exception $x) {
|
||||
$text = "";
|
||||
$text .= "Error executing job: " . $this->task_type . "\n";
|
||||
|
@ -126,34 +140,34 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
throw $x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function execute_periodic_maintenance()
|
||||
{
|
||||
if (!empty($this->data->next_run) && $this->data->next_run > time('Y-m-d H:i:s'))
|
||||
return;
|
||||
|
||||
|
||||
$this->update_data(array("step" => "recalculating post count"));
|
||||
Post::recalculate_row_count();
|
||||
$this->update_data(array("step" => "recalculating tag post counts"));
|
||||
Tag::recalculate_post_count();
|
||||
$this->update_data(array("step" => "purging old tags"));
|
||||
Tag::purge_tags();
|
||||
|
||||
|
||||
$next_run = strtotime('+6 hours');
|
||||
$this->update_data(array("next_run" => date('Y-m-d H:i:s', $next_run), "step" => null));
|
||||
}
|
||||
|
||||
|
||||
public function execute_external_data_search()
|
||||
{
|
||||
# current_user will be needed to save post history.
|
||||
# Set the first admin as current user.
|
||||
User::set_current_user(User::where('level = ?', CONFIG()->user_levels['Admin'])->first());
|
||||
|
||||
|
||||
if (empty($this->data->last_post_id))
|
||||
$this->data->last_post_id = 0;
|
||||
|
||||
|
||||
$post_id = $this->data->last_post_id + 1;
|
||||
|
||||
|
||||
$config = array_merge([
|
||||
'servers' => [],
|
||||
'interval' => 3,
|
||||
|
@ -164,7 +178,7 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
'exclude_tags' => [],
|
||||
'similarity' => 90
|
||||
], CONFIG()->external_data_search_config);
|
||||
|
||||
|
||||
$limit = $config['limit'];
|
||||
$interval = $config['interval'];
|
||||
$search_options = [
|
||||
|
@ -173,62 +187,62 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
'services' => $config['servers'],
|
||||
'threshold' => $config['similarity']
|
||||
];
|
||||
|
||||
|
||||
$post_count = !$limit ? -1 : 0;
|
||||
|
||||
|
||||
while ($post_count < $limit) {
|
||||
if (!$post = Post::where('id >= ? AND status != "deleted"', $post_id)->order('id ASC')->first()) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$search_options['source'] = $post;
|
||||
$new_tags = [];
|
||||
$source = null;
|
||||
|
||||
|
||||
$external_posts = SimilarImages::similar_images($search_options)['posts_external'];
|
||||
|
||||
|
||||
$rating_set = false;
|
||||
foreach ($external_posts as $ep) {
|
||||
if (!$rating_set && $config['set_rating'] && $ep->rating) {
|
||||
$post->rating = $ep->rating;
|
||||
$rating_set = true;
|
||||
}
|
||||
|
||||
|
||||
if ($config['source'] && !$source && $ep->source) {
|
||||
$source = $ep->source;
|
||||
}
|
||||
$new_tags = array_merge($new_tags, explode(' ', $ep->tags));
|
||||
}
|
||||
|
||||
|
||||
# Exclude tags.
|
||||
$new_tags = array_diff($new_tags, $config['exclude_tags']);
|
||||
|
||||
|
||||
if ($config['merge_tags']) {
|
||||
$new_tags = array_merge($new_tags, $post->tags);
|
||||
}
|
||||
|
||||
|
||||
$new_tags = array_filter(array_unique($new_tags));
|
||||
$post->new_tags = $new_tags;
|
||||
|
||||
|
||||
if ($source); {
|
||||
$post->source = $source;
|
||||
}
|
||||
|
||||
|
||||
$post->save();
|
||||
|
||||
|
||||
if ($limit) {
|
||||
$post_count++;
|
||||
}
|
||||
|
||||
|
||||
$this->update_data(['last_post_id' => $post->id]);
|
||||
$post_id = $post->id + 1;
|
||||
|
||||
|
||||
if ($config['interval']) {
|
||||
sleep($config['interval']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function execute_upload_batch_posts()
|
||||
{
|
||||
$upload = BatchUpload::where("status = 'pending'")->order("id ASC")->first();
|
||||
|
@ -238,7 +252,7 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
$this->updateAttributes(['data' => ['id' => $upload->id, 'user_id' => $upload->user_id, 'url' => $upload->url]]);
|
||||
$upload->run();
|
||||
}
|
||||
|
||||
|
||||
public function execute_approve_tag_alias()
|
||||
{
|
||||
$ta = TagAlias::find($this->data->id);
|
||||
|
@ -246,7 +260,7 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
$updater_ip_addr = $this->data->updater_ip_addr;
|
||||
$ta->approve($updater_id, $updater_ip_addr);
|
||||
}
|
||||
|
||||
|
||||
public function execute_approve_tag_implication()
|
||||
{
|
||||
$ti = TagImplication::find($this->data->id);
|
||||
|
@ -254,22 +268,27 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
$updater_ip_addr = $this->data->updater_ip_addr;
|
||||
$ti->approve($updater_id, $updater_ip_addr);
|
||||
}
|
||||
|
||||
|
||||
public function execute_calculate_tag_subscriptions()
|
||||
{
|
||||
if (Rails::cache()->read("delay-tag-sub-calc")) {
|
||||
return;
|
||||
if (CONFIG()->tag_subscription_delay) {
|
||||
if (Rails::cache()->read("delay-tag-sub-calc")) {
|
||||
return;
|
||||
}
|
||||
|
||||
Rails::cache()->write("delay-tag-sub-calc", 1, ['expires_in' => CONFIG()->tag_subscription_delay]);
|
||||
}
|
||||
Rails::cache()->write("delay-tag-sub-calc", ['expires_in' => '360 minutes']);
|
||||
|
||||
TagSubscription::process_all();
|
||||
$this->updateAttributes(['data' => ['last_run' => date('Y-m-d H:i')]]);
|
||||
|
||||
$this->updateAttributes(['data' => ['last_run' => date('Y-m-d H:i:s')]]);
|
||||
}
|
||||
|
||||
|
||||
protected function init()
|
||||
{
|
||||
$this->setData($this->data_as_json ? json_decode($this->data_as_json) : new stdClass());
|
||||
}
|
||||
|
||||
|
||||
public function setData($data)
|
||||
{
|
||||
$this->data_as_json = json_encode($data);
|
||||
|
@ -281,4 +300,4 @@ class JobTask extends Rails\ActiveRecord\Base
|
|||
$data = array_merge((array)$this->data, $data);
|
||||
$this->updateAttributes(array('data' => $data));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,8 @@ trait PostFileMethods
|
|||
'image/jpg' => 'jpg',
|
||||
'image/png' => 'png',
|
||||
'image/gif' => 'gif',
|
||||
'video/webm' => 'webm',
|
||||
'video/mp4' => 'mp4',
|
||||
'application/x-shockwave-flash' => 'swf'
|
||||
];
|
||||
|
||||
|
@ -331,9 +333,12 @@ trait PostFileMethods
|
|||
|
||||
$this->tempfile_name = pathinfo($this->tempfile_name, PATHINFO_FILENAME);
|
||||
|
||||
list ($x, $y, $type) = getimagesize($this->tempfile_path());
|
||||
|
||||
$this->mime_type = image_type_to_mime_type($type);
|
||||
// list ($x, $y, $type) = getimagesize($this->tempfile_path());
|
||||
// $this->mime_type = image_type_to_mime_type($type);
|
||||
list ($x, $y) = getimagesize($this->tempfile_path());
|
||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||
$this->mime_type = finfo_file($finfo, $this->tempfile_path());
|
||||
finfo_close($finfo);
|
||||
}
|
||||
|
||||
# Assigns a CGI file to the post. This writes the file to disk and generates a unique file name.
|
||||
|
@ -414,6 +419,10 @@ trait PostFileMethods
|
|||
return $this->file_ext == "swf";
|
||||
}
|
||||
|
||||
public function video()
|
||||
{
|
||||
return in_array($this->file_ext, array('mp4', 'webm'));
|
||||
}
|
||||
public function gif()
|
||||
{
|
||||
return $this->file_ext == 'gif';
|
||||
|
@ -715,4 +724,4 @@ trait PostFileMethods
|
|||
$this->source = $source;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ trait PostTagMethods
|
|||
$pool = Pool::create(array('name' => $name, 'is_public' => false, 'user_id' => $this->updater_user_id));
|
||||
|
||||
if (!$pool || !$pool->can_change(current_user(), null))
|
||||
continue;
|
||||
continue 2;
|
||||
|
||||
$pool->add_post($this->id, $options);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ class TagSubscription extends Rails\ActiveRecord\Base
|
|||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
protected function callbacks()
|
||||
{
|
||||
return [
|
||||
|
@ -21,7 +21,7 @@ class TagSubscription extends Rails\ActiveRecord\Base
|
|||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
protected function scopes()
|
||||
{
|
||||
return [
|
||||
|
@ -30,7 +30,7 @@ class TagSubscription extends Rails\ActiveRecord\Base
|
|||
}
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function normalize_name()
|
||||
{
|
||||
/**
|
||||
|
@ -40,26 +40,26 @@ class TagSubscription extends Rails\ActiveRecord\Base
|
|||
*/
|
||||
$this->name = preg_replace(['/\P{L}/', '/_{2,}/'], '_', mb_convert_encoding($this->name, 'ISO-8859-2'));
|
||||
}
|
||||
|
||||
|
||||
public function initialize_post_ids()
|
||||
{
|
||||
if ($this->user->is_privileged_or_higher()) {
|
||||
$this->cached_post_ids = join(',', array_unique(Post::find_by_tags($this->tag_query, ['limit' => ceil(CONFIG()->tag_subscription_post_limit / 3), 'select' => 'p.id', 'order' => 'p.id desc'])->getAttributes('id')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static public function find_post_ids($user_id, $name = null, $limit = null)
|
||||
{
|
||||
if (!$limit) {
|
||||
$limit = CONFIG()->tag_subscription_post_limit;
|
||||
}
|
||||
|
||||
|
||||
$post_ids = self::select('cached_post_ids')->where(['user_id' => $user_id]);
|
||||
if ($name) {
|
||||
$post_ids->where('name LIKE ?', $name . '%');
|
||||
}
|
||||
$post_ids = $post_ids->take();
|
||||
|
||||
|
||||
$parsed_ids = [];
|
||||
foreach ($post_ids as $subs) {
|
||||
$ids = explode(',', $subs->cached_post_ids);
|
||||
|
@ -69,15 +69,15 @@ class TagSubscription extends Rails\ActiveRecord\Base
|
|||
$parsed_ids = array_merge($parsed_ids, $ids);
|
||||
}
|
||||
sort($parsed_ids);
|
||||
|
||||
|
||||
return array_slice(array_reverse(array_unique($parsed_ids)), 0, $limit);
|
||||
}
|
||||
|
||||
|
||||
static public function find_posts($user_id, $name = null, $limit = null)
|
||||
{
|
||||
return Post::available()->where('id IN (?)', self::find_post_ids($user_id, $name, $limit))->order('id DESC')->take();
|
||||
}
|
||||
|
||||
|
||||
static public function process_all()
|
||||
{
|
||||
foreach (self::all() as $tag_subscription) {
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<p><?= $this->t(['.confirm', 'name' => $this->artist->name]) ?></p>
|
||||
|
||||
<?= $this->formTag([], ['level' => 'privileged'], function(){ ?>
|
||||
<?= $this->submitTag($this->t('buttons._yes')) ?>
|
||||
<?= $this->submitTag($this->t('buttons._no')) ?>
|
||||
<button type="submit" name="commit" value="Yes"><?= $this->t('buttons._yes') ?></button>
|
||||
<button type="submit"><?= $this->t('buttons._no') ?></button>
|
||||
<?php }) ?>
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
<div id="artist-index">
|
||||
<div id="search-form" style="margin-bottom: 1em;">
|
||||
<?= $this->formTag([], ['method' => 'get'], function(){ ?>
|
||||
<?= $this->textFieldTag('name', $this->params()->name, ['size' => 40]) ?> <?= $this->submitTag($this->t('.search')) ?>
|
||||
<br />
|
||||
<?= $this->selectTag('order', [[$this->t('.name') => 'name', $this->t('.date') => 'date'], ($this->params()->order ?: '')]) ?>
|
||||
<?php }) ?>
|
||||
</div>
|
||||
|
||||
<?php if (!$this->artists->blank()) : ?>
|
||||
<table class="highlightable" width="100%">
|
||||
<thead>
|
||||
|
|
|
@ -19,11 +19,15 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th><label for="dmail_title"><?= $this->t('.form.title') ?></label></th>
|
||||
<td><?= $this->textField('dmail', 'title') ?></td>
|
||||
<td>
|
||||
<input type="text" id="dmail_title" name="dmail[title]" value="<?= $this->h($this->dmail->title) ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="dmail_body"><?=$this->t('.form.body') ?></label></th>
|
||||
<td><?= $this->textArea('dmail', 'body', ['size' => "50x25", 'class' => "default"]) ?></td>
|
||||
<td>
|
||||
<textarea id="dmail_body" cols="50" name="dmail[body]" rows="25" class="default"><?= $this->h($this->dmail->body) ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
var thumb = $("hover-thumb");
|
||||
<?php foreach ($this->changes as $change) : ?>
|
||||
History.add_change(<?= $change->id ?>, "<?= $change->get_group_by_controller() ?>", <?= $change->group_by_id ?>, [ <?= implode(', ', $change->history_changes->getAttributes('id')) ?> ], '<?= $this->escapeJavascript($change->author()) ?>')
|
||||
<?php if ($change->group_by_table_class() == "Post") : ?>
|
||||
<?php if ($change->group_by_table_class() == "Post" && CONFIG()->can_see_post(current_user(), $change->group_by_obj())) : ?>
|
||||
Post.register(<?= $this->jsonEscape($change->group_by_obj()->toJson()) ?>)
|
||||
var hover_row = $("r<?= $change->id ?>");
|
||||
var container = hover_row.up("TABLE");
|
||||
|
@ -121,7 +121,7 @@
|
|||
Post.init_blacklisted({replace: true});
|
||||
|
||||
<?php foreach ($this->changes as $change) : ?>
|
||||
<?php if ($change->group_by_table_class() == "Post") : ?>
|
||||
<?php if ($change->group_by_table_class() == "Post" && CONFIG()->can_see_post(current_user(), $change->group_by_obj())) : ?>
|
||||
if(!Post.is_blacklisted(<?= $change->group_by_obj()->id ?>))
|
||||
Preload.preload('<?= $this->escapeJavascript($change->group_by_obj()->preview_url()) ?>');
|
||||
<?php endif ?>
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
|
||||
<?php $this->contentFor('subnavbar', function(){ ?>
|
||||
<li><?= $this->linkTo($this->t(".nav.list"), ['action' => "index"]) ?></li>
|
||||
<?php if ($this->job_task->status == "error") : ?>
|
||||
<?php if (current_user()->is_admin() && $this->job_task->status == "error") : ?>
|
||||
<li><?= $this->linkTo($this->t(".nav.restart"), ["#restart", 'id' => $this->job_task->id]) ?></li>
|
||||
<?php elseif (current_user()->is_admin() && $this->job_task->status != 'pending') : ?>
|
||||
<li><?= $this->linkTo('Force restart', ["#restart", 'id' => $this->job_task->id]) ?></li>
|
||||
<?php endif ?>
|
||||
<?php }) ?>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* having placeholders for user id and name that will be replaced with current user's
|
||||
* data right before echoing the menu.
|
||||
*/
|
||||
$key = 'menu.'.current_user()->level;
|
||||
$key = 'menu.' . Rails::application()->I18n()->locale() . '.'.current_user()->level;
|
||||
$menu = Rails::cache()->read($key);
|
||||
|
||||
|
||||
if (!$menu) :
|
||||
ob_start();
|
||||
?>
|
||||
|
@ -15,10 +15,10 @@
|
|||
<li class="user"><?= $this->linkTo($this->t('.account._'), ['user#home'], ['onclick' => 'if(!User.run_login_onclick(event)) return false;', 'class' => 'login-button']) ?>
|
||||
<?= $this->linkTo('■', '#', ['class' => 'submenu-button']) ?>
|
||||
<ul class="submenu">
|
||||
<?php if (current_user()->is_anonymous()) : ?>
|
||||
<?php if (current_user()->is_anonymous()) : ?>
|
||||
<li><?= $this->linkTo($this->t('.account.login'), ['controller' => 'user', 'action' => 'login'], ['id' => 'login-link', 'class' => 'login-button']) ?></li>
|
||||
<li><?= $this->linkTo($this->t('.account.reset'), ['controller' => 'user', 'action' => 'reset_password']) ?></li>
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
<li><?= $this->linkTo($this->t('.account.profile'), ['controller' => 'user', 'action' => 'show', 'id' => "-user.id-"]) // MI: -user.id- ?></li>
|
||||
<li><?= $this->linkTo($this->t('.account.mail'), ['controller' => 'dmail', 'action' => 'inbox']) ?></li>
|
||||
<li><?= $this->linkTo($this->t('.account.favorites'), ['controller' => 'post', 'action' => 'index', 'tags' => "order:vote vote:3:-user.name-"]) // MI: -user.name- ?></li>
|
||||
|
@ -28,15 +28,15 @@
|
|||
<?php endif ?>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="post"><?= $this->linkTo($this->t('.posts._'), ['controller' => 'post', 'action' => 'index']) ?>
|
||||
<?= $this->linkTo('■', '#', ['class' => 'submenu-button']) ?>
|
||||
<li class="post"><?= $this->linkTo($this->t('.posts._'), ['controller' => 'post', 'action' => 'index']) ?>
|
||||
<?= $this->linkTo('■', '#', ['class' => 'submenu-button']) ?>
|
||||
<ul class="search-box">
|
||||
<li>
|
||||
<div>
|
||||
<?= $this->formTag('post#', ['method' => 'get'], function(){ ?>
|
||||
<?= $this->formTag('post#', ['method' => 'get'], function(){ ?>
|
||||
<?= $this->textFieldTag('tags', '', ['id' => '']) ?><br />
|
||||
<?= $this->submitTag($this->t('.posts.search')) ?>
|
||||
<?php }) ?>
|
||||
<?= $this->submitTag($this->t('.posts.search')) ?>
|
||||
<?php }) ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -46,11 +46,7 @@
|
|||
<li><?= $this->linkTo($this->t('.posts.upload'), ['controller' => 'post', 'action' => 'upload']) ?></li>
|
||||
<li><?= $this->linkTo($this->t('.posts.random'), ['controller' => 'post', 'tags' => 'order:random']) ?></li>
|
||||
<li><?= $this->linkTo($this->t('.posts.popular'), ['controller' => 'post', 'action' => 'popular_recent']) ?></li>
|
||||
<li><?= $this->linkTo($this->t('.posts.image_search'), ['controller' => 'post', 'action' => 'similar']) ?></li>
|
||||
<li><?= $this->linkTo($this->t('.posts.history'), ['controller' => 'history', 'action' => 'index']) ?></li>
|
||||
<?php if (current_user()->is_contributor_or_higher()) : ?>
|
||||
<li><?= $this->linkTo($this->t('.posts.batch'), ['controller' => 'batch', 'action' => 'index']) ?></li>
|
||||
<?php endif ?>
|
||||
<?php if (current_user()->is_janitor_or_higher()) : ?>
|
||||
<li><?= $this->linkTo($this->t('.posts.moderate'), ['controller' => 'post', 'action' => 'moderate'], ['class' => 'moderate']) ?></li>
|
||||
<?php endif ?>
|
||||
|
@ -207,10 +203,7 @@
|
|||
<li><?= $this->linkTo($this->t('.help.site'), "help#") ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="static"><?= $this->linkTo($this->t('.more'), ['controller' => 'static', 'action' => 'more']) ?>
|
||||
</li>
|
||||
<li class="has-mail">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php if (!CONFIG()->enable_news_ticker) return; ?>
|
||||
<div id="news-ticker" style="display: none">
|
||||
<ul>
|
||||
<li>MyImouto is now on <a href="https://github.com/myimouto/myimouto">GitHub</a>.</li>
|
||||
<li><a href="https://9854.moe">Visit Winterchan</a></li>
|
||||
</ul>
|
||||
|
||||
<a href="#" id="close-news-ticker-link"><?= $this->t('.close') ?></a>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div id="header">
|
||||
<div id="title">
|
||||
<h2 id="site-title">
|
||||
<?= $this->linkTo($this->imageTag('/images/logo_small.png', ['alt' => CONFIG()->app_name, 'size' => '484x75', 'id' => 'logo']), $this->rootPath()) ?>
|
||||
<?= $this->linkTo($this->imageTag('/images/logo_small.png', ['alt' => CONFIG()->app_name, 'size' => '195x40', 'id' => 'logo']), $this->rootPath()) ?>
|
||||
</h2>
|
||||
</div>
|
||||
<?= $this->partial('layouts/menu') ?>
|
||||
|
|
|
@ -6,18 +6,21 @@
|
|||
<meta name="description" content="<?= CONFIG()->app_name ?>">
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="top" title="<?= CONFIG()->app_name ?>" href="/">
|
||||
<?= $this->stylesheetLinkTag("application") ?>
|
||||
<?= $this->javascriptIncludeTag('application') ?>
|
||||
<?= $this->javascriptIncludeTag('moe-legacy/application') ?>
|
||||
<?= CONFIG()->custom_html_headers ?>
|
||||
<?= $this->content('html_header') ?>
|
||||
<?php foreach (CONFIG()->asset_stylesheets as $asset) : ?>
|
||||
<?= $this->stylesheetLinkTag($asset) ?>
|
||||
<?php endforeach ?>
|
||||
<?php foreach (CONFIG()->asset_javascripts as $asset) : ?>
|
||||
<?= $this->javascriptIncludeTag($asset) ?>
|
||||
<?php endforeach ?>
|
||||
<?= CONFIG()->custom_html_headers ?>
|
||||
<?= $this->content('html_header') ?>
|
||||
</head>
|
||||
<body>
|
||||
<?= $this->partial("layouts/notice") ?>
|
||||
<?= $this->partial("layouts/notice") ?>
|
||||
<div id="content">
|
||||
<?= $this->content() ?>
|
||||
<?= $this->content() ?>
|
||||
</div>
|
||||
<?= $this->content('post_cookie_javascripts') ?>
|
||||
<?= $this->content('post_cookie_javascripts') ?>
|
||||
<?php
|
||||
/*
|
||||
<script type="text/javascript">
|
||||
|
@ -32,6 +35,6 @@
|
|||
})();
|
||||
</script>
|
||||
*/
|
||||
?>
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
<title><?= $this->html_title() ?></title>
|
||||
<meta name="description" content="<?= CONFIG()->app_name ?>">
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="android-icon-192x192.png" sizes="192x192">
|
||||
<meta name="theme-color" content="#b5534a">
|
||||
<link rel="top" title="<?= CONFIG()->app_name ?>" href="/">
|
||||
<?php # The javascript-hide class is used to hide elements (eg. blacklisted posts) from JavaScript. ?>
|
||||
<script type="text/javascript">
|
||||
|
@ -43,15 +45,164 @@
|
|||
<?php // echo csrf_meta_tag ?>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
(function() {
|
||||
var cookieName = 'disclaimer_accepted';
|
||||
|
||||
if (Cookie.get(cookieName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $ = jQuery;
|
||||
var notice = 'WARNING! THIS SITE HAS MIXED CONTENT AND IS NOT SAFE FOR WORK OR PUBLIC!\nThis site contains mixed content and has images containing erotic, grotesque acts, or acts of violence. NO content portrays any real life events or illegal content. This database is well regulated by its moderators and all posts are pending until approval.\nSome content is NOT accessible to the public or any bot, you must register or login to view such content.';
|
||||
|
||||
notice = notice.replace(/\n/g, "<br />");
|
||||
var accept = 'YES, not a normie!';
|
||||
var cancel = 'EXIT';
|
||||
|
||||
var container = $('<div>')
|
||||
.css({
|
||||
backgroundColor: 'rgba(66, 0, 0, 0.96)',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: 0,
|
||||
zIndex: 999,
|
||||
});
|
||||
|
||||
container
|
||||
.append(
|
||||
$('<div>')
|
||||
.css({
|
||||
display: 'flex',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
})
|
||||
.append(
|
||||
$('<div>')
|
||||
.css({
|
||||
backgroundColor: '#a90000',
|
||||
display: 'flex',
|
||||
padding: 8,
|
||||
minWidth: 350,
|
||||
flexDirection: 'column',
|
||||
})
|
||||
.append(
|
||||
$('<div>')
|
||||
.css({
|
||||
margin: 8,
|
||||
color: 'white',
|
||||
|
||||
})
|
||||
.html(notice)
|
||||
)
|
||||
.append(
|
||||
$('<div>')
|
||||
.css({
|
||||
margin: 8,
|
||||
textAlign: 'right'
|
||||
})
|
||||
.append(
|
||||
$('<button>')
|
||||
.css({
|
||||
marginRight: 5
|
||||
})
|
||||
.html(accept)
|
||||
.click(function() {
|
||||
Cookie.put(cookieName, true);
|
||||
container.remove();
|
||||
})
|
||||
)
|
||||
.append(
|
||||
$('<button>')
|
||||
.html(cancel)
|
||||
.click(function() {
|
||||
window.location.href = 'https://acr.moe';
|
||||
})
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
.prependTo(
|
||||
$('body')
|
||||
)
|
||||
|
||||
})();
|
||||
</script>
|
||||
<?= $this->partial('layouts/news') ?>
|
||||
<div id="header">
|
||||
<div id="title"><h2 id="site-title"><?= $this->linkTo($this->imageTag('images/logo_small.png', array('alt' => CONFIG()->app_name, 'size' => '484x75', 'id' => 'logo')), CONFIG()->url_base) ?><span><?= $this->tag_header($this->h($this->params()->tags)) ?></span></h2></div>
|
||||
<div id="title"><h2 id="site-title"><?= $this->linkTo($this->imageTag('images/logo_small.png', array('alt' => CONFIG()->app_name, 'size' => '146x30', 'id' => 'logo')), CONFIG()->url_base) ?><div style="margin-right: 0.0em;">
|
||||
<?php if ($this->request()->controller() == 'post') : ?>
|
||||
<?= $this->formTag('post#index', array('method' => 'get', 'accept-charset' => 'UTF-8'), function(){ ?>
|
||||
<div style="margin:0;padding:0;display:inline"></div>
|
||||
<div>
|
||||
<?= $this->textFieldTag("tags", $this->h($this->params()->tags), array('size' => '35', 'autocomplete' => 'off', 'placeholder' => 'Search Posts...', 'style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: dotted; background: #2b0000;')) ?>
|
||||
<?= $this->tag_completion_box('$("tags")', ['$("tags").up("form")', '$("tags")', null], true) ?>
|
||||
<?php if ($this->request()->action() == 'index') : ?>
|
||||
<div style="display: inline-block; margin: 0 0 0 -8px;" id="mode-box" class="advanced-editing">
|
||||
<form onsubmit="return false;" action="">
|
||||
<div>
|
||||
<select name="mode" id="mode" onchange="PostModeMenu.change()" onkeyup="PostModeMenu.change()" style="font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 0; border-style: dotted; background: #2b0000; border-color: darkred; border-width: 0 0 1px 1px; color: #7d3030;">
|
||||
<option value="view">View</option>
|
||||
<option value="edit">Edit</option>
|
||||
<option value="rating-s">Rate:S</option>
|
||||
<option value="rating-q">Rate:Q</option>
|
||||
<option value="rating-e">Rate:E</option>
|
||||
<?php if (current_user()->is_privileged_or_higher()) : ?>
|
||||
<option value="lock-rating">L-Rating</option>
|
||||
<option value="lock-note">L-Notes</option>
|
||||
<?php endif ?>
|
||||
<?php if (current_user()->is_mod_or_higher()) : ?>
|
||||
<option value="approve">Approve</option>
|
||||
<?php endif ?>
|
||||
<option value="flag">Flag</option>
|
||||
<option value="apply-tag-script">Script</option>
|
||||
<option value="reparent-quick">Reparent</option>
|
||||
<?php if ($this->searching_pool) : ?>
|
||||
<option value="remove-from-pool">D.F. Pool</option>
|
||||
<?php endif ?>
|
||||
<?php if (CONFIG()->delete_post_mode && current_user()->is_admin()) : ?>
|
||||
<option value="destroy">Delete</option>
|
||||
<?php endif ?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php }) ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->request()->controller() == 'tag') : ?>
|
||||
<?= $this->formTag(array('action' => 'index'), array('method' => 'get'), function(){ ?>
|
||||
<table class="form">
|
||||
<?= $this->textFieldTag("name", $this->h($this->params()->name), array('size' => '35', 'autocomplete' => 'off', 'placeholder' => 'Search Tags...', 'style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: dotted; background: #2b0000;')) ?> <?= $this->selectTag('type', array(array_merge(array('Any' => 'any'), array_unique(CONFIG()->tag_types)), $this->params()->type), array('style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 0; border-style: dotted; background: #2b0000; border-color: darkred; border-width: 0 0 1px 1px; color: #7d3030;')) ?> <?= $this->selectTag('order', array(array('Name' => 'name', 'Count' => 'count', 'Date' => 'date'), $this->params()->order), array('style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 0; border-style: dotted; background: #2b0000; border-color: darkred; border-width: 0 0 1px 1px; color: #7d3030;')) ?>
|
||||
</table>
|
||||
<?php }) ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->request()->controller() == 'artist') : ?>
|
||||
<?= $this->formTag([], ['method' => 'get'], function(){ ?>
|
||||
<?= $this->textFieldTag('name', $this->params()->name, array('size' => '35', 'autocomplete' => 'off', 'placeholder' => 'Search Artists...', 'style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: dotted; background: #2b0000;')) ?> <?= $this->selectTag('order', [['Name' => 'name', 'Date' => 'date'], ($this->params()->order ?: '')], ['style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 -8px; border-style: dotted; background: #2b0000; border-color: darkred; border-width: 0 0 1px 1px; color: #7d3030;']) ?>
|
||||
<?php }) ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->request()->controller() == 'pool') : ?>
|
||||
<?= $this->formTag([], ['method' => 'get'], function(){ ?>
|
||||
<?php if ($this->params()->order) : ?>
|
||||
<?= $this->hiddenFieldTag("order", $this->params()->order) ?>
|
||||
<?php endif ?>
|
||||
<?= $this->textFieldTag("query", $this->h($this->params()->query), ['size' => '35', 'autocomplete' => 'off', 'placeholder' => 'Search Pools...', 'style' => 'font-size: 14pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: dotted; background: #2b0000;']) ?>
|
||||
<?php }) ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</h2></div>
|
||||
<?= $this->partial('layouts/menu') ?>
|
||||
</div>
|
||||
<?= $this->partial('layouts/login') ?>
|
||||
|
||||
<?php if (CONFIG()->server_host == "yande.re") : ?>
|
||||
<div style="display: none;">Danbooru-based image board with a specialization in high-quality images.</div>
|
||||
<?php if (CONFIG()->server_host == "sequenzia.moe") : ?>
|
||||
<div style="display: none;">The global image database!</div>
|
||||
<?php endif ?>
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div id="header">
|
||||
<div id="title">
|
||||
<h2 id="site-title">
|
||||
<?= $this->linkTo($this->imageTag('/images/logo_small.png', ['alt' => CONFIG()->app_name, 'size' => '484x75', 'id' => 'logo']), $this->rootPath()) ?>
|
||||
<?= $this->linkTo($this->imageTag('/images/logo_small.png', ['alt' => CONFIG()->app_name, 'size' => '195x40', 'id' => 'logo']), $this->rootPath()) ?>
|
||||
</h2>
|
||||
</div>
|
||||
<?= $this->partial('layouts/menu') ?>
|
||||
|
|
|
@ -1,14 +1,4 @@
|
|||
<div id="pool-index">
|
||||
<div style="margin-bottom: 2em;">
|
||||
<?= $this->formTag([], ['method' => 'get'], function(){ ?>
|
||||
<?php if ($this->params()->order) : ?>
|
||||
<?= $this->hiddenFieldTag("order", $this->params()->order) ?>
|
||||
<?php endif ?>
|
||||
<?= $this->textFieldTag("query", $this->h($this->params()->query), ['size' => 40]) ?>
|
||||
<?= $this->submitTag($this->t('.search'), ['name' => '']) ?>
|
||||
<?php }) ?>
|
||||
</div>
|
||||
|
||||
<?= $this->imageTag('images/blank.gif', ['id' => 'hover-thumb', 'alt' => '', 'style' => 'position: absolute; display: none; border: 2px solid #000; right: 42%;']) ?>
|
||||
|
||||
<table width="100%" class="highlightable">
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<div style="margin-bottom: 1em;">
|
||||
<h5><?= $this->t('.title') ?></h5>
|
||||
<div style="margin-right: 0.0em;">
|
||||
<?= $this->formTag('post#index', array('method' => 'get', 'accept-charset' => 'UTF-8'), function(){ ?>
|
||||
<div style="margin:0;padding:0;display:inline"></div>
|
||||
<div>
|
||||
<?= $this->textFieldTag("tags", $this->h($this->params()->tags), array('size' => '20', 'autocomplete' => 'off')) ?>
|
||||
<?= $this->textFieldTag("tags", $this->h($this->params()->tags), array('size' => '38', 'autocomplete' => 'off', 'style' => 'font-size: 20pt; padding: 0 0 1px 4px; margin: 4px 0 0 8px; border-style: none; background: #2b0000;')) ?>
|
||||
<?= $this->submitTag($this->t('.search'), array('style' => 'display: none;', 'name' => '')) ?>
|
||||
</div>
|
||||
<?php }) ?>
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
<?= $this->tag('meta', array('property' => 'og:title', 'content' => $this->html_title())) ?>
|
||||
<?= $this->tag('meta', array('property' => 'og:type', 'content' => 'article')) ?>
|
||||
<?= $this->tag('meta', array('property' => 'og:url', 'content' => $this->urlFor(array('post#show', 'id' => $this->post->id, 'only_path' => false)))) ?>
|
||||
<?= $this->tag('meta', array('property' => 'og:image', 'content' => $this->post->sample_url())) ?>
|
||||
<?= $this->tag('meta', array('property' => 'og:site_name', 'content' => CONFIG()->app_name)) ?>
|
||||
<?= $this->tag('meta', array('property' => 'og:description', 'content' => $this->post->tags())) ?>
|
||||
<?php # Reddit Thumbnail ?>
|
||||
<?= $this->tag('link', array('rel' => 'image_src', 'href' => $this->post->sample_url())) ?>
|
||||
<?php
|
||||
if (CONFIG()->can_see_post(current_user(), $this->post)) {
|
||||
echo $this->tag('link', array('rel' => 'image_src', 'href' => $this->post->sample_url()));
|
||||
echo $this->tag('meta', array('property' => 'og:image', 'content' => $this->post->sample_url()));
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
!isset($this->include_tag_hover_highlight) && $this->include_tag_hover_highlight = false;
|
||||
!isset($this->include_tag_reverse_aliases) && $this->include_tag_reverse_aliases = false;
|
||||
?>
|
||||
<div>
|
||||
<h5><?= $this->t('.title') ?></h5>
|
||||
<div style="margin-bottom: 0.5em;>
|
||||
<ul id="tag-sidebar">
|
||||
<?php !empty($this->tags['exclude']) && print $this->tag_links($this->tags['exclude'], array('prefix' => '-', 'with_hover_highlight' => 'true', 'with_hover_highlight' => $this->include_tag_hover_highlight)) ?>
|
||||
<?php !empty($this->tags['include']) && print $this->tag_links($this->tags['include'], array('with_aliases' => $this->include_tag_reverse_aliases, 'with_hover_highlight' => $this->include_tag_hover_highlight)) ?>
|
||||
|
|
|
@ -96,8 +96,8 @@ Data entered here will be applied to all posts.</p>
|
|||
|
||||
<div id="delete-dupes" style="display:none">
|
||||
<!--
|
||||
<a id="delete-dupes-link" href="#">Delete dupes</a>
|
||||
-->
|
||||
|
||||
--><a id="delete-dupes-link" href="#">Delete dupes</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -151,12 +151,12 @@ Data entered here will be applied to all posts.</p>
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<div id="related"><em>None</em></div>
|
||||
<div id="related"><em>None or Fault found</em></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id="post-list">
|
||||
<ul id="post-list-posts"></ul>
|
||||
<ul id="post-list-posts" style="display:none"></ul>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
@ -179,7 +179,7 @@ Import = {
|
|||
start: function() {
|
||||
this.busy = true
|
||||
$('description').hide()
|
||||
$('posts-details').show()
|
||||
//$('posts-details').show()
|
||||
|
||||
rating = this.get_rating()
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<?php $this->provide('title', '/' . str_replace('_', ' ', $this->params()->tags)) ?>
|
||||
<div id="post-list">
|
||||
<?php if (current_user()->is_privileged_or_higher()) : ?>
|
||||
<?= $this->partial('tag_script') ?>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
if ($this->tag_suggestions) :
|
||||
$total = count($this->tag_suggestions);
|
||||
|
@ -16,48 +19,8 @@
|
|||
unset($total, $count);
|
||||
endif
|
||||
?>
|
||||
|
||||
<div class="sidebar">
|
||||
<?= $this->partial('search') ?>
|
||||
<?php if (current_user()->is_privileged_or_higher()) : ?>
|
||||
<div style="margin-bottom: 1em;" id="mode-box" class="advanced-editing">
|
||||
<h5><?= $this->t('.mode') ?></h5>
|
||||
<form onsubmit="return false;" action="">
|
||||
<div>
|
||||
<select name="mode" id="mode" onchange="PostModeMenu.change()" onkeyup="PostModeMenu.change()" style="width: 13em;">
|
||||
<option value="view"><?= $this->t('.mode_form.view') ?></option>
|
||||
<option value="edit"><?= $this->t('.mode_form.edit') ?></option>
|
||||
<!-- <option value="rating-s">Rate safe</option>
|
||||
<option value="rating-q">Rate questionable</option>
|
||||
<option value="rating-e">Rate explicit</option>
|
||||
<?php if (current_user()->is_privileged_or_higher()) : ?>
|
||||
<option value="lock-rating">Lock rating</option>
|
||||
<option value="lock-note">Lock notes</option>
|
||||
<?php endif ?> -->
|
||||
<?php if (current_user()->is_mod_or_higher()) : ?>
|
||||
<option value="approve"><?= $this->t('.mode_form.approve') ?></option>
|
||||
<?php endif ?>
|
||||
<option value="flag"><?= $this->t('.mode_form.flag') ?></option>
|
||||
<option value="apply-tag-script"><?= $this->t('.mode_form.script') ?></option>
|
||||
<option value="reparent-quick"><?= $this->t('.mode_form.reparent') ?></option>
|
||||
<?php if ($this->searching_pool) : ?>
|
||||
<option value="remove-from-pool"><?= $this->t('.mode_form.pool_remove') ?></option>
|
||||
<?php endif ?>
|
||||
<?php if (CONFIG()->delete_post_mode && current_user()->is_admin()) : ?>
|
||||
<option value="destroy">Delete posts</option>
|
||||
<?php endif ?>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?= $this->partial('tag_script') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->searching_pool) : ?>
|
||||
<?= $this->t(['.pool_view_html', 'pool' => $this->linkTo($this->h($this->searching_pool->pretty_name()), array('pool#show', 'id' => $this->searching_pool->id))]) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="content">
|
||||
<div class="sidebar" style="display: none;">
|
||||
<?php if ($this->showing_holds_only) : ?>
|
||||
<?php if (!$this->posts->blank()) : ?>
|
||||
<div style="margin-bottom: .5em;">
|
||||
|
@ -69,15 +32,16 @@
|
|||
<?php endif ?>
|
||||
|
||||
<?= $this->partial('blacklists') ?>
|
||||
<?= $this->partial('tags', array('include_tag_hover_highlight' => 'true')) ?>
|
||||
|
||||
<br />
|
||||
|
||||
<?php if (CONFIG()->can_show_ad('post#index-sidebar', current_user())) : ?>
|
||||
<?= $this->partial('vertical') ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if (!current_user()->is_member_or_higher()) : ?>
|
||||
<div class="status-notice">You are required to have an account to access sensitive or <a href="/wiki/show?title=restricted_content">restricted content</a>!</div>
|
||||
<?php endif ?>
|
||||
<?php if ($this->searching_pool) : ?>
|
||||
<div class="status-notice">
|
||||
<?= $this->t(['.pool_view_html', 'pool' => $this->linkTo($this->h($this->searching_pool->pretty_name()), array('pool#show', 'id' => $this->searching_pool->id))]) ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (!empty($this->ambiguous_tags)) : ?>
|
||||
<div class="status-notice">
|
||||
<?= $this->t('.ambiguous') ?>: <?= implode(', ', array_map(function($x){ return $this->linkTo($this->h($x), ['wiki#show', 'title' => $x]); }, $this->ambiguous_tags)) ?>
|
||||
|
@ -147,7 +111,6 @@
|
|||
<?php if ($this->contentFor('subnavbar')) : ?>
|
||||
<!-- Align the links to the content, not the window. -->
|
||||
<div style="clear: both;">
|
||||
<div class="sidebar"> </div>
|
||||
<div class="footer" style="clear: none;">
|
||||
<ul class="flat-list" id="subnavbar">
|
||||
<?= $this->content('subnavbar') ?>
|
||||
|
|
|
@ -10,30 +10,40 @@
|
|||
<?php if ($this->post->can_be_seen_by(current_user())) : ?>
|
||||
<script type="text/javascript">Post.register_resp(<?= json_encode(Post::batch_api_data(array($this->post))) ?>);</script>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (!current_user()->is_member_or_higher()) : ?>
|
||||
<div class="status-notice">You must have an account to comment or edit posts</div>
|
||||
<?php endif ?>
|
||||
<?= $this->partial('post/show_partials/status_notices', array('pools' => $this->pools)) ?>
|
||||
|
||||
|
||||
<div class="sidebar">
|
||||
<?= $this->partial('search') ?>
|
||||
<?= $this->partial('tags') ?>
|
||||
<?= $this->partial('post/show_partials/related_posts_panel') ?>
|
||||
<?php if ($this->post->can_be_seen_by(current_user())) : ?>
|
||||
<?= $this->partial('tags') ?>
|
||||
<?= $this->partial('post/show_partials/statistics_panel') ?>
|
||||
<?php if (current_user()->is_member_or_higher()) : ?>
|
||||
<?= $this->partial('post/show_partials/options_panel') ?>
|
||||
<?= $this->partial('post/show_partials/related_posts_panel') ?>
|
||||
<br />
|
||||
<?php if (CONFIG()->can_show_ad('post#show-sidebar', current_user())) : ?>
|
||||
<?= $this->partial('vertical') ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<br />
|
||||
<?php if (CONFIG()->can_show_ad('post#show-sidebar', current_user())) : ?>
|
||||
<?= $this->partial('vertical') ?>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="content" id="right-col">
|
||||
<div class="content content-post" id="right-col">
|
||||
<?php if (CONFIG()->can_show_ad('post#show-top', current_user())) : ?>
|
||||
<?= $this->partial('horizontal', ['position' => 'top']) ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (!$this->post->can_be_seen_by(current_user())) : ?>
|
||||
<div class="status-notice">You are required to have an account to access <a href="/wiki/show?title=restricted_content">restricted content</a>!</div>
|
||||
<?php endif ?>
|
||||
<?php if ($this->post->can_be_seen_by(current_user())) : ?>
|
||||
<?= $this->partial('post/show_partials/image') ?>
|
||||
<?= $this->partial('post/show_partials/image_footer', ['post_id' => $this->post->id]) ?>
|
||||
<?= $this->partial('post/show_partials/edit') ?>
|
||||
<?= $this->partial('post/show_partials/comments') ?>
|
||||
|
||||
<?php if (current_user()->is_member_or_higher()) : ?>
|
||||
<?= $this->partial('post/show_partials/image_footer', ['post_id' => $this->post->id]) ?>
|
||||
<?= $this->partial('post/show_partials/edit') ?>
|
||||
<?= $this->partial('post/show_partials/comments') ?>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?php if (CONFIG()->can_show_ad('post#show-bottom', current_user())) : ?>
|
||||
<?= $this->partial('horizontal', ['position' => 'bottom']) ?>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php if (!$this->post->is_deleted()) : ?>
|
||||
<div<?php if (CONFIG()->dblclick_resize_image) echo ' ondblclick="Post.resize_image(); return false;"' ?>>
|
||||
<?php if (!$this->post->can_be_seen_by(current_user())) : ?>
|
||||
<p><?= $this->t('.text') ?></p>
|
||||
<p>This post is restricted</p>
|
||||
<?php elseif ($this->post->image()) : ?>
|
||||
<div id="note-container">
|
||||
<?php foreach ($this->post->active_notes() as $note) : ?>
|
||||
|
@ -30,6 +30,13 @@
|
|||
</object>
|
||||
|
||||
<p><?= $this->linkTo($this->t('post_flash_dl'), $this->post->file_url()) ?></p>
|
||||
<?php elseif ($this->post->video()) : ?>
|
||||
<div>
|
||||
<video controls="true" autoplay="true" loop="true" >
|
||||
<source src="<?= $this->post->file_url() ?>" type="video/mp4">
|
||||
Your browser does not support webm video.
|
||||
</video>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<h2><a href="<?= $this->post->file_url() ?>"><?= $this->t('post_download') ?></a></h2>
|
||||
<p><?= $this->t('post_download_text') ?></p>
|
||||
|
|
|
@ -1,75 +1,78 @@
|
|||
<div>
|
||||
<h5><?= $this->t('.title') ?></h5>
|
||||
<div class="clearfix" >
|
||||
<ul>
|
||||
<li><?= $this->linkToFunction($this->t('buttons.edit'), "$('comments').hide(); $('edit').show().scrollTo(); $('post_tags').focus(); Cookie.put('show_defaults_to_edit', 1);") ?></li>
|
||||
<!-- <?php //if (!$this->post->is_deleted() && $this->post->image() && $this->post->width && $this->post->width > 700) : ?>
|
||||
<li><?php //echo $this->linkToFunction($this->t('.resize'), "post->resize_image()") ?></li>
|
||||
<?php //endif ?> -->
|
||||
<?php if ($this->post->image() && $this->post->can_be_seen_by(current_user())) : ?>
|
||||
<?php $file_jpeg = $this->post->get_file_jpeg() ?>
|
||||
<?php if ($this->post->use_sample(current_user()) or current_user()->always_resize_images) : ?>
|
||||
<li><?php if (!array_key_exists("dakimakura", $this->post->tags()) || current_user()->is_contributor_or_higher());
|
||||
echo $this->linkTo($this->t('.view_larger'), $file_jpeg['url'], [
|
||||
'class' => ($this->post->has_sample() ? "original-file-changed":"original-file-unchanged") . " highres-show",
|
||||
'id' => 'highres-show', 'large_width' => $this->post->width, 'large_height' => $this->post->height])
|
||||
?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li><?php if (array_key_exists("dakimakura", $this->post->tags()) && !current_user()->is_contributor_or_higher()) :
|
||||
$file_sample = $this->post->get_file_sample(current_user());
|
||||
echo $this->linkTo(($this->post->has_sample() ? $this->t('.download.larger') : $this->t('.download.normal')) . ' (' . $this->numberToHumanSize($file_sample['size']) . ' ' . strtoupper($file_sample['ext']) . ')', $file_sample['url'], array(
|
||||
'class' => $this->post->has_sample() ? "original-file-changed":"original-file-unchanged",
|
||||
'id' => 'highres'));
|
||||
else:
|
||||
echo $this->linkTo(($this->post->has_sample() ? $this->t('.download.larger') : $this->t('.download.image')) . ' (' . $this->numberToHumanSize($file_jpeg['size']) . ' ' . strtoupper($file_jpeg['ext']) . ')', $file_jpeg['url'], array(
|
||||
'class' => ($this->post->has_sample() ? "original-file-changed":"original-file-unchanged"),
|
||||
'id' => 'highres'));
|
||||
endif
|
||||
?>
|
||||
</li>
|
||||
<?php if ($this->post->has_jpeg()) : ?>
|
||||
<?php $file_image = $this->post->get_file_image() ?>
|
||||
<?php # If we have a JPEG, the above link was the JPEG. Link to the PNG here. ?>
|
||||
<li><?= $this->linkTo($this->t('.download.normal').' '.strtoupper($file_image['ext']).' ('.$this->numberToHumanSize($file_image['size']).')', $file_image['url'], array(
|
||||
'class' => 'original-file-unchanged',
|
||||
'id' => 'png'));
|
||||
?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->post->can_user_delete(current_user())) : ?>
|
||||
<li><?= $this->linkTo($this->t('.delete'), array('#delete', 'id' => $this->post->id)) ?></li>
|
||||
<?php endif ?>
|
||||
<?php if ($this->post->is_deleted() && current_user()->is_janitor_or_higher()) : ?>
|
||||
<li><?= $this->linkTo($this->t('.undelete'), array('#undelete', 'id' => $this->post->id)) ?></li>
|
||||
<?php endif ?>
|
||||
<?php if (!$this->post->is_flagged() && !$this->post->is_deleted()) : ?>
|
||||
<li><?= $this->linkToFunction($this->t('.flag'), "Post.flag(".$this->post->id.", function() { window.location.reload(); })", array('level' => 'member')) ?></li>
|
||||
<?php endif ?>
|
||||
<?php if (!$this->post->is_deleted() && $this->post->image() && !$this->post->is_note_locked()) : ?>
|
||||
<?php if (CONFIG()->disable_old_note_creation) : ?>
|
||||
<li style="position:relative">
|
||||
<div id="note_create_notice"><?= $this->t(['.notes_create_notice', 'notes_help' => $this->linkTo('Notes help', 'help#notes'), 'close' => $this->linkToFunction('close', 'Note.toggleCreateNotice()')]) ?></div>
|
||||
<?= $this->linkToFunction($this->t('.add_notes'), "Note.toggleCreateNotice()", array('level' => 'member')) ?>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li><?= $this->linkToFunction($this->t('.add_notes'), "Note.create(".$this->post->id.")", array('level' => 'member')) ?></li>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<li id="add-to-favs"><?= $this->linkToFunction($this->t('.favorites.add'), "Post.vote(".$this->post->id.", 3); return false") ?></li>
|
||||
<li id="remove-from-favs"><?= $this->linkToFunction($this->t('.favorites.remove'), "Post.vote(".$this->post->id.", 0); return false") ?></li>
|
||||
<?php if ($this->post->is_pending() && current_user()->is_janitor_or_higher()) : ?>
|
||||
<li><?= $this->linkToFunction($this->t('.approve._'), "if (confirm('".$this->t('.approve.confirm')."')) {Post.approve(".$this->post->id.")}") ?></li>
|
||||
<?php endif ?>
|
||||
<?php if (!$this->post->is_deleted()) : ?>
|
||||
<li id="add-to-pool" class="advanced-editing"><a href="#" onclick="new Ajax.Updater('add-to-pool', '/pool/select?post_id=<?= $this->post->id ?>', {asynchronous:true, evalScripts:true, method:'get'}); return false;"><?= $this->t('.add_to_pool') ?></a></li>
|
||||
<?php endif ?>
|
||||
<?php if (!$this->post->is_deleted()) : ?>
|
||||
<li id="set-avatar"><?= $this->linkTo($this->t('.set_avatar'), array('user#set_avatar', 'id' => $this->post->id)) ?></li>
|
||||
<?php endif ?>
|
||||
<li><?= $this->linkTo($this->t('.history'), array('history#index', 'search' => 'post:'.$this->post->id)) ?></li>
|
||||
<?php if (CONFIG()->enable_find_external_data && current_user()->is_mod_or_higher()) : ?>
|
||||
<li><?= $this->linkTo('Search external data', array('post#search_external_data', 'ids' => $this->post->id)) ?></li>
|
||||
<?php endif ?>
|
||||
<li class="wiki"><?php if ($this->post->image() && $this->post->can_be_seen_by(current_user())) : ?>
|
||||
<?php $file_jpeg = $this->post->get_file_jpeg() ?>
|
||||
<li><?php if (array_key_exists("dakimakura", $this->post->tags()) && !current_user()->is_contributor_or_higher()) :
|
||||
$file_sample = $this->post->get_file_sample(current_user());
|
||||
echo $this->linkTo(($this->post->has_sample() ? $this->t('.download.larger') : $this->t('.download.normal')) . ' ' . $this->numberToHumanSize($file_sample['size']), $file_sample['url'], array(
|
||||
'class' => $this->post->has_sample() ? "original-file-changed":"original-file-unchanged",
|
||||
'id' => 'highres'));
|
||||
else:
|
||||
echo $this->linkTo(($this->post->has_sample() ? $this->t('.download.larger') : $this->t('.download.image')) . ' (' . $this->numberToHumanSize($file_jpeg['size']) . ')', $file_jpeg['url'], array(
|
||||
'class' => ($this->post->has_sample() ? "original-file-changed":"original-file-unchanged"),
|
||||
'id' => 'highres'));
|
||||
endif
|
||||
?>
|
||||
</li>
|
||||
<?php if ($this->post->has_jpeg()) : ?>
|
||||
<?php $file_image = $this->post->get_file_image() ?>
|
||||
<?php # If we have a JPEG, the above link was the JPEG. Link to the PNG here. ?>
|
||||
<li><?= $this->linkTo($this->t('.download.normal').' '.strtoupper($file_image['ext']).' ('.$this->numberToHumanSize($file_image['size']).')', $file_image['url'], array(
|
||||
'class' => 'original-file-unchanged',
|
||||
'id' => 'png'));
|
||||
?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?= $this->linkTo('Options ■', '#', ['class' => 'submenu-button']) ?>
|
||||
<ul class="submenu" style="display: none; margin-left: 0em; margin-top: .2em; width: 115px; padding: 0.3em; border: 1px solid #bf5e65;">
|
||||
<li><?= $this->linkToFunction($this->t('buttons.edit'), "$('comments').hide(); $('edit').show().scrollTo(); $('post_tags').focus(); Cookie.put('show_defaults_to_edit', 1);") ?></li>
|
||||
<!-- <?php //if (!$this->post->is_deleted() && $this->post->image() && $this->post->width && $this->post->width > 700) : ?>
|
||||
<li><?php //echo $this->linkToFunction($this->t('.resize'), "post->resize_image()") ?></li>
|
||||
<?php //endif ?> -->
|
||||
<?php if ($this->post->image() && $this->post->can_be_seen_by(current_user())) : ?>
|
||||
<?php if ($this->post->has_jpeg()) : ?>
|
||||
<?php $file_image = $this->post->get_file_image() ?>
|
||||
<?php # If we have a JPEG, the above link was the JPEG. Link to the PNG here. ?>
|
||||
<li><?= $this->linkTo($this->t('.download.normal').' '.strtoupper($file_image['ext']).' ('.$this->numberToHumanSize($file_image['size']).')', $file_image['url'], array(
|
||||
'class' => 'original-file-unchanged',
|
||||
'id' => 'png'));
|
||||
?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?php if ($this->post->can_user_delete(current_user())) : ?>
|
||||
<li><?= $this->linkTo($this->t('.delete'), array('#delete', 'id' => $this->post->id)) ?></li>
|
||||
<?php endif ?>
|
||||
<?php if ($this->post->is_deleted() && current_user()->is_janitor_or_higher()) : ?>
|
||||
<li><?= $this->linkTo($this->t('.undelete'), array('#undelete', 'id' => $this->post->id)) ?></li>
|
||||
<?php endif ?>
|
||||
<?php if (!$this->post->is_flagged() && !$this->post->is_deleted()) : ?>
|
||||
<li><?= $this->linkToFunction($this->t('.flag'), "Post.flag(".$this->post->id.", function() { window.location.reload(); })", array('level' => 'member')) ?></li>
|
||||
<?php endif ?>
|
||||
<?php if (!$this->post->is_deleted() && $this->post->image() && !$this->post->is_note_locked()) : ?>
|
||||
<?php if (CONFIG()->disable_old_note_creation) : ?>
|
||||
<li style="position:relative">
|
||||
<div id="note_create_notice"><?= $this->t(['.notes_create_notice', 'notes_help' => $this->linkTo('Notes help', 'help#notes'), 'close' => $this->linkToFunction('close', 'Note.toggleCreateNotice()')]) ?></div>
|
||||
<?= $this->linkToFunction($this->t('.add_notes'), "Note.toggleCreateNotice()", array('level' => 'member')) ?>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li><?= $this->linkToFunction($this->t('.add_notes'), "Note.create(".$this->post->id.")", array('level' => 'member')) ?></li>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<li id="add-to-favs"><?= $this->linkToFunction($this->t('.favorites.add'), "Post.vote(".$this->post->id.", 3); return false") ?></li>
|
||||
<li id="remove-from-favs"><?= $this->linkToFunction($this->t('.favorites.remove'), "Post.vote(".$this->post->id.", 0); return false") ?></li>
|
||||
<?php if ($this->post->is_pending() && current_user()->is_janitor_or_higher()) : ?>
|
||||
<li><?= $this->linkToFunction($this->t('.approve._'), "if (confirm('".$this->t('.approve.confirm')."')) {Post.approve(".$this->post->id.")}") ?></li>
|
||||
<?php endif ?>
|
||||
<?php if (!$this->post->is_deleted()) : ?>
|
||||
<li id="add-to-pool" class="advanced-editing"><a href="#" onclick="new Ajax.Updater('add-to-pool', '/pool/select?post_id=<?= $this->post->id ?>', {asynchronous:true, evalScripts:true, method:'get'}); return false;"><?= $this->t('.add_to_pool') ?></a></li>
|
||||
<?php endif ?>
|
||||
<?php if (!$this->post->is_deleted()) : ?>
|
||||
<li id="set-avatar"><?= $this->linkTo($this->t('.set_avatar'), array('user#set_avatar', 'id' => $this->post->id)) ?></li>
|
||||
<?php endif ?>
|
||||
<li><?= $this->linkTo($this->t('.history'), array('history#index', 'search' => 'post:'.$this->post->id)) ?></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,21 +1,6 @@
|
|||
<div>
|
||||
<h5><?= $this->t('.title') ?></h5>
|
||||
<ul>
|
||||
<li><?= $this->linkToIf($this->post->previous_id(), $this->t('.previous'), array('post#show', 'id' => $this->post->previous_id())) ?></li>
|
||||
<li><?= $this->linkToIf($this->post->next_id(), $this->t('.next'), array('post#show', 'id' => $this->post->next_id())) ?></li>
|
||||
<?php if ($this->post->parent_id) : ?>
|
||||
<li><?= $this->linkTo($this->t('.parent'), array('post#show', 'id' => $this->post->parent_id)) ?></li>
|
||||
<?php endif ?>
|
||||
<li><?= $this->linkTo($this->t('.random'), 'post#random') ?></li>
|
||||
<?php if (current_user()->is_member_or_higher()) : ?>
|
||||
<?php if (!$this->post->is_deleted() || $this->post->image()) : ?>
|
||||
<li><a id="find-dupes"><?= $this->t('.find.duplicate') ?></a><?php #= linkTo "Find dupes", 'post#similar', 'id' => $this->post->id, 'services' => 'local' ?></li>
|
||||
<li><a id="find-similar"><?= $this->t('.find.similar') ?></a><?php #= linkTo "Find similar", 'post#similar', 'id' => $this->post->id, 'services' => 'all' ?></li>
|
||||
<script type="text/javascript">
|
||||
$("find-dupes").href = '<?= $this->urlFor(array('post#similar', 'id' => $this->post->id, 'services'=>'local')) ?>';
|
||||
$("find-similar").href = '<?= $this->urlFor(array('post#similar', 'id' => $this->post->id, 'services'=>'all')) ?>';
|
||||
</script>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<li><?= $this->linkToIf($this->post->previous_id(), $this->t('.previous'), array('post#show', 'id' => $this->post->previous_id())) ?> <?= $this->linkToIf($this->post->next_id(), $this->t('.next'), array('post#show', 'id' => $this->post->next_id())) ?> <?php if ($this->post->parent_id) : ?><?= $this->linkTo($this->t('.parent'), array('post#show', 'id' => $this->post->parent_id)) ?><?php endif ?></li>
|
||||
<li><?= $this->linkTo($this->t('.random'), 'post#random') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<div id="stats" class="vote-container">
|
||||
<h5><?= $this->t('.title') ?></h5>
|
||||
<ul>
|
||||
<li><?= $this->t('.id') ?>: <?= $this->post->id ?></li>
|
||||
<?php if ($this->post->user->has_avatar()) : ?>
|
||||
<li><?= $this->avatar($this->post->user, 1) ?></li>
|
||||
<?php endif ?>
|
||||
<li><?= $this->t('.id') ?>: <?= $this->post->id ?></li>
|
||||
<li><?= $this->t('.posted') ?>: <?= $this->t(['.posted_data_html', 'time' => $this->linkTo($this->t(['time.x_ago', 't' => $this->timeAgoInWords($this->post->created_at)]), ["#index", 'tags' => "date:" . substr($this->post->created_at, 0, 10)], ['title' => substr(date('r', strtotime($this->post->created_at)), 0, -6)]), 'user' => $this->linkToIf($this->post->user_id, $this->post->author(), ['user#show', 'id' => $this->post->user_id])]) ?></li>
|
||||
<?php if (current_user()->is_admin() && $this->post->approver) : ?>
|
||||
<li><?= $this->t('.approver') ?>: <?= $this->post->approver->name ?></li>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<h4><?= $this->t('.guidelines.title') ?></h4>
|
||||
<p><?= $this->t('.guidelines.info') ?></p>
|
||||
<ul>
|
||||
<li><?= $this->t(['.guidelines.do_not.tags_html', 'tags' => substr_replace(($str = implode(', ', array_map(function($t){return $this->linkTo(str_replace('_', ' ', $t), ['wiki#show', 'title' => $t]);}, ['furry', 'yaoi', 'guro', 'toon', 'poorly_drawn']))), ' or', strrpos($str, ','), 1) ]) ?></li>
|
||||
<li><?= $this->t(['.guidelines.do_not.tags_html', 'tags' => substr_replace(($str = implode(', ', array_map(function($t){return $this->linkTo(str_replace('_', ' ', $t), ['wiki#show', 'title' => $t]);}, ['furry', 'scat', 'toon', 'poorly_drawn']))), ' or', strrpos($str, ','), 1) ]) ?></li>
|
||||
<li><?= $this->t(['.guidelines.do_not.with_html', 'with' => $this->linkTo($this->t('.guidelines.do_not.compression_artifacts'), array('wiki#show', 'title' => 'compression_artifacts'))]) ?></li>
|
||||
<li><?= $this->t(['.guidelines.do_not.with_html', 'with' => $this->linkTo($this->t('.guidelines.do_not.obnoxious_watermarks'), array('wiki#show', 'title' => 'watermark'))]) ?></li>
|
||||
<li><?= $this->linkTo($this->t('.guidelines.group'), 'help#post_relationships') ?></li>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<?php if (current_user()->is_member_or_higher()) : ?>
|
||||
<?= $this->mailTo(CONFIG()->admin_contact, "Contact", ['encode' => "javascript"]) ?> –
|
||||
<?php endif ?>
|
||||
<?= $this->t('static_serve') ?><?= number_format($this->post_count, 0) ?><?= $this->t('static_posts2') ?>– <?= str_replace('Moebooru', 'MyImouto', $this->t('static_running')) ?><?= CONFIG()->version ?>
|
||||
<?= $this->t('static_serve') ?><?= number_format($this->post_count, 0) ?><?= $this->t('static_posts2') ?>– <?= str_replace('Moebooru', 'Sequenzia', $this->t('static_running')) ?><?= CONFIG()->version ?>
|
||||
<br />
|
||||
<?= $this->t('static_translation') ?>
|
||||
</p>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id="static-more">
|
||||
<div id="title"><h2><?= $this->linkTo($this->imageTag('images/logo_small.png', ['alt' => CONFIG()->app_name, 'size' => '484x75', 'id' => 'logo']), 'root') ?></h2></div>
|
||||
<div id="title"><h2><?= $this->linkTo($this->imageTag('images/logo_small.png', ['alt' => CONFIG()->app_name, 'size' => '146x30', 'id' => 'logo']), 'root') ?></h2></div>
|
||||
<div>
|
||||
<ul>
|
||||
<li><h4><?= $this->t('static_t1') ?></h4></li>
|
||||
|
@ -92,8 +92,8 @@
|
|||
</ul>
|
||||
<ul>
|
||||
<li><h4><?= $this->t('static_t11') ?></h4></li>
|
||||
<li><?= $this->linkTo($this->t('static46'), 'https://github.com/myimouto/myimouto') ?></li>
|
||||
<li><?= $this->linkTo(str_replace('Danbooru', 'Moebooru', $this->t('static47')), 'https://github.com/moebooru/moebooru') ?></li>
|
||||
<li><?= $this->linkTo($this->t('static46'), 'https://code.acr.moe/kazari/sequenzia') ?></li>
|
||||
<li><?= $this->linkTo(str_replace('Danbooru', 'myimouto', $this->t('static47')), 'https://github.com/moebooru/moebooru') ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -1,33 +1,3 @@
|
|||
<div>
|
||||
<?= $this->formTag(array('action' => 'index'), array('method' => 'get'), function(){ ?>
|
||||
<table class="form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="15%">
|
||||
<label for="name"><?= $this->t('tag_name') ?></label>
|
||||
<p><?= $this->t('tag_wild') ?></p>
|
||||
</th>
|
||||
<td width="85%"><?= $this->textFieldTag("name", $this->h($this->params()->name), array('size' => '40')) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="type"><?= $this->t('tag_type') ?></label></th>
|
||||
<td><?= $this->selectTag('type', array(array_merge(array('Any' => 'any'), array_unique(CONFIG()->tag_types)), $this->params()->type)) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="order"><?= $this->t('tag_order') ?></label></th>
|
||||
<td><?= $this->selectTag('order', array(array('Name' => 'name', 'Count' => 'count', 'Date' => 'date'), $this->params()->order)) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td><?= $this->submitTag($this->t('tag_search')) ?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php }) ?>
|
||||
</div>
|
||||
|
||||
<table width="100%" class="highlightable">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<tr id="tag-subscription-row-<?= $this->tag_subscription->id ?>">
|
||||
<td><input onclick="new Ajax.Request('<?= $this->urlFor(['tag_subscription#destroy', 'id' => $this->tag_subscription->id, 'format' => 'js']) ?>', {asynchronous:true, evalScripts:true});" type="button" value="<?= '-' ?>"></td>
|
||||
<td><?= $this->textFieldTag("tag_subscription[".$this->tag_subscription->id."][name]", $this->tag_subscription->name, ['size' => 20]) ?></td>
|
||||
<td><?= $this->textFieldTag("tag_subscription[".$this->tag_subscription->id."][tag_query]", $this->tag_subscription->tag_query, ['size' => 70]) ?></td>
|
||||
<td><?= $this->textFieldTag("tag_subscription[".$this->tag_subscription->id."][name]", $this->tag_subscription->name, ['size' => 20, 'required']) ?></td>
|
||||
<td><?= $this->textFieldTag("tag_subscription[".$this->tag_subscription->id."][tag_query]", $this->tag_subscription->tag_query, ['size' => 70, 'required']) ?></td>
|
||||
<td>
|
||||
<?= $this->selectTag("tag_subscription[".$this->tag_subscription->id."][is_visible_on_profile]", $this->optionsForSelect(["Visible" => 1, "Hidden" => 0], $this->tag_subscription->is_visible_on_profile)) ?>
|
||||
</td>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
<th>
|
||||
<label for="ban_duration"><?= $this->t('user_duration') ?></label>
|
||||
</th>
|
||||
<td><?=$this->textField("ban", "duration", ['size' => '10']) ?></td>
|
||||
<td><?=$this->textField("ban", "duration", ['size' => '10', 'required']) ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "myimouto/myimouto",
|
||||
"name": "sequenzia/sequenzia",
|
||||
"description": "Image board for PHP 5.4+ and MySQL",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
@ -12,6 +12,8 @@
|
|||
"railsphp/railsphp": "1.0.*",
|
||||
"railsphp/willpaginate": "1.0.*",
|
||||
"railsphp/actsasversioned": "1.0.*",
|
||||
"michelf/php-markdown": "1.3.*"
|
||||
}
|
||||
"michelf/php-markdown": "1.9.*"
|
||||
},
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true
|
||||
}
|
||||
|
|
1185
composer.lock
generated
Normal file
|
@ -14,7 +14,7 @@ define('RAILS_ROOT', dirname(__DIR__));
|
|||
/**
|
||||
* Path to Rails.
|
||||
*/
|
||||
$railsPath = __DIR__ . '/../vendor/railsphp/railsphp/lib/Rails';
|
||||
$railsPath = dirname(__DIR__, 1) . '/vendor/railsphp/railsphp/lib/Rails';
|
||||
|
||||
/**
|
||||
* Load and initialize Rails.
|
||||
|
@ -25,5 +25,5 @@ Rails::initialize();
|
|||
/**
|
||||
* Load and initialize application.
|
||||
*/
|
||||
require __DIR__ . '/application.php';
|
||||
require dirname(__DIR__) . '/config/application.php';
|
||||
MyImouto\Application::initialize();
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace MyImouto;
|
|||
abstract class DefaultConfig
|
||||
{
|
||||
# The name of this booru.
|
||||
public $app_name = 'my.imouto';
|
||||
public $app_name = 'Sequenzia';
|
||||
|
||||
# Host name. Must not include scheme (i.e. http(s)://) nor trailing slash.
|
||||
public $server_host = '127.0.0.1:3000';
|
||||
|
@ -17,7 +17,7 @@ abstract class DefaultConfig
|
|||
public $url_base = 'http://127.0.0.1:3000';
|
||||
|
||||
# The version of this MyImouto
|
||||
public $version = '1.0.8';
|
||||
public $version = '1.1';
|
||||
|
||||
# This is a salt used to make dictionary attacks on account passwords harder.
|
||||
public $user_password_salt = 'choujin-steiner';
|
||||
|
@ -100,7 +100,7 @@ abstract class DefaultConfig
|
|||
# the above dimensions.
|
||||
public $sample_always_generate_size = 524288; // 512*1024
|
||||
|
||||
# After a post receives this many posts, new comments will no longer bump the post in comment/index.
|
||||
# After a post receives this many comments, new comments will no longer bump the post in comment/index.
|
||||
public $comment_threshold = 9999;
|
||||
|
||||
# Members cannot post more than X posts in a day.
|
||||
|
@ -221,9 +221,9 @@ abstract class DefaultConfig
|
|||
|
||||
# List of image services available for similar image searching.
|
||||
public $image_service_list = [
|
||||
"danbooru.donmai.us" => "http://iqdb.yande.re/index.xml",
|
||||
"yande.re" => "http://iqdb.yande.re/index.xml",
|
||||
"konachan.com" => "http://iqdb.yande.re/index.xml"
|
||||
"danbooru.donmai.us" => "http://iqdb.org/index.xml",
|
||||
"yande.re" => "http://iqdb.org/index.xml",
|
||||
"konachan.com" => "http://iqdb.org/index.xml"
|
||||
];
|
||||
|
||||
public $dupe_check_on_upload = false;
|
||||
|
@ -462,6 +462,14 @@ abstract class DefaultConfig
|
|||
# Set to 0 to wait indefinitely.
|
||||
public $http_streaming_timeout = 10;
|
||||
|
||||
/**
|
||||
* Don't process tag subscriptions again within this time.
|
||||
* Set to null to process tag subscriptions asap.
|
||||
*
|
||||
* @param string
|
||||
*/
|
||||
public $tag_subscription_delay = '360 minutes';
|
||||
|
||||
public function __get($prop)
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -785,7 +785,7 @@ en:
|
|||
dimension: Dimension
|
||||
source: Source
|
||||
posts:
|
||||
empty: Nobody here but us chickens!
|
||||
empty: There is nothing to show here
|
||||
search:
|
||||
search: Search
|
||||
title: Search
|
||||
|
@ -825,6 +825,7 @@ en:
|
|||
title: History
|
||||
image:
|
||||
denied: You need a privileged account to see this image
|
||||
text: You need an account to see this image or wait till an OPEN ACCESS day
|
||||
download:
|
||||
_: Download
|
||||
info: You must download this file manually.
|
||||
|
@ -841,7 +842,7 @@ en:
|
|||
delete: Delete
|
||||
download:
|
||||
image: Image
|
||||
larger: Download larger version
|
||||
larger: Download Hi-Res
|
||||
normal: Download
|
||||
favorites:
|
||||
add: Add to favorites
|
||||
|
@ -868,15 +869,15 @@ en:
|
|||
find:
|
||||
duplicate: Find dupes
|
||||
similar: Find similar
|
||||
next: Next
|
||||
parent: Parent
|
||||
previous: Previous
|
||||
next: 'Next »'
|
||||
parent: 'Up'
|
||||
previous: '« Previous'
|
||||
random: Random
|
||||
title: Related Posts
|
||||
statistics_panel:
|
||||
approver: Approver
|
||||
favorited_by: Favorited by
|
||||
id: Id
|
||||
id: PID
|
||||
posted: Posted
|
||||
posted_data_html: '%{time} by %{user}'
|
||||
rating: Rating
|
||||
|
@ -912,7 +913,7 @@ en:
|
|||
resized:
|
||||
always_view_original: Always view original
|
||||
hide: Hide this message
|
||||
info_html: This image has been resized. Click on the %{larger} link in the sidebar for a high-quality version.
|
||||
info_html: This image has been resized. %{larger} for a high-quality version.
|
||||
view_larger: View larger version
|
||||
samples_disabled: Image samples have been disabled. If you find this to be too slow, you can turn samples back on in your profile settings.
|
||||
similar:
|
||||
|
|
|
@ -28,8 +28,7 @@ ru:
|
|||
index: {expires_in: 'Истекает в течение %{t}.', permanent: Этот бан навсегда., reason: Вы забанены}
|
||||
batch:
|
||||
create: {files: Файлы, load_file_index: Загрузить индекс, submit: Начать Закачку, tags: Метки, title: Очередь, url: URL}
|
||||
index: {cancel: Отменить все закачки, clear: Очистить завершённые, completed_html: 'Пост %{id} завершён', exists_html: 'Пост %{id} уже существует', pause: Пауза, paused: Пауза, pending: Ожидает, queue_uploads: Очередь, resume: Возобновить, retry_failed: Повторить сбойные,
|
||||
status: Статус, tags: Метки, title: Очередь Батчей, uploading: Загрузка, url: URL, username: Пользователь}
|
||||
index: {cancel: Отменить все закачки, clear: Очистить завершённые, completed_html: 'Пост %{id} завершён', exists_html: 'Пост %{id} уже существует', pause: Пауза, paused: Пауза, pending: Ожидает, queue_uploads: Очередь, resume: Возобновить, retry_failed: Повторить сбойные, status: Статус, tags: Метки, title: Очередь Батчей, uploading: Загрузка, url: URL, username: Пользователь}
|
||||
buttons:
|
||||
_no: 'Нет'
|
||||
_yes: 'Да'
|
||||
|
@ -81,9 +80,7 @@ ru:
|
|||
search: Поиск
|
||||
show: {help: Справка, list: Список, locked: Эта темя закрыта., new: Новая тема, parent: Родитель, post: Пост, preview: Предпросмотр, reply: Ответить}
|
||||
help:
|
||||
index: {about: О Moebooru, accounts: Учётные Записи, api: API, artists: Художники, bookmarklet: Закладки, bugs: Ошибки, cheat_sheet: Шпаргалка, comments: Комментарии, dtext: DText, faq: Часто Задаваемые Вопросы, firefox_ext: Расширение для Firefox, help: Справка, image_sampling: Образцы
|
||||
Изображений, irc: IRC, mass_tag_edit: Массовая Правка Меток, notes: Заметки, pools: Коллекции, post_relationships: Взаимосвязи Постов, posts: Посты, ratings: Оценки, source: Исходный Код, starting: Вступление, suggestions: Предположения, tag_aliases: Синонимы,
|
||||
tag_implications: Дополнительные Значения, tag_scripts: Сценарии Меток, tags: Метки, voting: Голосование, wiki: Wiki}
|
||||
index: {about: О Moebooru, accounts: Учётные Записи, api: API, artists: Художники, bookmarklet: Закладки, bugs: Ошибки, cheat_sheet: Шпаргалка, comments: Комментарии, dtext: DText, faq: Часто Задаваемые Вопросы, firefox_ext: Расширение для Firefox, help: Справка, image_sampling: Образцы Изображений, irc: IRC, mass_tag_edit: Массовая Правка Меток, notes: Заметки, pools: Коллекции, post_relationships: Взаимосвязи Постов, posts: Посты, ratings: Оценки, source: Исходный Код, starting: Вступление, suggestions: Предположения, tag_aliases: Синонимы, tag_implications: Дополнительные Значения, tag_scripts: Сценарии Меток, tags: Метки, voting: Голосование, wiki: Wiki}
|
||||
helpers:
|
||||
submit:
|
||||
advertisement: {create: Создать, update: Сохранить}
|
||||
|
@ -773,8 +770,7 @@ ru:
|
|||
tag_implication:
|
||||
index:
|
||||
add: Добавить
|
||||
add_new: {title: Добавить Дополнительное Значение, info: 'Предикат - метка, для которой добавляется метка дополнение. Например, дополнительное значение с предикатом=квадрат и дополнением=прямоугольник означает, что для каждого поста, помеченного как квадрат, будет
|
||||
также добавлена метка прямоугольник.', info_moderation: 'Вы можете предложить новое дополнительное значение для метки, но оно должно быть подтверждено модератором.', submit: Отправить}
|
||||
add_new: {title: Добавить Дополнительное Значение, info: 'Предикат - метка, для которой добавляется метка дополнение. Например, дополнительное значение с предикатом=квадрат и дополнением=прямоугольник означает, что для каждого поста, помеченного как квадрат, будет также добавлена метка прямоугольник.', info_moderation: 'Вы можете предложить новое дополнительное значение для метки, но оно должно быть подтверждено модератором.', submit: Отправить}
|
||||
approve: Подтвердить
|
||||
consequent: Дополнение
|
||||
delete: Удалить
|
||||
|
|
12
db/migrate/20160730084704_change_ip_addr_length.php
Executable file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
class ChangeIpAddrLength extends Rails\ActiveRecord\Migration\Base
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->execute("ALTER TABLE `ip_bans` CHANGE `ip_addr` `ip_addr` VARCHAR(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
|
||||
$this->execute("ALTER TABLE `comments` CHANGE `ip_addr` `ip_addr` VARCHAR(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
|
||||
$this->execute("ALTER TABLE `post_tag_histories` CHANGE `ip_addr` `ip_addr` VARCHAR(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
|
||||
$this->execute("ALTER TABLE `wiki_page_versions` CHANGE `ip_addr` `ip_addr` VARCHAR(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
|
||||
$this->execute("ALTER TABLE `wiki_pages` CHANGE `ip_addr` `ip_addr` VARCHAR(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
|
||||
}
|
||||
}
|
|
@ -9,7 +9,6 @@
|
|||
<body>
|
||||
<div style="text-align: center;">
|
||||
<img src="/images/errors.png" alt="errors" style="margin: auto;" />
|
||||
<p style="width: 30em; margin: auto;">An error has occurred.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
14
public/504.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Error</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/assets/application.css" title="default" />
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<img src="/images/504.png" alt="errors" style="margin: auto;" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
public/android-icon-144x144.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
public/android-icon-192x192.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
public/android-icon-36x36.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/android-icon-48x48.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
public/android-icon-72x72.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
public/android-icon-96x96.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
public/apple-icon-114x114.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
public/apple-icon-120x120.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
public/apple-icon-144x144.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
public/apple-icon-152x152.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
public/apple-icon-180x180.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
public/apple-icon-57x57.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
public/apple-icon-60x60.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
public/apple-icon-72x72.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
public/apple-icon-76x76.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
public/apple-icon-precomposed.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
public/apple-icon.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.9 KiB |
2
public/browserconfig.xml
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 4.7 KiB |
BIN
public/favicon-16x16.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
public/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/favicon-96x96.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 922 B After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 974 B After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 9.3 KiB |
BIN
public/images/504.png
Normal file
After Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 74 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 74 B After Width: | Height: | Size: 1.2 KiB |
BIN
public/images/ddl_uhd.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 435 KiB After Width: | Height: | Size: 179 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 922 B |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 974 B |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 1.0 KiB |