iG:Syntax Hiliter plugin installed

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:

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

phpBB Mod: Change Registration Date Denied from MOD-DB

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.

[php]
#
#—–[ 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”;
[/php]

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.

[php]$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).’;[/php]

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

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

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 😛

show_replies_and_views_in_topic_viewtopic

More phpBB mods: Thank Post by User

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

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

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

Another phpBB Mod: Change Your Password Reminder & Change Registration Date

September 5th, 2006

I’ve been trying to think of ideas for another mod to make and came up with this Change Your Password Reminder mod. Basically it reminds the user to change their password every x amount of days that the admin set. So if they changed their password today and the admin has it set for 30 days, then in 30 days it’ll remind them with a little popup to change their password.

If they don’t change their password then they will be re-reminded with the same popup every x hours specified by the admin. It’s good for forums who need users to change their password every month or so for security reasons.

change_your_password_reminder_acp change_your_password_reminder_popup change_your_password_reminder_profile

I also did a little mod to add a editable user registration date in the Administrator Control Panel, so that Admins can change user’s registration dates easily. I’ve submitted this one to the MOD Database and hopefully it gets in. The little mod is called Change Registration Date.

Change_Registration_Date

I’m still waiting for users to test my Mods for bugs so that I can submit to the MOD DB once any bugs are removed.

phpBB Mod: Remove Unactivated Users (Automatically)

August 31st, 2006

I haven’t been doing much on the UzziSoft website, so have looked around and found something new to do; which is to build a phpBB mod called Remove Unactivated Users (Automatically). This mod basically removes unactivated users after a period of time that I specify.

I’ve been working on it quite a bit and lately have added some email functionality which can email you the error log and the deletion log after a number of users get deleted. I would of done it every x days, but then the user would have to run a cron script which wouldn’t suit everyone. After this email functionality, I decided to lay it out as all the official mods which have a lang[] array and the templates file. I thought it would of taken forever and it seemed a little complex but in the end it actually helps my script to be more easiler to read.

I’m not sure what else I should do to this mod other than possibly using a database instead of using a configuration file (but the configuration file is just easier). I do believe that right now it might be accepted in the phpBB Official Mod list. Best to double check all the requirements and to wait a while for some users to test the mod out.

Edit: I just installed the mod on my forum and there goes half of the members 😉

remove_unactivated_users remove_unactivated_users1

Random Sig Script Text Addon

August 16th, 2006

A user has posted on the forum with asking for text to be synced with the images. This text addon only works for users who have their Randomness on Progressive. I’ve implemented this feature and you’ll firstly have to activate it by going into the My Account page and selecting Images with Text as the Picture Display Style.

You then go to the View Pictures page and you’ll see you have text boxes after each image. This is where you type in the text you want with the image and then you press the Update/Delete button.

Your text link will be on the Login Home page which once called on is a transparent image with the text on it. Internet Explorer users may have troubles with the transparency (i.e. it might look to be transparent).

Note: In rare times it’s possible that the wrong text is shown on an image. This is usually because alot of people might be accessing your signature at the same time.