inherit
229600
0
Sept 7, 2022 11:09:51 GMT -8
Ben Goodman
96
February 2016
benhun
|
Post by Ben Goodman on May 21, 2017 4:20:18 GMT -8
So, today I made a new function to my forum using the custom profile fields system, aka the Holiday mode. It actually displays a div on user profile, when its owner is on holiday. BUT I want to restrict my members, whose are on holiday, by disallowing post writing, and shoutbox usage. I tried the if/else way, it works, when Holiday mode active, but it wont show anything, when the Holiday mode box is left alone. How can I fix it?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on May 22, 2017 7:31:55 GMT -8
What is the holiday box? I assume "box" as in an input field? If so, is this so members can write in the box where they have gone? By the sounds if it, you are mostly there. It's likely your if condition needs to be tweaked a tiny bit. So if you could post your if statement, that would help us.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,849
January 2015
msg
|
Post by Lynx on May 22, 2017 9:36:22 GMT -8
Also, just to note - if you're using a text / input custom field, they will not show up in the (mini-)profile unless there's something in them. Empty fields get skipped in the {foreach} loop that reads them.
So, if the field is empty, it won't get displayed - not even that the field is there, just empty.
|
|
inherit
229600
0
Sept 7, 2022 11:09:51 GMT -8
Ben Goodman
96
February 2016
benhun
|
Post by Ben Goodman on May 22, 2017 21:19:35 GMT -8
Here is it. It is on my native, but I do not think it is a problem.
{foreach $[current_user.mini_custom_field]}{if $[current_user.mini_custom_field.name] == "Szabadság mód"}{if $[current_user.mini_custom_field.value] == "Igen"}<div style="background-image:url(http://svite-league-apps-content.s3.amazonaws.com/bgimages/big-red.jpg); border: solid 2px red;border-radius:30px;box-shadow: 0px 0px 10px red;"><table><tr><td><img src="http://i.imgur.com/s3Rg48Z.png"></td><td><font style="text-shadow: 1px 0 black, 0 -1px black, 1px 0 black, 0 -1px black;
"color="#CCCCFF"><font size="6">Kedves játékos!</font><br><br>Jelenleg szabadság módban vagy, a profilodra látogató játékosok err?l értesítést fognak kapni, továbbá az általad írt hozzászólások mellett is jelezve van a távolléted. Kérjük, hogy ha már írásképes leszel, akkor ne felejtsd el kikapcsolni ezt a funkciót, mert megtévesztené a játékosokat. Köszönjük!
</font></td><tr></table></div><br>{else} Placed the reply box, and the quick reply inside, but if the field has no value entered. {/if}{/foreach}
|
|