vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   [img] in sig... (https://vborg.vbsupport.ru/showthread.php?t=44356)

GaleForce 10-06-2002 06:34 PM

[img] in sig...
 
I know there is a hack for this, but is there anyway that I can just allow [img] code in sigs?

Xenon 10-06-2002 07:26 PM

well you can use a little trick:
open admin/functions.php

find:
PHP Code:

                $post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
                eval(
"\$post[signature] = \"".gettemplate("postbit_signature")."\";");
                
$sigcache["$post[userid]"] = $post[signature]; 

change it to:
PHP Code:

                $post[signature]="<img src=\"".bbcodeparse($post[signature],0,$allowsmilies)."\">;
                eval("
\$post[signature] = \"".gettemplate("postbit_signature")."\";");
                
$sigcache["$post[userid]"] = $post[signature]; 

then tell your users they have to enter just the url of their pic into the sig...

GaleForce 10-06-2002 08:05 PM

That would work well if every member wanted to use an image as a signature, but unfortunately only around half my forum wants it :(

Xenon 10-06-2002 08:33 PM

hmm, than you can use this trick:

create a new profilefield editable and viewable by users and then change the original block i poste above into this:

PHP Code:

if(trim($post[fieldX]=="")) {
$post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
} else {
  
$post[signature]="<img src=\"".$post[fieldX]."\">";
}
                eval(
"\$post[signature] = \"".gettemplate("postbit_signature")."\";");
                
$sigcache["$post[userid]"] = $post[signature]; 

replace the X with the new fieldid


All times are GMT. The time now is 05:13 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.00931 seconds
  • Memory Usage 1,727KB
  • 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)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete