inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jun 7, 2010 19:49:48 GMT -8
I found out about it when I was at the last SoCal meet and I leaked it...
|
|
inherit
*this CT deserves an achievement*
136400
0
Jun 25, 2021 18:23:00 GMT -8
Trill
hola
6,232
January 2009
ghbraingle
|
Post by Trill on Jun 13, 2010 10:03:13 GMT -8
Now if only they added pb_membergroup for the logged in member...
|
|
inherit
154242
0
Jul 6, 2011 14:34:53 GMT -8
RyanDiamond
271
May 2010
giantsfan23
|
Post by RyanDiamond on Jun 13, 2010 12:49:02 GMT -8
That'd be sexy
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Jun 13, 2010 14:32:19 GMT -8
I'm sure that'll be something in PB v5. I can't wait for v5, for what it seems like, it's gonna kick some serious butt.
|
|
Troxy
Junior Member
Song in the air, why should singer care when singer can be among song?
Posts: 321
inherit
126658
0
Apr 11, 2011 0:17:35 GMT -8
Troxy
Song in the air, why should singer care when singer can be among song?
321
June 2008
troxy
|
Post by Troxy on Jun 27, 2010 8:22:42 GMT -8
I totally hear you on that. I'm practically bouncing around in my site, I'm so excited!
|
|
inherit
156058
0
Feb 20, 2012 14:06:50 GMT -8
MadMax™
24
July 2010
madmaxdata
|
Post by MadMax™ on Jul 25, 2010 20:53:13 GMT -8
The most useful is "home" and "boardindex". We have all seen this or similar for checking for the main page: if(location.href.match(/\.com(\/|.+cgi(\?|#.+|\?\w+=home)?)?$/i)){ Now you can just use if(pb_action=="home"){ Regards, SubDevo Hate to have to correct you, but that's not accurate. For instance, my forum is currently in Maintainance Mode [ proboardcoding.proboards.com ]. But you can still see my News Fader Remodel script in action [placed in the Main Header]. In that script I used the RegExp conditional: if(location.href.match(/com\/?((index\.cgi)?\??(action=(logout|home))?(#.+)?)?$/i)){ However, on that "main page" the pb_action='login' [view the source]. Had I used: if(pb_action=="home"){ as the conditional, the script wouldn't be working right now. There are many instances where this applies too. We as coders need to pay particular attention to the details in these things. The pb_action variable has been around for awhile now, and although it can indeed be useful for some things, I'll stick to RegExp when it comes to location conditionals. I have a little bit of experience with ProBoards, gentlemen. Trust me when I tell you that RegExp is the way to go for location conditionals. Max
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jul 25, 2010 21:34:32 GMT -8
The Main page I am referring to is your "Home" page with your forum. Of course, if it is maintenance mode and you are not logged in, for that page, pb_action would be "login".
pb_action=="home", covers home, logout, mark as read, change visibility in one check. If you still wanted your newsfader to show on the login page along with the main page, you would just do a if(/^(home|login)$/.test(pb_action)){ Easy enough.
Let's say you use the same regexp for all codes that are on the main page. Using your regexp, all those codes would run on the login page. Why do that when there is no need?
Regards, SubDevo
|
|
inherit
16846
0
Nov 19, 2012 15:20:20 GMT -8
Chris
3,036
December 2003
cddude
|
Post by Chris on Jul 25, 2010 21:34:50 GMT -8
Max: And in the case of the "home" page only, a location check is right. However, in the case of the "main page" (i.e. board listing and info center), you only need to check pb_action. While I'm here, small peculiarity: pb_action is "display" on the page to enter a password when viewing a board. Caused a small hitch on SZ that I fixed by making sure no element with name bpass existed.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 25, 2010 21:44:12 GMT -8
even more fun.. look at pb_action when you view a page when you get the "you have been banned" message.
|
|
inherit
134992
0
May 26, 2012 2:38:57 GMT -8
SubDevo
Creator of LSD...
3,861
December 2008
subdevo
|
Post by SubDevo on Jul 25, 2010 21:57:39 GMT -8
even more fun.. look at pb_action when you view a page when you get the "you have been banned" message. Don't leave me hanging! What is it?
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Jul 25, 2010 22:00:35 GMT -8
well ban yourself and look!
I was hoping there was an pb_action="ban" but apparently it took on all sorts of different values depending on where you were.
|
|
inherit
156058
0
Feb 20, 2012 14:06:50 GMT -8
MadMax™
24
July 2010
madmaxdata
|
Post by MadMax™ on Jul 25, 2010 23:11:12 GMT -8
The Main page I am referring to is your "Home" page with your forum. Of course, if it is maintenance mode and you are not logged in, for that page, pb_action would be "login". pb_action=="home", covers home, logout, mark as read, change visibility in one check. I understand that. If you still wanted your newsfader to show on the login page along with the main page, you would just do a if(/^(home|login)$/.test(pb_action)){ Easy enough. But I don't want the News Fader on the login page...LOL If you click the login button at my forum, you won't see the News Fader. It only shows on the main page, AND when you logout [the main page]. That's the advantage of the RegExp. Perhaps your not getting what I'm saying. Let's say you use the same regexp for all codes that are on the main page. Using your regexp, all those codes would run on the login page. Why do that when there is no need? No they wouldn't. They would run on the main page, and when you logout. And I wouldn't, nor have I ever, used the same location check for all main page codes. I don't run scripts where they don't have to be run. That's coding 101. ;D Max
|
|
inherit
156058
0
Feb 20, 2012 14:06:50 GMT -8
MadMax™
24
July 2010
madmaxdata
|
Post by MadMax™ on Jul 25, 2010 23:27:50 GMT -8
Max: And in the case of the "home" page only, a location check is right. Long time no see, Chris. Yeah, that's what I was saying. However, in the case of the "main page" (i.e. board listing and info center), you only need to check pb_action. With an Info Center code, I would agree. It only needs to be viewed on the main page...period. What have you been up to? While I'm here, small peculiarity: pb_action is "display" on the page to enter a password when viewing a board. Caused a small hitch on SZ that I fixed by making sure no element with name bpass existed. That's a trip. What about the "pb_this" variable? "GLaDOS" & "betty" Wierd. I would like to see ProBoards come up with a way to distinguish regular thread listings, from Sub-Board thread listings. Would have made it a lot easier with splitting the sticky threads. I still found a way to slap head/base images on both tables while in AMM, but it wouldn't have taken me nearly as long. Max
|
|
inherit
100824
0
May 13, 2012 5:37:49 GMT -8
Michael
14,585
March 2007
wrighty
|
Post by Michael on Jul 26, 2010 0:27:15 GMT -8
Ultimately, you'd want to use both. Use pb_action where you can, then allow for the anomalous cases using RegExp. pb_this, I am guessing is server related.
|
|
inherit
16846
0
Nov 19, 2012 15:20:20 GMT -8
Chris
3,036
December 2003
cddude
|
Post by Chris on Jul 26, 2010 5:21:49 GMT -8
Last I heard, pb_this was server names. It originally was numbers back when we had stuff like "somecrazyforumlawl.proboards45.com" Max: The maintenance mode page is an extreme case though. In most cases, 99% of codes don't need to work on that page AND the login page during maintenance mode. Also, what happens on the gender confirmation page? It'll show that table. What about when viewing a board directly after inputting a password? It'll show that table. (Assuming for the latter you put it in global instead of main.) Both probably is the better case, but the scenarios where you need a RegEx over pb_action are few and far between.
|
|