Archive for September, 2006

phpBB Mod: Deny Posting Specific Text and BBcode Until x Posts

Tuesday, September 26th, 2006

Deny Posting Specific Text and BBcode Until x Posts allows you to specify certain text that users below the post restriction can’t post and disallow users below the post restriction to use BBcode, You are also able to change the post restriction limit. It’s a simple way to stop spammers who say post URLs in their first post.

phpBB Mod: Viewtopic Absolute Post

Friday, September 22nd, 2006

Viewtopic Absolute Post allows users to only view the post they want to see without having any other posts in that thread being displayed. It has the link in the mini post icon (so now there are two mini post icons).

There is a very similar Mod in the MOD-DB: View Single Post

phpBB Mod: Remove Banned Users From Memberlist

Tuesday, September 19th, 2006

Remove Banned Users From Memberlist was a mod request which removes banned users from being displayed on the memberslist. If you have other mods installed on memberlist.php try using v1.0.1. It has been submitted to the MOD-DB.

iG:Syntax Hiliter plugin installed

Friday, September 15th, 2006

It took me forever to find a good syntax highlighter plugin for this WP blog but at last I’ve found a good one: http://blog.igeek.info/still-fresh/category/wp-plugins/igsyntax-hiliter/

If your having problems with the width, change the width in this line in ig_syntax_hilite/css/syntax_hilite_css.css:

/* change this line to set the width of code box */
.syntax_hilite { width:500px; }

phpBB Mod: Change Registration Date Denied from MOD-DB

Friday, September 15th, 2006

I’ve just gotten a PM from the MOD Database Manager (phpBB MOD Team) that my v1.0.0 of Change Registration was denied. Below are the reasons why it was denied with my responses to them.

#
#-----[ FIND ]------------------------------------------
#

$sql =  "UPDATE " . USERS_TABLE . "
SET " .  $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email)  . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" .  str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''",  $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "',  user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" .  str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim  = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'",  "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "',  user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid',  user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar =  $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline =  $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm,  user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" .  str_replace("\'", "''", $user_lang) . "', user_style = $user_style,  user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''",  $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" .  $avatar_sql . "
WHERE user_id =  $user_id";

#
#-----[ REPLACE WITH  ]------------------------------------------
#

$sql = "UPDATE " .  USERS_TABLE . "
SET " . $username_sql .  $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq  = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'",  "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "',  user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" .  str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'",  "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" .  str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''",  $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig  = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile =  $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar =  $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline =  $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm,  user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" .  str_replace("\'", "''", $user_lang) . "', user_style = $user_style,  user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''",  $user_dateformat) . "', user_active = $user_status, user_regdate = '" .  str_replace("\'", "''", $regdate_unix) . "', user_rank = $user_rank" .  $avatar_sql . "
WHERE user_id = $user_id";

That’s a frequently updated line. IN-LINE actions and a partial match should be used, instead, to account for this fact.

I should of resubmitted this Mod once I found out the INLINE command that could be used with EasyMOD.

Also, why not use sometihng like $board_config['default_dateformat']?

I could use that but then how to recongise each different pattern and correctly parse it. Say I had 09 September 2006 11:44 am, and then I changed the default_dateformat to something like September 09 2006 11:44 am. How would it know which part is which?

Since they can change the default_dateformat they could use all different kinds of combinations as well as not having the date or time in the format as well and then this mod wouldn’t work. I could use drop down boxes, etc, but this was meant to be a simple mod so I left it how it was.

$lang['Regdate_wrong_date_format'] = 'Registration Date format is incorrect. The  correct format is DD/MM/YYYY HH:MM:SS (in 24 hr time format).';

That’s not the correct format. The correct format is DD-MM-YYYY HH:MM:SS. Note the -’s instead of the \.

Simple mistake which is now corrected.

Additionally, mentioning this format in the ACP, even before the error is triggered, just as how ‘New Password’ mentions stuff, seems like a good idea.

Not a bad idea so I did it.

I’ve now updated it to v1.0.1 and resubmitted the Mod which will hopefully be accepted into the MOD-DB.

phpBB Mod: View Previous and Next PM

Thursday, September 14th, 2006

Another little mod I’ve made today from a request which I call View Previous and Next PM. It shows “View Previous PM” and “View Next PM” in Private Messaging like phpBB does when viewing a topic.

view_previous_and_next_pm_privmsg

phpBB Mod: Show Replies and Views in Topic

Thursday, September 14th, 2006

I made a little mod called Show Replies and Views in Topic which does what it says, it shows the replies and views of the topic that you are viewing in the topic. I thought of this as I was looking at my other mods on phpbb.com and had to keep going through all the development pages to find out how many people have viewed my topics. Now if only phpbb.com would apply this mod to their forum :P

show_replies_and_views_in_topic_viewtopic

More phpBB mods: Thank Post by User

Monday, September 11th, 2006

Thank Post by User was a request which allows registered users to thank a post which was posted by another user. This mod took me a while longer than the rest to do and I’m glad I did it. Although the thanks button could be done better instead of me copying and pasting the letters from all the other subSilver icons ;)

- Able to thank users for specific posts
- View posts to see the users who have thanked them
- View a topic and see the number of times you have been thanked and the number of times you have thanked other users posts

thank_post_by_user_viewtopic thank_post_by_user_popup

Graduated from University

Sunday, September 10th, 2006

At last, I’ve graduated from my university. I now have a Bachelor in Information Technology majoring in Software Engineering. Hurray! :) . The ceremony was on the 8th of September and lasted 2 hrs.

Yet another phpBB Mod: Last Post by User in Profile

Sunday, September 10th, 2006

Last Post by User in Profile is a simple mod which just shows in the each user’s profile the thread they last posted in and the time they posted.

Last Post by User in Profile