Before asking for help please read "How to request help" by clicking on that tab above here.
Question Search and replace
- Shemwell
- Topic Author
- Offline
- Junior Member
Barry
Please Log in or Create an account to join the conversation.
- Jackie
- Offline
- Platinum Member
- Posts: 4787
Shemwell wrote: Is there a method to restrict the Search and replace feature to Administrators only?.
Hi,
Open the search.php file (with NotePad++) and edit around the line 116
BY
Please Log in or Create an account to join the conversation.
- Shemwell
- Topic Author
- Offline
- Junior Member
ERROR 8: Use of undefined constant WT_USER_CAN_ADMIN - assumed 'WT_USER_CAN_ADMIN'
0 Error occurred on line 116 of file search.php
Notice: Use of undefined constant WT_USER_CAN_ADMIN - assumed 'WT_USER_CAN_ADMIN' in
/home/xxxxxxx/public_html/webtrees/search.php on line 116
I've had two "editors" in the past few years use this indiscriminate feature... of course I rejected the changes. Can I just eliminate Search and replace from the drop down?. I can always use the batch update if needed.
Barry
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
You might also want to remove it from the menu (in the theme).
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Shemwell
- Topic Author
- Offline
- Junior Member
Fatal error: Class 'Auth' not found in /home/xxxxxx/public_html/webtrees/search.php on line 116. If the Search and replace would let you select what you wanted changed I don't think there would be any issue.
Barry
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
use WT\Auth;
Sorry - there's a lot of difference between the 1.6.2 code and the 1.7.0 code, and I forget which one I'm working with...
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Shemwell
- Topic Author
- Offline
- Junior Member
Is there any other method other than altering the code?. I've been watching/testing 1.7.0, looks good. How can I make the same changes in it?.
Thanks
Barry
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
You could put all this in a custom theme (which is much easier now).
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Shemwell
- Topic Author
- Offline
- Junior Member
Barry
Please Log in or Create an account to join the conversation.
- fisharebest
- Away
- Administrator
By waiting until 1.7.0 is released.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Shemwell
- Topic Author
- Offline
- Junior Member
Barry
Please Log in or Create an account to join the conversation.
- thomas52
- Offline
- Premium Member
- Western North Carolina
We normally get updates every 3-4 months, but this one is a major revision and 6 months & counting.
I expect it will be worth the wait.
(In the meantime, you can always try the beta version, if you don't mind a few bugs.)
"Failure is an amazing teacher." (L'échec est un professeur extraordinaire.)
Please Log in or Create an account to join the conversation.