vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Signature Guardian Version 1 (Beta Released) (https://vborg.vbsupport.ru/showthread.php?t=79566)

Scerina 04-10-2005 07:07 PM

Can someone help me out here? How do you add an Real PHP Cron Job? This paragraph confused me...

Next set the values for your database at the top
of the script you are using then place it in the
path that you want it to be called from. Then do
a system call to add the task to your cron.


someone care to explain?

Scerina 04-10-2005 07:36 PM

i cant see anything on admincp admin signature guardian section

Scerina 04-10-2005 07:44 PM

i need help on my lang mysql query part
i just messed up on it...

Scerina 04-10-2005 08:24 PM

i fix the last co uple of issues but the cron job wordin in admin cp...i cant view it...i only see the path to my monitor.php and other stuff but no descriptions

MPDev 04-11-2005 12:48 PM

Quote:

Originally Posted by Trigunflame
Lol, ive got about this same script in a 10 or so line cron script. Would basically be the same thing if I added variables for its configuration in the admin control panel..

Wow, you did all this in 10 lines of code? That's simply amazing! You must be an ubber-coder to get that much functionality out of 10 lines of code. No, really, you must post these 10 lines of code which duplicate all the functionality of this script so that us mere mortals can learn from someone with such mastery of scripting.

Sure my Dodge Viper has four wheels and a motor, but that doesn't mean its the same thing as your Geo Traacker.

Marco van Herwaarden 04-11-2005 12:56 PM

Lol he didn't mention how long these lines are, not the fact it will only work on MySQL7.3Beta4/PHP9.0.1

But serious. If you take out all the settings and just focus on some fixed limitations, i guess you could code it in a few lines cronjob.

Trigunflame 04-11-2005 01:20 PM

I format my code as to be easily readible ie (function and brackets on seperate lines), plus the comments...

However if you inline the code and IF() calls, remove comments, and disregard the variables/replace text.. the core script works out to about 9-10 lines.

The starting PHP, and ending PHP are just routine cron sanity check, and then logging if enabled... in cronjob setting.

PHP Code:

<?php

error_reporting
(E_ALL & ~E_NOTICE);
if (!
is_object($DB_site)) { exit; }

// Max Sigs
$maxSigs 3;
$maxSpoilers 2;
$maxQuotes 1;

// Message To Display
$message "Your signature has been removed due to signature violation. 
    Signatures are limited to a maximum of 
$maxSigs images, a maximum 
    of 
$maxSpoilers spoilers, and a maximum of $maxQuotes quote tags.
    Please remake your signature with the limit in mind. 
    Note: This has been done via auto Signature Removal.
"
;

// Signature Query
$signatures $DB_site->query("SELECT userid, signature FROM usertextfield WHERE signature <> ''");

// Loop Signatures
$total 0;
while (
$signature $DB_site->fetch_array($signatures))
{
    
$sig strtolower($signature['signature']);
    if (    
        
substr_count($sig,'[img') > $maxSigs OR
        
substr_count($sig,'[spoiler') > $maxSpoilers OR
        
substr_count($sig,'[quote') > $maxQuotes
    
)
    {
        
$total++;
        
$DB_site->query(
            
"UPDATE " TABLE_PREFIX "usertextfield " 
            
"SET signature = '" $message "' " 
            
"WHERE userid = '"$signature['userid']. "'"
        
);
    }
}

// Finished
if ($total)
{
    
log_cron_action("[#$total] Signatures with violations have been removed."$nextitem);
}
else
{
    
log_cron_action('No Signatures found in violation.'$nextitem);
}

?>

PS. I never said it "had" all the functionality of the Thread Authors script..
I just said I wouldn't install an entirely new hack over my simple crontab I have now..

MPDev 04-11-2005 01:30 PM

Wow, this script really does do everything the mod posted does - and more! I'm impressed. Take out the configuration items, the comments and the line breaks and you really did it in 10 lines. A work of art. Feature for feature your script kicks this mod's butt in simplicity and ease of implentation. Thank you for sharing this genius piece of work.

Quote:

PS. I never said it "had" all the functionality of the Thread Authors script..
I just said I wouldn't install an entirely new hack over my simple crontab I have now..
No, that's not what you said. You said, "Lol, ive got about this same script in a 10 or so line cron script. Would basically be the same thing if I added variables for its configuration in the admin control panel.."

Even going to the effort of "laughing out loud" before you made your claim of writing this script in "10 lines or so" and that it would "basically be the same thing".

Marco van Herwaarden 04-11-2005 01:39 PM

Well your code is not configurable per usergroup/user.
Your code does not control who can SEE signatures.
It don't work real time.
No 'Soft' remove
No moderating of Sig's
No statistics
No Limitation in number of lines
No group control over smily usage
No control over number of smilies
No control over which BB-codes are allowed
.......

Could go on for more then 10 lines like this ;)

Seems i need more then 10 lines to describe what your code is missing.

PS Not trying to burn you down now, but you really did ask for a reaction like this.

why-not 04-11-2005 03:13 PM

This post was not meant as a reply to or centered at MarcoH64 I apologize if that is how it sounded, it is a reply to the person who keeps making accounts on my demo forum just to PM me really dumb, rude comments!


One of them PMS
Code:

PM SENT:

You know your mod really sucks and should not be allowed to be posted at
vb...org. You copied the guy that made this mod for phpBB and did not give
him any credit. Plus your mod don't work at ell!



If you think I copied anyones mod please show where my code is like person you said I copied. You will not find it, because I did not copy anyone's code!


I will answer each of your comments any ways!

Your code does not control who can SEE signatures.

Yes it does, I think your confused!

Go here without being logged in, you can not see any signatures! (configured per group)

http://forum.ya-right.com/index.php?


No Limitation in number of lines

http://24.91.149.80/sig/lines.png

The following (2) are the same (per group)

No group control over smily usage

No control over number of smilies

http://24.91.149.80/sig/smilies.png

No control over which BB-codes are allowed

http://24.91.149.80/sig/bbcode.png


The following is part of the Admin Panel that has not been released with the Beta version...

This includes...

Mod and Admin forum controls (validate signatures when browsing the forum)

Statistics (part of the Admin Panel, update (2) soon to be released!)

Signature Admin Panel

Stats...

total images, total unique links in signatures, search signatures by.. (size, image size, text size)

Admin Configuration!

Cron control
Set Ban Limits
Set Ban Duration
Set Configuration of....

Bad word filter... (user db, or file system to maintain lists)
Domain blocking... (user db, or file system to maintain lists)


Sonia


All times are GMT. The time now is 01:06 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.01107 seconds
  • Memory Usage 1,764KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (2)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