vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Better signature limiting options (https://vborg.vbsupport.ru/showthread.php?t=61239)

Spinball 03-16-2005 02:46 PM

Sounds like you've put a lot of thought into it and I hope the vB team take it onboard in the official software.
I'll certainly be installing this hack when it is done.
By the way, we don't allow images in signatures because it's such a frivolous waste of (our) bandwidth. I wouldn't advise anyone allow sig images to be honest.

RCA 03-16-2005 03:55 PM

Looks veryy good. This will be a MUST have for any vB board.

msimplay 03-17-2005 04:16 PM

I'm waiting for this mod so i don't have problems with signaturesagain, one of my new members was just argueing with me about suspendinghis signature

apnet 03-20-2005 03:05 PM

Sounds great, any idea of release date?

why-not 03-21-2005 03:12 PM

Just a update!

This will be release in just a few more days!

I was going to release it earlier, but few people want to work with groups and others want it to be just user based so I have to rewrite that part of the code over again!


I also am making changes to the "FIRST RUN" system so that everything in a signature will be tested but the "REMOTE IMAGES", if there are remote images and the rest of the signature passed the test then the signature will be allowed to be shown, but that signature will be added to the cron cache so only the images can be checked later in the "FIRST RUN CRON GROUPING" so as to keep server resources down during the first run!

Some other notes!

Added custom bbcode support! (you can them in the admin panel signature group permissions)


Someone asked me for an example off the bbcode handler, so I wrote this really quick as an example!

Before the code let me explain it!

The signature system uses a switch to turn it's self on or off, When off the original vBulletin handler is used. When the signature control is on it will fully overide the vBulletin handler!

When the signature control runs, it creates a error handler! The error handler, validates each part of the signature, it adds each error to it's value so when a signature is processed it will report every error it has found. This is so we don't get into a never ending loop of users having keep updating their signature to find they made another mistake!

The error handler, will give complete detailed information about the errors it has found! the example script below creates a error array...

PHP Code:

Array
(
    [
'php'] => 1
    
['code'] => 1
    
['url'] => 1
    
['b'] => 6


This is passed to the error handler that convert the errors to a nice found error output!

example...

Code:

['php'] => 1
output!

The signature contained 'PHP' bbcode which is not allowed in your signature!

Code:

['code'] => 1
output!

The signature contained 'CODE' bbcode which is not allowed in your signature!

Code:

['url'] => 1
output!

The signature contained 'URL' bbcode which is not allowed in your signature!


The last error is different, 'Bold' tags are allowed but the 'MAXIMUM' reuse bbcode allowed for a single bbcode tag is '2'! So the main error = 2 + (the total number of times the tag was found which = 4), meaning they went over the limit by (2)

Code:

['b'] => 6
The signature contained an allowed bbcode 'B' but it's usage is over the maximum allowed of (2)!

Error Notes:

Please see the detailed help related to the signatures rules !!LINK HERE!!

// end error output

Now code notes! I could use substr_count(), but holding (2) signatures and doing other str_ type functions is not worth it, because the overhead is greater in this case than using Perl Regex Power, plus I have some idea's in my head that will use the output from the preg_ functions to extend this even more (later that is!!)

Anyway here is the example script you can download! (my laptop)

Code:

http://24.91.149.80/test.php.txt

Any other question just ask!

Sonia

trulylowcarb 03-22-2005 05:18 AM

Can't wait for this hack, BLESS YOU for making it!

why-not 03-23-2005 05:45 PM

1 Attachment(s)
Last update

This will be the last update here, as I will be posting this into the beta forum late tomorrow night! At that time a demo will be up that you can try! Also the beta version will be there so you can test it on your forum!

I have included a image of the final Permissions Panel and Manager Panel.

The manager panel will allow you to access the edit / set permissions panel, view signatures by group panel and access the admin panel to setup or edit monitors! The beta version will not include a few admin related things that the final version will have! I will explain that when I post this tomorrow! The beta version will have the complete final permissions working 100%. I have tested this on many flavors of Unix/Linux/Mac and Windows, so everything works the same way without any trouble (ERRORS)!

I will include a limited help file for the beta version so you understand each permission, because there are over 50 options just in the permissions panel. The Image monitor will need PHP 4.0.5 or higher with the ability to set 'allow_url_fopen' in your PHP.ini file. If your on a host that has safe_mode running or can not access this setting then 'Image Size Permissions' will be disabled! There is nothing I can do to change this, as it is host and server permission related!

After I post this I will not be able to answer any questions for 1 or 2 days as I have another mod to release and 1 other to update! After that I will spend my time getting this ready for it's full release!

C, ya...

Sonia

why-not 03-26-2005 01:36 AM

1 Attachment(s)
Hi All

I keep adding stuff that makes it take longer to release this! I think I will stop that now! A few have emailed me asking when will it be done! Well, it is almost done. The only thing I need to do is finishes the phrases (100 to go!)! I hate that part because I never know what to write and it's boring! Give me notepad and some code to write and I am happy :ermm: !

I have some questions if people want to answer them! If you do it will help me figure what way of doing things will people like best! Anyway here are my questions!

The database layout!

The signature control adds (2) tables...

1. table (signature)

This holds each groups settings...

groupid = group the configuration belongs to
permissions = the form data for the admin panel
editor = the compiled permissions used for editing signatures
admin = the configurations (cron, monitor, mass manage users)
run = the signal that tells the cron to run
cron = a time field to track the next run time
users = holds the list of users being processed by the cron task manager
warn = holds a list of users that have more than once violated the sig perms...

2. table ( monitor )

this table keeps a list of users by userid and all the image urls that are in each users signature!

usergroupid = the user is a member of this group
userid = the id of the user
images = a serialized array of images that are in this users signature, including (date, size, type, last time checked)

We use this table for the monitor, so we don't have to do any script processing on a signature to validate images that are contained in a users signature that has already been validated! This table is updated every time the user updates their signature, if it has images the user is added to the monitor table, if they don't have images in their signature they are not added to the monitor!

The reason for adding the first (1) table, is that forum permissions are global, so adding big array that the signature control uses to the global permissions would be a waste because the only time the signature control permissions are needed is during a edit of a signature!

Having said that!

My question!

1. I can remove the first table and just add the permissions to the usergroup table, removing the one extra query that is needed when a editing request is made. But like I said the array is carried around the forum taking up memory!

2. I can leave it just the way it is, and just live with one extra query for a signature edit! But be happy because memory of a big array would not be wasted!

So what do you think, (1) or (2)

Before I go, here are two screens standard editor, advanced editor with the signature control reporting the errors it has found!

I will be taking requests in a few days for people wanting to test it on their forums, I will also put a demo up so others can try it!

One thing I will say, some of your members will not like that you add this to your forums, because they can not get by this control no matter what they do! Let me tell you some will get very mean, I am telling you this from experience!

C, ya...

Sonia

deb0 03-26-2005 01:39 AM

Dude, I wanna thank you in advance for putting alot of effort into something that should be included with VB. You are the man! (raising brew to toast)

Spinball 03-26-2005 08:13 AM

Quote:

Originally Posted by why-not
So what do you think, (1) or (2)

Definitely (2) because signatures are edited relatively rarely so who cares if there is an extra query? Whereas storing the entire stuff globally 100% of the time is going to impact performance all of the time, isn't it?
So (2) would be my preference.


All times are GMT. The time now is 03:36 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.01148 seconds
  • Memory Usage 1,760KB
  • 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)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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