Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 12
Every time one of my members update their profile ubb automaticly places http:// in their picture field if that is empty. Is there any way to prevent this? I have installed a hack wich shows the users picture under their name when they post but know it displayed an error image when members who don't have a picture and updated their profile.

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Uh, then modify the hack to, like NOT DISPLAY THE PICTURE IF IT's "http://" laugh


UBB.classic: Love it or hate it, it was mine.
Joined: Apr 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 12
I tried, but I'm not that good in cgi.
I was thinking about something like this:
Both a fix for http:// or underneath code would be great smile

#Start User Defined Custom Avatar Hack v1.0
my $user_image = $user_profile[20];
chomp ($user_image);
if ($user_image "") {
$user_image = qq~~;
elsif ($user_image "http://") {
$user_image = qq~~;
} else {
$user_image = qq~~;
}
#End User Defined Custom Title Hack v1.0

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Nearly perfect, only:

elsif ($user_image "http://") {

should be

elsif ($user_image eq 'http://') {


UBB.classic: Love it or hate it, it was mine.
Joined: Apr 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 12
Tried that but then I get this error frown
syntax error at /web/sites/99/jernst/www.jernst.f2s.com/Forum/ubb/Templates/public_topic_page.pl line 127, near ") or" syntax error at /web/sites/99/jernst/www.jernst.f2s.com/Forum/ubb/Templates/public_topic_page.pl line 129, near "} else"

Line 127:
my $user_image = $user_profile[20];
Line 129:
if ($user_image eq "") or ($user_image eq "http://") {

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
if (($user_image eq "") or ($user_image eq "http://")) {


UBB.classic: Love it or hate it, it was mine.
Joined: Apr 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 12
Thx, that works smile


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
hatter
hatter
USA
Posts: 69
Joined: January 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)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
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)