Previous Thread
Next Thread
Print Thread
Rate Thread
#227586 11/09/2002 6:41 PM
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
I would like to add an extra user profile field with multi line capabilty.

I see in the Config Settings (UBBThreads 6.1.1) I have several fileds, but there is no display option for field lenght or viewable length. Can this be modified?

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Are you looking to have lines that break at a pre-determined point, or just lines that wrap when necessary?


- Allen wavey
- What Drives You?
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
wrap as neccessary.

We are a motorcycle site and I'm looking to have specific fields that will be for the motorcycles they own.

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
hmmm.. I would think then you only need to increase the length/size if the field in question. I am not sure what limit is there presently. Perhaps Scream or someone who's done this recently will have an idea.


- Allen wavey
- What Drives You?
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
The extra fields look like they've got a 200 character limit in the database.

You could try this (attached) to get a bigger entry box for those fields.

I didn't test it... so let me know.
Attachments
60210-longerfield.txt (0 Bytes, 43 downloads)

Sponsored Links
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Josh,

EXCELLENT! Worked great.

Any thoughts on how to make this searchable. We put mtorcycles owned info in this field. It would be great to have members search on the field to find people with similar bikes.

THANKS!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
IIP Lets you search profile fields from the Index Page.

That's easiest if you've got Integrated Index Page. If not.. download it from the forum design integration forum.

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Josh,

Good point. I do have IIP, but I have removed the Profile section from the menu, since I have and extrmely large database of members that go backover 2.5 years. Many are stale, but for the sake of competition among similar sites... we tend to brag on the number of members. By having the profiles exposed, you can allow someone to farm you database and/or see that many have been inactive. Niether is good for us.

If there was a profile search, that could not produce an entire list, or one that had specific searchable fileds (and return no blancks), then the search option alone would be good.

What is you opinion on someone Farming the database for emails to spam on a related subject. I heard this happened to a competitor using VBulliten a while back?

Thanks!

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Hi Mike,

If you are worried about spiders farming your user database you can apply the anti-spam measures modification found here.

I thought that this might be of help.

Warm regards

Nikos


Nikos
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Probably could limit the function to allow only registered members to have access to the list.... or maybe even users with x number of posts. ?

Just an idea.

Sponsored Links
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Josh,

Is there a way to recognize html or ubb markup in this field?

For example... I typed in the 5 motorcycles I own... one on each line, and when it displays, it puts them in one big string. I would like to see them on separate line , as I typed them in.

Mike

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Untested.... so let me know but....

code:
In changebasic.php

Find this:

// ------------------------------------------------
// Strip out all of the <> and change to HTML codes
$Email = str_replace("<","<",$Email);
$Fakeemail = str_replace("<","<",$Fakeemail);
$Name = str_replace("<","<",$Name);
$Homepage = str_replace("<","<",$Homepage);
$Occupation = str_replace("<","<",$Occupation);
$Hobbies = str_replace("<","<",$Hobbies);
$Location = str_replace("<","<",$Location);
$Bio = str_replace("<","<",$Bio);
$ICQ = str_replace("<","<",$ICQ);
$Picture = str_replace("<","<",$Picture);
$Extratwo = str_replace("<","<",$Extra2);
$Extrathr = str_replace("<","<",$Extra3);
$Extrafou = str_replace("<","<",$Extra4);
$Extrafiv = str_replace("<","<",$Extra5);
$Bio = str_replace("\n","<br />",$Bio);



ADD this to the bottom of that list:

$Extratwo = str_replace("\n","<br />",$Extratwo);
$Extrathr = str_replace("\n","<br />",$Extrathr);
$Extrafou = str_replace("\n","<br />",$Extrafou);
$Extrafiv = str_replace("\n","<br />",$Extrafiv);



Then so it doesn't break when you go back and edit,
you'll also have to change this in editbasic.php:

Find this:

// ------------------------
// Convert returns to <br />s
$Signature = str_replace("<br />","\n",$Signature);
$Bio = str_replace("<br />","\n",$Bio);



ADD this to the bottom of that list:

$Extratwo = str_replace("<br />","\n",$Extratwo);
$Extrathr = str_replace("<br />","\n",$Extrathr);
$Extrafou = str_replace("<br />","\n",$Extrafou);
$Extrafiv = str_replace("<br />","\n",$Extrafiv);




That should do the trick replacing the line breaks with HTML breaks
when you edit the info.


This adds this capability to all the extra fields... if you only need this with one, then you can omit the code for the unneeded fields.


Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Josh... Perfect as usual!

Thanks for the help!


Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
With the 6.2 upgrade... I think maybe the fieldname changes have created issue for me

I tried to mod Josh's attached file by only adding the variables for the Cols / rows/ and wrap, bu that gave me an error.

Just looking for the ability to have ediatbox big enough to reflect the information being typed in the Extra2 field.

Oh... where does a person who want to experiment with these changes keep up to date on variable names?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
You've got to do more than just add the cols rows and wrap.

Look closely at the attachment above.

It changes from

<input type="text" name="Extra2"

to:
<textarea name="Extra2" .....

Make sure you make the change to the type of box it is.

I haven't tested.... but this should have no trouble working in 6.2


Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
THANKS!

I originally thought the new line was a version diff...


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)