Attention:

Support Rules and Guidelines
Before you post your support topic, please remember to:
  • Read the support forum rules.
  • Check the wiki and use search to see if your problem can be answered there first.
  • Link your board please, and make sure that the problem on your board is visible to guests or provide a test account.
  • Do not post Board Wrappers and CSS unless requested. With a board link, this is not necessary.
  • Be as descriptive as you can and use as many details as possible when describing your problem.
  • Please briefly mark any links to forums that may not be work-safe.
This will help ensure your support issue will be attended to in a quick and efficient manner.

Pages: (2) 1 2  ( Go to first unread post ) Add ReplyNew TopicNew Poll

 Mini Profile Variable Question
#
I was working on my mini profiles, and while I came up with a round-about solution to what I'm about to ask, I was wondering if there were a simpler answer to what I'm trying to accomplish.

I'm including a "PM" link in the profile, and while I have found the url to do so, and where the MID number would go I put the <!-- |id| -->, so it works. I was wondering if I could just simplify it and put <!-- |pm| --> instead and it'd work?

I also have a part two of my question. I'm using Gunblaza's alpha plus skin, and love the popup for the messenger. I've seen it work on a previous site I was on where you click on the PM button at the bottom of a post, and the popup comes up. I'd LIKE to accomplish the same effect if possible. If not, no big, but I'd really like to. I have the link to that board, although it's offline. If that would help with this part of my question?
PM
#
As for part one of your questions, I believe you've got it figured out - that's really the best way I can see to go about linking the PM. As for part two, please make sure to link to your board so that people who are able to can try to help you; there's a million and one reasons why something might not be working, and without the link to the board it's hard to rule the wrong ones out.

signature
user posted image
#
Here you go! Thanks for the help!
PM
#
    I know there's this one here, which works similar to what you're talking about. Just click on PM in the miniprofile and it pops up the message thing. I think it also works wherever it says PM and stuff too.

    http://code.jfbs.net/index.php?showtopic=56
PM
#
That.... might actually accomplish what I'm trying to do. I already have the message popup script installed via the skin I'm editing. Gunblaza included one, but there's part of that, that just might actually do what I was asking about. Going to test it out and see how it goes!

*Edit:
At first my initial idea didn't work. But one cup of coffee and a homemade bacon, egg, and cheese biscuit later... my brain kicked in gear and I was able to take what I saw on Black's code that I thought would work if edited to reflect the skin's coding, and make this work! My initial try that didn't work wound up being because I'd left out a key element or two. So this can be marked as solved!

Unless someone wants to take a look at my slight mini profile conundrum while I'm here... I used a script to give each member group their own profile codes. I was able to get my profile codes for registered users to show up. Worked like a dream. I decided to get fancier and attempt to save myself some work by making my Guest, Validating, and Banned usergroup profiles simple, because hey... they don't need all the other stuff that's in the tabbed profiles! I got the code to work in scratchpad. Looked great. Tested it on site as a dohtml template which also worked. You can see this in the "Welcome to your forum" topic. I apply the codes, the same as all the others.... and Zilch. If you look at that topic, you can see that it doesn't show up at all. I swear I did everything right, checked and rechecked my spelling (I sometimes get a touch of dyslexia), even renamed my guest group to make sure I didn't fudge that up. And no luck.

This post has been edited by Aralisse: Aug 10 2015, 07:45 AM
PM
#
So I'm not sure if I need to start a new topic or not, since this is still related to my mini profiles. I was able to use the script that was provided in this thread to get my registered usergroup profiles to work. So that made me giddy. But then I tried the validating and guest accounts and saw they were not getting the same treatment with the simpler code I came up with. Nothing I've tried seems to make them work. If I get the default code for them to work, it applies to all of the groups. So major frustration.

I then went back to try and use Disco's code provided here, I even tried Miss Amy's code that worked for her, and ALL of them disappeared. I know it's possible to have two mostly different layouts for the registered users, and like the validating/banned/guest ones. I honestly got the inspiration to do the more basic versions for those groups thanks to dropping an ad here. I am just having the worst time getting everything to work. It's either defaults, and no customs, or customs and no more simplistic default.

HALP. Please?? I offer cookies and hugs to anyone that can save my sanity on this.

This post has been edited by Aralisse: Aug 19 2015, 10:59 AM
PM
#
The best thing to do when asking for specific help with miniprofile codes is to post your code; usually if a tried and true code isn't working there's some some hidden error in the way it's been implemented.

signature
user posted image
#
As requested! Pardon the mile long code. I have nine groups and all of them have different colors/graphics attached to their codes. I was introduced to a simpler way of having all the differences in my css rather than individual named divs for each, but even that last night didn't show up for me, although it did for who was trying to help me. I'm still in hopes that'll actually work. This is the current code in my mini profiles section. Let me know if you need anything else.

CODE
<script>if('<!-- |member_group| -->' == 'The Writer') { document.write("<div id='THEWRITER'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div><div></div>); } else if ( ('<!-- |member_group| -->' == 'The Narrator') { document.write("<div id='THENARRATOR'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>"); } else if ( ('<!-- |member_group| -->' == 'Gryffindor') { document.write("<div id='GRYFFINDOR'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div>); } else if ( ('<!-- |member_group| -->' == 'Hufflepuff') { document.write("<div id='HUFFLEPUFF'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>); } else if ( ('<!-- |member_group| -->' == 'Ravenclaw') { document.write("<div id='RAVENCLAW'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>"); } else if ( ('<!-- |member_group| -->' == 'Slytherin') { document.write("<div id='SLYTHERIN'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>"); } else if ( ('<!-- |member_group| -->' == 'Citizen') { document.write("<div id='CITIZEN'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>"); } else if ( ('<!-- |member_group| -->' == 'Pendragon Staff') { document.write("<div id='PENDRAGON'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>"); } else if ( ('<!-- |member_group| -->' == 'Unique') { document.write("<div id='UNIQUE'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='membtm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div>"); } else if ( ('<!-- |member_group| -->' == 'Banned') || ('<!-- |member_group| -->' == 'The Visitors') || ('<!-- |member_group| -->' == 'Validating') ) {document.write("<div id='hpmini'><div id='hp_tabs_content_container'><div class='hpav'><!-- |avatar| --></div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'>Guest</div></div></div>"); } </script>
PM
#
I accomplished this with CSS, but I did all of my customization with CSS so I'm not sure how well these things mix. Let's see if anyone who knows Javascript can understand this better.

signature
user posted image
#
I'd be willing to hear what you did? I'm a little more familiar with CSS. Javascript, I'm still learning so at this point I'm taking any and all suggestions and giving them a shot.
PM
#
Like I said, I'm not sure it'll work with Javascript etc., but I wrapped the whole miniprofile as such:

<div class="<!-- |title| -->"> MP HERE </div>

Then on my board I was able to hide elements I didn't want in my guest section using "Unregistered" as the CSS class of that div for any guest miniprofiles - so, for instance, if I wanted to hide a div with a class "gif" I would use;

.Unregistered .gif {display:none}

If your elements are well defined, you should be able to manipulate things in your miniprofile in a similar fashion. You can see variations on this theme in the advertising section of either board in my signature. Similarly, you can use this method to have customization between your usergroups, as so:

<div class="<!-- |title| --> mp<!-- |g_id| -->"> MP HERE </div>

So if I didn't want my admin accounts to have a div with a class "gif" on it I would use:

.mp4 .gif {display:none}

And if I wanted to hide it from both guests and admins it would still work:

.Unregistered .gif, .mp4 .gif {display:none}

4 being the group ID number of the default admin usergroup. One way to figure out group IDs if you don't know them is:

Admin CP > Users and Groups > Legend Display Order

Since this relies primarily on CSS and user related variables I find it a pretty solid method with a little clever design work. I'm not sure if it will work in your situation, but I hope it makes some sense. If you have any general questions feel free to tag me. I don't really understand anything but the most basic level of Javascript, so some of those codes might work better for you, but I find this method pretty bullet-proof, personally, especially when used on miniprofiles designed with this in mind,

signature
user posted image
#
I may wind up having to do this. It's quite a bit of using the display none coding, but if it works, it works. I'd like to see all my options, and make sure the javascript isn't just something that's being fudged up via user error.
PM
#
Just by looking at your conditionals, it looks like you've got extra parentheses.

CODE
else if ( ('<!-- |member_group| -->' == 'Unique'){ document.write


you have an extra opening ( that you should remove. There's probably others in the code too.

EDIT: It looks like ALL your else if statements have the extra opening parenthesis. Try removing those first

This post has been edited by disco before the breakdown: Aug 20 2015, 05:17 PM
PM
#
Removed those, and still no luck. Thanks for pointing those out!

Also, I tried using this code, and had the same results. I'm pretty sure it's why there was the extra opening, but if it can work I'm game, since it was the version I wanted to use initially.

CODE
<script>
var mp-group-1 = ['The Narator'];
var mp-group-2 = ['The Writer'];
var mp-group-3 = ['Gryffindor'];
var mp-group-4 = ['Hufflepuff'];
var mp-group-5 = ['Ravenclaw'];
var mp-group-6 = ['Slytherin'];
var mp-group-7 = ['Pendragon Staff'];
var mp-group-8 = ['Citizen'];
var mp-group-9 = ['Unique'];
var mp-group-10 = ['Validating, Banned, The Visitor'];
var mp-html = "";

if ( $.inArray(<!-- |member_group| -->, mp-group-1 ) > -1 ) {
mp-html = "<div id='THENARRATOR'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-2 ) > -1 ) {
mp-html = "<div id='THEWRITER'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-3 ) > -1 ) {
mp-html = "<div id='GRYFFINDOR'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-4 ) > -1 ) {
mp-html = "<div id='HUFFLEPUFF'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-5 ) > -1 ) {
mp-html = "<div id='RAVENCLAW'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-6 ) > -1 ) {
mp-html = "<div id='SLYTHERIN'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-7 ) > -1 ) {
mp-html = "<div id='PENDRAGON'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-8 ) > -1 ) {
mp-html = "<div id='CITIZEN'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-9 ) > -1 ) {
mp-html = "<div id='UNIQUE'><div id='hpmini'><div id='hp_tabs_content_container'><div id='228TAB1' class='hp_tab_content' style='display: block'><div class='hpav'><!-- |avatar| --></div></div><div id='228TAB2' class='hp_tab_content'><div class='hp-in'><div class='hp-age'><!-- |field_2| --><div class='hp-yrs'>Years Old</div></div><div class='hp-infoc'><div class='hp-pinfo'><!-- |field_3| --></div><div class='hp-pinfo'><!-- |field_4| --></div><div class='hp-pinfo'><!-- |field_7| --></div><div class='hp-pinfo'><!-- |points| --> Galleons</div></div><div class='hp-proinfc'><div class='hp-proinfl'><!-- |field_9| --></div><div class='hp-proinfr'><!-- |field_10| --></div></div><div class='hp-patronus'><!-- |field_16| --> patronus</div><div class='hp-proic'><div class='hp-profl'><!-- |field_11| --></div><div class='hp-profl'><!-- |field_12| --></div></div><div class='hp-quote'><b>“</b><!-- |field_8| --></div><div class='hp-gif1'><img src='<!-- |field_5| -->'></div></div></div> <div id='228TAB3' class='hp_tab_content'> <div class='hp-in'><div class='hp-gif2'><img src='<!-- |field_6| -->'></div><div class='hp-lnkks'><div class='hp-lnkks-bg'><a href='<!-- |field_13| -->'><i title='application' class='fa fa-bolt'></i></a></div><div class='hp-lnkks-bg'><a href='<!-- |field_14| -->'><i title='shipper' class='fa fa-anchor'></i> </a></div><div class='hp-lnkks-bg'><a href='<!-- |field_15| -->'><i title='tracker' class='fa fa-fa fa-crosshairs'></i></a></div><div class='hp-lnkks-bg'><a href='/?act=Msg&CODE=04&MID=<!-- |id| -->' class='popup click' popupId='messPopup' id='messPop'><i title='pm me' class='fa fa-paper-plane-o'></i></a></div></div> <div class='hp-status'><!-- |field_1| --> is <n><!-- |status| --></n></div><div class='hp-sorted'>sorted on <!-- |member_joined| --></div> <div class='mem-posts'><!-- |posts| --> Posts</div> <div class='hp-awards'><!-- |awards| --></div></div> </div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'><!-- |g_title| --></div><div id='hp_tabs_container'><ul id='hp_tabs'><li class='hp_active'> <a href='#228TAB1'>i.</a></li><li><a href='#228TAB2'>ii.</a></li><li><a href='#228TAB3'>iii.</a></li></ul></div></div></div></div>";
}

else if ( $.inArray(<!-- |member_group| -->, mp-group-10 ) > -1 ) {
mp-html = "<div id='hpmini'><div id='hp_tabs_content_container'><div class='hpav'><!-- |avatar| --></div></div><div class='hp-btm'><div class='hp-crst'></div><div class='mp-name'><!-- |name| --></div><div class='hp-title'>The Visitor</div></div></div>";
}

customProfile.init({
html: mp-html
});
</script>


This post has been edited by Aralisse: Aug 20 2015, 07:48 PM
PM
#
Aha. That code. Below is the most recent version:

Preface: I recently answered a support question on jcink's official forums about how to do this, and it seemed to be a code that a lot of people are interested in, so I figure I might as well make it a tutorial.

I will be showing you how to make custom mini-profiles per member group, by grouping them. This is usually a typical scenario: you've got a lot of member groups, and you have a mini-profile that you want to use for one group of member groups, a structure you want to use for out-of-character accounts and staff accounts, and a member group for registered but unsorted members. Whatever your case maybe, it's easy to start grouping your member groups together.

PLEASE NOTE:
If you do not know how to use jcink profile templates already, this tutorial will not teach it to you. This tutorial also assumes you know how to make custom mini-profiles, as this tutorial will not teach it to you. Or at the very least, have working mini-profile codes available. Test them without this code separately to make sure they work for you (including all your profile fields). It makes it's waaaaay easier to troubleshoot when you know the HTML already works.

This tutorial does teach you a little bit about Javascript. If you have any problems, PM me! I'll fix you right up!

[YADA, YADA, YADA. JUST SHOW ME THE CODE. I KNOW HOW TO USE IT.]

If you want to follow along the tutorial and use it to make your own, keep reading.

CODE

<script>
var mpgroup1 = ['OOC', 'Mod', 'Admin'];
var mpgroup2 = ['NPC', 'Members', 'Validating'];
var mpgroup3 = ['MemberGroup 1', 'MemberGroup2', 'MemberGroup3'];
var mphtml = "DEFAULT PROFILE CODE HERE";
</script>


1. In this example, we've set up 4 variables. mpgroup1 variable holds member groups called 'OOC', 'Mod', and 'Admin'. Member groups must be typed exactly the way they are in the ACP. You can put your first list of member groups here. Continue for each group of member groups.

The variable mphtml is set right away to default profile code. This step is very important! If you forget to put a member group into a list, (this stuff [..] is a list), this is the code that they will use - especially guests!


2. We will be using conditional statements to overwrite mphtml so it's not the default code.

tech talk:
Because we used arrays (fancy programming word for 'list'), we have access to the jQuery method (fancy programming word for function, which is Latin for "To Do Sh1t") $.inArray(thing, list). This method/function simply checks to see if the thing is in the list. It returns the position/location of the item, starting from zero (if it's the first thing in the list, it position 0. Second thing in the list, position 1, etc). If it is not in the list, it returns -1. We don't care about where it is in the list, just that it is in the list. So if it returns ANYTHING greater than -1 (because 0 is greater than -1), it's in the list.



A conditional statement in javascript looks like this:
CODE

if (condition) {
//do this
}


Our conditional statements look like this:

CODE

if ( $.inArray(<!-- |member_group| -->, mpgroup1 ) > -1 ) {
mphtml = "PROFILE CODE HERE FOR mpgroup1";
}

else if ( $.inArray(<!-- |member_group| -->, mpgroup2 ) > -1 ) {
mphtml = "PROFILE CODE HERE FOR mpgroup3";
}

else if ( $.inArray(<!-- |member_group| -->, mpgroup3 ) > -1 ) {
mphtml = "PROFILE CODE HERE FOR mpgroup3";
}



Tip: Make sure you don't have any double-quotes inside your profile codes! Your profile codes should use single quotes instead! Very important!

4. … Execute!

CODE

document.write(mphtml);



5. SMUSH IT! DON'T SKIP STEP 5!

Everything must be on one-line for it to work in the Jcink mini profile area. If you have any line breaks, it will mess it up. I like to use this tool: Remove Line Breaks.

Take your fully assembled code looks like this (yours should look similar):

CODE


<script>

var mpgroup1 = ['OOC', 'Mod', 'Admin'];
var mpgroup2 = ['NPC', 'Members', 'Validating'];
var mpgroup3 = ['MemberGroup 1', 'MemberGroup2', 'MemberGroup3'];
var mphtml = "DEFAULT PROFILE CODE HERE";

if ( $.inArray(<!-- |member_group| -->, mpgroup1 ) > -1 ) {
mphtml = "PROFILE CODE HERE FOR mpgroup1";
}

else if ( $.inArray(<!-- |member_group| -->, mpgroup2 ) > -1 ) {
mphtml = "PROFILE CODE HERE FOR mpgroup3";
}

else if ( $.inArray(<!-- |member_group| -->, mpgroup3 ) > -1 ) {
mphtml = "PROFILE CODE HERE FOR mpgroup3";
}

document.write(mphtml);

</script>



Tip: If you need more, add another var mpgroup4 at the top, make a list with the brackets - this things: [ ]. Remember, commas go outside the single quotes! Then add another else if statement, and change it to mpgroup4 (or whatever name you chose), and add your other profile code. You can also prune it down by taking away else if statements too.

So fully assembled finished code - remove the line breaks, looks like this:

CODE
<script>var mpgroup1 = ['OOC', 'Mod', 'Admin'];var mpgroup2 = ['NPC', 'Members', 'Validating'];var mpgroup3 = ['MemberGroup 1', 'MemberGroup2', 'MemberGroup3'];var mphtml = "DEFAULT PROFILE CODE HERE";if ( $.inArray(<!-- |member_group| -->, mpgroup1 ) > -1 ) {mphtml = "PROFILE CODE HERE FOR mpgroup1";}else if ( $.inArray(<!-- |member_group| -->, mpgroup2 ) > -1 ) {mphtml = "PROFILE CODE HERE FOR mpgroup3";}else if ( $.inArray(<!-- |member_group| -->, mpgroup3 ) > -1 ) {mphtml = "PROFILE CODE HERE FOR mpgroup3";}document.write(mphtml);</script>


Looks like a mess, so keep an unsmushed version handy for any alterations, then use the link and smush it again before saving it in Jcink.

6. ???

7. PROFIT!!!
This works well with the CSS way too, so if Slytherin, Hufflepuff, Gryffindor, and Ravenclaw are the same except for the colors, you can put them all in ONE list, and use the CSS way with the membergroup names as classes for your colors.

Then you can group together other membergroups too, and cut down on your code.
PM
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | General Support | Next Newest »

OptionsPages: (2) 1 2  Add ReplyNew TopicNew Poll