ThreadsDev FusionBB Greeting Cards FusionBBDev.com Measurection.com VertexHost NASCAR Racing MouseFunFacts.com Myrtle Beach Info UBB.Threads Modifications threadsdev.net
FusionBB

Trans-D Tropin
Use Coupon Code '1004' to Save $20 Off Your Initial Order of Trans-D Tropin®
V6 Threads Development >> Modifications

Pages: 1 | 2 | >> (show all)
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Finished-[6.3-6.4] Restrict signatures
      #107486 - 02/09/04 06:55 AM Attachment (127 downloads)

Mod Name / Version: Restrict signatures

Description: This hack allows the administrators to restrict the users' signatures via the admin panel.
Possible restrictions:
- maximum height/width of an image
- number of images
- max. filesize of the images
- max. number of linebreaks

Working Under: UBB.Threads 6.3-6.4

Mod Status: Finished

Any pre-requisites: none

Author(s): Astaran

Date: 02/09/04

Credits: My moderators who requested it

Files Altered: changebasic.php, ubbt.inc.php, config.inc.php

New Files: none

Database Altered: no

Info/Instructions:

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Edited by Astaran (02/11/04 04:15 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Zackary
Code Monkey
*****

Reged: 10/23/02
Posts: 540
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #107498 - 02/09/04 08:56 AM

Awesome! A must have! No more HUUUUGE sig images on my forums. muahaha

Tossing this on my todo list, thanks Astaran!


Post Extras: Print Post   Remind Me!   Notify Moderator  
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Re: Finished-[6.3-6.4] Restrict signatures [Re: Zackary]
      #107504 - 02/09/04 10:08 AM

I forgot the language strings. Just grab the updated instructions.

--------------------
Running a community? -> Keep informed and take it to the next level


Post Extras: Print Post   Remind Me!   Notify Moderator  
DLWebmaestro
Addict
***

Reged: 01/16/03
Posts: 1696
Loc: North Carolina
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #107538 - 02/09/04 05:30 PM

Has this just plain not worked for anyone? I tested it by entered a sig with a bunch of line breaks, but it allows it.

--------------------
ThreadsDev 2003 Member Spotlight Winner

JoshPet was here.

Miserable Failure


Post Extras: Print Post   Remind Me!   Notify Moderator  
JoshPetAdministrator
The artist formerly known as Mr. Bug
****

Reged: 11/29/01
Posts: 11414
Loc: Charlotte, NC
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #107550 - 02/09/04 07:00 PM

Nice!

--------------------
Josh - Joshua PettitWebsite - For Hire Coding work and Modifications

Feel Better, Look younger - www.BuyTransD.com
Use Coupon Code 1004 to Save $20 Off Your Initial Order of Trans-D Tropin


Post Extras: Print Post   Remind Me!   Notify Moderator  
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Re: Finished-[6.3-6.4] Restrict signatures [Re: DLWebmaestro]
      #107625 - 02/10/04 01:47 PM

Quote:

DLWebmaestro said:
Has this just plain not worked for anyone? I tested it by entered a sig with a bunch of line breaks, but it allows it.




You're right. I fixed it and updated the instructions.
Only this row changed:

$sigLines = preg_match_all("/\\n/",$Signature, $outLines);


Post Extras: Print Post   Remind Me!   Notify Moderator  
PhotoPost
Hacker
****

Reged: 02/03/02
Posts: 989
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #107630 - 02/10/04 02:38 PM

Great mod!

Now all I need to do is write a script to check all the existing ones!

--------------------


Viper Alley - http://www.viperalley.com

Extreme Fitness - http://www.extremefitness.com


Post Extras: Print Post   Remind Me!   Notify Moderator  
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Re: Finished-[6.3-6.4] Restrict signatures [Re: PhotoPost]
      #107645 - 02/10/04 04:33 PM

I already did such a script.
It sends out an PM to all users who have a signature that don't fit to the new rules.

--------------------
Running a community? -> Keep informed and take it to the next level


Post Extras: Print Post   Remind Me!   Notify Moderator  
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #107649 - 02/10/04 04:43 PM Attachment (32 downloads)

Attached you'll find a script that checks all signatures if they match to your rules defined in the config file.
If the signature don't fit to the rules, the signature is deleted. Additionally, the user receives an PM with his old signature so that he can changed and reapply it.

Note: Change the Body of the private message and make a Backup of your database first!
Rename the attachement to .php and upload it to you ubbthreads main dir. Delete it after execution.

Edited by Astaran (02/10/04 06:30 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
DLWebmaestro
Addict
***

Reged: 01/16/03
Posts: 1696
Loc: North Carolina
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #107667 - 02/10/04 06:17 PM

It works now! But where is that attached script you were talking about?

--------------------
ThreadsDev 2003 Member Spotlight Winner

JoshPet was here.

Miserable Failure


Post Extras: Print Post   Remind Me!   Notify Moderator  
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Re: Finished-[6.3-6.4] Restrict signatures [Re: DLWebmaestro]
      #107668 - 02/10/04 06:31 PM

Good question.
There it is.

--------------------
Running a community? -> Keep informed and take it to the next level


Post Extras: Print Post   Remind Me!   Notify Moderator  
DLWebmaestro
Addict
***

Reged: 01/16/03
Posts: 1696
Loc: North Carolina
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #107674 - 02/10/04 07:40 PM



--------------------
ThreadsDev 2003 Member Spotlight Winner

JoshPet was here.

Miserable Failure


Post Extras: Print Post   Remind Me!   Notify Moderator  
PhotoPost
Hacker
****

Reged: 02/03/02
Posts: 989
Re: Finished-[6.3-6.4] Restrict signatures [Re: DLWebmaestro]
      #107738 - 02/11/04 03:44 PM

What is $imageSize = remoteFileSize($imageUrl); ?

Also, I'm getting some $imageUrl errors, its creating:

http://http://www.viperalley

--------------------


Viper Alley - http://www.viperalley.com

Extreme Fitness - http://www.extremefitness.com


Post Extras: Print Post   Remind Me!   Notify Moderator  
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Re: Finished-[6.3-6.4] Restrict signatures [Re: PhotoPost]
      #107742 - 02/11/04 04:22 PM

My fault, I didn't add that to the instructions.
Just add this function to your ubbt.inc.php (I updated the instructions to reflect this):

function remoteFileSize($remote_file)
{
$file = file_get_contents($remote_file);

return strlen($file);
}

Quote:


Also, I'm getting some $imageUrl errors, its creating:

http://http://www.viperalley



Mhh, I just use the standard regexp. Maybe the user entered it that way?

--------------------
Running a community? -> Keep informed and take it to the next level


Post Extras: Print Post   Remind Me!   Notify Moderator  
PhotoPost
Hacker
****

Reged: 02/03/02
Posts: 989
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #107750 - 02/11/04 04:41 PM

Keep in mind file_get_contents() only works with PHP 4.3 and later...

--------------------


Viper Alley - http://www.viperalley.com

Extreme Fitness - http://www.extremefitness.com


Post Extras: Print Post   Remind Me!   Notify Moderator  
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Re: Finished-[6.3-6.4] Restrict signatures [Re: PhotoPost]
      #107753 - 02/11/04 04:56 PM

Yes, anyone who is using an older version can use this to make it compatible:

if (!function_exists("file_get_contents")) {
function file_get_contents($filename, $use_include_path = 0) {
$data = FALSE;
$file = fopen($filename, "rb", $use_include_path);
if ($file) {
while (!feof($file)) $data .= fread($file, 1024);
fclose($file);
}
return $data;
}
}

--------------------
Running a community? -> Keep informed and take it to the next level


Post Extras: Print Post   Remind Me!   Notify Moderator  
smoknz28
Enthusiast


Reged: 04/10/03
Posts: 401
Loc: Washington, D.C.
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #108046 - 02/16/04 02:18 AM

Interesting and a well needed mod! However, it's not working on my site after the applied changes.

I've gone in and created some huge signature images and they are still showing after the mod, changing the height and width, and making a new registered member with it.

Here's what I changed the fields to and it's still allowing huge sigs:

$config['sigMaxImages'] = '1';
$config['sigImageHeight'] = '150';
$config['sigImageWidth'] = '400';
$config['sigImageSize'] = '55000';
$config['sigMaxLines'] = '10';

--------------------
F-Body Hideout

Project Speedy


Post Extras: Print Post   Remind Me!   Notify Moderator  
Astaran
Addict
****

Reged: 12/21/00
Posts: 1552
Loc: Germany
Re: Finished-[6.3-6.4] Restrict signatures [Re: smoknz28]
      #108113 - 02/17/04 06:52 AM

Any error messages?
What php version are you using?

--------------------
Running a community? -> Keep informed and take it to the next level


Post Extras: Print Post   Remind Me!   Notify Moderator  
smoknz28
Enthusiast


Reged: 04/10/03
Posts: 401
Loc: Washington, D.C.
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #108552 - 02/23/04 03:51 PM

Quote:

Astaran said:
Any error messages?
What php version are you using?




No, not picking up on visible errors...

I'm running PHP version 4.3.3.

--------------------
F-Body Hideout

Project Speedy


Post Extras: Print Post   Remind Me!   Notify Moderator  
Khârn
Lurker


Reged: 05/04/03
Posts: 9
Loc: Tennessee
Re: Finished-[6.3-6.4] Restrict signatures [Re: Astaran]
      #109033 - 03/01/04 07:27 AM

Hi all,
I'm not too familar with php yet (I'm still stuck in the perl days )but a user reported the following error and it is able to be reproduced by attempting to change the basic profile.
Code:
 
Fatal error: Call to undefined function: remotefilesize() in /home/xganon/www/forums/ubbt.inc.php on line 739


I am using mysql 4.0.16, php 4.1.2, Redhat ES 2.3(or so).
I added the function to the bottom of ubbt.inc.php but stil no go (It was the code for php versions that aren't 4.3)

Any ideas?
Line 739 of that file is:
Code:
 739 $imageSize = remoteFileSize($imageUrl);
740 if ($imageSize > $config['sigImageSize']) {
741 $this -> not_right ($ubbt_lang['SIGMAX_SIZE'],$Cat);



--------------------
Moderator - Infopop Corporation


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1 | 2 | >> (show all)



Extra information
0 registered and 20 anonymous users are browsing this forum.

Moderator:  JoshPet, Gardener, Ian_W, Anno 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 5655

Rate this topic

Jump to
 
Hot Topic
No posts have caught fire as of yet.

Developers for Hire
Are you looking for custom modifications? Upgrades? Installs?
We have developers who can help!
View Our Services Page for information.

Login
Enter your username and password to login. If you do not have a username you can register one HERE.
username:
password:

Send Password
Remember Me

Online
119 guests have been online with in the last 90 minutes.

ThreadsDev.com
Trans-D Tropin

Current Threads
No current threads found...

Modifications
Recently Added:
· View Private Messages v0.9.3
· Stop Guests from seeing "Who's Online." [6.5.5]
· User List Display Limited by Post Count 1.0
· Paginate PMs 1.0
· Today and Yesterday

Most Downloaded:
· Inline Images 3.1
· Quote Username 1.0
· Games Arcade Deluxe v1.8
· UbbThreads and Photopost Total Integration Version 4
· Tool Tip Body Preview 3.0

Highest Rated:
· Mass Threads Move for 6.3
· Update Last Posts 1.0
· Update B_Parent User 1.0
· Integrated Index Page (IIP) 5.3.1
· IIP SideBarPal 1.1

Recent Stylesheets:
· Mix-Colors_2-0_3D for UBBT v6.3 - 6.5
· Mix-Colors_2-0 for UBBT v6.3 - 6.5
· Dark-Grey_3-0 for UBBT v6.3 - 6.5
· Green-Orange_1-0 for UBBT v6.3 - 6.5
· ebay_1-0 for UBBT v6.3 - 6.5

Recent Template Mods:
· Postlist modification - line separates new topics and replies
· I need some help with my postlist.tmpl file
· Edit, reply, and quote buttons mod for Facelift 6.5
· Google Add Sense add on for Threads 6.5
· Article templates for Thread 6.5

Shout Box

Short Stats
New Members:
4 Last 24 hours
20 Last 7 days
107 Last 31 days

Boards:
11676 Total topics
73324 Total replies

Totals:
5728 Members
85000 Posts

Max Online:
814 Total
(06/01/06 09:46 AM)


Web Hosting Provided by
VertexHost Web Hosting

Content ©2003-2006 ThreadsDev.NET
Powered By UBB.threads™ 6.5.5

 .: IIP 5.5 by David Lozier ©2003 :. 
Distributed by ThreadsDev.net

Visit Our Sister Sites!
JoshuaPettit.com and ThreadsAddons.com
Web Hosting Provided by
VertexHost Web Hosting

Generated in 0.542 seconds in which 0.33 seconds were spent on a total of 27 queries. Zlib compression enabled.


Whiplash Claims - Gold Necklace - Whiplash - Jewellery