vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Signatures on/off per member (https://vborg.vbsupport.ru/showthread.php?t=41411)

Xenon 07-24-2002 08:45 PM

yes ;)

i hope it works now ;)

Smoothie 07-24-2002 08:47 PM

Xenon-

Seems to be working fine. Now, if there would be some way to allow text, and not the img tag, that would be the best.
Like this in the edit user:
Signature text: on
Signature text: off
Signature img code: on
Signature img code: off

Xenon 07-24-2002 08:55 PM

i think it'll be doable, too ;)

add another field to user table called is isallowedimgsig
in your admin/user.php do the same changes as you've done for allow sigs in general, just replace all isallowedsig with isallowedimgsig

then open member.php find:
PHP Code:

// check max images
  
if ($maximages!=0) {
    
$parsedsig=bbcodeparse($signature,0,$allowsmilies);
    if (
countchar($parsedsig,"<img")>$maximages) {
      eval(
"standarderror(\"".gettemplate("error_toomanyimages")."\");");
      exit;
    }
  } 

and replace it with:
PHP Code:

// check max images
  
if ($maximages!=0) {
    
$parsedsig=bbcodeparse($signature,0,$allowsmilies);
    if (
countchar($parsedsig,"<img")>$maximages or (countchar($parsedsig,"<img")>and !$bbuserinfo[isallowedimgsig])) {
      eval(
"standarderror(\"".gettemplate("error_toomanyimages")."\");");
      exit;
    }
  } 

i think it should do all ;)

Boofo 07-24-2002 09:19 PM

If you have this set to no, that would do it, without adding the code above, right?

Quote:

Allow vB IMG code in signatures?

Xenon 07-24-2002 09:28 PM

yes, if this is set to no img use in sigs is generally off ;)

but if you want to allow it to some users you had to set this setting to yes and apply my changes :)

Smoothie 08-06-2002 07:21 AM

Quote:

add another field to user table called is isallowedimgsig
Is this correct?
PHP Code:

ALTER TABLE `userADD `isallowedimgsigSMALLINT(6) DEFAULT '1' NOT NULL


Smoothie 08-06-2002 07:24 AM

Quote:

in your admin/user.php do the same changes as you've done for allow sigs in general, just replace all isallowedsig with isallowedimgsig
is this correct?
PHP Code:

makeinputcode("Can use siganture","isallowedimgsig",$user[isallowedimgsig],0); 


Smoothie 08-06-2002 07:28 AM

I'm not to sure about this part, admin/user.php
PHP Code:

$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupid='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',isallowedsig=$isallowedsig,adminemail=$adminemail,showemail=$showemail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cookieuser=$cookieuser,nosessionhash=$nosessionhash,daysprune='$daysprune',lastvisit=$lastvisit,lastactivity=$lastactivity,lastpost=$lastpost,posts='$posts',timezoneoffset='$timezoneoffset',emailnotification=$emailnotification,receivepm='$receivepm',emailonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid"); 

What do I add?

Xenon 08-06-2002 11:41 AM

yes correct both ;)
PHP Code:

$DB_site->query("UPDATE user SET birthday='$birthday',options='$options',usergroupid='$usergroupid',username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',styleid='$userstyleid',parentemail='".addslashes(htmlspecialchars($parentemail))."',coppauser=$coppauser,homepage='".addslashes(htmlspecialchars($homepage))."',icq='".addslashes(htmlspecialchars($icq))."',aim='".addslashes(htmlspecialchars($aim))."',yahoo='".addslashes(htmlspecialchars($yahoo))."',signature='".addslashes($signature)."',isallowedsig=$isallowedsig,isallowedimgsig=$isallowedimgsig,adminemail=$adminemail,showemail=$showemail,invisible=$invisible,usertitle='".addslashes($usertitle)."',customtitle=$customtitle,joindate=$joindate,cookieuser=$cookieuser,nosessionhash=$nosessionhash,daysprune='$daysprune',lastvisit=$lastvisit,lastactivity=$lastactivity,lastpost=$lastpost,posts='$posts',timezoneoffset='$timezoneoffset',emailnotification=$emailnotification,receivepm='$receivepm',emailonpm='$emailonpm',ipaddress='".addslashes($aipaddress)."',pmpopup=IF(pmpopup=2 AND $pmpopup=1,pmpopup,'$pmpopup') WHERE userid=$userid"); 


Smoothie 08-06-2002 03:37 PM

Xenon-

Many thanks. I will let ya know how it goes!


All times are GMT. The time now is 01:47 AM.

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.01063 seconds
  • Memory Usage 1,773KB
  • 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
  • (6)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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