Jump to content

Recommended Posts

Hi guys.

I am trying to make a signature system for my custom made forum system. I have been working hard on "my framework" in the past weeks, and now it happens that I am stuck without being able to find a solution.

 

It is a Signature class, but I don't need help with the OOP. I need help thinking in a way and functions that will help me achieve what I want to achieve.

 

<?php

/*-----------------------------------------------------------------------------*/
#                           SCRIPT: Signature Validator                        #
#                           SCRIPT NAME: class.signature.inc.php               #
#                           AUTHOR: Andrés Ibañez | Vermillion.                #
/*-----------------------------------------------------------------------------*/

class Signature{

private $counter; //Keeps track of the "points".
private $signature;

final function __construct($signature){

	$this -> signature = $signature;

}

final function validateImages(){

	#Comming soon.

}

final function validateText(){
}

}


?>

 

This is how I want my signature system to work:

 

It is based in "Points". Each BBCode will add a certain amount of Points and will update the value on the 'counter' member. If the number on Counter is over 300, then the signature is invalid and the user should cut down some of its content.

 

So now that you know how it works, the following BBCode tags will add points:

 

[size=1][/size] = 5 points.

One Linebreak = 10 points.

Div tags = 15 points.

Pictures that are bigger than 400 x 100 = 100 points.

Pictures less then 400 x 100 = 50 points.

 

Also, pictures in the signature shouldn't be bigger than 575 x 125 pixels

 

I really need to get this done, and I can't seem to figure out what to do, so any help will be highly appreciated :)!

Link to comment
https://forums.phpfreaks.com/topic/146472-help-me-make-a-signature-system/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.