Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2001
Posts: 2
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2
Hi folks,

this simple hack utilizes the standard userimage-Field in UBB6 and shows the image below name and status in the posting.

Demo

eurosale

Sponsored Links
Joined: Mar 2000
Posts: 16
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 16
Ich sehe, Du hast ein deutsches Board, daher meine Antwort auf Deutsch:

Kann ich die Größe des verlinkten Bildes auch begrenzen? Es macht keinen Sinn ein Userbild in den Beiträgen anzubieten, wenn einzelne Bilder 100kb oder grösser sind... wink

For all others, is there a way to limit the datasize of the picture to let's say < 10 kb?

Joined: Feb 2001
Posts: 2
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2
There is no limitation of filesize included in the hack yet.

I'm running that hack also on 5.47 for a time, never had problems with users linking oversized pictures.

You should alter the text in the profile for using the image (e.g. size, proportions 60x60).

eurosale

Joined: Nov 2000
Posts: 467
Code Monkey
Code Monkey
Offline
Joined: Nov 2000
Posts: 467
What is the difference between this hack and the 6.0 avatar hack. Other than changing the text in two files instead of one

Joined: Feb 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 12
Quote
quote:
Exaclty how do you edit the text on the profile page? Which file do I have to alter?

ThanX!

Gr33n

Sponsored Links
Joined: Feb 2000
Posts: 57
Member
Member
Offline
Joined: Feb 2000
Posts: 57
looking at the code, I don't see any added functionality from the other avatar hack. If you want to make a change, my recomendation would be to change the profile field to one of the custom fields (that is what I did when I installed it on my board).

Joined: Feb 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 12
Yes, but how? WHat files do we alter and how?

TheGr33n1

Joined: Feb 2000
Posts: 57
Member
Member
Offline
Joined: Feb 2000
Posts: 57
http://www.h-realms.com/hacks/6.x/avatar6.txt
public_topic_page.pl

That is the original hack (MM posted it a while ago)

where he said:
my $this_img = $user_profile[20];
chomp($this_img);


I did this:
my $this_img = $user_profile[18];
chomp($this_img);


The 18 is the second to last custom slot. I then went into the control panel, and made it so the second to last slot said "User images." This did not require any hacking...it is a built in option of this version of UBB.

If you want to change the image size,
find where MM says this:

if ($this_img ne "") {
$this_img = qq(
);
} else {
$this_img = "";
}


and change the numbers after width and height.

Joined: Sep 2000
Posts: 23
Junior Member
Junior Member
Offline
Joined: Sep 2000
Posts: 23
What about taking this a step further and put in the ability to limit the size of the pic to be shown. I'd like to use it in our forums but I few people who would put in pics that are a megabyte or so. All of my dialup users would complain.

Someone think they can add in some code to set the max image size?

Joined: Feb 2001
Posts: 12
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 12
I saw on another board where on the profile he had a 'picture' field AND an 'Avatar' field. Now how would I accomplish that? ANd how do I put links in the text next to the profile fields? (I wanna make a link to a page of available avatars).

ThanX. TheGr33n1

Sponsored Links
Joined: Jan 2000
Posts: 6
Junior Member
Junior Member
Offline
Joined: Jan 2000
Posts: 6
I really hope someone can whip up a pulldown avatar list instead of this. The one I remember was set up to read from an avatar directory that is full of images you put in there, then they just click the drop down list, pick the image they want and a little java script makes the image pop on beside the drop down list.

I know nothing of cgi scripting frown but it would be nice if someone were to bring that ol' 5.x script into the 6.x world smile

Oh well, it's too early, but we'll all look foward to seeing that script one day smile


V'Pier
Joined: Feb 2000
Posts: 57
Member
Member
Offline
Joined: Feb 2000
Posts: 57
Gr33n,
If you want to have both a avatar field and a picture field, just follow the instructions I gave in response to your last question in this thread. It will not be a drop down box, it will be a slot for people to enter the addy of the image.

No, I don't know a way to limit the file size (in MB) but if you set the diminsions of the image at a reasonably small size, you should not have problems with download times.

Joined: Jan 2000
Posts: 12
Junior Member
Junior Member
Offline
Joined: Jan 2000
Posts: 12
Giving the IMG tag a size will NOT reduce download time. All it does is download the huge 1MB file and then rescale it.

IMHO, and it's always been of my opinion that the Avatar hack and/or this particular feature is EXTREMELY short sighted. Why do people insist on giving the users power to bring a dialup connection or even an ISDN connection to it's knees with huge image files? That's exactly what happens when you give the user the ability to specify ANY URL they want for their little icon.

All my users icons are ones they have uploaded to my server (eliminating the speed problems from connecting to 50 billion different servers), then converted to the proper dimentions, THEN that file is sent to the user who views the message.

The above is the ONLY secure way to handle user icons, any other way and you are just BEGGING for trouble. I really don't see why people keep persisting with the Avatar hack or why on earth Infopop made the ability to specify a URL as a user image.

Anyway, just my 2c worth.


A crust of bread is better than nothing. Nothing is better than love.
Therefore, by the transitive property, a crust of bread is better than love.
Joined: Nov 2000
Posts: 915
Developer
Developer
Offline
Joined: Nov 2000
Posts: 915
get the Image Magick module....
http://www.simplesystems.org/ImageMagick/

Joined: Jan 2001
Posts: 184
Member
Member
Offline
Joined: Jan 2001
Posts: 184
Flare is 100% right.

However, if I was gonna create a hack, I'd probably approach is this way...

Code
code:

Above is some simple perl that checks the gif image height/width attributes.

Step 1: create an upload page so users can send a .gif file to your server (many applet, javascript wares out there for this). put your policies about filesize and type there, plus this could be linked from the profile screen in UBB and could allow image deleting/addition - user controlled.

Step 2: check image attribute, sh!tcan the image if too big (you decide what is too big)

Step 3: rename the file to include the member profile number in the filename, i.e. 0000002.gif

Step 4: hack UBB to use SSI call to a perl script to check if image exists, and if it's there display the image

this is real quick off the top of my head stuff... but in a nutshell it allows user to upload, you can warn them about filesizes and take action, and image will NOT display unless it exists, and it's all on your server. two hacks - one in profile, one in forums display source, and one external script or HTML file that handles uploading and deleting and policies.

hey, i'm busy with my own stuff, no time for this! but maybe i sparked some folks into saying "hmmmmm....." ;-)

-jim

[ February 16, 2001: Message edited by: hate98 ]

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Another prob is, if you have none enetered you see a missing image (using IE 5.0)

frown


- Custom Web Development
http://www.JCSWebDev.com

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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
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,833
Greg Hard 4,625
Top Posters(30 Days)
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-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)