vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Make avatars a link to user's homepage (https://vborg.vbsupport.ru/showthread.php?t=25046)

Admin 08-09-2001 10:00 PM

This hack was requested by Sinema.

1. Open functions.php (in your admin folder), and find
PHP Code:

        if ($avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="";
        } else {
            eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
        } 

replace it with
PHP Code:

        if ($avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="";
        } else {
            if (
$post[homepage]!="" and $post[homepage]!="http://") {
              eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar_link")."\";");
            } else {
              eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
            }
        } 

2. Add a template and name it postbit_avatar_link with this
PHP Code:

<a href="$post[homepage]target="_blank"><img src="$avatarurlborder="0" alt="Visit $post[username]'s homepage!"></a

And that's it! :)

See a demo here:
http://forum.t-cove.com/showthread.php?threadid=5

Feedback is welcome! :)

dxb 08-11-2001 12:26 AM

simple and effective firefly good job :)

Sinema 08-11-2001 01:09 AM

Hey that worked like a charm!!

Thanks a lot of fan site owners will love that!

Hey quick question

Is there a way to preset certain buttons to have a certain URL?

I don't want people promoting their site with someon elses button .. if you know what I mean

badmeetsevil- 08-11-2001 01:11 AM

Nice hack! I'll have to try it out. https://vborg.vbsupport.ru/

Admin 08-11-2001 04:41 AM

Thanks all! :)

[QUOTE]Originally posted by Sinema
Is there a way to preset certain buttons to have a certain URL?
I don't want people promoting their site with someon elses button .. if you know what I mean

Omega 08-11-2001 06:47 AM

Hmm dont you mean showthread.php instead of functions.php???

Sinema 08-11-2001 09:16 AM

It's like presetting the image

Lets say your using a button for TheBronze.tv

the image was created for TheBronze.tv so when the person selects it .. it automatically is linked back to

http://www.thebronze.tv

this way people can't use the "Bronze" button to promote their own site ..

Piston 08-11-2001 09:56 AM

I keep getting a parse error on line 226 of Functions.php

I've retried 4 times just to make sure with the same results each time. Any Idea's?

Admin 08-11-2001 12:23 PM

Omega: No, I mean functions.php. :)

Sinema: Would someone explain me what he wants? :p

Piston: What version of vB are you running, and what's line 226?

Sinema 08-11-2001 12:35 PM

LoL let me try again

Right now you can use buttons and whatever URL you enter in your Profile is the url that is used.

However I'm curious if there is a way to preset the URL

So if a user selects an Avatar from Avatars uploaded .. the url is already preset .

Example

Joe Bob goes and selects an avatar for the site "SpikeSpotting.com"

The avatar is a button promoting the site "SpikeSpotting.com"

instead of Joe Bob going into his profile and entering in http://www.spikespotting.com in his "Homepage" section ..

the urls could be preset so he selects the SpikeSpotting avatar and it automatically hyperlinks to http://www.spikespotting.com

This would stop users from using Buttons to promote their own site and have them promote the site of the avatar they are using.


All times are GMT. The time now is 01:39 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05295 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete