Skip to content

Commit 9f6d24d

Browse files
author
jbreu
committed
Fixes to make it run on phpBB3.3
Credits to mrgoldy: https://www.phpbb.com/community/viewtopic.php?p=15393276#p15393276
1 parent 8572dca commit 9f6d24d

3 files changed

Lines changed: 43 additions & 28 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
phpBB-Reputation-System
22
=======================
33

4-
A full reputation (karma) system for phpBB3.2, with adjustable reputation settings.
4+
A full reputation (karma) system for phpBB3.3, with adjustable reputation settings.
55

66
## Features
77
* AJAX post rating
@@ -12,7 +12,7 @@ A full reputation (karma) system for phpBB3.2, with adjustable reputation settin
1212
* and more
1313

1414
## Quick Install
15-
You can install this on the latest copy of phpBB ([phpBB 3.2](https://github.com/phpbb/phpbb3)) by following the steps below:
15+
You can install this on the latest copy of phpBB ([phpBB 3.3](https://github.com/phpbb/phpbb3)) by following the steps below:
1616

1717
1. Download the latest repository.
1818
2. Unzip the downloaded release, and change the name of the folder to `reputation`.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=5.3.3"
16+
"php": ">=7.0"
1717
},
1818
"extra": {
1919
"display-name": "Reputation System",
2020
"soft-require": {
21-
"phpbb/phpbb": ">=3.2.0"
21+
"phpbb/phpbb": ">=3.3.0"
2222
}
2323
}
2424
}

config/routing.yml

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,69 @@
11
reputation_clear_post_controller:
2-
pattern: /reputation/clear/post/{post_id}
3-
defaults: { _controller: pico.reputation.action.controller:clear_post }
2+
path: /reputation/clear/post/{post_id}
3+
defaults:
4+
_controller: pico.reputation.action.controller:clear_post
45
requirements:
56
post_id: \d+
67

78
reputation_clear_user_controller:
8-
pattern: /reputation/clear/user/{uid}
9-
defaults: { _controller: pico.reputation.action.controller:clear_user }
9+
path: /reputation/clear/user/{uid}
10+
defaults:
11+
_controller: pico.reputation.action.controller:clear_user
1012
requirements:
1113
uid: \d+
1214

1315
reputation_delete_controller:
14-
pattern: /reputation/delete/{rid}
15-
defaults: { _controller: pico.reputation.action.controller:delete }
16+
path: /reputation/delete/{rid}
17+
defaults:
18+
_controller: pico.reputation.action.controller:delete
1619
requirements:
1720
rid: \d+
1821

1922
reputation_details_controller:
20-
pattern: /reputation/{uid}/{sort_key}/{sort_dir}/{page}
21-
defaults: { _controller: pico.reputation.details.controller:details, sort_key: id, sort_dir: dsc, page: 1 }
23+
path: /reputation/{uid}/{sort_key}/{sort_dir}/{page}
24+
defaults:
25+
_controller: pico.reputation.details.controller:details
26+
sort_key: 'id'
27+
sort_dir: 'dsc'
28+
page: 1
2229
requirements:
2330
uid: \d+
24-
sort_key: id|username|time|point|action
25-
sort_dir: asc|dsc
31+
sort_key: 'id|username|time|point|action'
32+
sort_dir: 'asc|dsc'
2633

2734
reputation_post_details_controller:
28-
pattern: /reputation/details/post/{post_id}/{sort_key}/{sort_dir}
29-
defaults: { _controller: pico.reputation.details.controller:postdetails, sort_key: id, sort_dir: dsc }
35+
path: /reputation/details/post/{post_id}/{sort_key}/{sort_dir}
36+
defaults:
37+
_controller: pico.reputation.details.controller:postdetails
38+
sort_key: 'id'
39+
sort_dir: 'dsc'
3040
requirements:
3141
post_id: \d+
32-
sort_key: id|username|time|point
33-
sort_dir: asc|dsc
42+
sort_key: 'id|username|time|point'
43+
sort_dir: 'asc|dsc'
3444

3545
reputation_post_rating_controller:
36-
pattern: /reputation/rate/post/{mode}/{post_id}
37-
defaults: { _controller: pico.reputation.rating.controller:post }
46+
path: /reputation/rate/post/{mode}/{post_id}
47+
defaults:
48+
_controller: pico.reputation.rating.controller:post
3849
requirements:
39-
mode: positive|negative
50+
mode: 'positive|negative'
4051
post_id: \d+
4152

4253
reputation_user_details_controller:
43-
pattern: /reputation/details/user/{uid}/{sort_key}/{sort_dir}
44-
defaults: { _controller: pico.reputation.details.controller:userdetails, sort_key: id, sort_dir: dsc }
54+
path: /reputation/details/user/{uid}/{sort_key}/{sort_dir}
55+
defaults:
56+
_controller: pico.reputation.details.controller:userdetails
57+
sort_key: 'id'
58+
sort_dir: 'dsc'
4559
requirements:
4660
uid: \d+
47-
sort_key: id|username|time|point|action
48-
sort_dir: asc|dsc
61+
sort_key: 'id|username|time|point|action'
62+
sort_dir: 'asc|dsc'
4963

5064
reputation_user_rating_controller:
51-
pattern: /reputation/rate/user/{uid}
52-
defaults: { _controller: pico.reputation.rating.controller:user }
65+
path: /reputation/rate/user/{uid}
66+
defaults:
67+
_controller: pico.reputation.rating.controller:user
5368
requirements:
54-
uid: \d+
69+
uid: \d+

0 commit comments

Comments
 (0)