vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Need to disallow use of SIZE vb code in Singature (https://vborg.vbsupport.ru/showthread.php?t=33304)

VirtueTech 12-18-2001 01:38 AM

Hello,

Can someone please let me know how I can disallow the use of the SIZE vb tags in my forums signatures.

Any information would be helpful.

Thans. :)

-.valkyre 12-18-2001 02:03 AM

I may come across as an idiot here, but..

Remove the [SIZE] vBCode.

Or try this: In individual vbCodes click on edit and click NO on the option part.

VirtueTech 12-18-2001 02:41 AM

Where would I edit ...in what script...to have it say if the SIZE tags option is greater than 2 to make the option equal 2

I just want to eliminate the large fonts and I want to change the current posts on the forums large fonts to size 2.

What script do I edit?

bira 12-18-2001 02:46 AM

I think there are two ways you could do it, VT:

1) to strip it off all signatures, including existing ones, open admin/functions.php and find:

Code:

$post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
Before that add:

Code:

$post[signature] = preg_replace("/(\[)(size)(=)(['\"]?)([0-9]*)(\])(.*)(\[\/size)(\])/siU", "\\7", $post[signature]);

2) to strip it off all newly added or edited sigs, open members.php AND register.php and find in both:

Code:

  $signature=censortext($signature);
Before or after it, add:

Code:

$signature =  preg_replace("/(\[)(size)(=)(['\"]?)([0-9]*)(\])(.*)(\[\/size)(\])/siU", "\\7", $signature);
Cheers,

Bira

VirtueTech 12-18-2001 03:03 AM

How would I set that code so that it allows SIZE=1 but nothing higher than 2

So like:
If SIZE>=2 then SIZE=2

Thanks Bira

bira 12-18-2001 04:16 AM

I'm stuck on that one :)

I thought it would be something like

Code:

$signature = preg_replace("/(\[)(size)(=)(['\"]?)([0-9]*)(\])/siU", "[size=".iif('\\5'==1, 1, 2)."]", $signature);
But the expression '\\5'==1 always returns false, even when it is 1. \\5 is correct. Don't know why it won't work. regexp is so bloody hard. Maybe someone more advanced than me can say what would be the right way.

heidit 02-01-2002 06:11 PM

Erm, I may be completely offbase, and I've never explained a "hack" before (I mostly just read them, then ask my tech people if they can do them) but yesterday I actually changed the sizes in our sigs.

All I did was go into postbit_signature in the postbit templates and replace what was there with this:

<smallfont>__________________<br>
$post[signature]</smallfont>

Did I mess something up? It seems to work nicely - all our sigs are tiny now.


All times are GMT. The time now is 10:04 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.01050 seconds
  • Memory Usage 1,721KB
  • 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
  • (5)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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