Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
How to check if it is the forum page
Avatar
Yehonal
Member
sp_UserOfflineSmall Offline
Jun 15, 2017 - 1:47 pm

Hello

i've created some filters/action within my theme/plugins that should be registered only if we're in forum page.

I would avoid ugly url checks. Is there a way to do it via global variables or other methods?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 15, 2017 - 3:13 pm

https://simple-press.com/docum.....functions/

Look at the 'Primitives' section.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Yehonal
Member
sp_UserOfflineSmall Offline
Jun 16, 2017 - 9:44 am

Ok sp_is_forumpage  , it's not documented there but i've checked the code.

Thank you

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 16, 2017 - 12:12 pm

All of those are just simple true/false functions.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 638
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 615
Members: 17342
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10114
Posts: 79573