View Full Version : Can someone help me with this hack/feature to my forum?
sbryan
01-14-2003, 10:32 AM
I want to add two additional info fields into my members profiles to display two things as shown in the attached photo.
The thing thats different is i want them to appear as shown in the pic.
Is that possible? Any help advice appreciated. Willing to pay someone to help me with it as well if possible.
EvilLS1
01-14-2003, 10:55 AM
If I'm understanding what you want, thats easy. No hack necessary.
Just create the two new fields in your admin control panel.. Make a note of the field IDs for the two new fields. You can find out what the ID is by clicking "modify" under profile fields in the admin control panel, then hold your mouse over the new fields.. The field ID is displayed at the end of the URL at the bottom of your screen. Then edit your postbit template and add this wherever you want them to appear:
<smallfont>Currently Playing: $post[fieldX] <br>
X-Box Live gamer tag: $post[fieldX]<br></smallfont> (replace the Xs with the field ID)
You can add the fancy tables around them with html.
sbryan
01-14-2003, 11:07 AM
awesome. is it ok to prep the code and post it here for you to check for me?
sbryan
01-14-2003, 11:26 AM
what template do i edit?
sbryan
01-14-2003, 11:33 AM
oh and how do i make it NOT appear if nothing is entered into their profile? is that possible?
if you visit http://www.xboxworld.com.au/forum/showthread.php?s=&postid=40844#post40844 you can see it working
what template do i put it into to make it appear under the location and postcount bit?
sbryan
01-14-2003, 12:03 PM
hehe there we go ive got it all working nicely now but if u can help me make it optional so that if nothings entered, nothing displays that would be incredible!
Craigr
01-14-2003, 01:48 PM
Originally posted by sbryan
oh and how do i make it NOT appear if nothing is entered into their profile? is that possible?
if you visit http://www.xboxworld.com.au/forum/showthread.php?s=&postid=40844#post40844 you can see it working
what template do i put it into to make it appear under the location and postcount bit?
template - postbit
Craig
sbryan
01-14-2003, 08:19 PM
thanks craig, i worked it out :) can you help mae make it optional, ie make them not display in the forum posts if nothing is entered into the fields by the user..
EvilLS1
01-15-2003, 04:37 AM
In admin/functions.php find:
if ($post[customtitle]==2) {
$post[usertitle] = htmlspecialchars($post[usertitle]);
}
Below it add:
// first profile field
if ($post[fieldX]!="") {
$gamedata1="<smallfont><b>Currently Playing:</b><br>$post[fieldX]</smallfont><br>";
} else {
$gamedata1="";
}
// second profile field
if ($post[fieldX]!="") {
$gamedata2="<smallfont><b>Xbox Live gamer tag:</b><br>$post[fieldX]</smallfont><br>";
} else {
$gamedata2="";
}
Note: In the code above, replace ALL Xs in "$post[fieldX]" with the field IDs for the two fields you added. There are 4 places that will need to be changed to your field IDs. $gamedata1 is for the first field, and $gamedata2 is for the second.
Now go to your postbit template and remove all of the code & text that you added earlier.. Now replace it with:
$gamedata1
$gamedata2
That should work.
sbryan
01-15-2003, 05:56 AM
thats awesome, thank you so much EvilLS1, worked perfectly first time!
that is awesome :)
psoexplorer
06-04-2005, 01:04 PM
This is great - but I'm confused with the last part (to make it optional)
I cant find admin/functions.php I only have admincp, and there's no functions.php in there...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.