inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Sept 5, 2023 12:53:56 GMT -8
Lately, I have been on a "This is us" kick. I'm on season 3 or 4 right now.
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
If/Else
Sept 5, 2023 12:43:06 GMT -8
Post by Teg on Sept 5, 2023 12:43:06 GMT -8
Now I'm having an issue with: {foreach $[current_user.custom_field]} {if $[current_user.custom_field.name] == "Store"} {if $[current_user.custom_field.value] != ""} <li> <a href="$[current_user.custom_field.value]" title="My Store">My Store</a> </li> {else} <li> <a href="#" title="Open A Store">Open A Store</a> </li> {/if} {/if} {/foreach}
so the != "" should represent empty but it's not registering that. Is there something I am missing? Unfortunately you cannot target a custom field that has not been filled in as it isn't even available — even if you are trying to target it because it is empty, since lack of entry means the value does not exist which means it cannot be targeted. The workaround is really messy as well. You would have to define an element that exists outside of the foreach loop with a class name, then set that class between a foreach loop and if the custom field is present, then use CSS to say that class should be hidden. This way, you have an element that shows UNLESS the field is filled. Does that make sense? Yeah that seems like a bit much for something that should be so simple. It does make sense though. Any idea on the second problem in that same post?
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Sept 5, 2023 12:40:38 GMT -8
So, I want to take 2 numbers represented by $[total_members_online] and $[total_staff_online] and add them together and then place that sum in a span tag. This is how I'm trying to do it, and it's not working. I think I've been looking at code too damn long today and missing stupid stuff. LOL Please help:(
<a href="https://hwsoww.boards.net/members" title="Marauder's Map">Marauder's Map</a>( <script> function addTotalMOnline() { var num1, num2, sum; num1 = parseInt(document.getElementById("mO").value); num2 = parseInt(document.getElementById("sO").value); sum = num1 + num2; document.getElementById("combinedTotalMembersOnine").value = sum; </script> <span style="visibility:hidden;" id="mO">$[total_members_online]</span> <span style="visibility:hidden;" id="sO">$[total_staff_online]</span> <span id="combinedTotalMembersOnline"></span>)
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
If/Else
Sept 5, 2023 10:17:29 GMT -8
Post by Teg on Sept 5, 2023 10:17:29 GMT -8
Now I'm having an issue with:
{foreach $[current_user.custom_field]} {if $[current_user.custom_field.name] == "Store"} {if $[current_user.custom_field.value] != ""} <li> <a href="$[current_user.custom_field.value]" title="My Store">My Store</a> </li> {else} <li> <a href="#" title="Open A Store">Open A Store</a> </li> {/if} {/if} {/foreach}
so the != "" should represent empty but it's not registering that. Is there something I am missing?
Then for whatever reason I cannot get the private messages number total to display using this...
<a href="$[current_user.messages.inbox]" title="Private Messages">Owlry</a> {if $[current_user.messages.new]} <span class="sidebar-notification">$[current_user.new_notification] </span> {/if}
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Sept 4, 2023 12:08:55 GMT -8
Awesome, thank you! I'll try that out and see how I fare I appreciate the guidance. it has been a hot minute since i have done anything with pb, so i forgot lol thank you though. I am curious, is there a way to write an if/else statement to say the following If current user group name does not equal group1 group2 group3 or group4, then this happens? if [variable] != group1 || [variable] != group2 etc. the double pipe || is an inclusive "or" for "if any of these are true", then execute
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
If/Else
Sept 4, 2023 10:47:01 GMT -8
Post by Teg on Sept 4, 2023 10:47:01 GMT -8
it has been a hot minute since i have done anything with pb, so i forgot lol thank you though. I am curious, is there a way to write an if/else statement to say the following If current user group name does not equal group1 group2 group3 or group4, then this happens? I figured it out, forgot the for each but, yes, it is intentional, it should only be for the current user who is viewing the page. ahh got it, foreach was gonna be my next question but i had (erroneously it seems) assumed you were only showing a snippet and already had it 😅 glad you got it sorted!
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
If/Else
Sept 3, 2023 11:40:54 GMT -8
Post by Teg on Sept 3, 2023 11:40:54 GMT -8
I figured it out, forgot the for each but, yes, it is intentional, it should only be for the current user who is viewing the page. Someone please guide me what I am doing wrong. {if $[current_user.custom_field.name] == "House Points" && $[current_user.custom_field.value] != "0"} $[current_user.custom_field.value] {else} <a href="https://hwsoww.boards.net/board/5/sorting-ceremony">Get Sorted</a>{/if}
It' consistently puts the "Get Sorted" link, even though the number in the custom field value is over 1000. You're using "current_user"; is this intentional? This would pull the custom field values of the account *viewing* the section, as opposed to the account to whom the section belongs.
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
If/Else
Sept 3, 2023 11:28:27 GMT -8
Post by Teg on Sept 3, 2023 11:28:27 GMT -8
Someone please guide me what I am doing wrong.
{if $[current_user.custom_field.name] == "House Points" && $[current_user.custom_field.value] != "0"} $[current_user.custom_field.value] {else} <a href="https://hwsoww.boards.net/board/5/sorting-ceremony">Get Sorted</a>{/if}
It' consistently puts the "Get Sorted" link, even though the number in the custom field value is over 1000.
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Sept 3, 2023 10:16:48 GMT -8
Is there a way I can add {if} statements to the content in the side bar? Like If the user is staff display this link, if not display this? It's not working for me. If it's not possible, is there a way to make it possible? Or do I just have to code a whole sidebar from scratch?
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on May 25, 2023 18:15:56 GMT -8
Hogwarts Online is an interactive Hogwarts experience. Members can take Hogwarts classes in the fall, and our school feels like the students are actually going to school. We have monthly contests and discussions that earn members House Points and forum currency. Members get their own personal vaults to track transactions. They can join official roleplays and/or create their own. User's can create their own stores and we're going to allow them start their own clubs in the future. I'm looking for thoughts on our current ideas, and am open to suggestions for other features in the future. Check it out here: hwol.boards.net
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on May 25, 2023 17:57:03 GMT -8
Hogwarts Online is an interactive Hogwarts experience. Get sorted into a house, earn House Points and more. Starting in the fall we will have Hogwarts classes, set up through google classroom to make it feel more like a school experience. We have Vaults for members who sign up to receive one (which is how we track transactions between users and shops. Diagon Alley and Hogsmeade Shops (on Hogsmeade weekends). Users can join official roleplays or create their own. Earn House Points and Galleons by participating in and/or winning contests or events, completing homework and assignments and so much more. Come check us out Hogwarts Online | Student Handbook & Guide | June Madness
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on May 15, 2023 10:35:50 GMT -8
I know there is a way to do this, I just cannot remember how to do it.
I want to take four specific groups and display their total member counts somewhere on the forum. What is the easiest way to do this?
Thank you!
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Apr 6, 2023 17:48:24 GMT -8
Yep one and the same LOL Teg , Are you the same Teg who had the Jasper Designs forum in 2012? Your forum URL and old blog are still in your profile on my forum. Yes, you've been with ProBoards for a long time.
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Apr 6, 2023 17:18:31 GMT -8
A lot has changed for me over the past few years. I had another kid, so I've given birth to 5. I met someone who has two kids from a previous relationship so we are up to a total of 7. Recently, I managed to snag a job working as a General Manager of a restaurant where I live which is going extremely well. I've been there for about a month and they are already talking about promoting me out of management into a "Marketing Director" position, so I'm kind of excited about that.
I have a teenager who is about to turn 18 (step-child), and my eldest is going to be 15 this year. I was a member of ProBoards long before she was born. It amazes me how long some of us have been around this community.
|
|
inherit
114253
0
Oct 1, 2023 21:13:35 GMT -8
Teg
Can't Wait for V6
3,138
November 2007
teg
|
Post by Teg on Apr 6, 2023 17:15:07 GMT -8
My name is Jason. Leaf and Teg and wildmaven do you enjoy the taste of black not at all sweetened coffee? I super mega do love the taste of black not sweetened at all coffee. VS Admin and ASE's other account and Scott and all other members such as Chani have you ever played an NES (Nintendo Entertainment System) game named en.wikipedia.org/wiki/Karnov KARNOV? I sure have and I made a ZC (Zelda Classic) 2.53 quest named KARNOV II: Yolanda's Quest and I soon enough will make more of on Nintendo Switch an RPG (Role Playing Game) Maker MV game named KARNOV III: Marie's Quest eventually. I detest the taste of coffee in general. My heart also doesn't do so great with caffeine. So, I limit that intake.
|
|