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)
-   -   Signature Image System Hack - Version 3.0+... (https://vborg.vbsupport.ru/showthread.php?t=45310)

Pikok 07-16-2003 02:38 PM

Nobody knows how to get the signature image to show up int PMs along with the signature text?!? :( I tried the following, but didn't work..

In "root/private.php" find:
PHP Code:

        if ($post[avatarid]!=0) {
          
$avatarurl=$post[avatarpath];
        } else {
          if (
$post[hascustomavatar] and $avatarenabled) {
            
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
          } else {
            
$avatarurl="";
          }
        }
        if (
$avatarurl=="") {
    
$post[avatar]="";
} else {
    eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
  } 

And Add After:
PHP Code:

// START SIGNATURE IMAGE
        
if ($post[signatureid]!=0) {
            
$signatureurl=$post[signaturepath];
        } else {
            if (
$post[hascustomsignature] and $signatureenabled) {
                
$signatureurl="signature.php?userid=$post[userid]&dateline=$post[signaturedateline]";
            } else {
                
$signatureurl="";
            }
        }
        if (
$signatureurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showsignatures]))) {
            
$post[signatureimg]="";
        } else {
            eval(
"\$post[signatureimg] = \"".gettemplate("postbit_signatureimg")."\";");
        }
// END SIGNATURE IMAGE 

But that didn't fix it either. :confused: Any help?

LangTuDaTinh 07-16-2003 03:10 PM

u need to add a JOIN queries to the original PM queries for signature too....like the one in the showthread.

Pikok 07-16-2003 03:29 PM

Quote:

Today at 05:10 PM LangTuDaTinh said this in Post #232
u need to add a JOIN queries to the original PM queries for signature too....like the one in the showthread.
I'd thought about that after I posted that last message. :o I was just gonna look and see what queries needed to be run. Thanks for the help, works great! :D

I added both parts for the queries and also added the "postbit_signatureimg" template to the required templates. For those of you who don't know exactly what to add where to get the sig image to show in PMs, do the following..


In "root/private.php" do the following 4 things..

Find:
PHP Code:

privfolder,postbit_avatar 

And Replace With:
PHP Code:

privfolder,postbit_avatar,postbit_signatureimg 

Find:
PHP Code:

                                 user.*,userfield.*".iif($avatarenabled,",avatar.avatarpath,customavatar.dateline AS avatardateline,NOT ISNULL(customavatar.avatardata) AS hascustomavatar ","")." 

And Add Below:
PHP Code:

                                 ".iif($signatureenabled,",signature.signaturepath,NOT ISNULL(customsignature.signaturedata) AS hascustomsignature,customsignature.dateline AS signaturedateline","")." 

Find:
PHP Code:

                                 ".iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                                                        LEFT JOIN customavatar ON customavatar
.userid=user.userid ","")." 

And Add Below:
PHP Code:

                                 ".iif ($signatureenabled,"LEFT JOIN signature ON signature.signatureid=user.signatureid
                                                           LEFT JOIN customsignature ON customsignature
.userid=user.userid","")." 

Find:
PHP Code:

if ($post[avatarid]!=0) { 
          
$avatarurl=$post[avatarpath]; 
        } else { 
          if (
$post[hascustomavatar] and $avatarenabled) { 
            
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]"
          } else { 
            
$avatarurl=""
          } 
        } 
        if (
$avatarurl=="") { 
    
$post[avatar]=""
} else { 
    eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";"); 
  } 

And Add Below:
PHP Code:

        if ($post[signatureid]!=0) {
            
$signatureurl=$post[signaturepath];
        } else {
            if (
$post[hascustomsignature] and $signatureenabled) {
                
$signatureurl="signature.php?userid=$post[userid]&dateline=$post[signaturedateline]";
            } else {
                
$signatureurl="";
            }
        }
        if (
$signatureurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showsignatures]))) {
            
$post[signatureimg]="";
        } else {
            eval(
"\$post[signatureimg] = \"".gettemplate("postbit_signatureimg")."\";");
        } 

Perhaps this should be included in the installation instructions. ;) Thanks again LangTuDaTinh!

sabret00the 08-07-2003 05:53 PM

beautiful hack, pity the queries wern't auto or the templates weren't in different txt files, would've cut installation time into shreads, gonna install this later

Harlequin 08-19-2003 03:42 AM

I'm using vB 2.3.2 and I've installed this hack with no problems whatsoever, however, there was a pretty big problem with the fact that the graphic itself didn't show. It has a nice, big X.

I've went through about ten pages of this thread hoping to grab on to an answer, but I don't think I've passed by anyone that's got quite the same problem I do.

Not only does the graphic not display in the usercp, it doesn't display on a post either (the text is there for the signature, the graphic comes up, again, as an X.)

The <img src=" is returning the following:

signature.php?userid=1&dateline=1061267928


Any clues?


I've reinstalled this thing twice already -- but I'll install it again if that's what it takes. :) It looks like a great hack -- hope I can use it soon.

(Could just be it's reeeeal late at night while I'm tryin' to get this on. ;))

Dark_Wizard 09-09-2003 12:53 PM

Quote:

08-19-03 at 12:42 AM Harlequin said this in Post #235
I'm using vB 2.3.2 and I've installed this hack with no problems whatsoever, however, there was a pretty big problem with the fact that the graphic itself didn't show. It has a nice, big X.

I've went through about ten pages of this thread hoping to grab on to an answer, but I don't think I've passed by anyone that's got quite the same problem I do.

Not only does the graphic not display in the usercp, it doesn't display on a post either (the text is there for the signature, the graphic comes up, again, as an X.)

The <img src=" is returning the following:

signature.php?userid=1&dateline=1061267928


Any clues?


I've reinstalled this thing twice already -- but I'll install it again if that's what it takes. :) It looks like a great hack -- hope I can use it soon.

(Could just be it's reeeeal late at night while I'm tryin' to get this on. ;))


I'm having issues with this as well and I don't get any sig showing and yes everyting is enabled. Problem is there are too many steps to go through to find the problem. I will have to remove this for now until Hellsatan finds the bugs.

sabret00the 09-14-2003 11:27 AM

does this hack still work or shall i leave it for another day?

PAINTBALLM 10-07-2003 02:50 AM

any way to add the option of using a image sig, or a text sig? (via radio button)

NightWalk8r 10-13-2003 04:22 PM

hey.....great hack!!!

but as everyone asked, is there a way to have either or both image and text sig??

how about just add another field for the text sig??

LangTuDaTinh 11-22-2003 03:14 PM

This is a great hack and I have installed it for a long time but the more members are using it in a big forum, your forum will be much more slower. After removed this from showthread and store avatar and sig image on web harddisk instead of on the database, my forum speed is much much faster.

So if you have a big forum and would like to use this or multi avatar feature then I would recommend not to store on database.

and the best part is i don't use any queries for both avatars and sig image. i even removed all avatars and sig image from big get post queries in showthread.

what i do is allow members to upload to a directory and set their userid as filename. if user uploaded avatar or sig image then i would change the field avatarid and signatureid to 1, then in function.php, i would add sigimage by check weather those field is one or not. if it's 1 then the avatar and sig will display.

i will add a multi avatars later


All times are GMT. The time now is 09:20 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.02945 seconds
  • Memory Usage 1,795KB
  • 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
  • (10)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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