[2.0.20] Signature Length Based on Rank

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
4
44%
Very Good
5
56%
Good
0
No votes
Fair
0
No votes
Poor
0
No votes
 
Total votes: 9

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28009
Joined: Sat Aug 16, 2003 7:36 am

[2.0.20] Signature Length Based on Rank

Post by Extensions Robot » Mon Jan 24, 2005 12:41 pm

MOD Name: Signature Length Based on Rank
Author: ycl6
MOD Description: Admin can set different signature lengths based on user's rank in ACP.


MOD Version: 1.1.2 (Updated 04/16/06)

Download File: Signature_length_based_on_rank_1.1.2a.zip
mods overview page: View
File Size: 10137 Bytes

Security Score: 0

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Sat Jan 29, 2005 11:59 am

MOD Validated/Released

Notes:
Admin can set signature length based on member ranks in rank panel.

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Thu Feb 17, 2005 4:39 am

I just implemented this mod and set fairly low signature lengths for beginning members but set a signature length of 400 characters for a Moderator and 512 for Forum Admins

I am the Site/Forum Admin and when I go into my profile and click submit I get an error message that my signature is too long! :?

I have checked the database and all the values there are correct. The values in the ACP are also correct.

I downloaded the 5 modified files to my local system and rechecked the mod and all changes have been made as the text file required. In fact, I used Easy Mod to install it, so would be surprised if it weren't.

Anyone have any possible answers to a possible solution?

[Added]
I created a new user with no priviledges and made a few posts. Right now, the default Sig length has been set to 65 characters. A new member with less than 10 posts should have a sig length of 20 characters.

My new user with 3 posts is able to get a sig length of 65. 8O

Also, when I first tried to edit my new users sig I got an error message that pointed to line 266 in includes/usercp_register.php every time I tried to open the profile page.

I was able to fix it by going into the user as Forum Admin and adding a 10 character sig. After that my new user was able to modify and even completely delete his sig.

[Added2]
I have now reset the default length to 256 so my users sigs will work. No values in the rank table were set to zero, so they all should have been defined. :(

Could it have something to do with the fact that the special ranks are checked after the normal ranks?
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

bebe2803
Registered User
Posts: 49
Joined: Tue Jan 25, 2005 7:16 am
Location: Hong Kong

Post by bebe2803 » Fri Feb 18, 2005 11:53 am

I dont have that problem when i have installed that mod... but when i want to make a new rank in ACP, i got this error message :

--------
Couldn't update/insert into ranks table

DEBUG MODE

SQL Error : 1136 Column count doesn't match value count at row 1

INSERT INTO phpbb_ranks (rank_title, rank_special, rank_min, rank_image) VALUES ('版面管理員', 1, -1, 2000, '')

Line : 198
File : E:\Apache2\htdocs\site\admin\admin_ranks.php
----------

I can edit rank without problem, but cannot create a new one. After that i guess where is the problem... that is ok in view profile, edit rank, view rank in ACP, after that i guess the problem should be in that line...

the lines edited (after installed the mod)

Code: Select all

$sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image)
VALUES ('" . str_replace("\'", "''", $rank_title) . "', $special_rank, $min_posts, $sig_length, '" . str_replace("\'", "''", $rank_image) . "')";
should be changed like this

Code: Select all

$sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_sig_length, rank_image)
VALUES ('" . str_replace("\'", "''", $rank_title) . "', $special_rank, $min_posts, $sig_length, '" . str_replace("\'", "''", $rank_image) . "')";
(i have add those line in the mod install instrution, if anyone need it, i will post it)


P.S. someone may find that how can i enter "2000" in sig length because it is 3 smallint only; i have changed SQL and ranks_edit_body 3 to 4 to do this (note that it is not the problem that cause that error)

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Fri Feb 18, 2005 2:51 pm

Thanks to both of you, I'll submit a new version for validation.

~Mac

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Mon Feb 21, 2005 8:03 pm

If you need a beta tester, I would be willing. After all, I already have the base mod installed ... :wink:
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Thu Mar 03, 2005 3:15 pm

MOD Updated to version 1.0.3
See first post for Download Link

bebe2803
Registered User
Posts: 49
Joined: Tue Jan 25, 2005 7:16 am
Location: Hong Kong

Post by bebe2803 » Thu Mar 03, 2005 3:35 pm

er.... dont have upgrade txt.... can any suggest should i uninstall the mod and install it again, or find the diff between that 2 version ?


edit : i am just too stupid, just find that i am report an error before... is that the new version is an error fix ?


edit2 : I have just upgrade to 103 by remove 102 changes in all file (except the template one) and there is no problem... (the mod works fine now) i just find that i have miss many row that should be added in 102.. i really don't know why the mod did work before.... seem that i should not install mod without using easymod...
怨念公社 (trad. chinese big5 forum)

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Fri Mar 04, 2005 12:18 pm

Thanks for letting me it works :o
If you found anymore bugs, do that me know.

~Mac

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Wed Mar 09, 2005 8:41 pm

I just updated from 1.0.2 to 1.0.3 by applying the differences to the (I think) one file that showed any changes. It seems to be working fine now.

Will keep an eye on things to let you know how well it's working. :)
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Thu Mar 10, 2005 11:50 am

OK, I have found another problem with your mod. :(

Not too big a problem but something that I hope you can fix.

The signature limits set in the rank list all seem to apply when a user changes his own profile. When I edit my own profile I have no problems. My profile is about 309 characters and my rank allows for 512, so I have room to spare.

The problem comes in when the Admin uses the ACP User Admin Management to change a users signature. When I go into the ACP, select my own information, and immediately click on Submit I get the error"
Your signature is too long by %s character(s).


At least it should allow the number of characters as defined in the rank table. At best, I would want any sig length limitation to be totally ignored since I'm using the ACP to change it ... :?
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Thu Mar 10, 2005 2:34 pm

Yes, you are right. I should make the same changes to admin_users.php to make this MOD complete.

~Mac

PhilC
Registered User
Posts: 64
Joined: Wed Jun 05, 2002 1:31 am

Post by PhilC » Thu May 19, 2005 1:03 pm

I've just installed this mod (1.0.3) and I'm having problems - it's not working. I've upgraded to phpbb 2.0.15.

I can set the number of characters for different user levels, but they aren't applied. I've tried all sorts of tests but I can't get the sig length to be applied to different levels.

For instance, right now I have the default (general configuration) set at 255 chars, admin and mods sig length set at 0 (= default), Full Member level set at 255 (could be set to 0), and Member's length set at 10. The minimum posts for a Member is 0, and for a Full Member it's 100.

With that setup a new user can have a sig length of the default 255. I've tried setting the min posts to 1, and the sig length to 1, and even the default to 0 and other low numbers, but whatever configuration I try, only the default length is applied nomatter what level is writing a signature.

All I really want to do is disallow signature links to people who haven't made enough posts. I'm surprised there isn't a mod for, but I couldn't find one, and I thought that this mod would do it. I really want a sig length of 0 for people who haven't made the required minimum number of posts, but I think the lowest I can have it is 1, which will do - if I can get it working.

I've re-checked all the file edits (6 files), the database content is fine, and I'm basically stuck. Any ideas?

Btw, there are 2 spelling mistakes in the lang_admin.php bits:-
$lang['Rank_sig_length_explain'] = 'Specify the maximum signiture legnth this rank is allowed. If set to <b>0</b>, this rank will use the value specified in <b>General Admin -> Configuration</b>';

added:
Cancel all that. I managed it by setting the default to 0 chars, and explicitly setting the lengths for the admins and other levels. That's probably the only configuration that I hadn't tried :(

The mod's text file could do with that kind of instruction - or did I miss it?

PhilC
Registered User
Posts: 64
Joined: Wed Jun 05, 2002 1:31 am

Post by PhilC » Thu May 19, 2005 1:32 pm

Just one problem though:-

I have the low level Member set at 10 chars length (to allow a name but not long enough for a link), and the default set at 0 chars. If the low level writes a sig that's too long, the error message says it's too long by the full length of the new sig instead of by the actual number of chars.

E.g. With a limit of 10 chars, I (as a low level) wrote a 15 char sig line, and I got the message that it is 15 chars too long, but it was only 5 chars too long. A sig line within the 10 char limit was accepted.

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Post by PCTalk » Thu May 19, 2005 4:29 pm

PhilC wrote: ... With a limit of 10 chars, I (as a low level) wrote a 15 char sig line, and I got the message that it is 15 chars too long, but it was only 5 chars too long. A sig line within the 10 char limit was accepted.

I have seen that also but just wanted it to work. I wasn't too concerned with an inaccurate error message at the time. If you are going to fix the admin_users it would be nice if the error message could also be fixed. :wink:
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

Post Reply

Return to “[2.0.x] MOD Database Releases”