Page Index Toggle Pages: 1 ... 4 5 [6] 7 8  Send TopicPrint
Very Hot Topic (More than 25 Replies) Extended Profiles for SP1.1 (Read 49935 times)
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #75 - May 16th, 2003 at 4:31pm
Print Post  
Michael is it possible to have the single selection drop down menu's default as blank so that a user is forced to make a selection? I know the first line is the default, but I want the first selection to be blank so that on registration the user is forced to make a choice. Making a return in the options area does not save the blank space. Thanks.
  

Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Extended Profiles for SP1.1
Reply #76 - May 17th, 2003 at 1:33pm
Print Post  
Sorry but there is no easy way todo this. This mod doesn't make any difference between the registration and edit profile page when generating the input fields so it's very complicated to have a blank option on registration but the currently selected or default option on edit profile page.
  

The Administrator.
Back to top
WWW  
IP Logged
 
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #77 - May 17th, 2003 at 6:32pm
Print Post  
Then can some code be added (hardcoded) for the name of the field so that it says, if option equals 'x' then.... popup message or say make selection?
  

Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Extended Profiles for SP1.1
Reply #78 - May 17th, 2003 at 9:35pm
Print Post  
I think I found a way to get this working. Open your ExtendedProfiles.pl and look for this code:

Code
Select All
	elsif ($field{'type'} eq "select") {
		$output .= qq~<tr><td><font size=2><b>$field{'name'}: </b></font><br><font size="1">$field{'comment'}</font></td><td><select name="ext_$id" size=1>\n~;
		@options = split(/\^/,$field{'options'});
		if ($ext_profile[$id] > $#options || $ext_profile[$id] eq "") { $ext_profile[$id] = 0; }
		$count = 0;
		foreach (@options) {
			if ($count == $ext_profile[$id]) { $selected = " selected"; } else { $selected = ""; }
			$output .= qq~<option value="$count"$selected>$_\n~;
			$count++;
		}
		$output .= qq~</select></td></tr>~;
	}  



and replace it with

Code
Select All
	elsif ($field{'type'} eq "select") {
		$output .= qq~<tr><td><font size=2><b>$field{'name'}: </b></font><br><font size="1">$field{'comment'}</font></td><td><select name="ext_$id" size=1>\n~;
		@options = split(/\^/,$field{'options'});
		if ($ext_profile[$id] > $#options || $ext_profile[$id] eq "") { $ext_profile[$id] = 0; }
		$count = 0;
		if ($pusername eq "") {	$output .= qq~<option value="9999" selected>Please choose...\n~; }
		foreach (@options) {
			if ($count == $ext_profile[$id] && $pusername ne "") { $selected = " selected"; } else { $selected = ""; }
			$output .= qq~<option value="$count"$selected>$_\n~;
			$count++;
		}
		$output .= qq~</select></td></tr>~;
	} 

  

The Administrator.
Back to top
WWW  
IP Logged
 
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #79 - May 17th, 2003 at 9:55pm
Print Post  
Absolutely fantastic, it works, however I would like to chane the part that says 'it does not exist' to 'You must make a selection, please go back and select'

Thanks much!
  

Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Extended Profiles for SP1.1
Reply #80 - May 17th, 2003 at 10:12pm
Print Post  
Simply change the text variable in the language definition part of ExtendedProfiles.pl:

Code
Select All
$lang_ext{'option_does_not_exist'} = "Option does not exist";
 

  

The Administrator.
Back to top
WWW  
IP Logged
 
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #81 - May 17th, 2003 at 10:16pm
Print Post  
Yes, thanks much
  

Back to top
WWW  
IP Logged
 
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #82 - Aug 4th, 2003 at 8:57pm
Print Post  
I noticed that when a column is added to the membership list with information from an extended profiles field it shows it as font=2, where do I have to change this so that it shows as font=1
Thanks,
  

Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Extended Profiles for SP1.1
Reply #83 - Aug 4th, 2003 at 9:53pm
Print Post  
In ExtendedProfiles.pl, look for this sub:

Code
Select All
# returns the output for the table tds in memberlist
sub ext_memberlist_tds { 


and replace any occurance of <font size=2> with <font size=1> in this sub.
  

The Administrator.
Back to top
WWW  
IP Logged
 
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #84 - Aug 4th, 2003 at 10:06pm
Print Post  
Thank you kindly Wink

PS. Seems like email is working again, got notified of this one.
  

Back to top
WWW  
IP Logged
 
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #85 - Aug 7th, 2003 at 12:33am
Print Post  
In display.pl I use the following:

~;
require "$sourcedir/ExtendedProfiles.pl";
$mytitle = ext_get($musername,"Title");
$mytitle = ext_parse_ubbc($mytitle, $displayname);
$yymain .= $mytitle . qq~<br>

to show the field named $mytitle. What I want to know... is there a code that can be put around this to say that only when the user is viewing the board named 'test' that is shown and when not viewing test do not show? If there is can be made so as to show for certain boards... for instance if user is viewing boards called, 'test', 'lucy', and 'truck' then display $mytitle.
Thanks.
  

Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Extended Profiles for SP1.1
Reply #86 - Aug 7th, 2003 at 7:04pm
Print Post  
The id of the current board is stored in the $currentboard variable. So if you'd want to display on the boards with the ids 'test', 'lucy' and 'truck', your code would look like this:
Code
Select All
~;
if ($currentboard eq "test" || $currentboard eq "lucy" || $currentboard eq "truck") {
  require "$sourcedir/ExtendedProfiles.pl";
  $mytitle = ext_get($musername,"Title");
  $mytitle = ext_parse_ubbc($mytitle, $displayname);
  $yymain .= $mytitle . "<br>";
}
$yymain .= qq~ 

  

The Administrator.
Back to top
WWW  
IP Logged
 
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #87 - Aug 7th, 2003 at 8:18pm
Print Post  
Thanks very much, works well.
  

Back to top
WWW  
IP Logged
 
bordeglobal
God Member
*****
Offline


Only the Best Posters
Survive!

Posts: 1837
Location: Trinidad, West Indies
Joined: Sep 30th, 2002
Gender: Male
Re: Extended Profiles for SP1.1
Reply #88 - Sep 15th, 2003 at 2:35am
Print Post  
I am trying to get the following to work in the view profile page. WHat am I missing? (as it is it shows nothing)

Code
Select All
require "$sourcedir/ExtendedProfiles.pl";
$myhonor = ext_get($musername,"Honor");
$myhonor = ext_parse_ubbc($myhonor, $displayname);
$yymain .= $myhonor . qq~ 



$myhonor is a field of info in my extended profile.

While we are at it, but a bit offtopic:

How do you display information if it is a certain user they are looking at? For instance. If someone is viewing the profile of 'tom' then display to someone 'x'?

Thanks.
  

Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: Extended Profiles for SP1.1
Reply #89 - Sep 15th, 2003 at 9:21pm
Print Post  
in Profile.pl, the variable in which the username is stored is called $INFO{'username'}, not $musername. So you'd have to use
Code
Select All
require "$sourcedir/ExtendedProfiles.pl";
$myhonor = ext_get($INFO{'username'},"Honor");
$myhonor = ext_parse_ubbc($myhonor, $displayname);
$yymain .= $myhonor . qq~ 


Quote:
How do you display information if it is a certain user they are looking at? For instance. If someone is viewing the profile of 'tom' then display to someone 'x'?
That's simple. When calling ext_get, you pass a variable which contains the username of the user you want to information for. The username of the user which is currently viewing the page is ALWAYS stored in $username. The username of the member who is currently displayed is mostly stored in the variable $musername. In your case, it was stored in $INFO{'username'}.
  

The Administrator.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 ... 4 5 [6] 7 8 
Send TopicPrint