WordPress Download Manager - Version 2.3.0

Version Description

  • Fixed category pagination issue
  • Fixed category count issue
  • Fixed 'facebook' css class issue
  • Fixed file delete option
Download this release

Release Info

Developer codename065
Plugin Icon 128x128 WordPress Download Manager
Version 2.3.0
Comparing to
See all releases

Code changes from version 2.1.3 to 2.3.0

css/front.css CHANGED
@@ -1,3 +1,64 @@
1
.download_link{
2
3
padding:10px 20px;
@@ -33,6 +94,14 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6db3f2', end
33
letter-spacing: 1px;
34
}
35
36
.wpdm_submit{
37
background: #777 url('../images/play.png') 4px center no-repeat;
38
color: #FFF;
@@ -67,6 +136,10 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6db3f2', end
67
.myorder tr.items td{text-align: left;font-size:9pt;}
68
.myorder tr.item td{font-size: 8pt;}
69
70
.wpdm_category .thumb{
71
72
-moz-box-shadow: 0 0 5px #888;
@@ -163,4 +236,382 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6db3f2', end
163
position:inline-block;
164
background: url(../images/download-16.png) left center no-repeat;
165
padding-left:20px;
166
- }
1
+ .wpdm-only-button .btn_outer:hover{
2
+ color: #333;
3
+ border-color: #999;
4
+ -moz-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2) -webkit-box-shadow:0 2px 5px rgba(0, 0, 0, 0.2);
5
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
6
+ }
7
+ .btn_outer{
8
+ float: left;
9
+ color: #6e6e6e;
10
+ font: bold 12px Helvetica, Arial, sans-serif;
11
+ text-decoration: none;
12
+ padding: 4px 12px 4px 3px;
13
+ position: relative;
14
+ display: inline-block;
15
+ text-shadow: 0 1px 0 #fff;
16
+ -webkit-transition: border-color .218s;
17
+ -moz-transition: border .218s;
18
+ -o-transition: border-color .218s;
19
+ transition: border-color .218s;
20
+ background: #f3f3f3;
21
+ background: -webkit-gradient(linear,0% 40%,0% 70%,from(#F5F5F5),to(#F1F1F1));
22
+ background: -moz-linear-gradient(linear,0% 40%,0% 70%,from(#F5F5F5),to(#F1F1F1));
23
+ border: solid 1px #dcdcdc;
24
+ border-radius: 2px;
25
+ -webkit-border-radius: 2px;
26
+ -moz-border-radius: 2px;
27
+ margin-right: 10px;
28
+ }
29
+ .wpdm-only-button .btn_outer{
30
+ margin-top: 5px;
31
+ }
32
+ .btn_right{
33
+ line-height: 26px;
34
+ }
35
+ .wpdm-only-button .btn_left,
36
+ .wpdm-only-button .btn_right{
37
+ display: block;
38
+ line-height: normal !important;
39
+ }
40
+ .wpdm-only-button .btn_outer_c{
41
+ padding-left: 40px;
42
+ background-image: url(../icon/download.png);
43
+ background-position: 2px center;
44
+ background-repeat: no-repeat;
45
+ }
46
+ .wpdm-only-button .has-counter,
47
+ .wpdm-only-button .counter{
48
+ display: block;
49
+ float: none;
50
+ line-height: normal;
51
+ }
52
+ .wpdm-only-button .counter{
53
+ font-weight: normal;
54
+ font-size: 10px;
55
+ }
56
+
57
+ .btn_left {
58
+ color: #000000;
59
+ line-height: 20pt;
60
+ }
61
+
62
.download_link{
63
64
padding:10px 20px;
94
letter-spacing: 1px;
95
}
96
97
+ .wpdm_file h3{
98
+ padding:0px 10px;
99
+ font-size: 12pt;
100
+ font-family: 'Lucida Grande','Lucida Sans';
101
+ text-transform: capitalize;
102
+ line-height: normal;
103
+ }
104
+
105
.wpdm_submit{
106
background: #777 url('../images/play.png') 4px center no-repeat;
107
color: #FFF;
136
.myorder tr.items td{text-align: left;font-size:9pt;}
137
.myorder tr.item td{font-size: 8pt;}
138
139
+ .btn_left{
140
+ margin-right: 5px;
141
+ }
142
+
143
.wpdm_category .thumb{
144
145
-moz-box-shadow: 0 0 5px #888;
236
position:inline-block;
237
background: url(../images/download-16.png) left center no-repeat;
238
padding-left:20px;
239
+ }
240
+
241
+
242
+ .clear{
243
+ clear: both;
244
+ }
245
+ .wpdm-facebook{
246
+ border:6px solid #777777;
247
+ background:#7C89A3;
248
+ -webkit-border-radius: 8px;
249
+ -moz-border-radius: 8px;
250
+ border-radius: 8px;
251
+ font-family: 'Lucida Grande','Lucida Sans';
252
+ opacity:0.9;
253
+ filter:alpha(opacity=90);
254
+ margin-bottom: 10px;
255
+ }
256
+ .wpdm-facebook h3{
257
+ margin:0px !important;
258
+ padding:4px 10px !important;
259
+ background: #3B5998 !important;
260
+ color:#ffffff !important;
261
+ font-family: 'Lucida Grande','Lucida Sans' !important;
262
+ font-size:12pt;
263
+ font-weight: bold;
264
+ border: 0px !important;
265
+ -webkit-border-top-left-radius: 1px;
266
+ -webkit-border-top-right-radius: 1px;
267
+ -moz-border-radius-topleft: 1px;
268
+ -moz-border-radius-topright: 1px;
269
+ border-top-left-radius: 1px;
270
+ border-top-right-radius: 1px;
271
+ }
272
+
273
+ .wpdm_file .cont{
274
+ padding:5px 10px;
275
+ -webkit-border-bottom-right-radius: 3px;
276
+ -webkit-border-bottom-left-radius: 3px;
277
+ -moz-border-radius-bottomright: 3px;
278
+ -moz-border-radius-bottomleft: 3px;
279
+ border-bottom-right-radius: 3px;
280
+ border-bottom-left-radius: 3px;
281
+ font-size: 9pt;
282
+ }
283
+
284
+
285
+
286
+
287
+
288
+ .wpdm-facebook .btn_left {
289
+ background: #3b5998;
290
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzNiNTk5OCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM1NDc3YmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
291
+ background: -moz-linear-gradient(top, #3b5998 0%, #5477bf 100%);
292
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3b5998), color-stop(100%,#5477bf));
293
+ background: -webkit-linear-gradient(top, #3b5998 0%,#5477bf 100%);
294
+ background: -o-linear-gradient(top, #3b5998 0%,#5477bf 100%);
295
+ background: -ms-linear-gradient(top, #3b5998 0%,#5477bf 100%);
296
+ background: linear-gradient(top, #3b5998 0%,#5477bf 100%);
297
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3b5998', endColorstr='#5477bf',GradientType=0 );
298
+ font-weight: bold;
299
+ -webkit-border-top-left-radius: 4px;
300
+ -webkit-border-bottom-left-radius: 4px;
301
+ -moz-border-radius-topleft: 4px;
302
+ -moz-border-radius-bottomleft: 4px;
303
+ border-top-left-radius: 4px;
304
+ border-bottom-left-radius: 4px;
305
+ color: #ffffff;
306
+ float: left;
307
+ font-size: 10pt;
308
+ padding: 5px 10px;
309
+ letter-spacing: 0.5px;
310
+ text-shadow: 0 1px 0 #000;
311
+ }
312
+
313
+ .wpdm-facebook .cont {
314
+ background: #fff;
315
+ }
316
+ .wpdm-facebook .btn_outer {
317
+ background: none repeat scroll 0 0 #D6E3FF;
318
+ border: 1px solid #3b5998;
319
+ -webkit-border-radius: 5px;
320
+ -moz-border-radius: 5px;
321
+ border-radius: 5px;
322
+ float: left;
323
+ margin-top: 10px;
324
+ margin-bottom: 10px;
325
+ margin-right: 20px;
326
+ padding: 0;
327
+ }
328
+
329
+ .wpdm-facebook .btn_right {
330
+ display: block;
331
+ float: left;
332
+ font-size: 10pt;
333
+ font-weight: normal;
334
+ padding: 5px 10px;
335
+ -webkit-border-top-right-radius: 4px;
336
+ -webkit-border-bottom-right-radius: 4px;
337
+ -moz-border-radius-topright: 4px;
338
+ -moz-border-radius-bottomright: 4px;
339
+ border-top-right-radius: 4px;
340
+ border-bottom-right-radius: 4px;
341
+ }
342
+
343
+ .passit {
344
+ color:#800000;
345
+ font-style: italic;
346
+ }
347
+ .perror{ color: #aa0000; padding-left:10px;}
348
+ .inf{
349
+ padding:4px;
350
+ font-size:8pt;
351
+ font-family: 'Lucida Grande','Lucida Sans';
352
+ }
353
+
354
+
355
+ /* Shared styles */
356
+
357
+ .drop-shadow {
358
+ position:relative;
359
+
360
+ }
361
+
362
+ .drop-shadow:before,
363
+ .drop-shadow:after {
364
+ content:"";
365
+ position:absolute;
366
+ z-index:-2;
367
+ }
368
+
369
+ .drop-shadow p {
370
+ font-size:16px;
371
+ font-weight:bold;
372
+ }
373
+
374
+
375
+
376
+ /* Lifted corners */
377
+
378
+ .lifted {
379
+ -moz-border-radius:4px;
380
+ border-radius:4px;
381
+ }
382
+
383
+ .lifted:before,
384
+ .lifted:after {
385
+ bottom:15px;
386
+ left:10px;
387
+ width:50%;
388
+ height:20%;
389
+ max-width:300px;
390
+ -webkit-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
391
+ -moz-box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
392
+ box-shadow:0 15px 10px rgba(0, 0, 0, 0.7);
393
+ -webkit-transform:rotate(-3deg);
394
+ -moz-transform:rotate(-3deg);
395
+ -ms-transform:rotate(-3deg);
396
+ -o-transform:rotate(-3deg);
397
+ transform:rotate(-3deg);
398
+ }
399
+
400
+ .lifted:after {
401
+ right:10px;
402
+ left:auto;
403
+ -webkit-transform:rotate(3deg);
404
+ -moz-transform:rotate(3deg);
405
+ -ms-transform:rotate(3deg);
406
+ -o-transform:rotate(3deg);
407
+ transform:rotate(3deg);
408
+ }
409
+
410
+
411
+
412
+ /* Raised shadow - no pseudo-elements needed */
413
+
414
+ .raised {
415
+ -webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
416
+ -moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
417
+ box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
418
+ }
419
+
420
+ /* Curved shadows */
421
+
422
+ .curved:before {
423
+ top:10px;
424
+ bottom:10px;
425
+ left:0;
426
+ right:50%;
427
+ -webkit-box-shadow:0 0 15px rgba(0,0,0,0.6);
428
+ -moz-box-shadow:0 0 15px rgba(0,0,0,0.6);
429
+ box-shadow:0 0 15px rgba(0,0,0,0.6);
430
+ -moz-border-radius:10px / 100px;
431
+ border-radius:10px / 100px;
432
+ }
433
+
434
+ .curved-vt-2:before {
435
+ right:0;
436
+ }
437
+
438
+ .curved-hz-1:before {
439
+ top:50%;
440
+ bottom:0;
441
+ left:10px;
442
+ right:10px;
443
+ -moz-border-radius:100px / 10px;
444
+ border-radius:100px / 10px;
445
+ }
446
+
447
+ .curved-hz-2:before {
448
+ top:0;
449
+ bottom:0;
450
+ left:10px;
451
+ right:10px;
452
+ -moz-border-radius:100px / 10px;
453
+ border-radius:100px / 10px;
454
+ }
455
+
456
+ /* Rotated box */
457
+
458
+ .rotated {
459
+ -webkit-box-shadow:none;
460
+ -moz-box-shadow:none;
461
+ box-shadow:none;
462
+ -webkit-transform:rotate(-3deg);
463
+ -moz-transform:rotate(-3deg);
464
+ -ms-transform:rotate(-3deg);
465
+ -o-transform:rotate(-3deg);
466
+ transform:rotate(-3deg);
467
+ }
468
+
469
+ .rotated > :first-child:before {
470
+ content:"";
471
+ position:absolute;
472
+ z-index:-1;
473
+ top:0;
474
+ bottom:0;
475
+ left:0;
476
+ right:0;
477
+ background:#fff;
478
+ -webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
479
+ -moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
480
+ box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
481
+ }
482
+
483
+
484
+ .wpdm-bluebox{
485
+ border:1px solid #30aedc;
486
+ -webkit-border-radius: 8px;
487
+ -moz-border-radius: 8px;
488
+ border-radius: 8px;
489
+ font-family: 'Lucida Grande','Lucida Sans';
490
+ opacity:0.9;
491
+ filter:alpha(opacity=90);
492
+ margin-bottom: 10px;
493
+ background: #ffffff;
494
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U4ZjhmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjE3JSIgc3RvcC1jb2xvcj0iI2ZlZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
495
+ background: -moz-linear-gradient(top, #e8f8ff 0%, #feffff 17%);
496
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e8f8ff), color-stop(17%,#feffff));
497
+ background: -webkit-linear-gradient(top, #e8f8ff 0%,#feffff 17%);
498
+ background: -o-linear-gradient(top, #e8f8ff 0%,#feffff 17%);
499
+ background: -ms-linear-gradient(top, #e8f8ff 0%,#feffff 17%);
500
+ background: linear-gradient(top, #e8f8ff 0%,#feffff 17%);
501
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e8f8ff', endColorstr='#feffff',GradientType=0 );
502
+
503
+ text-align: center;
504
+ }
505
+
506
+ .wpdm-bluebox h3{
507
+ padding: 4px 10px;
508
+ font-size:12pt;
509
+ font-family: 'Lucida Grande','Lucida Sans';
510
+ margin-bottom: 0px;
511
+
512
+ }
513
+ .wpdm-bluebox .cont{
514
+ background: #ffffff url(../images/content-shadow.png) center -2px no-repeat;
515
+ text-align: left;
516
+ padding-top: 10px;
517
+ padding-bottom: 10px;
518
+ -webkit-border-radius: 8px;
519
+ -moz-border-radius: 8px;
520
+ border-radius: 8px;
521
+ }
522
+
523
+ .wpdm-bluebox .passit{
524
+ margin-bottom: 10px;
525
+ }
526
+ .wpdm-bluebox .btn_outer .btn_left{
527
+ background: #7abcff;
528
+ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzdhYmNmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjUyJSIgc3RvcC1jb2xvcj0iIzYwYWJmOCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM0MDk2ZWUiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
529
+ background: -moz-linear-gradient(top, #7abcff 0%, #60abf8 52%, #4096ee 100%);
530
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7abcff), color-stop(52%,#60abf8), color-stop(100%,#4096ee));
531
+ background: -webkit-linear-gradient(top, #7abcff 0%,#60abf8 52%,#4096ee 100%);
532
+ background: -o-linear-gradient(top, #7abcff 0%,#60abf8 52%,#4096ee 100%);
533
+ background: -ms-linear-gradient(top, #7abcff 0%,#60abf8 52%,#4096ee 100%);
534
+ background: linear-gradient(top, #7abcff 0%,#60abf8 52%,#4096ee 100%);
535
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7abcff', endColorstr='#4096ee',GradientType=0 );
536
+ -webkit-border-radius: 5px;
537
+ -moz-border-radius: 5px;
538
+ border-radius: 5px;
539
+ padding:4px 10px;
540
+ color: #ffffff;
541
+ margin: 4px;
542
+
543
+
544
+ }
545
+
546
+ #TB_ajaxContent p{
547
+ font-size:10pt;
548
+ }
549
+ #TB_ajaxContent h1{
550
+ font-size:16pt;
551
+ }
552
+
553
+ .wpdm-category {
554
+ list-style: none;
555
+ margin: 0px !important;
556
+ padding: 10px 0px !important;
557
+ margin-left: 0px !important;
558
+ }
559
+ .wpdm-category li div{
560
+ min-height: 32px;
561
+ }
562
+ .wpdm-category li{
563
+ padding: 10px 5px !important;
564
+ border-bottom: 1px solid #cccccc;
565
+ list-style: none !important;
566
+ margin-left: 0px !important;
567
+ min-height: 32px;
568
+ }
569
+
570
+ .wpdm_clink{
571
+ background: url('../icon/download.png') left top no-repeat;
572
+ padding-left: 35px;
573
+ line-height: normal;
574
+ }
575
+ .wpdm_clink small{
576
+ font-size:8pt;
577
+ }
578
+
579
+
580
+ /**
581
+ * pagination
582
+ */
583
+
584
+ div.pagination {
585
+ font-size: 14px;
586
+ padding:2px;
587
+ background-color:#c1c1c1;
588
+ }
589
+
590
+ div.pagination a {
591
+ padding: 2px 7px 2px 7px;
592
+ margin: 2px;
593
+ background-color:#eeeeee;
594
+ text-decoration: none; /* no underline */
595
+ color: #000;
596
+
597
+ }
598
+ div.pagination a:hover, div.pagination a:active {
599
+ background-color:#444444;
600
+ color: #ffffff;
601
+ }
602
+ div.pagination span.current {
603
+ padding: 2px 7px 2px 7px;
604
+ margin: 2px;
605
+ font-weight: bold;
606
+ background-color: #fff;
607
+ color: #303030;
608
+
609
+ }
610
+ div.pagination span.disabled {
611
+ padding: 2px 5px 2px 5px;
612
+ margin: 2px;
613
+ background-color:#c1c1c1;
614
+ color: #797979;
615
+ }
616
+
617
+
css/jqueryFileTree.css CHANGED
@@ -1,24 +1,27 @@
1
UL.jqueryFileTree {
2
font-family: Verdana, sans-serif;
3
font-size: 11px;
4
- line-height: 18px;
5
padding: 0px;
6
margin: 0px;
7
}
8
9
UL.jqueryFileTree LI {
10
list-style: none;
11
- padding: 0px;
12
- padding-left: 20px;
13
- margin: 0px;
14
white-space: nowrap;
15
}
16
17
UL.jqueryFileTree A {
18
color: #333;
19
text-decoration: none;
20
display: block;
21
- padding: 0px 2px;
22
}
23
24
UL.jqueryFileTree A:hover {
1
UL.jqueryFileTree {
2
font-family: Verdana, sans-serif;
3
font-size: 11px;
4
+ line-height: 18px !important;
5
padding: 0px;
6
margin: 0px;
7
}
8
9
UL.jqueryFileTree LI {
10
list-style: none;
11
+ padding: 0px;
12
+ padding-top: 0px;
13
+ padding-bottom: 0px;
14
+ padding-left: 20px !important;
15
+ margin: 0px !important;
16
white-space: nowrap;
17
+ line-height: 18px !important;
18
}
19
20
UL.jqueryFileTree A {
21
color: #333;
22
text-decoration: none;
23
display: block;
24
+ padding: 0px 2px !important;
25
}
26
27
UL.jqueryFileTree A:hover {
download-manager.php CHANGED
@@ -1,18 +1,14 @@
1
<?php
2
- /**
3
- * @package Download Manager
4
- * @author Shaon
5
- * @version 2.1.3
6
- */
7
/*
8
Plugin Name: Download Manager
9
Plugin URI: http://www.wpdownloadmanager.com/
10
Description: Manage, track and controll file download from your wordpress site
11
Author: Shaon
12
- Version: 2.1.3
13
Author URI: http://www.wpdownloadmanager.com/
14
*/
15
16
$d = str_replace('\\','/',dirname(__FILE__));
17
$d = explode("/", $d);
18
array_pop($d);
@@ -23,13 +19,15 @@ define('UPLOAD_DIR',$d.'/uploads/download-manager-files/');
23
define('UPLOAD_BASE',$d.'/uploads/');
24
25
function wpdm_process(){
26
if($_GET['wpdmact']=='process')
27
include("process.php");
28
}
29
30
- include("functions.php");
31
- include("class.wpdmpagination.php");
32
- include("wpdm-server-file-browser.php");
33
34
if(!$_POST) $_SESSION['download'] = 0;
35
@@ -79,7 +77,7 @@ function wpdm_new_packages($show=5, $show_count=true){
79
$key = $d['id'];
80
if($show_count) $sc = "<br/><i>$d[download_count] downloads</i>";
81
$url = home_url("/?download={$d[id]}");
82
- echo "<li><a class='wpdm-popup' rel='colorbox' title='$d[title]' href='$url'>{$d[title]}</a> $sc</li>\r\n";
83
}
84
}
85
@@ -103,7 +101,7 @@ function wpdm_import_download_monitor(){
103
'download_count'=>$d->hits,
104
'access'=> ($d->member?'member':'guest'),
105
'show_counter'=>'1',
106
- 'quota'=>0,
107
'category' => serialize($ct),
108
'link_label'=>'Download'
109
);
@@ -126,6 +124,67 @@ function wpdm_import_download_monitor(){
126
127
128
129
function wpdm_downloadable($content){
130
global $wpdb;
131
@@ -194,8 +253,103 @@ function wpdm_dropdown_categories($parent="", $level = 0, $sel='',$cid='',$class
194
wpdm_dropdown_categories($id,$level+1, $sel, $cid, $class);}
195
}
196
197
}
198
199
function wpdm_admin_options(){
200
201
if(!file_exists(UPLOAD_DIR)&&$_GET[task]!='wpdm_create_dir'){
@@ -207,7 +361,7 @@ function wpdm_admin_options(){
207
Otherwise you will not be able to upload files.</p></div>";
208
}
209
210
- if($_GET[success]==1){
211
echo "
212
<div id=\"message\" class=\"updated fade\"><p>
213
Congratulation! Plugin is ready to use now.
@@ -217,9 +371,9 @@ function wpdm_admin_options(){
217
218
219
if(!file_exists(UPLOAD_DIR.'.htaccess'))
220
- setHtaccess();
221
222
- if($_GET[task]!='')
223
return call_user_func($_GET['task']);
224
else
225
include('wpdm-list-files.php');
@@ -304,8 +458,9 @@ function wpdm_add_new_file(){
304
$file['file'] = $name;
305
306
}
307
-
308
$file['show_counter'] = 0;
309
$file['category'] = serialize($file['category']);
310
$wpdb->insert("ahm_files", $file);
311
if(!$wpdb->insert_id){
@@ -352,14 +507,14 @@ function wpdm_edit_file(){
352
}
353
354
function wpdm_categories(){
355
-
356
if($_GET['task']=='DeleteCategory'){
357
$tpldata = maybe_unserialize(get_option('_fm_categories'));
358
- unset($tpldata[$_GET['cid']]);
359
update_option('_fm_categories',@serialize($tpldata));
360
echo "<script>
361
location.href='{$_SERVER[HTTP_REFERER]}';
362
- </script>";
363
die();
364
}
365
if($_POST['cat']){
@@ -371,8 +526,9 @@ function wpdm_categories(){
371
$cid = $tcid."-".(++$postfx);
372
}
373
374
$tpldata[$cid] = $_POST['cat'];
375
- update_option('_fm_categories',@serialize($tpldata));
376
echo "<script>
377
location.href='{$_SERVER[HTTP_REFERER]}';
378
</script>";
@@ -409,18 +565,19 @@ function wpdm_embed_category($id){
409
$pag->items($total);
410
$pag->limit($item_per_page);
411
$pag->currentPage($page);
412
- $url = strpos($_SERVER['REQUEST_URI'],'?')?$_SERVER['REQUEST_URI'].'&':$_SERVER['REQUEST_URI'].'?';
413
$pag->urlTemplate($url."cp=[%PAGENO%]");
414
415
$ndata = $wpdb->get_results("select * from ahm_files where category like '%\"$id\"%' limit $start, $item_per_page",ARRAY_A);
416
417
-
418
- $sap = count($_GET)>0?'&':'?';
419
$html = '';
420
foreach($ndata as $data){
421
422
$link_label = $data['title']?$data['title']:'Download';
423
- $data['page_link'] = "<a class='wpdm-popup' style=\"background:url('".get_option('siteurl')."/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;\" href='{$postlink}{$sap}download={$data[id]}'>$link_label</a>";
424
if($data[preview]!='')
425
$data['thumb'] = "<img class='wpdm_icon' align='left' src='".plugins_url()."/{$data[preview]}' />";
426
else
@@ -438,9 +595,9 @@ foreach($ndata as $data){
438
439
//foreach( $data as $ind=>$val ) $reps["[".$ind."]"] = $val;
440
//$repeater = stripslashes( strtr( $category['template_repeater'], $reps ));
441
- $template = "<li><b>$data[page_link]</b><br/>$data[counter]</li>";
442
if($data['access']=='member'&&!is_user_logged_in())
443
- $template = "<li><b><a href='".get_option('siteurl')."/wp-login.php?redirect_to=".$_SERVER['REQUEST_URI']."' style=\"background:url('".get_option('siteurl')."/wp-content/plugins/download-manager/l24.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;\">$data[title]</a></b><br/>login to download</li>";
444
$html .= $template;
445
446
@@ -455,7 +612,7 @@ END;
455
}
456
457
458
- return "<ul class='wpdm-category $id'>".$html."</div><div style='clear:both'></ul>";
459
}
460
461
@@ -497,7 +654,32 @@ function wpdm_front_js(){
497
<script language="JavaScript">
498
<!--
499
jQuery(function(){
500
- jQuery('.wpdm-popup').colorbox();
501
})
502
//-->
503
</script>
@@ -608,8 +790,17 @@ function wpdm_hotlink($params){
608
609
}
610
611
function wpdm_menu(){
612
- add_menu_page("File Manager","File Manager",get_option('wpdm_access_level'),'file-manager','wpdm_admin_options');
613
$access = get_option('wpdm_access_level')?get_option('wpdm_access_level'):'administrator';
614
add_submenu_page( 'file-manager', 'File Manager', 'Manage', $access, 'file-manager', 'wpdm_admin_options');
615
add_submenu_page( 'file-manager', 'Add New File &lsaquo; File Manager', 'Add New File', $access, 'file-manager/add-new-file', 'wpdm_add_new_file');
@@ -618,19 +809,30 @@ function wpdm_menu(){
618
619
}
620
621
- if(is_admin()){
622
- add_action("admin_menu","wpdm_menu");
623
- include("wpdm-free-mce-button.php");
624
- wp_enqueue_style('icons',plugins_url().'/download-manager/css/icons.css');
625
-
626
- }else{
627
wp_enqueue_script('jquery');
628
- wp_enqueue_script('11',plugins_url().'/download-manager/js/jquery.colorbox-min.js');
629
- wp_enqueue_style('22',plugins_url().'/download-manager/css/colorbox.css');
630
- add_action('wp_head','wpdm_front_js');
631
}
632
633
- if($_GET['page']=='file-manager/add-new-file')
634
add_filter('admin_head','wpdm_tinymce');
635
636
add_action("wp","wpdm_download_info");
@@ -638,9 +840,15 @@ add_action("wp","wpdm_download_info");
638
add_filter( 'the_content', 'wpdm_downloadable');
639
640
add_shortcode('wpdm_hotlink','wpdm_hotlink');
641
642
add_action('init','wpdm_process');
643
644
include("wpdm-widgets.php");
645
646
register_activation_hook(__FILE__,'wpdm_free_install');
1
<?php
2
/*
3
Plugin Name: Download Manager
4
Plugin URI: http://www.wpdownloadmanager.com/
5
Description: Manage, track and controll file download from your wordpress site
6
Author: Shaon
7
+ Version: 2.3.0
8
Author URI: http://www.wpdownloadmanager.com/
9
*/
10
11
+
12
$d = str_replace('\\','/',dirname(__FILE__));
13
$d = explode("/", $d);
14
array_pop($d);
19
define('UPLOAD_BASE',$d.'/uploads/');
20
21
function wpdm_process(){
22
+ if(!isset($_GET['wpdmact'])) return;
23
if($_GET['wpdmact']=='process')
24
include("process.php");
25
}
26
27
+ include(dirname(__FILE__)."/functions.php");
28
+ include(dirname(__FILE__)."/class.wpdmpagination.php");
29
+ include(dirname(__FILE__)."/wpdm-server-file-browser.php");
30
+ include(dirname(__FILE__)."/wpdm-free-mce-button.php");
31
32
if(!$_POST) $_SESSION['download'] = 0;
33
77
$key = $d['id'];
78
if($show_count) $sc = "<br/><i>$d[download_count] downloads</i>";
79
$url = home_url("/?download={$d[id]}");
80
+ echo "<li><div class='wpdm_link'><a class='wpdm-popup' title='$d[title]' href='$url'>{$d[title]}</a> $sc</div></li>\r\n";
81
}
82
}
83
101
'download_count'=>$d->hits,
102
'access'=> ($d->member?'member':'guest'),
103
'show_counter'=>'1',
104
+ 'quota'=>'0',
105
'category' => serialize($ct),
106
'link_label'=>'Download'
107
);
124
125
126
127
+ function wpdm_downloadable_nsc($params){
128
+ global $wpdb;
129
+ extract($params);
130
+
131
+
132
+ $home = home_url('/');
133
+
134
+ $sap = count($_GET)>0?'&':'?';
135
+
136
+ $data = $wpdb->get_row("select * from ahm_files where id='$id'",ARRAY_A);
137
+ if($title=='true') $title = "<h3>".$data['title']."</h3>";
138
+ else $title = '';
139
+ if($desc=='true') $desc = $data['description']."</br>";
140
+ else $desc = '';
141
+ $desc = stripslashes($desc);
142
+ if($data['show_counter']!=0) $hc= 'has-counter';
143
+ if($template=='') $template = 'wpdm-only-button';
144
+ else $template = "wpdm-{$template}";
145
+ $wpdm_login_msg = get_option('wpdm_login_msg')?get_option('wpdm_login_msg'):'Login Required';
146
+ $link_label = $data['link_label']?$data['link_label']:'Download';
147
+ if($data['access']=='member'&&!is_user_logged_in()){
148
+ $url = get_option('siteurl')."/wp-login.php?redirect_to=".$_SERVER['REQUEST_URI'];
149
+ $uuid = uniqid();
150
+ /*$args = array(
151
+ 'echo' => false,
152
+ 'redirect' => $_SERVER['REQUEST_URI'],
153
+ 'form_id' => 'loginform_'.$id,
154
+ 'label_username' => __( 'Username' ),
155
+ 'label_password' => __( 'Password' ),
156
+ 'label_remember' => __( 'Remember Me' ),
157
+ 'label_log_in' => __( 'Log In' ),
158
+ 'id_username' => 'user_login',
159
+ 'id_password' => 'user_pass',
160
+ 'id_remember' => 'rememberme_'.$id,
161
+ 'id_submit' => 'wp-submit_'.$id,
162
+ 'remember' => true,
163
+ 'value_username' => NULL,
164
+ 'value_remember' => false );
165
+ $loginform = "<div id='wpdm-login-form' class='wpdm-login-form'>".wp_login_form( $args ).'</div>';*/
166
+
167
+ //"<div class=passit>Login Required<br/><input placeholder='Username' type=text id='username_{$id}' size=15 class='inf' /> <input placeholder='Password' class='inf' type=password id='password_{$id}' size=15 /><span class='perror'></span></div>";
168
+ $html = "<div id='wpdm_file_{$id}' class='wpdm_file $template'>{$title}<div class='cont'>{$desc}{$loginform}<div class='btn_outer'><div class='btn_outer_c'><a class='btn_left $classrel $hc login-please' rel='{$id}' title='{$data[title]}' href='$url' >$link_label</a>";
169
+ //if($data['show_counter']!=0)
170
+ //$html .= "<span class='btn_right counter'>$data[download_count] downloads</span>";
171
+ //else
172
+ $html .= "<span class='btn_right counter'>Login Required</span>";
173
+ $html .= "</div></div><div class='clear'></div></div></div>";
174
+ }
175
+ else {
176
+ if($data['password']=='') { $url = home_url('/?wpdmact=process&did='.base64_encode($id.'.hotlink')); $classrel = ""; }
177
+ else { $classrel='haspass'; /*$url = home_url('/?download='.$id);*/ $url = home_url('/'); $password_field = "<div class=passit>Enter password<br/><input type=password id='pass_{$id}' size=15 /><span class='perror'></span></div>"; }
178
+ $html = "<div id='wpdm_file_{$id}' class='wpdm_file $template'>{$title}<div class='cont'>{$desc}{$password_field}<div class='btn_outer'><div class='btn_outer_c'><a class='btn_left $classrel $hc' rel='{$id}' title='{$data[title]}' href='$url' >$link_label</a>";
179
+ if($data['show_counter']!=0)
180
+ $html .= "<span class='btn_right counter'>$data[download_count] downloads</span>";
181
+ else
182
+ $html .= "<span class='btn_right'>&nbsp;</span>";
183
+ $html .= "</div></div><div class='clear'></div></div></div>";
184
+ }
185
+ return $html;
186
+ }
187
+
188
function wpdm_downloadable($content){
189
global $wpdb;
190
253
wpdm_dropdown_categories($id,$level+1, $sel, $cid, $class);}
254
}
255
256
+ }
257
+
258
+ function wpdm_tree(){
259
+ ?>
260
+ <script language="JavaScript" src="<?php echo plugins_url().'/download-manager/js/jqueryFileTree.js';?>"></script>
261
+ <link rel="stylesheet" href="<?php echo plugins_url().'/download-manager/css/jqueryFileTree.css';?>" />
262
+ <div id="tree"></div>
263
+ <script language="JavaScript">
264
+ <!--
265
+ jQuery(document).ready( function() {
266
+ jQuery('#tree').fileTree({
267
+ script: '<?php echo site_url(); ?>/?task=wpdm_tree',
268
+ expandSpeed: 1000,
269
+ collapseSpeed: 1000,
270
+ multiFolder: false
271
+ }, function(file) {
272
+ //alert(file);
273
+ //var sfilename = file.split('/');
274
+ //var filename = sfilename[sfilename.length-1];
275
+ tb_show(jQuery(this).html(),'<?php echo home_url('/?download=');?>'+file+'&modal=1&width=600&height=400');
276
+
277
+ });
278
+
279
+
280
+ });
281
+ //-->
282
+ </script>
283
+ <?php
284
}
285
286
+ function wpdm_embed_tree(){
287
+ if($_GET['task']!='wpdm_tree') return;
288
+ global $wpdb;
289
+ $cats = maybe_unserialize(get_option('_fm_categories'));
290
+ if(!is_array($cats)) $cats = array();
291
+
292
+
293
+
294
+
295
+ echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
296
+ // All Cats
297
+ $_POST['dir'] = $_POST['dir']=='/'?'':$_POST['dir'];
298
+ foreach( $cats as $id=>$file ) {
299
+ if($file['parent']==$_POST['dir'])
300
+ echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . $id . "\">" . htmlentities($file[title]) . "</a></li>";
301
+ }
302
+
303
+ // All files
304
+ if($_POST[dir])
305
+ $ct = "\"{$_POST[dir]}\"";
306
+ else $ct = '';
307
+ $ndata = $wpdb->get_results("select * from ahm_files where category like '%{$ct}%'",ARRAY_A);
308
+ $sap = '?'; //count($_GET)>0?'&':'?';
309
+
310
+ foreach($ndata as $data){
311
+ $html = '';
312
+ $link_label = $data['title']?$data['title']:'Download';
313
+ $data['page_link'] = "<a class='wpdm-popup' href='' rel='{$data[id]}'>$link_label</a>";
314
+ if($data[preview]!='')
315
+ $data['thumb'] = "<img class='wpdm_icon' align='left' src='".plugins_url()."/{$data[preview]}' />";
316
+ else
317
+ $data['thumb'] = '';
318
+ if($data[icon]!='')
319
+ $data['icon'] = "<img class='wpdm_icon' align='left' src='".plugins_url()."/{$data[icon]}' />";
320
+ else
321
+ $data['icon'] = '';
322
+
323
+
324
+ if($data['show_counter']==1){
325
+ $counter = "{$data[download_count]} downloads<br/>";
326
+ $data['counter'] = $counter;
327
+ }
328
+ $ext = end(explode(".", $data['file']));
329
+ //foreach( $data as $ind=>$val ) $reps["[".$ind."]"] = $val;
330
+ //$repeater = stripslashes( strtr( $category['template_repeater'], $reps ));
331
+ $template = "<li class=\"wpdm_clink file ext_$ext\">$data[page_link]</li>";
332
+ if($data['access']=='member'&&!is_user_logged_in())
333
+ $template = "<li class=\"file ext_$ext\"><a href='".get_option('siteurl')."/wp-login.php?redirect_to=".$_SERVER['REQUEST_URI']."' >$data[title]<small> (login to download)</small></a></li>";
334
+ $html .= $template;
335
+
336
+
337
+
338
+ echo $html;
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+ }
347
+ echo "</ul>";
348
+ die();
349
+
350
+
351
+ }
352
+
353
function wpdm_admin_options(){
354
355
if(!file_exists(UPLOAD_DIR)&&$_GET[task]!='wpdm_create_dir'){
361
Otherwise you will not be able to upload files.</p></div>";
362
}
363
364
+ if(isset($_GET['success'])&&$_GET['success']==1){
365
echo "
366
<div id=\"message\" class=\"updated fade\"><p>
367
Congratulation! Plugin is ready to use now.
371
372
373
if(!file_exists(UPLOAD_DIR.'.htaccess'))
374
+ wpdm_set_htaccess();
375
376
+ if(isset($_GET['task'])&&$_GET['task']!='')
377
return call_user_func($_GET['task']);
378
else
379
include('wpdm-list-files.php');
458
$file['file'] = $name;
459
460
}
461
+
462
$file['show_counter'] = 0;
463
+ $file['quota'] = $file['quota']?$file['quota']:0;
464
$file['category'] = serialize($file['category']);
465
$wpdb->insert("ahm_files", $file);
466
if(!$wpdb->insert_id){
507
}
508
509
function wpdm_categories(){
510
+ $cid = addslashes($_GET['cid']);
511
if($_GET['task']=='DeleteCategory'){
512
$tpldata = maybe_unserialize(get_option('_fm_categories'));
513
+ unset($tpldata[$cid]);
514
update_option('_fm_categories',@serialize($tpldata));
515
echo "<script>
516
location.href='{$_SERVER[HTTP_REFERER]}';
517
+ </script>";
518
die();
519
}
520
if($_POST['cat']){
526
$cid = $tcid."-".(++$postfx);
527
}
528
529
+ if($_POST['cat']['title']!=''){
530
$tpldata[$cid] = $_POST['cat'];
531
+ update_option('_fm_categories',@serialize($tpldata)); }
532
echo "<script>
533
location.href='{$_SERVER[HTTP_REFERER]}';
534
</script>";
565
$pag->items($total);
566
$pag->limit($item_per_page);
567
$pag->currentPage($page);
568
+ $plink = $url = preg_replace("/[\?|\&]+cp=[0-9]+/","",$_SERVER['REQUEST_URI']);
569
+ $url = strpos($url,'?')?$url.'&':$url.'?';
570
$pag->urlTemplate($url."cp=[%PAGENO%]");
571
572
$ndata = $wpdb->get_results("select * from ahm_files where category like '%\"$id\"%' limit $start, $item_per_page",ARRAY_A);
573
574
+
575
+ $sap = strpos($plink,'?')>0?'&':'?';
576
$html = '';
577
foreach($ndata as $data){
578
579
$link_label = $data['title']?$data['title']:'Download';
580
+ $data['page_link'] = "<a class='wpdm-popup' href='{$postlink}{$sap}download={$data[id]}'>$link_label</a>";
581
if($data[preview]!='')
582
$data['thumb'] = "<img class='wpdm_icon' align='left' src='".plugins_url()."/{$data[preview]}' />";
583
else
595
596
//foreach( $data as $ind=>$val ) $reps["[".$ind."]"] = $val;
597
//$repeater = stripslashes( strtr( $category['template_repeater'], $reps ));
598
+ $template = "<li><div class='wpdm_clink'><b>$data[page_link]</b><br/><small>$data[counter]</small></div></li>";
599
if($data['access']=='member'&&!is_user_logged_in())
600
+ $template = "<li><div class='wpdm_clink'><a href='".get_option('siteurl')."/wp-login.php?redirect_to=".$_SERVER['REQUEST_URI']."' >$data[title]</a></b><br/><small>login to download</small></div></li>";
601
$html .= $template;
602
603
612
}
613
614
615
+ return "<ul class='wpdm-category $id'>".$html."</ul><div style='clear:both'></div>".$pag->show()."<div style='clear:both'></div>";
616
}
617
618
654
<script language="JavaScript">
655
<!--
656
jQuery(function(){
657
+
658
+ jQuery('.wpdm-popup').click(function(){
659
+ tb_show(jQuery(this).html(),this.href+'&modal=1&width=600&height=400');
660
+ return false;
661
+ });
662
+
663
+ jQuery('.haspass').click(function(){
664
+ var url = jQuery(this).attr('href');
665
+ var id = jQuery(this).attr('rel');
666
+ var password = jQuery('#pass_'+id).val();
667
+ jQuery.post('<?php echo home_url('/'); ?>',{download:id,password:password},function(res){
668
+
669
+ if(res=='error') {
670
+
671
+ jQuery('#wpdm_file_'+id+' .perror').html('Wrong Password');
672
+ setTimeout("jQuery('#wpdm_file_"+id+" .perror').html('');",3000);
673
+ return false;
674
+ } else {
675
+ location.href = '<?php echo home_url('/?wpdmact=process&did='); ?>'+res;
676
+ }
677
+ //if(res.url!='undefined') location.href=res.url;
678
+
679
+ });
680
+
681
+ return false;
682
+ });
683
})
684
//-->
685
</script>
790
791
}
792
793
+ function delete_all_cats(){
794
+ if(!isset($_GET['page'])) return;
795
+ if($_GET['page']=='file-manager/categories'&&$_GET['task']=='delete-all'){
796
+ delete_option('_fm_categories');
797
+ header('location: '.$_SERVER['HTTP_REFERER']);
798
+ die();
799
+ }
800
+ }
801
+
802
function wpdm_menu(){
803
+ add_menu_page("File Manager","File Manager",get_option('wpdm_access_level'),'file-manager','wpdm_admin_options',plugins_url('download-manager/img/donwloadmanager-16.png'));
804
$access = get_option('wpdm_access_level')?get_option('wpdm_access_level'):'administrator';
805
add_submenu_page( 'file-manager', 'File Manager', 'Manage', $access, 'file-manager', 'wpdm_admin_options');
806
add_submenu_page( 'file-manager', 'Add New File &lsaquo; File Manager', 'Add New File', $access, 'file-manager/add-new-file', 'wpdm_add_new_file');
809
810
}
811
812
+
813
+ function wpdm_admin_enque_scripts(){
814
+ wp_enqueue_style('icons',plugins_url().'/download-manager/css/icons.css');
815
+ wp_enqueue_script('jquery');
816
+ wp_enqueue_script('file-tree-js',plugins_url().'/download-manager/js/jqueryFileTree.js',array('jquery'));
817
+
818
+ }
819
+
820
+ function wpdm_enque_scripts(){
821
wp_enqueue_script('jquery');
822
+ wp_enqueue_script('thickbox');
823
+ wp_enqueue_style('thickbox');
824
+ wp_enqueue_style('wpdm-front',plugins_url().'/download-manager/css/front.css');
825
}
826
827
+
828
+ add_action("admin_menu","wpdm_menu");
829
+ add_action("init","delete_all_cats");
830
+
831
+ add_action('admin_enqueue_scripts','wpdm_admin_enque_scripts');
832
+ add_action('wp_enqueue_scripts','wpdm_enque_scripts');
833
+ add_action('wp_head','wpdm_front_js');
834
+
835
+ if(isset($_GET['page'])&&$_GET['page']=='file-manager/add-new-file')
836
add_filter('admin_head','wpdm_tinymce');
837
838
add_action("wp","wpdm_download_info");
840
add_filter( 'the_content', 'wpdm_downloadable');
841
842
add_shortcode('wpdm_hotlink','wpdm_hotlink');
843
+ add_shortcode('wpdm_file','wpdm_downloadable_nsc');
844
+ add_shortcode('wpdm_tree','wpdm_tree');
845
846
+ add_action('init','wpdm_embed_tree');
847
add_action('init','wpdm_process');
848
849
+ add_action("init","wpdm_file_browser");
850
+ add_action("init","wpdm_dir_tree");
851
+
852
include("wpdm-widgets.php");
853
854
register_activation_hook(__FILE__,'wpdm_free_install');
download.php CHANGED
@@ -1,6 +1,6 @@
1
<?php
2
global $wpdb;
3
- $dl = (int)$_REQUEST['download'];
4
if($dl>0){
5
$data = $wpdb->get_row("select * from ahm_files where id='$dl'",ARRAY_A);
6
if($data['access']=='member'&&!is_user_logged_in()){
@@ -26,7 +26,7 @@ form{text-align:center;}
26
27
if($data){
28
29
- echo "<div style='min-weight:300px;min-height:200px;padding:30px;background:#fff;color:#000'><h1><nobr>$data[title]</nobr></h1><br/><p style='height:100px;overflow:auto;'>$data[description]</p>";
30
/*
31
if($_POST&&$data[password]==''){
32
echo "<script>
1
<?php
2
global $wpdb;
3
+ $dl = isset($_REQUEST['download'])?(int)$_REQUEST['download']:0;
4
if($dl>0){
5
$data = $wpdb->get_row("select * from ahm_files where id='$dl'",ARRAY_A);
6
if($data['access']=='member'&&!is_user_logged_in()){
26
27
if($data){
28
29
+ echo "<div style='min-weight:300px;min-height:200px;padding:30px;background:#fff;color:#000'><h1><nobr>$data[title]</nobr></h1><br/><p>".stripcslashes($data[description])."</p>";
30
/*
31
if($_POST&&$data[password]==''){
32
echo "<script>
editor_plugin.js CHANGED
@@ -8,7 +8,7 @@
8
ed.windowManager.open({
9
title: 'Download Controller',
10
file : 'admin.php?wpdm_action=wpdm_tinymce_button',
11
- height: 300,
12
width:400,
13
inline : 1
14
}, {
8
ed.windowManager.open({
9
title: 'Download Controller',
10
file : 'admin.php?wpdm_action=wpdm_tinymce_button',
11
+ height: 350,
12
width:400,
13
inline : 1
14
}, {
functions.php CHANGED
@@ -77,6 +77,34 @@
77
return $ismu&&$cond?$cond:$ismu;
78
}
79
80
/**
81
* popup
82
*
77
return $ismu&&$cond?$cond:$ismu;
78
}
79
80
+ // Function that output's the contents of the dashboard widget
81
+ function wpdm_dashboard_widget_function() {
82
+ echo "<img src='".plugins_url('/download-manager/images/wpdm-logo.png')."' /><br/>";
83
+
84
+ if(function_exists('curl_init')){
85
+ $ch=curl_init();
86
+ curl_setopt($ch,CURLOPT_URL,'http://wpdownloadmanager.com/notice.php');
87
+ curl_exec($ch);
88
+ curl_close($ch);
89
+ } else
90
+ echo "CURL need to be enabled!";
91
+ }
92
+
93
+ // Function that beeng used in the action hook
94
+ function wpdm_add_dashboard_widgets() {
95
+ wp_add_dashboard_widget('wpdm_dashboard_widget', 'WordPress Download Manager', 'wpdm_dashboard_widget_function');
96
+ global $wp_meta_boxes;
97
+ $side_dashboard = $wp_meta_boxes['dashboard']['side']['core'];
98
+ $wpdm_widget = array('wpdm_dashboard_widget' => $wp_meta_boxes['dashboard']['normal']['core']['wpdm_dashboard_widget']);
99
+ unset($wp_meta_boxes['dashboard']['normal']['core']['wpdm_dashboard_widget']);
100
+ $sorted_dashboard = array_merge($wpdm_widget, $side_dashboard);
101
+ $wp_meta_boxes['dashboard']['side']['core'] = $sorted_dashboard;
102
+ }
103
+
104
+ // Register the new dashboard widget into the 'wp_dashboard_setup' action
105
+ add_action('wp_dashboard_setup', 'wpdm_add_dashboard_widgets',999999 );
106
+
107
+
108
/**
109
* popup
110
*
icon/download.png CHANGED
Binary file
images/content-shadow.png ADDED
Binary file
images/download.png ADDED
Binary file
images/wpdm-logo.png ADDED
Binary file
img/donwloadmanager-16.png ADDED
Binary file
js/jqueryFileTree.js CHANGED
@@ -69,7 +69,8 @@ if(jQuery) (function($){
69
$(this).parent().parent().find('LI.directory').removeClass('expanded').addClass('collapsed');
70
}
71
$(this).parent().find('UL').remove(); // cleanup
72
- showTree( $(this).parent(), escape($(this).attr('rel').match( /.*\// )) );
73
$(this).parent().removeClass('collapsed').addClass('expanded');
74
} else {
75
// Collapse
69
$(this).parent().parent().find('LI.directory').removeClass('expanded').addClass('collapsed');
70
}
71
$(this).parent().find('UL').remove(); // cleanup
72
+ var dr = escape($(this).attr('rel').match( /.*\// ))=='null'?$(this).attr('rel'):escape($(this).attr('rel').match( /.*\// ));
73
+ showTree( $(this).parent(), dr );
74
$(this).parent().removeClass('collapsed').addClass('expanded');
75
} else {
76
// Collapse
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
- === Download Manager ===
2
Contributors: Shaon
3
Donate link:
4
- Tags: files, downloads, downloadables, download manager, file manager, download monitor, download counter, password protection, downlad tracker, download protection, ad, admin, administration, ads, adsense, advertising, affiliate, AJAX, amazon, analytics, anti-spam, api, archive, atom, audio, authentication, author, automatic, blog, blogroll, book, bookmark, bookmarking, bookmarks, buddypress, button, calendar, captcha, categories, category, cms, code, comment, comments, community, contact, content, counter, CSS, custom, dashboard, database, date, del.icio.us, Digg, ecommerce, edit, editor, email, embed, event, events, excerpt, Facebook, feed, feeds, filter, flash, flickr, form, Formatting, free, gallery, google, html, image, images, integration, iphone, javascript, jquery, language, lightbox, Like, link, links, list, login, mail, manage, maps, media, menu, meta, mobile, mp3, multisite, music, myspace, navigation, network, News, nofollow, notification, page, pages, password, paypal, performance, permalink, photo, photos, php, picture, pictures, plugin, plugins, Post, posts, profile, quotes, random, Reddit, redirect, register, registration, related, rss, scroll, search, security, seo, Share, sharing, shortcode, sidebar, simple, slideshow, social, social, bookmarking, spam, statistics, stats, Style, tag, tags, template, text, theme, themes, thumbnail, time, TinyMCE, title, tracking, tweet, twitter, update, upload, url, user, users, video, widget, widgets, wordpress, wpmu, xml, yahoo, youtube
5
Requires at least: 2.0.2
6
- Tested up to: 3.3
7
License: GPLv2 or later
8
9
-
10
11
WordPress Download Manager plugin will help you to manage, track and control file downloads from your wordpress site.
12
@@ -16,29 +16,29 @@ WordPress Download Manager plugin will help you to manage, track and control fil
16
WordPress Download Manager plugin will help you to manage, track and control file downloads from your wordpress site. You can set password and set access level any of your downloadable files from your wordpress site.
17
You can add/embed downloadable files anywhere in the post just pasting the embed code inside your post content using WordPress Download Manager.
18
19
- `v2.1.2 comes with new shortcode [wpdm_hotlink id=file_id_required link_label=any_text_optional],
20
- use the short-code to place direct download link to files without showing popup
21
- also enabled 1 click download for files without password`
22
23
= Features =
24
* Control who can access to download
25
* Password protection
26
* Download Counter
27
- * control who can user this plugin (author, editor, administrator)
28
* Custom download link icon
29
* Custom link label
30
- * shortcode for download link
31
- * jquery popup for download page
32
* Tinymce button for short-code embed
33
* Widget for new downloads
34
* Multi-level Categories
35
* Custom TinyMce Button
36
* Category embed short-code
37
* Advanced server file browser
38
* "Download Monitor" to "Download Manager" files Importer
39
40
- = Discussion forum for Download Manager =
41
- `http://www.wpdownloadmanager.com/forum/?vasthtmlaction=viewforum&f=2.0`
42
43
= My other plugins =
44
`http://wordpress.org/extend/plugins/profile/codename065`
@@ -51,18 +51,64 @@ also enabled 1 click download for files without password`
51
2. Activate the plugin through the 'Plugins' menu in WordPress
52
53
54
- == Frequently Asked Questions ==
55
-
56
57
== Screenshots ==
58
1. Create new download package
59
2. Manage download packages
60
3. Categories
61
62
== Changelog ==
63
64
= 2.1.3 =
65
- * fixed tinymce button and editor issue
66
67
= 2.1.2 =
68
* fixed download issues with 2.1.1
@@ -198,9 +244,3 @@ also enabled 1 click download for files without password`
198
* Fixed security bug with direct download protection
199
200
201
- == Arbitrary section ==
202
- N/A
203
-
204
- == A brief Markdown Example ==
205
-
206
- == Upgrade Notice ==
1
+ === WordPress Download Manager ===
2
Contributors: Shaon
3
Donate link:
4
+ Tags: files, downloads, downloadables, download manager, file manager, download monitor, download counter, password protection, downlad tracker, download protection
5
Requires at least: 2.0.2
6
+ Tested up to: 3.3.2
7
License: GPLv2 or later
8
9
+
10
11
WordPress Download Manager plugin will help you to manage, track and control file downloads from your wordpress site.
12
16
WordPress Download Manager plugin will help you to manage, track and control file downloads from your wordpress site. You can set password and set access level any of your downloadable files from your wordpress site.
17
You can add/embed downloadable files anywhere in the post just pasting the embed code inside your post content using WordPress Download Manager.
18
19
+ `v2.3.x ! Yes, its totally redesigned to give you better experience`
20
21
= Features =
22
* Control who can access to download
23
* Password protection
24
* Download Counter
25
+ * Control who can user this plugin (author, editor, administrator)
26
* Custom download link icon
27
* Custom link label
28
+ * Shortcode for download link
29
+ * Shortcode for direct link to downloadable file [wpdm_hotlink id=file_id_required link_label=any_text_optional]
30
+ * New templates for file links
31
+ * WP Thickbox popup for download page
32
* Tinymce button for short-code embed
33
* Widget for new downloads
34
* Multi-level Categories
35
* Custom TinyMce Button
36
* Category embed short-code
37
* Advanced server file browser
38
+ * Complete category and file tree using a simple short-code [wpdm_tree]
39
* "Download Monitor" to "Download Manager" files Importer
40
41
+
42
43
= My other plugins =
44
`http://wordpress.org/extend/plugins/profile/codename065`
51
2. Activate the plugin through the 'Plugins' menu in WordPress
52
53
54
55
== Screenshots ==
56
1. Create new download package
57
2. Manage download packages
58
3. Categories
59
+ 4. Frton-end link template preview
60
+ 5. Full tree view of categories and files with a simple short-code [wpdm_tree]
61
62
== Changelog ==
63
64
+ = 2.3.0 =
65
+ * Fixed category pagination issue
66
+ * Fixed category count issue
67
+ * Fixed 'facebook' css class issue
68
+ * Fixed file delete option
69
+
70
+ = 2.2.9 =
71
+ * Added new short-code [wpdm_tree] to show all files and categories in tree format
72
+ * Fixed image issue with file description
73
+ * Fixed subcategory edit issue
74
+
75
+ = 2.2.8 =
76
+ * Fixed a minor database issue with file list
77
+
78
+ = 2.2.7 =
79
+ * Fixed server file browser issue
80
+
81
+ = 2.2.6 =
82
+ * Adjusted enqueue script issue
83
+
84
+ = 2.2.5 =
85
+ * Fixed compatibility issue with wordpress 3.4
86
+
87
+ = 2.2.4 =
88
+ * Fixed empty category name issue
89
+ * Added new option to delete all category
90
+ * Fixed delete category issue
91
+
92
+ = 2.2.3 =
93
+ * Fixed category page security issue
94
+
95
+ = 2.2.2 =
96
+ * setHtaccess funtion error fixed
97
+ * optimized front-end css
98
+ * additional button template added
99
+
100
+ = 2.2.1 =
101
+ * adjusted issue with template selection in tinymce popup
102
+ * hyperlink issue with description fixed
103
+ * adjusted css styling issue
104
+
105
+ = 2.2.0 =
106
+ * New templates for file links
107
+ * WP Thickbox popup for download page
108
+ * Upgraded tiny-mce butotn
109
+
110
= 2.1.3 =
111
+ * update short-code from {filelink=fileid} to [file id=fileid]. also support for old styles shortcode exists.
112
113
= 2.1.2 =
114
* fixed download issues with 2.1.1
244
* Fixed security bug with direct download protection
245
246
screenshot-4.png ADDED
Binary file
screenshot-5.png ADDED
Binary file
wpdm-add-new-file.php CHANGED
@@ -1,8 +1,4 @@
1
<style>
2
- .wrap *{
3
-
4
- letter-spacing: 1px;
5
- }
6
7
input[type=text],textarea{
8
@@ -143,7 +139,7 @@ input{
143
144
<div id="currentfiles">
145
<?php if($file['file']!=''){ ?>
146
- <div class="cfile">
147
<nobr>
148
<b style="float: left"><?php echo basename($file['file']); ?></b> <a href='#' id="dcf" title="Delete Current File" style="float: right;">delete</a>
149
</nobr>
@@ -152,12 +148,12 @@ input{
152
<?php } ?>
153
154
155
- <?php if($files): ?>
156
<script type="text/javascript">
157
158
159
- jQuery('#dcf').click(function(){
160
-
161
return false;
162
});
163
@@ -185,53 +181,7 @@ jQuery('#dcf').click(function(){
185
<ul id="serverfiles">
186
187
188
-
189
- <?php
190
- /*
191
- $path = "wp-content/plugins/download-manager/imports/";
192
- $scan = scandir( '../'.$path );
193
- $k = 0;
194
- foreach( $scan as $v )
195
- {
196
- if( $v=='.' or $v=='..' or is_dir('../'.$path.$v) ) continue;
197
-
198
- $fileinfo[$k]['file'] = 'download-manager/imports/'.$v;
199
- $fileinfo[$k]['name'] = $v;
200
- $k++;
201
- }
202
-
203
-
204
- if( !empty($fileinfo) )
205
- {
206
-
207
- include dirname(__FILE__).'/imports.php';
208
- ?>
209
- <div id="major-publishing-actions">
210
- <div id="delete-action">
211
-
212
- What do you want:<select name="whatido">
213
- <option value="move"> Move files </option>
214
- <option value="copy"> Copy files </option>
215
- </select>
216
-
217
-
218
-
219
- </div>
220
-
221
-
222
- <div class="clear"></div>
223
- </div>
224
-
225
226
- <?php
227
- } else {
228
-
229
- ?>
230
- <div style="padding: 5px;line-height: 1.5;font-family: Tahoma; letter-spacing: 1px;">
231
- upload your files on <code>/wp-content/plugins/download-manager/imports/</code> using ftp, file list will show here.</div>
232
-
233
- <?php } */ ?>
234
-
235
236
237
</ul> <br>
@@ -296,6 +246,17 @@ What do you want:<select name="whatido">
296
</div>
297
</div>
298
299
</div>
300
301
</form>
1
<style>
2
3
input[type=text],textarea{
4
139
140
<div id="currentfiles">
141
<?php if($file['file']!=''){ ?>
142
+ <div class="cfile" id="cfl">
143
<nobr>
144
<b style="float: left"><?php echo basename($file['file']); ?></b> <a href='#' id="dcf" title="Delete Current File" style="float: right;">delete</a>
145
</nobr>
148
<?php } ?>
149
150
151
+ <?php if($file['file']!=''): ?>
152
<script type="text/javascript">
153
154
155
+ jQuery('#dcf').click(function(){
156
+ jQuery('#cfl').slideUp();
157
return false;
158
});
159
181
<ul id="serverfiles">
182
183
184
185
186
187
</ul> <br>
246
</div>
247
</div>
248
249
+ <div class="postbox " id="action">
250
+ <h3><span>My Other Plugins</span></h3>
251
+ <div class="inside">
252
+ <a href="http://wpeden.com/wpeden-club/" style="width:97%;overflow:hidden;margin:5px;background: #fafafa;border: 1px solid #ccc;display: block;float: left;text-align: center;-webkit-border-radius: 6px;-moz-border-radius: 6px;border-radius: 6px;" ><h3 style="margin: 0px;background: #ccc;-webkit-border-top-left-radius: 5px;-webkit-border-top-right-radius: 5px;-moz-border-radius-topleft: 5px;-moz-border-radius-topright: 5px;border-top-left-radius: 5px;border-top-right-radius: 5px;padding:5px;text-decoration: none;color:#333">WordPress Themes & Plugins Club</h3><span style="display: block;padding: 10px;font-size:14pt;font-family:'Segoe UI Light';line-height: 1.5;color:#008000">WP Eden Club! Download all of our club themes and plugins only for $35!</span></a>
253
+ <a href="http://wpeden.com/" style="width:97%;overflow:hidden;margin:5px;background: #fafafa;border: 1px solid #ccc;display: block;float: left;text-align: center;-webkit-border-radius: 6px;-moz-border-radius: 6px;border-radius: 6px;" ><h3 style="margin: 0px;background: #ccc;-webkit-border-top-left-radius: 5px;-webkit-border-top-right-radius: 5px;-moz-border-radius-topleft: 5px;-moz-border-radius-topright: 5px;border-top-left-radius: 5px;border-top-right-radius: 5px;padding:5px;text-decoration: none;color:#333">WordPress Themes & Plugins Collection</h3><img src="http://wpeden.com/wp-content/themes/wp-eden/img/logo.png" /></a>
254
+ <a href="http://www.wpdownloadmanager.com/" style="width:97%;overflow:hidden;margin:5px;background: #fafafa;border: 1px solid #ccc;display: block;float: left;text-align: center;-webkit-border-radius: 6px;-moz-border-radius: 6px;border-radius: 6px;" ><h3 style="margin: 0px;background: #ccc;-webkit-border-top-left-radius: 5px;-webkit-border-top-right-radius: 5px;-moz-border-radius-topleft: 5px;-moz-border-radius-topright: 5px;border-top-left-radius: 5px;border-top-right-radius: 5px;padding:5px;text-decoration: none;color:#333">WordPress Download Manager Pro</h3><img src="http://www.wpdownloadmanager.com/wp-content/themes/wpdm/images/icon.png" /></a>
255
+ <a href="http://www.wpmarketplaceplugin.com/" style="width:97%;overflow:hidden;margin:5px;background: #fafafa;border: 1px solid #ccc;display: block;float: left;text-align: center;-webkit-border-radius: 6px;-moz-border-radius: 6px;border-radius: 6px;" ><h3 style="margin: 0px;background: #ccc;-webkit-border-top-left-radius: 5px;-webkit-border-top-right-radius: 5px;-moz-border-radius-topleft: 5px;-moz-border-radius-topright: 5px;border-top-left-radius: 5px;border-top-right-radius: 5px;padding:5px;text-decoration: none;color:#333">WordPress Marketplace Plugin</h3><img vspace="12" src="http://wpmarketplaceplugin.com/wp-content/uploads/2011/06/logo2.png" /></a>
256
+ <div style="clear: both;"></div>
257
+ </div>
258
+ </div>
259
+
260
</div>
261
262
</form>
wpdm-categories.php CHANGED
@@ -1,8 +1,5 @@
1
<style>
2
- .wrap *{
3
- font-family: Tahoma;
4
- letter-spacing: 1px;
5
- }
6
7
input[type=text],textarea{
8
width:500px;
@@ -64,7 +61,9 @@ input{
64
</tr>
65
<?php wpdm_render_cats($id,$level+1);}}}}}wpdm_render_cats(); ?>
66
</tbody>
67
- </table>
68
</div>
69
<div style="margin-left:10px;float: right;width:45%;margin-top:-70px">
70
<form action="" method="post">
@@ -88,12 +87,13 @@ input{
88
[download_count] downloads
89
90
</div>';
91
?>
92
93
<tbody class="list:post" id="the-list">
94
<tr valign="top" class="alternate author-self status-inherit" id="post-8">
95
<td class="author column-author">
96
- <input style="" type="hidden" name="cid" value="<?php echo $_GET[cid]?$_GET[cid]:''; ?>">
97
Title:<br>
98
<input type="text" style="width: 99%;font-size: 14pt" name="cat[title]" value="<?php echo htmlspecialchars($cat[title]); ?>">
99
Description:
@@ -120,6 +120,14 @@ input{
120
</div>
121
<script language="JavaScript">
122
<!--
123
jQuery('.<?php echo $_GET['cid'];?>').attr('disabled','disabled');
124
//-->
125
</script>
1
<style>
2
+
3
4
input[type=text],textarea{
5
width:500px;
61
</tr>
62
<?php wpdm_render_cats($id,$level+1);}}}}}wpdm_render_cats(); ?>
63
</tbody>
64
+ </table><br>
65
+
66
+ <a href="#" class="button" onclick="return wpdm_deleteallcats();">Delete All Categories</a>
67
</div>
68
<div style="margin-left:10px;float: right;width:45%;margin-top:-70px">
69
<form action="" method="post">
87
[download_count] downloads
88
89
</div>';
90
+ $cid = stripslashes($_GET['cid']);
91
?>
92
93
<tbody class="list:post" id="the-list">
94
<tr valign="top" class="alternate author-self status-inherit" id="post-8">
95
<td class="author column-author">
96
+ <input style="" type="hidden" name="cid" value="<?php echo $cat?$cid:''; ?>">
97
Title:<br>
98
<input type="text" style="width: 99%;font-size: 14pt" name="cat[title]" value="<?php echo htmlspecialchars($cat[title]); ?>">
99
Description:
120
</div>
121
<script language="JavaScript">
122
<!--
123
+ jQuery('.<?php echo $cid;?>').attr('disabled','disabled');
124
+
125
+ function wpdm_deleteallcats(){
126
+ if(!confirm('Are you sure?')) return false;
127
+ location.href='admin.php?page=file-manager/categories&task=delete-all';
128
+ }
129
+ <?php if($_GET['cid']!=''): ?>
130
jQuery('.<?php echo $_GET['cid'];?>').attr('disabled','disabled');
131
+ <?php endif; ?>
132
//-->
133
</script>
wpdm-free-mce-button.php CHANGED
@@ -22,7 +22,7 @@ function wpdm_tinyplugin_register($plugin_array)
22
23
function wpdm_free_tinymce(){
24
global $wpdb;
25
- if($_GET['wpdm_action']!='wpdm_tinymce_button') return false;
26
?>
27
<html>
28
<head>
@@ -63,8 +63,24 @@ fieldset{padding: 10px;}
63
</style>
64
</head>
65
<body> <br>
66
67
- <fieldset><legend>Embed File</legend>
68
<select class="button input" id="fl">
69
<?php
70
$res = $wpdb->get_results("select * from ahm_files", ARRAY_A);
@@ -78,7 +94,7 @@ fieldset{padding: 10px;}
78
79
}
80
?>
81
- </select>
82
<input type="submit" id="addtopost" class="button button-primary" name="addtopost" value="Insert into post" />
83
</fieldset> <br>
84
<fieldset><legend>Embed Category</legend>
@@ -90,18 +106,27 @@ fieldset{padding: 10px;}
90
<input type="submit" id="addtopostc" class="button button-primary" name="addtopost" value="Insert into post" />
91
</fieldset>
92
93
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
94
<script type="text/javascript" src="<?php echo home_url('/wp-includes/js/tinymce/tiny_mce_popup.js'); ?>"></script>
95
<script type="text/javascript">
96
/* <![CDATA[ */
97
jQuery('#addtopost').click(function(){
98
- var win = window.dialogArguments || opener || parent || top;
99
- win.send_to_editor('{filelink='+$('#fl').val()+'}');
100
tinyMCEPopup.close();
101
return false;
102
});
103
- jQuery('#addtopostc').click(function(){
104
var win = window.dialogArguments || opener || parent || top;
105
win.send_to_editor('{wpdm_category='+jQuery('#flc').val()+'}');
106
tinyMCEPopup.close();
107
return false;
22
23
function wpdm_free_tinymce(){
24
global $wpdb;
25
+ if(!isset($_GET['wpdm_action'])||$_GET['wpdm_action']!='wpdm_tinymce_button') return false;
26
?>
27
<html>
28
<head>
63
</style>
64
</head>
65
<body> <br>
66
+ <fieldset><legend>Embed File</legend>
67
+ <input type="checkbox" id="title" value="1"> <label for="title">Show Title</label>
68
+ <input type="checkbox" id="desc" value="1"> <label for="desc">Show Description</label> <br/>
69
+ Template: <select id="template">
70
+ <option value="">None</option>
71
+ <option value="facebook">Facebook</option>
72
+ <option value="bluebox">Blue Box</option>
73
+ </select>
74
+ <br />
75
+ Drop Shadow Effect: <select id="shadow">
76
+ <option value="">None</option>
77
+ <option value="drop-shadow raised">Raised</option>
78
+ <option value="drop-shadow lifted">Lifted</option>
79
+ <option value="drop-shadow curved curved-hz-2">Curved</option>
80
+ </select>
81
+ <br/>
82
+ <br/>
83
84
<select class="button input" id="fl">
85
<?php
86
$res = $wpdb->get_results("select * from ahm_files", ARRAY_A);
94
95
}
96
?>
97
+ </select>
98
<input type="submit" id="addtopost" class="button button-primary" name="addtopost" value="Insert into post" />
99
</fieldset> <br>
100
<fieldset><legend>Embed Category</legend>
106
<input type="submit" id="addtopostc" class="button button-primary" name="addtopost" value="Insert into post" />
107
</fieldset>
108
109
+
110
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
111
<script type="text/javascript" src="<?php echo home_url('/wp-includes/js/tinymce/tiny_mce_popup.js'); ?>"></script>
112
<script type="text/javascript">
113
/* <![CDATA[ */
114
+ var title ='', desc = '';
115
jQuery('#addtopost').click(function(){
116
+ var win = window.dialogArguments || opener || parent || top;
117
+ if(jQuery('#title').attr("checked")==true) title = ' title="true" ';
118
+ if(jQuery('#desc').attr("checked")==true) desc = ' desc="true" ';
119
+ var shadow = jQuery('#shadow').val();
120
+ var template = ' template="'+jQuery('#template').val()+' '+shadow+'" ';
121
+ if(jQuery('#template').val()=='') template = "";
122
+ win.send_to_editor('[wpdm_file id='+$('#fl').val()+title+desc+template+']');
123
tinyMCEPopup.close();
124
return false;
125
});
126
+ jQuery('#addtopostc').click(function(){
127
var win = window.dialogArguments || opener || parent || top;
128
+ if(jQuery('#title').attr("checked")==true) title = ' title="true" ';
129
+ if(jQuery('#desc').attr("checked")==true) desc = ' desc="true" ';
130
win.send_to_editor('{wpdm_category='+jQuery('#flc').val()+'}');
131
tinyMCEPopup.close();
132
return false;
wpdm-list-files.php CHANGED
@@ -2,30 +2,25 @@
2
global $wpdb;
3
$limit = 10;
4
5
- $start = $_GET['paged']?(($_GET['paged']-1)*$limit):0;
6
- $res = mysql_query("select * from ahm_files limit $start, $limit");
7
8
- $row = mysql_fetch_assoc(mysql_query("select count(*) as total from ahm_files"));
9
10
?>
11
- <style>
12
- .wrap *{
13
- font-family: Tahoma;
14
- letter-spacing: 1px;
15
- }
16
- </style>
17
18
<div class="wrap">
19
<div class="icon32" id="icon-upload"><br></div>
20
21
<h2>Manage Files
22
<a class="button add-new-h2" href="admin.php?page=file-manager/add-new-file">Add New</a>
23
- <a class="button add-new-h2" href="admin.php?page=file-manager&task=wpdm_import_download_monitor">Import Files from Download Monitor</a>
24
</h2>
25
- <div class="updated" style="padding:5px 10px;position: absolute;color:#008000;font-weight:bold;margin:-35px 0 0 550px">
26
- <a style="color: #3399ff;" href="http://www.wpdownloadmanager.com/download/" target="_blank">Get download manager premium version now! only @ 30.00 $ </a> |
27
- <a style="color: #3399ff;" href="http://www.wpdownloadmanager.com/features/" target="_blank">Checkout the features here</a>
28
- </div>
29
<i><b style="font-family:Georgia">Simply Copy and Paste the embed code at anywhere in post contents</b></i><br><br>
30
31
@@ -79,7 +74,7 @@ $row = mysql_fetch_assoc(mysql_query("select count(*) as total from ahm_files"))
79
</tfoot>
80
81
<tbody class="list:post" id="the-list">
82
- <?php while($media = mysql_fetch_assoc($res)) {
83
84
switch(end(explode(".",$media[file]))){
85
case 'jpg': case 'png': case 'bmp': case 'gif':
@@ -107,9 +102,9 @@ $row = mysql_fetch_assoc(mysql_query("select count(*) as total from ahm_files"))
107
</a>
108
</td>
109
<td class="media column-media">
110
- <strong><a title="Edit" href="admin.php?page=file-manager&task=wpdm_edit_file&id=<?php echo $media['id']?>"><?php echo $media['title']?></a></strong> | Embed Code: <input style="text-align:center" type="text" onclick="this.select()" size="20" title="Simply Copy and Paste in post contents" value="{filelink=<?php echo $media['id'];?>}" /><br>
111
<code>File: <?php echo $media['file']; ?></code><Br>
112
- <?php echo $media['description']?>
113
<div class="row-actions"><span class="edit"><a href="admin.php?page=file-manager&task=wpdm_edit_file&id=<?php echo $media['id']?>">Edit</a> | </span><span class="delete"><a href="admin.php?page=file-manager&task=wpdm_delete_file&id=<?php echo $media['id']?>" onclick="return showNotice.warn();" class="submitdelete">Delete Permanently</a></div>
114
</td>
115
<td class="author column-author"><?php echo $media['password']; ?></td>
2
global $wpdb;
3
$limit = 10;
4
5
+ $start = isset($_GET['paged'])?(($_GET['paged']-1)*$limit):0;
6
+ $res = $wpdb->get_results("select * from ahm_files limit $start, $limit",ARRAY_A);
7
8
+ $row = $wpdb->get_row("select count(*) as total from ahm_files",ARRAY_A);
9
10
?>
11
+
12
13
<div class="wrap">
14
<div class="icon32" id="icon-upload"><br></div>
15
16
<h2>Manage Files
17
<a class="button add-new-h2" href="admin.php?page=file-manager/add-new-file">Add New</a>
18
+ <a class="button add-new-h2" href="admin.php?page=file-manager&task=wpdm_import_download_monitor">Import Files from Download Monitor</a> <br />
19
+ <div class="updated" style="padding:5px 10px;color:#008000;font-weight:bold;">
20
+ <a style="color: #3399ff;" href="http://www.wpdownloadmanager.com/?ref=wpadmin&domain=<?php echo $_SERVER['HTTP_HOST']; ?>" target="_blank">Get download manager premium version now! only @ 45.00 $ </a> |
21
+ <a style="color: #3399ff;" href="http://www.wpdownloadmanager.com/?ref=wpadmin&domain=<?php echo $_SERVER['HTTP_HOST']; ?>#features" target="_blank">Checkout the features here</a>
22
+ </div>
23
</h2>
24
<i><b style="font-family:Georgia">Simply Copy and Paste the embed code at anywhere in post contents</b></i><br><br>
25
26
74
</tfoot>
75
76
<tbody class="list:post" id="the-list">
77
+ <?php foreach($res as $media) {
78
79
switch(end(explode(".",$media[file]))){
80
case 'jpg': case 'png': case 'bmp': case 'gif':
102
</a>
103
</td>
104
<td class="media column-media">
105
+ <strong><a title="Edit" href="admin.php?page=file-manager&task=wpdm_edit_file&id=<?php echo $media['id']?>"><?php echo $media['title']?></a></strong> | Embed Code: <input style="text-align:center" type="text" onclick="this.select()" size="20" title="Simply Copy and Paste in post contents" value="[wpdm_file id=<?php echo $media['id'];?>]" /><br>
106
<code>File: <?php echo $media['file']; ?></code><Br>
107
+
108
<div class="row-actions"><span class="edit"><a href="admin.php?page=file-manager&task=wpdm_edit_file&id=<?php echo $media['id']?>">Edit</a> | </span><span class="delete"><a href="admin.php?page=file-manager&task=wpdm_delete_file&id=<?php echo $media['id']?>" onclick="return showNotice.warn();" class="submitdelete">Delete Permanently</a></div>
109
</td>
110
<td class="author column-author"><?php echo $media['password']; ?></td>
wpdm-server-file-browser.php CHANGED
@@ -60,12 +60,8 @@ function wpdm_file_browser(){
60
die();
61
}
62
63
- if(is_admin()){
64
- wp_enqueue_script('jquery');
65
- wp_enqueue_script('file-tree-js',plugins_url().'/download-manager/js/jqueryFileTree.js');
66
- add_action("init","wpdm_file_browser");
67
- add_action("init","wpdm_dir_tree");
68
- }
69
70
71
?>
60
die();
61
}
62
63
+
64
+
65
66
67
?>
wpdm-settings.php CHANGED
@@ -1,8 +1,4 @@
1
<style>
2
- .wrap *{
3
- font-family: Tahoma;
4
- letter-spacing: 1px;
5
- }
6
7
input[type=text],textarea{
8
width:500px;
@@ -35,7 +31,7 @@ input{
35
<tr>
36
<td>Login Required Message:</td>
37
<td>
38
- <input type="text" name="wpdm_login_msg" value="<?php echo get_option('wpdm_login_msg',true); ?>" size="40">
39
</td>
40
</tr>
41
1
<style>
2
3
input[type=text],textarea{
4
width:500px;
31
<tr>
32
<td>Login Required Message:</td>
33
<td>
34
+ <input type="text" name="wpdm_login_msg" value="<?php echo stripcslashes(htmlspecialchars(get_option('wpdm_login_msg',true))); ?>" size="40">
35
</td>
36
</tr>
37