Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[CODE] XProfile 2.0; Now with Admin Controllable abilities
Topic Started: May 27 2005, 03:25 PM (56,434 Views)
Paper
Member Avatar
Member
 *   *   *   *   *   *  
Important announcement 30/05/05
This is an update on the breaking out of frames script

Sorry everyone. I made an error in my new breaking out of frames script. If you need to break out of frames and use this script, please use the following code instead. If you get redirected to your edit signature page then you need this code.

Quote:
 
<script language="Javascript" type="text/javascript">
<!--
if (window != window.top && document.location.href.indexOf("act=UserCP&CODE=22") == -1)
top.location.href = location.href;
//-->
</script>




Contents
Introduction
Support
Preview
Installing
Basic functionality
Using the custom box in the Code CP
Disclaimer


Introduction
This code is based on the code called XProfile 1.5 (Final) by Markup. You need to remove his old code before installing this one. All user settings will still be kept.

This code will allow the user to add functionality for more fields. Instead of just Home Page, Birthday, Location, and Interests, you can now have more.

This code corrects the Mozilla Firefox compatibility issue that XProfile 1.5 has. It also adds a control panel, so that you no longer have to use your Admin CP. It uses the Easy Admin CP code to do this.

Please report errors that you find. Please tell me which browser you are using, which OS you are using and please provide a link to your board.


Support
I will no longer be offering support here on a regular basis. I am still happy to provide support, however, and will continue to do so on a regular basis at a forum called the United Coders Organisation

If you still require help, please feel free to send me a PM here, or for quicker support ask for support at the UCO (Look in my signature)

Sorry for this inconvenience and thank you again for using the code


Preview
Here


Installing
Installing this code is straight forward.

1) Log in to your Admin CP, and go to the wrappers section (Admin CP -> Skinning & Styles -> Board Wrappers).

2) Go to the Javascript wrapper

3) Put the following code in that wrapper. Do not change the code
Quote:
 
<script>
var beginxprofile; var xage=true; var AlabelPrefix = "<B>"; var AlabelSuffix = "</B>"; var AvaluePrefix = "<I>"; var AvalueSuffix = "</I>"; var AwhereShown = "Both"; var xlocation=true; var LlabelPrefix =""; var LlabelSuffix =""; var LvaluePrefix ="<FONT color=red>"; var LvalueSuffix ="</FONT>"; var xflags=true; var FlabelPrefix = "<SPAN style=display:none>"; var FlabelSuffix = "</SPAN>"; var FvaluePrefix = ""; var FvalueSuffix = ""; var FwhereShown = "Profile"; var xsound=true; var xcustom="newField[i++] = ['Name', '<B>', '</B>', '', '<BR>', 'Both', [], 1]; newField[i++] = ['Gender', '<SPAN style=display:none>', '</SPAN>', '<CENTER>', '</CENTER>', 'Profile', ['Male', 'Female'], -1]"; var endxprofile;
</script>


4) Directly below the <% NAVIGATION %> tag in the Header & Body add:
Quote:
 
<script src="http://www.webpost.net/if/ifpaper/easyadmincp.js"></script>

Do not add another if this piece of code is already there.


5) Put the following code in the footer wrapper
Quote:
 
<script src="http://www.webpost.net/if/ifpaper/main2.js"></script>



Now it has been installed


Basic functions
If you go to someone's profile, you will now see some new information added on. You will also see some new information added on to the posts.

To edit your information, edit your profile. The new entry boxes will appear as well as the usual entry boxes.

An admin can edit the XProfile code by clicking on the "XProfile CP" link that should be among the user links. Only users with admin status can see this. Once you have clicked it a new forum section will appear asking you to log in. Enter your username and password.

Once you press "Submit" you should wait for it to log in. Even if it seems like it isn't doing anything, it is. After it has logged in, the section will change giving you a table with different options in.

Features - If you untick a feature then it will be turned off

Label prefix, Label suffix, Value prefix, and Value suffix - These all control the look and style of these aspects. On the forum, the information is viewed as "Label: value" where the label tells you what the data is about, and the value is the data belonging to that person.

Where shown - Where the feature is shown. "Both" means it will be shown both in the person's profile and on the person's posts. The other options are self explanatory.

You should not use double quotes (") in any of the text boxes. Use single quotes(') instead.

Press Save to update the code.


Using the custom box in the Code CP
There is a custom box underneath so that you may add more fields.

You should not use double quotes (") in any of the custom box. Use single quotes(') instead.

In this post read the bit about the "compressed" version of the code, towards the bottom.

After you have read that the following should make sense.

The following code has already been added. You do not have to put it into the custom box.
Quote:
 

i = 0
newField = []


Let's assume we wanted to put the following code into the custom box
Quote:
 
newField[i++] = ["Name", "<B>", "</B>", "", "<BR>", "Both", [], 1]


We would firstly change all the double quotes to single quotes, and then we would just simply put it into the custom box.
Quote:
 
newField[i++] = ['Name', '<B>', '</B>', '', '<BR>', 'Both', [], 1]


If we wanted to add another field, along with that one, we would need to add a ";" onto the end of the first one, and then add the other one on.
Quote:
 
newField[i++] = ['Name', '<B>', '</B>', '', '<BR>', 'Both', [], 1]; newField[i++] = ['Sur Name', '<B>', '</B>', '', '<BR>', 'Both', [], 1]


You just need to keep repeating this process. If you don't want any more fields than the features, then you can delete all of the text out of the custom box.


Disclaimer
This is an update of the XProfile code that was originally made by the user called Markup. Please note that this code is not mine and I do not claim it as my own, nor do I copyright the parts programmed by Markup.

I do, however, claim as my own and copyright the parts that I added in, including the fix to make it compatible with Mozilla FireFox, and the "Admin Controllable" functionality.

As a result of giving credit to Markup for developing the XProfile code, I have not stolen his code.
Offline Profile Goto Top
 
nolf
Unregistered

Hmm? Whos messing with the forums?
Goto Top
 
Paper
Member Avatar
Member
 *   *   *   *   *   *  
Some particularly immature person who has no other way to amuse themselves. Congratulations whoever did it, you managed to finally amuse yourself.
Offline Profile Goto Top
 
Ryan Fan
Nitrogenix
 *   *   *  
Awesome :o
Offline Profile Goto Top
 
jappyx
GaGaGa ™
 *   *   *   *   *  
The Password and User name as seem to of changed.... What is the new ones?
Offline Profile Goto Top
 
123gaming (PM)
Member
 *   *   *   *  
deos it have a shop with it
Offline Profile Goto Top
 
Paper
Member Avatar
Member
 *   *   *   *   *   *  
Sorry it doesn't have a shop

I would like to apologise about the rude messages on the test forum. As a result of people's immature actions they have ruined it for the rest. There will be no preview until I can take some screen shots.

Sorry everyone.
Offline Profile Goto Top
 
dscuber9000
Member Avatar
Member
 *   *   *   *  
Great job. A lot better than v1.0!
Offline Profile Goto Top
 
Paper
Member Avatar
Member
 *   *   *   *   *   *  
Thank you :)
Offline Profile Goto Top
 
tweetimz
Member
 *  
Hello,

I tried this on my board and XProfile CP did appear on my user's link bar, so I clicked on it to see what it does on my board, entered my own username and p/w but for some reason it's not working after I clicked on "submit". (I waited and waited and waited and waited.... at least more than 10 minutes or so). Why do you think its doing that? :unsure:
Offline Profile Goto Top
 
toby
Member Avatar
Member
 *   *  
can anyone suggest how to put this code in

<a href='callto://(the name they put in)'>(their name again)</a>
Offline Profile Goto Top
 
Tibbetts
Member
 *   *  
How do you get the members location to appear both in the profile and their posts?


Tibbetts
Offline Profile Goto Top
 
Paper
Member Avatar
Member
 *   *   *   *   *   *  
Tweetimz, please tell me what browser you are using, what OS you are using and give me a link to your board.

Toby, I don't understand what you are trying to do. If you want to change their real name into a link, then I will try to make a code that will do it for you.

Tibbetts, it always appears on your profile whether it is installed or not. The location feature adds it onto the posts.
Offline Profile Goto Top
 
Let Your Head Go
Member Avatar
Rachel Stevens | I Said Never Again
 *   *   *  
cool
Offline Profile Goto Top
 
Dreadpirate
Member
 *   *  
This is an awesome code though i can't make it so Location appears?
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code Snippets · Next Topic »
Locked Topic