fcfinder 0.1.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +9 -10
  3. data/.travis.yml +3 -3
  4. data/CODE_OF_CONDUCT.md +13 -13
  5. data/Gemfile +4 -4
  6. data/LICENSE.txt +21 -21
  7. data/README.md +356 -0
  8. data/Rakefile +1 -1
  9. data/app/assets/javascripts/fcfinder.js +1 -1
  10. data/app/assets/stylesheets/fcfinder.css.scss +347 -0
  11. data/bin/console +14 -14
  12. data/bin/setup +7 -7
  13. data/fcfinder-0.1.0.gem +0 -0
  14. data/fcfinder-0.1.1.gem +0 -0
  15. data/fcfinder.gemspec +31 -31
  16. data/lib/fcfinder/connector.rb +2 -2
  17. data/lib/fcfinder/engine.rb +10 -2
  18. data/lib/fcfinder/version.rb +1 -1
  19. data/screenshots/fcfinder_interface.png +0 -0
  20. data/vendor/assets/images/fcfinder/about.png +0 -0
  21. data/vendor/assets/images/fcfinder/copy.png +0 -0
  22. data/vendor/assets/images/fcfinder/cut.png +0 -0
  23. data/vendor/assets/images/fcfinder/date_sorter.png +0 -0
  24. data/vendor/assets/images/fcfinder/delete.png +0 -0
  25. data/vendor/assets/images/fcfinder/directory-max.png +0 -0
  26. data/vendor/assets/images/fcfinder/directory.png +0 -0
  27. data/vendor/assets/images/fcfinder/directory_mini.png +0 -0
  28. data/vendor/assets/images/fcfinder/download.png +0 -0
  29. data/vendor/assets/images/fcfinder/duplicate.png +0 -0
  30. data/vendor/assets/images/fcfinder/edit.png +0 -0
  31. data/vendor/assets/images/fcfinder/files/7z.png +0 -0
  32. data/vendor/assets/images/fcfinder/files/Untitled-24.png +0 -0
  33. data/vendor/assets/images/fcfinder/files/avi.png +0 -0
  34. data/vendor/assets/images/fcfinder/files/bmp.png +0 -0
  35. data/vendor/assets/images/fcfinder/files/bz.png +0 -0
  36. data/vendor/assets/images/fcfinder/files/bz2.png +0 -0
  37. data/vendor/assets/images/fcfinder/files/css.png +0 -0
  38. data/vendor/assets/images/fcfinder/files/doc.png +0 -0
  39. data/vendor/assets/images/fcfinder/files/docx.png +0 -0
  40. data/vendor/assets/images/fcfinder/files/dv.png +0 -0
  41. data/vendor/assets/images/fcfinder/files/flv.png +0 -0
  42. data/vendor/assets/images/fcfinder/files/gif.png +0 -0
  43. data/vendor/assets/images/fcfinder/files/gz.png +0 -0
  44. data/vendor/assets/images/fcfinder/files/htm.png +0 -0
  45. data/vendor/assets/images/fcfinder/files/html.png +0 -0
  46. data/vendor/assets/images/fcfinder/files/ico.png +0 -0
  47. data/vendor/assets/images/fcfinder/files/jpeg.png +0 -0
  48. data/vendor/assets/images/fcfinder/files/jpg.png +0 -0
  49. data/vendor/assets/images/fcfinder/files/js.png +0 -0
  50. data/vendor/assets/images/fcfinder/files/mid.png +0 -0
  51. data/vendor/assets/images/fcfinder/files/mkv.png +0 -0
  52. data/vendor/assets/images/fcfinder/files/mov.png +0 -0
  53. data/vendor/assets/images/fcfinder/files/mp3.png +0 -0
  54. data/vendor/assets/images/fcfinder/files/mp4.png +0 -0
  55. data/vendor/assets/images/fcfinder/files/mp4a.png +0 -0
  56. data/vendor/assets/images/fcfinder/files/mpg.png +0 -0
  57. data/vendor/assets/images/fcfinder/files/ogg.png +0 -0
  58. data/vendor/assets/images/fcfinder/files/other.png +0 -0
  59. data/vendor/assets/images/fcfinder/files/pdf.png +0 -0
  60. data/vendor/assets/images/fcfinder/files/php.png +0 -0
  61. data/vendor/assets/images/fcfinder/files/png.png +0 -0
  62. data/vendor/assets/images/fcfinder/files/pps.png +0 -0
  63. data/vendor/assets/images/fcfinder/files/ppt.png +0 -0
  64. data/vendor/assets/images/fcfinder/files/pptx.png +0 -0
  65. data/vendor/assets/images/fcfinder/files/psd.png +0 -0
  66. data/vendor/assets/images/fcfinder/files/rar.png +0 -0
  67. data/vendor/assets/images/fcfinder/files/rb.png +0 -0
  68. data/vendor/assets/images/fcfinder/files/swf.png +0 -0
  69. data/vendor/assets/images/fcfinder/files/tar.png +0 -0
  70. data/vendor/assets/images/fcfinder/files/tbz.png +0 -0
  71. data/vendor/assets/images/fcfinder/files/tga.png +0 -0
  72. data/vendor/assets/images/fcfinder/files/tgz.png +0 -0
  73. data/vendor/assets/images/fcfinder/files/tif.png +0 -0
  74. data/vendor/assets/images/fcfinder/files/tiff.png +0 -0
  75. data/vendor/assets/images/fcfinder/files/txt.png +0 -0
  76. data/vendor/assets/images/fcfinder/files/wav.png +0 -0
  77. data/vendor/assets/images/fcfinder/files/wm.png +0 -0
  78. data/vendor/assets/images/fcfinder/files/wma.png +0 -0
  79. data/vendor/assets/images/fcfinder/files/xls.png +0 -0
  80. data/vendor/assets/images/fcfinder/files/xlsx.png +0 -0
  81. data/vendor/assets/images/fcfinder/files/xml.png +0 -0
  82. data/vendor/assets/images/fcfinder/files/zip.png +0 -0
  83. data/vendor/assets/images/fcfinder/finder.png +0 -0
  84. data/vendor/assets/images/fcfinder/icon_view.png +0 -0
  85. data/vendor/assets/images/fcfinder/info.png +0 -0
  86. data/vendor/assets/images/fcfinder/info2.png +0 -0
  87. data/vendor/assets/images/fcfinder/kind_sorter.png +0 -0
  88. data/vendor/assets/images/fcfinder/list_view.png +0 -0
  89. data/vendor/assets/images/fcfinder/name_sorter.png +0 -0
  90. data/vendor/assets/images/fcfinder/new_folder.png +0 -0
  91. data/vendor/assets/images/fcfinder/paste.png +0 -0
  92. data/vendor/assets/images/fcfinder/preview.png +0 -0
  93. data/vendor/assets/images/fcfinder/refresh.png +0 -0
  94. data/vendor/assets/images/fcfinder/rename.png +0 -0
  95. data/vendor/assets/images/fcfinder/settings.png +0 -0
  96. data/vendor/assets/images/fcfinder/show_date.png +0 -0
  97. data/vendor/assets/images/fcfinder/show_size.png +0 -0
  98. data/vendor/assets/images/fcfinder/size_sorter.png +0 -0
  99. data/vendor/assets/images/fcfinder/sort.png +0 -0
  100. data/vendor/assets/images/fcfinder/tree/folder.png +0 -0
  101. data/vendor/assets/images/fcfinder/tree/loader.gif +0 -0
  102. data/vendor/assets/images/fcfinder/tree/minus.png +0 -0
  103. data/vendor/assets/images/fcfinder/tree/plus.png +0 -0
  104. data/vendor/assets/images/fcfinder/up_folder.png +0 -0
  105. data/vendor/assets/images/fcfinder/upload.png +0 -0
  106. data/vendor/assets/javascripts/fcfinder.js +1698 -0
  107. data/vendor/assets/stylesheets/fcfinder.css +347 -0
  108. data/vendor/assets/stylesheets/fcfinder.css.erb +347 -0
  109. metadata +108 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71430280fb0cb028149a2deddcad49155cad48db
4
- data.tar.gz: 0d46014e94abc9aa523a79373e16f4cd615a9d46
3
+ metadata.gz: 1b57ca6fca80da6af0950e0cd90cdf19c96a6f0c
4
+ data.tar.gz: 2bbcfc37cb28fbf1c8084fbacf8088b59acb6de2
5
5
  SHA512:
6
- metadata.gz: 83890395444510d0704889b83d543342cbcb954950a9d1b15a5e3ad7b1749578350b707dfa186661fc00ebfd0730545f9b13fd8f42e9dcdb5aec44705939cc3b
7
- data.tar.gz: 01e84d9e4297d386816c05dde13f8da17336b94ad2ed2c14fa36182ed670cb0060aa83b6dec1c0a65b44ba139effc1c43f1859125cf86eaedfa8f3c201f5a14a
6
+ metadata.gz: fed2e28ae80fc4ac6592c3e1ed1ca2cd0b494b827d280fb9b349905e6ae56e3b4eefa8ecd437fb4f7a54e40577a67900d40a99e59e4760e7a9ea0de142f5b7ba
7
+ data.tar.gz: ae7557bc06ff942f9d2471a20b5e25d0f86b97f48d3becefae8d382c4a963901dc796e5f752fe72f6c95deafd459aedd80f2aa353c0c3b43f5c2363ee412a4f5
data/.gitignore CHANGED
@@ -1,10 +1,9 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- /Readme.md
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
@@ -1,3 +1,3 @@
1
- language: ruby
2
- rvm:
3
- - 2.1.5
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.5
@@ -1,13 +1,13 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
-
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
-
7
- Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
-
9
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
-
11
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
-
13
- This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in fcfinder.gemspec
4
- gemspec
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in fcfinder.gemspec
4
+ gemspec
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Furkan Çelik
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Furkan Çelik
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,356 @@
1
+ # Fcfinder
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/fcfinder.svg)](http://badge.fury.io/rb/fcfinder)
4
+
5
+ Rails İçin Web Dosya Gezgini
6
+ CKEditor ve Tinymce ile Hızlı ve Basit bir şekilde Entegreli olarak kullanabileceğiniz dosya gezgini.
7
+
8
+ ![Arayuzu](https://raw.githubusercontent.com/furkancelik/fcfinder/master/screenshots/fcfinder_interface.png)
9
+
10
+ ## Gereklilikler
11
+
12
+ ###ImageMagick
13
+
14
+ [imagemagick](http://github.com)'in kurulu olması gerekmektedir.
15
+
16
+ Windows Kurulumu İçin;
17
+ [imagemagick](http://github.com) adresinden download butonundan
18
+ Windows Binary Release alanından **ruby ile uyumlu** (kurulu olan x64 x86 ile aynı)
19
+ ImageMagick-******-dll.exe Dosyasını İndirip Kurabilirsiniz kurulum işleminde path ortam değişkenine eklendiğine emin olun.
20
+
21
+ Komut Satırına
22
+
23
+ `convert -version`
24
+
25
+ yazdığınızda bu şekilde başarıyla yüklediğinizi görebilirsiniz.
26
+
27
+ ```
28
+ Version: ImageMagick 6.9.1-4 Q16 x86 2015-05-31 http://www.imagemagick.org
29
+ Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
30
+ License: http://www.imagemagick.org/script/license.php
31
+ Features: Cipher DPC Modules OpenMP
32
+ ...
33
+ ```
34
+
35
+ ### Puma Server (İsteğe Bağlı)
36
+ Gereklilik şartı yok ama büyük dosyaları yükleme işleminde webrick sorun çıkartabiliyor
37
+ pumanın windows için kurulumuna [buradan](https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows) bakabilirsiniz.
38
+
39
+
40
+
41
+ ## Kurulum
42
+
43
+ Rails uygulamaları için Gemfile dosyanıza alttaki satırı eklemelisiniz
44
+
45
+ ```ruby
46
+ gem 'fcfinder'
47
+ ```
48
+
49
+ ```
50
+ $ bundle install
51
+ ```
52
+
53
+ ile rails için yükleme işlemini gerçekleştirebilirsiniz.
54
+
55
+
56
+ ## Kullanım
57
+
58
+ ###Controller Ayarı
59
+
60
+ ```ruby
61
+ class SizinControlleriniz < ApplicationController
62
+
63
+ def index
64
+ if request.post?
65
+ # Alttaki Satırla Sadece Giriş Yapan Kullanıcıların (Admin'in) Finder'e erişimini Sağlayabilirsiniz
66
+ # Session Adını Sisteminizde Kullandığınız Adla Aynı Olmalı
67
+ # Oturu Açma İşlemi Olmayacaksa Bu Satırı Kaldırabilirsiniz
68
+ if session[:user_id]
69
+ # public klasörü altında istediğiniz isimde dosya oluşturabilirsiniz örnek açısından 'uploads' şeklinde oluşturuldu
70
+ # File.join(Rails.public_path, 'uploads', "/*")
71
+ # Paremetre olarak listelenmesini istediğiniz dosyalar,
72
+ # sunucu adresi,
73
+ # post paremetrleri,
74
+ # Hash paremetresi bu hash içerisinde
75
+ # :max_file_size = yüklenecek dosyanın boyutunu belirtiyor (byte)
76
+ # :allowed_mime = ekstra olarak izin vermek istediğiniz dosya tipleri
77
+ # :disallowed_mime = izin verilmeyen dosya tipleri
78
+ render text: Fcfinder::Connector.new(File.join(Rails.public_path, 'uploads', "/*"), request.env["HTTP_HOST"], params[:fcfinder],
79
+ {
80
+ :max_file_size => 1_000_000,
81
+ :allowed_mime => {'pdf' => 'application/pdf'},
82
+ :disallowed_mime => {}
83
+ }).run, :layout => false
84
+ # Eğer Oturum Açılmamışsa
85
+ #(session[:user_id] if bloğunu kaldırdıysanız bu else kısmınıda kaldırmalısınız)
86
+ else
87
+ # session_id değeri boş ise erişimi kapatıyor dosyalarınız güvende oluyor.
88
+ render :text => "Access not allowed!".to_json, :layout => false
89
+ end
90
+ else
91
+ #
92
+ render :layout => false
93
+ end
94
+ end
95
+
96
+
97
+ #dosya indirme işlemi için
98
+ def download
99
+ # 'uploads' kısmı yine public klasörü altında olan klasörünüz.
100
+ send_file File.join(Rails.public_path,'uploads',params[:path].split(":").join("/")+"."+params[:format])
101
+ end
102
+ end
103
+ ```
104
+ ###Rota Ayarı
105
+
106
+ ```ruby
107
+ scope '/fcfinder' do
108
+ match '/', to: 'sizin_controlleriniz#index', via: [:get, :post]
109
+ get '/download/:path', to: 'sizin_controlleriniz#download'
110
+ end
111
+ ```
112
+ **Eğer bir namespace altında kullanmak isterseniz bu şekilde kullanabilirsiniz**
113
+
114
+ ```ruby
115
+ namespace :admin do
116
+ scope '/fcfinder' do
117
+ match '/', to: 'sizin_controlleriniz#index', via: [:get, :post]
118
+ get '/download/:path', to: 'sizin_controlleriniz#download'
119
+ end
120
+ end
121
+ ```
122
+
123
+ ###View Ayarı
124
+
125
+ ####1.Yöntem
126
+ **app/assets/javascripts/application.js dosyanızda**
127
+
128
+ ```js
129
+ //= require jquery
130
+ //= require jquery_ujs
131
+ ```
132
+
133
+ bu satırlar ekli olmalıdır ***(jQuery'nin yüklü olduğuna emin olun!!)***
134
+
135
+
136
+ **config/initializers/assets.rb** dosyasında en alta
137
+
138
+ ```ruby
139
+ Rails.application.config.assets.precompile += %w( fcfinder.js )
140
+ Rails.application.config.assets.precompile += %w( fcfinder.css )
141
+ ```
142
+ satırlarını eklemelisiniz
143
+
144
+ **Viewdeki dosyanızın içeriği bu şekilde olmalıdır**
145
+
146
+ ```html
147
+ <!DOCTYPE html>
148
+ <html>
149
+ <head>
150
+ <title>FcFinder</title>
151
+
152
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
153
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
154
+
155
+ <%= javascript_include_tag 'fcfinder', 'data-turbolinks-track' => true %>
156
+ <%= stylesheet_link_tag 'fcfinder', media: 'all', 'data-turbolinks-track' => true %>
157
+ <%= csrf_meta_tags %>
158
+ </head>
159
+ <body>
160
+ <div id="fcfinder"></div>
161
+
162
+ <script type="text/javascript">
163
+ $(function(){
164
+ $("#fcfinder").fcFinder({
165
+ // bu değer rotada ayarladığınız adres olmalı
166
+ url:"/fcfinder",
167
+ getFileCallback: function(url) {
168
+ /**
169
+ Editör Entegre İşlemleri İlk Etap İçin Bu Değeri Boş Bırakabilirsiniz
170
+ Varsayılan Olarak CKEditor ile Entegrebir şekilde çalışıyor
171
+ */
172
+ }
173
+ });
174
+ });
175
+ </script>
176
+ </body>
177
+ </html>
178
+ ```
179
+
180
+ ####2.Yöntem
181
+
182
+ **app/assets/javascripts/application.js dosyanızda**
183
+ jquery Dosyalarını Yüklü Olduğuna emin olun ve
184
+
185
+ ```js
186
+ //= require jquery
187
+ //= require jquery_ujs
188
+ ```
189
+ altına
190
+
191
+ ```js
192
+ //= require fcfinder
193
+ ```
194
+ satırını ekleyin
195
+
196
+
197
+ **app/assets/stylesheets/application.css dosyasına**
198
+
199
+ ```css
200
+ *= require fcfinder
201
+ ```
202
+
203
+ satırını ekleyin
204
+
205
+
206
+
207
+ **Viewdeki dosyanızın içeriği bu şekilde olmalıdır**
208
+
209
+ ```html
210
+ <!DOCTYPE html>
211
+ <html>
212
+ <head>
213
+ <title>FcFinder</title>
214
+
215
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
216
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
217
+ <%= csrf_meta_tags %>
218
+
219
+ </head>
220
+ <body>
221
+ <div id="fcfinder"></div>
222
+
223
+ <script type="text/javascript">
224
+ $(function(){
225
+ $("#fcfinder").fcFinder({
226
+ // bu değer rotada ayarladığınız adres olmalı
227
+ url:"/fcfinder",
228
+ getFileCallback: function(url) {
229
+ /**
230
+ Editör Entegre İşlemleri İlk Etap İçin Bu Değeri Boş Bırakabilirsiniz
231
+ Varsayılan Olarak CKEditor ile Entegrebir şekilde çalışıyor
232
+ */
233
+ }
234
+ });
235
+ });
236
+ </script>
237
+ </body>
238
+ </html>
239
+ ```
240
+
241
+
242
+ **Şimdi Sunucunuzu Başlatıp Test Edebilirsiniz :)**
243
+
244
+ ## Entegre İşlemleri
245
+ ### CKEditor
246
+
247
+ Varsayılan olarak ckeditor ile entegreli olarak geliyor.
248
+ CKEditorün Bulunduğu Sayfada
249
+ ```js
250
+ CKEDITOR.replace( 'editor1',{
251
+ /* Bu Şekilde CKEditorde finder yolunu belirteceksiniz. */
252
+ filebrowserBrowseUrl : 'http://localhost:3000/fcfinder'
253
+ });
254
+ ```
255
+
256
+ ### Tinymce
257
+
258
+ Tinymce Editorun bulunduğu sayfada
259
+ ```js
260
+ function fcFinderBrowser (field_name, url, type, win) {
261
+ tinymce.activeEditor.windowManager.open({
262
+ /* Finder urlsi */
263
+ file: "http://localhost:3000/admin/fcfinder",
264
+ title: 'FCFinder Dosya Yöneticisi',
265
+ width: 900,
266
+ height: 450,
267
+ resizable: 'yes'
268
+ }, {
269
+ setUrl: function (url) {
270
+ win.document.getElementById(field_name).value = url;
271
+ }
272
+ });
273
+ return false;
274
+ }
275
+
276
+ tinymce.init({
277
+ selector: "textarea#elm1",
278
+ theme: "modern",
279
+ file_browser_callback : fcFinderBrowser,
280
+ ....
281
+ ...
282
+ ..
283
+ .
284
+ });
285
+ ```
286
+
287
+ **FcFinder'in bulunduğu sayfada**
288
+
289
+ ```js
290
+ $("#fcfinder").fcFinder({
291
+ url:"/admin/fcfinder",
292
+ getFileCallback: function(url) {
293
+
294
+ if (typeof(window.opener) !== 'undefined' && window.opener !== null) {
295
+ window.opener.FCFinder.callBack(url);
296
+ window.close();
297
+ }
298
+
299
+ if (typeof(top.tinymce) !== 'undefined' && typeof(top.tinymce) !== null) {
300
+ top.tinymce.activeEditor.windowManager.getParams().setUrl(url);
301
+ top.tinymce.activeEditor.windowManager.close();
302
+ }
303
+
304
+ }
305
+ });
306
+ ```
307
+
308
+ ### Input için Entegre İşlemi
309
+
310
+ **inputun bulunduğu sayfa**
311
+ ```html
312
+ <html>
313
+ <head>
314
+ <script type="text/javascript">
315
+ function openFCFinder(field) {
316
+ window.FCFinder = {
317
+ callBack: function(url) {
318
+ field.value = url;
319
+ }
320
+ };
321
+
322
+ window.open('http://localhost:3000/admin/fcfinder', 'kcfinder_textbox',
323
+ 'status=0, toolbar=0, location=0, menubar=0, directories=0, ' +
324
+ 'resizable=1, scrollbars=0, width=950, height=400'
325
+ );
326
+ }
327
+ </script>
328
+ </head>
329
+ <body>
330
+ <input type="text" readonly="readonly" onclick="openFCFinder(this)"
331
+ value="Click here and select a file double clicking on it" style="width:600px;cursor:pointer" />
332
+ </body>
333
+ </html>
334
+ ```
335
+
336
+ **Finder bulunduğu sayfa (finder paremetre ayarı)**
337
+
338
+
339
+ ```js
340
+ $("#fcfinders").fcFinder({
341
+ url:"/admin/fcfinder",
342
+ getFileCallback: function(url) {
343
+
344
+ if (typeof(window.opener) !== 'undefined' && window.opener !== null) {
345
+ window.opener.FCFinder.callBack(url);
346
+ window.close();
347
+ }
348
+
349
+ if (typeof(top.tinymce) !== 'undefined' && typeof(top.tinymce) !== null) {
350
+ top.tinymce.activeEditor.windowManager.getParams().setUrl(url);
351
+ top.tinymce.activeEditor.windowManager.close();
352
+ }
353
+ }
354
+ });
355
+ ```
356
+