AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Request to add filter hooks.

2 Posts
2 Users
0 Reactions
1,583 Views
Posts: 19
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@zmgma)
Eminent Member
Joined: 6 years ago
[#13093]

Hello!

First of all, thank you for your great works! I appreciate it.

I would like to suggest adding filter hooks, and the attached zip file is the patch file for filters.

I tested on my side several times and it seems works well.

To sum up,

1) order_by.patch : The filter

define('ORDER_BY', apply_filters( 'order_by', 'modified' )); 

determines how posts are sorted by 'modified' or 'created'. I changed all parts of 'modified' with ORDER_BY, so it is easy to change the way of sorting.

2) time_format.patch : The filters

apply_filters( 'enable_custom_date', false, $diff )
apply_filters( 'wpforo_custom_date_format', sprintf( wpforo_phrase('%s ago', false, false), $d ), $dt);

can change the way of time format in forums.

3) fontawesome_filter.patch: filters with fontawesome icons in topics

4) search_icon.patch: This is not related with filter hook. In this patch, it adds search icon beside page navigation, so it is useful without wpforo menu bar. A lot of forums have search icon beside page-navi, not in top bar or side widget.

5) trivia_style.patch: move inline style to style.css for caching and customizing, and move wpforo_template_pagenavi('wpf-navi-topic-bottom'); for better UI.

Thank you for your supports. I hope you reflect those filters and patch. Thank you again. Have a nice day! 😀

Best regards,

Dan


1 Reply
Sofy
Posts: 5777
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi @zmgma,

Thank you for the suggestion. 

We'll take this into consideration for future updates. 


Share: