PHP/JScript Question? : ID etc. Selector for Individual Profile Field
5 posters
Page 1 of 1
PHP/JScript Question? : ID etc. Selector for Individual Profile Field
Okay this is a bit of a curly question.
I've been working on toggling the profile field information shown under the avatar to save space on posts. I'm using punBB in this case on our testboard.
Now I have two fields that I want to always display.
you can see it working here with the show/hide button under the Avatar.
I want to set the Nationality icon and Race (Muggle) Icon to always display
should be pretty simple right?
Except that it involves having a unique ID for each field.
Which Forumotion's doesn't seem to have (though logically one must exist).
Anyone got any ideas?
I've been working on toggling the profile field information shown under the avatar to save space on posts. I'm using punBB in this case on our testboard.
Now I have two fields that I want to always display.
you can see it working here with the show/hide button under the Avatar.
I want to set the Nationality icon and Race (Muggle) Icon to always display
should be pretty simple right?
Except that it involves having a unique ID for each field.
Which Forumotion's doesn't seem to have (though logically one must exist).
Anyone got any ideas?
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
Can you not just remove those two items from the code, so they appear?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
I wish!
but the profile fields are all dynamically added though php (which can't be modified in the template). there's no way to separate them in the code.
The code is as follows:
Ideally there would be a field such as {postrow.displayed.profile_field.ID} but I've been using trial and error to find one without any luck.
but the profile fields are all dynamically added though php (which can't be modified in the template). there's no way to separate them in the code.
The code is as follows:
- Code:
<div class="user-info toggle">
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
{postrow.displayed.POSTER_RPG}
</div>
Ideally there would be a field such as {postrow.displayed.profile_field.ID} but I've been using trial and error to find one without any luck.
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
G'Evening
That's the thing with our templates, there's alot that are either too closely links so if u edit it, it screw the other over, or it's all mashed into 1 code so u can't edit it
I'm not aware of a code, or way that's able to do what you wish.
That's the thing with our templates, there's alot that are either too closely links so if u edit it, it screw the other over, or it's all mashed into 1 code so u can't edit it
I'm not aware of a code, or way that's able to do what you wish.
Darren1- Helper
- Posts : 11853
Reputation : 566
Language : English
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
Cheers Darren, I wanted to know if i was overlooking anything before I started looking at some curly Javascript solutions
Looks like it might be a case of finding a way to 'strip' the dirtycode from the label variable to create a id or somesuch. *sigh* fun fun.
Looks like it might be a case of finding a way to 'strip' the dirtycode from the label variable to create a id or somesuch. *sigh* fun fun.
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
Change this:
- Code:
<div class="user-info toggle">
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
<div>
- Code:
<!-- BEGIN profile_field -->
<div class="profile-field">
{postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}
</div>
<!-- END profile_field -->
<div class="user-info toggle"></div>
<script type="text/javascript>
(code to append profile fields to toggle DIV)
</script>
Guest- Guest
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
Thanks heaps!
but it still doesn't assign the class values
using <div class="profile-field"> just gives all of them a value of profile-field
figuring a typo i tried <div class={profile-field}> but all that did was give them a blank value.
but it still doesn't assign the class values
using <div class="profile-field"> just gives all of them a value of profile-field
figuring a typo i tried <div class={profile-field}> but all that did was give them a blank value.
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
How did you make your background green?
Mr.Rulez- Forumember
- Posts : 36
Reputation : 0
Language : English
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
Green is from the THANKS button.
and good news!
Turns out that everything between the comments seems to run for each profile field.
So writing a little javascript I was able to generate a counter and assign it to a span around the value.
It's not perfect but it works
first you need to define i in the header.
simple as adding
then insert the javascript between profile_field.LABEL and CONTENTS
so this is solved
and good news!
Turns out that everything between the comments seems to run for each profile field.
So writing a little javascript I was able to generate a counter and assign it to a span around the value.
It's not perfect but it works
first you need to define i in the header.
simple as adding
- Code:
<script type="text/javascript">
var i = 1;
</script>
then insert the javascript between profile_field.LABEL and CONTENTS
- Code:
<!-- BEGIN profile_field -->
<div class=profile_field>
{postrow.displayed.profile_field.LABEL}
<script type="text/javascript">
i++;
var id = "a" + i;
document.write('<span id="'+id+'">');
</script>
{postrow.displayed.profile_field.CONTENT}</span>
</div>
<!-- END profile_field -->
so this is solved
Re: PHP/JScript Question? : ID etc. Selector for Individual Profile Field
cool stuff.
Since the topic now appares to be solved i will now mark and lock the thread.
Since the topic now appares to be solved i will now mark and lock the thread.
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Similar topics
» [Question]Profile Field Type - Bar
» CSS Selector for Chatbox Message Field in Invision
» Profile Field for Custom Profiles adding an additional unwanted field?
» Profile field, multiple words with different colors in the same profile filed
» How to give individual forums a individual background picture.
» CSS Selector for Chatbox Message Field in Invision
» Profile Field for Custom Profiles adding an additional unwanted field?
» Profile field, multiple words with different colors in the same profile filed
» How to give individual forums a individual background picture.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum