[RC2]Recent Posts Mod for PHPBB3(0.1.2)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
User avatar
longsi
Registered User
Posts: 14
Joined: Wed Oct 17, 2007 3:44 am
Location: Beijing, China
Contact:

[RC2]Recent Posts Mod for PHPBB3(0.1.2)

Post by longsi »

MOD Title: Recent Posts Mod for PHPBB3
MOD Description: display recent records of the forum. Support recent posts or recent topics. It's very easy to install, you only need to copy some files and modify 2 lines of sources code. We test it with RC7, RC8 and 3.0.0, upgrade function can handle this mod automatically. Please read install.txt first.
MOD Version: 0.1.2

MOD Download: http://forum.chinaorbit.com/download/file.php?id=18 or http://community.orcworks.com/blog/download/4/
Demo Board: http://forum.chinaseite.de/ http://forum.chinaorbit.com/

Configuration:
  • title:The title for the block, please remember to change it when you change the language.
  • type: set to "post" to get recent posts, and "topic" to get recent topics
  • limit: how many records to display
  • text_length: the display length of post text
  • text_postfix: show this postfix when post text is longer than "text_length"
  • show_topic_icon: whether show topic icon or not
  • special_forums: only get topics/posts from special forums. read the manual for more detail.
  • except_forums: same structure like special_forums, list the ids you don't want to show in recent records
update
0.1.2:
  • add template prosilver
  • small bug fix
0.1.1:
  • rewrite some of the code to fit the standard PHPBB coding style.
  • change config variables from private to public
  • add smile icon and BBcode support
Last edited by longsi on Fri Dec 21, 2007 11:30 am, edited 4 times in total.
Complete, professional computer and network services, ORCWorks bring to you!
visit http://www.orcworks.com/ for details
Blog: http://community.orcworks.com/blog/
User avatar
Highway of Life
Former Team Member
Posts: 6048
Joined: Wed Feb 02, 2005 5:41 pm
Location: Seattle, WA
Name: David Lewis
Contact:

Re: [Beta]Recent Posts Mod for PHPBB3(0.1.0)

Post by Highway of Life »

Just glanced at the code... certainly unique way of doing that. Nice. :)

Remember to stick to the coding gudelines though, much of the code doesn’t comply with phpBB3 Coding Standards, here is a simple example:

Code: Select all

if ($this->_forum_id != 0) {
            // get all sub-forum ids
            $subIDs = $this->_getSubForumIDs($this->_forum_id, 1);
        } else {
            if ($this->_special_forums != "") {
                $subIDs = explode(",", $this->_special_forums);
            } else {
                $subIDs = $this->_getAllForumsIDs();
            }
        } 
Remember that brackets go on their own lines, don’t use double quotes unless you need to parse variables within the quoted text or need a newline printed, and don’t use camelCase, lower_case_with_underscores should be used for all function and variable names.

Overall, nice job. :)
The phpBB Weekly Podcast - Discussing the developments of phpBB4 and beyond.

New to phpBB3? Want to learn about programing?
Visit phpBB Academy at StarTrekGuide to learn how.
TimeZone
Registered User
Posts: 52
Joined: Mon Jul 23, 2007 8:35 pm

Re: [Beta]Recent Posts Mod for PHPBB3(0.1.0)

Post by TimeZone »

Sorry for my comments but I was watching this mod and it is very complicated, my mod does the same and only needs to be altered 4 lines. And use code standard phpbb3.

My mod is here:
http://www.phpbb.com/community/viewtopi ... 0&t=628205

TZ!
User avatar
longsi
Registered User
Posts: 14
Joined: Wed Oct 17, 2007 3:44 am
Location: Beijing, China
Contact:

Re: [Beta]Recent Posts Mod for PHPBB3(0.1.0)

Post by longsi »

Highway of Life wrote:Just glanced at the code... certainly unique way of doing that. Nice. :)

Remember to stick to the coding gudelines though, much of the code doesn’t comply with phpBB3 Coding Standards, here is a simple example:

Code: Select all

if ($this->_forum_id != 0) {
            // get all sub-forum ids
            $subIDs = $this->_getSubForumIDs($this->_forum_id, 1);
        } else {
            if ($this->_special_forums != "") {
                $subIDs = explode(",", $this->_special_forums);
            } else {
                $subIDs = $this->_getAllForumsIDs();
            }
        } 
Remember that brackets go on their own lines, don’t use double quotes unless you need to parse variables within the quoted text or need a newline printed, and don’t use camelCase, lower_case_with_underscores should be used for all function and variable names.

Overall, nice job. :)
Thanks for your advice. I'll modify the code to fit the phpbb coding standard and release a RC version tomorrow.
Complete, professional computer and network services, ORCWorks bring to you!
visit http://www.orcworks.com/ for details
Blog: http://community.orcworks.com/blog/
User avatar
longsi
Registered User
Posts: 14
Joined: Wed Oct 17, 2007 3:44 am
Location: Beijing, China
Contact:

Re: [RC1]Recent Posts Mod for PHPBB3(0.1.1)

Post by longsi »

version RC1 for this Mod is available. Thank you all.
Complete, professional computer and network services, ORCWorks bring to you!
visit http://www.orcworks.com/ for details
Blog: http://community.orcworks.com/blog/
ade_dnb
Registered User
Posts: 5
Joined: Fri Nov 30, 2007 1:38 pm

Re: [RC1]Recent Posts Mod for PHPBB3(0.1.1)

Post by ade_dnb »

longsi wrote:version RC1 for this Mod is available. Thank you all.
Wow that was quick. Im going to test this out then give you my views.

[edit] Installed it but am now geting an error.

Code: Select all

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY t.topic_time desc LIMIT 8' at line 1 [1064]
This only happens when all forums are hidden from guests, bots, and registered members. If you allow them to see but not view then it displays.

Even tho it does display, the style doesn't display correctly.
Image

Im testing on GOLD but I think the style was made for a previous version and not yet updated.
User avatar
longsi
Registered User
Posts: 14
Joined: Wed Oct 17, 2007 3:44 am
Location: Beijing, China
Contact:

Re: [RC1]Recent Posts Mod for PHPBB3(0.1.1)

Post by longsi »

ade_dnb wrote:
longsi wrote:version RC1 for this Mod is available. Thank you all.
Wow that was quick. Im going to test this out then give you my views.

[edit] Installed it but am now geting an error.

Code: Select all

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY t.topic_time desc LIMIT 8' at line 1 [1064]
This only happens when all forums are hidden from guests, bots, and registered members. If you allow them to see but not view then it displays.

Even tho it does display, the style doesn't display correctly.
Image

Im testing on GOLD but I think the style was made for a previous version and not yet updated.
Thanks very much.
This problem will happen when $this->special_forums is empty. I'll fix it ASAP.
and for the style, we're using subsilver2, so this template file is based on subsilver2. You can modify recent.html yourself, it should be very easy if you have some knowledge with PHPBB3 template system.
Or just tell me which template you're using and if I get free time I can help you modify this template.
Complete, professional computer and network services, ORCWorks bring to you!
visit http://www.orcworks.com/ for details
Blog: http://community.orcworks.com/blog/
HarryMuc
Registered User
Posts: 3
Joined: Sun Jan 21, 2007 11:06 am

Re: [RC1]Recent Posts Mod for PHPBB3(0.1.1)

Post by HarryMuc »

Hello,

also from my side: it would be grade if this mod would be available for style "prosilver" as well :)

Harry
HarryMuc
Registered User
Posts: 3
Joined: Sun Jan 21, 2007 11:06 am

Re: [RC1]Recent Posts Mod for PHPBB3(0.1.1)

Post by HarryMuc »

Hi,

now I've pachted the MOD for the prosilver style, but I've regonized that one feature is missing in this MOD:

Form icons are always displayed as already read. Are there plans to implement this in the future?

Harry
PaDoX
Registered User
Posts: 18
Joined: Thu Jul 12, 2007 11:39 am

Re: [RC1]Recent Posts Mod for PHPBB3(0.1.1)

Post by PaDoX »

Code: Select all

[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
User avatar
longsi
Registered User
Posts: 14
Joined: Wed Oct 17, 2007 3:44 am
Location: Beijing, China
Contact:

Re: [RC1]Recent Posts Mod for PHPBB3(0.1.1)

Post by longsi »

PaDoX wrote:

Code: Select all

[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
[phpBB Debug] PHP Notice: in file /recent.php on line 184: Undefined index: bbcode_bitfield
You can try the lastest one :)
RC2 is available now, thanks all.
User avatar
mericsson
Registered User
Posts: 40
Joined: Tue Jul 31, 2007 7:11 am
Location: Malmö, Sweden

Re: [RC2]Recent Posts Mod for PHPBB3(0.1.2)

Post by mericsson »

Great mod!
I'm having one problem though. When I'm using the text_length I get errors when there is html-code in the post, like links and smilies.
Any solution to this?
halofight977
Registered User
Posts: 63
Joined: Fri Mar 09, 2007 7:23 am

Re: [RC2]Recent Posts Mod for PHPBB3(0.1.2)

Post by halofight977 »

Nevermind about the error, figured it out.

Here's my idea:
Click to see Image
A cool gaming website with a great community. :: I offer a forum for testing mods out. Just PM, Register for my site, or E-Mail me.
User avatar
longsi
Registered User
Posts: 14
Joined: Wed Oct 17, 2007 3:44 am
Location: Beijing, China
Contact:

Re: [RC2]Recent Posts Mod for PHPBB3(0.1.2)

Post by longsi »

mericsson wrote:Great mod!
I'm having one problem though. When I'm using the text_length I get errors when there is html-code in the post, like links and smilies.
Any solution to this?
Sorry, not yet. I'll try to find a way out.
Complete, professional computer and network services, ORCWorks bring to you!
visit http://www.orcworks.com/ for details
Blog: http://community.orcworks.com/blog/
halofight977
Registered User
Posts: 63
Joined: Fri Mar 09, 2007 7:23 am

Re: [RC2]Recent Posts Mod for PHPBB3(0.1.2)

Post by halofight977 »

halofight977 wrote:Nevermind about the error, figured it out.

Here's my idea:
Click to see Image
Want to take a whack at this?
A cool gaming website with a great community. :: I offer a forum for testing mods out. Just PM, Register for my site, or E-Mail me.
Locked

Return to “[3.0.x] MODs in Development”

cron