Blog

Smartfeed extension update

As you can see from the attached image, the user interface for the Smartfeed extension is pretty much done and looks and behaves virtually the same as it did before. Some development notes:

  • I have skipped integrating jQuery for now so the Javascript logic is pretty much the same. It may not be needed and for a first version I may choose not to delve into it as it takes considerable time to figure out how to do it the proper way.
  • The URL will put out slightly different values for key/value pairs. The phpBB Mod/Extension team really doesn’t like text strings like ATOM1.0 in URLs and variables and prefers constants, so I plan to go that route. For example, feed_type=0 will be the same as feed_type=ATOM1.0 in the 3.0 mod. Example of the new URL: http://example.com/phpBB3/app.php/smartfeed/smartfeed?u=2&e=C3TRedNDS4Z4coB4fbxHTUM8knYNy2X7_7Xj4y4y_PWxw6yeDkbUp1yXcG6-vJQgwc9UOBZfz19D0VzpaYHnKw..&lastvisit=1&limit=-1&count_limit=10&sort_by=0&feed_type=0&feed_style=3&max_word_size=10
  • Certain fields that use to accept a blank now show a zero (0). This made the Javascript a lot easier and less confusing and actually more consistent
  • I’m deferring testing the ability to generate a new Smartfeed key for later. That code will probably need to be rewritten or possibly removed.
smartfeed_url
smartfeed_url

I am now puzzling through the Administration Control Panel interface. In phpBB 3.0 you largely did not need a template, rather you added a lot of instances to an array to generate the controls. The example provided shows using a template. I’d prefer to go with the old approach if it exists rather than recreate a lot of logic. The methods of doing so are not well documented.

When both of these are done I’ll tackled what used to be know as smartfeed.php itself.

The URL will look a little different because of the extension syntax. Instead of smartfeed_url.php it will be something like:

http://example.com/phpBB3/app.php/smartfeed/smartfeed_url?sid=9b424e637f2eb0a81a132efd020c9d3a

Those of you wondering when I’ll be getting around to a digests extension: I will learn 80% of what I need to know to do that by doing Smartfeed, which is simpler. I’ll start the Digests extension while Smartfeed undergoes its first round of reviews.

All this depends on having time to do so. Being semi-retired it is easier to find the time, but when there is consulting business that will take precedence because it generates income. The extensions do not.

May 2015 work summary

  • Over several days I helped resolve issues on why people were getting messages that they were banned from a forum and were already registered. I removed the person bans by removing rows from the phpBB bans table but there were still there were still banning issues reported. I then removed some for an IP range for users that were having issues and no more problems were noted.
  • An administrator abandoned a popular forum and the backup administrator had no access to the host. She wanted to know if it was possible to move the site to a new host and new domain even though she had no FTP privileges on the current host and could not access its web host control panel. I was able to copy the database using phpBB’s backup utility and load it into a database on the new host and set up a new phpBB instance there. I also was able to reinstall two mods on the new host that they depend on. I upgraded the forum to version 3.0.14 and upgraded the mods as well. Moving attachments (mostly pictures) is not possible without FTP permissions, but client will move these individually with screen captures at a later date. Proof of concept done and waiting to proceed for a final move of the database.
  • Converted a forum from 3.0.11 to 3.1.3. Installed Subway theme and its options panel. Installed Tapatalk extension. I was slowed by timeouts (HTTP 500 errors) that made it hard to run database_update.php all the way through and to create a search index.
  • After checking client’s source code with a reference version I determined that the client had been hacked and his site was spreading malware. I fixed 8-10 files that inserted Javascript at the top of affected HTML pages.
  • Upgraded a forum from 3.0.6 to 3.1.4. FTP would time out trying to connect so I had to use cPanel File Manager to move the files. Customized style to match rest of site. Matched background gradient image and menu bar at top.
  • Fixed inability to attach a file to an initial post. This was due to a bug I introduced a few months earlier by adding code to capture events into a log that the client requests. Fixed the attachments table so it was consistent and incorrect attachments were not showing for posts.
  • Ghost wrote two technical articles for a client.
  • Installed Smartfeed 2.2.27. Client had Javascript stored in his post_text column, causing invalid feeds, so I made the default HTML Safe and this created a valid feed. 
  • Upgraded forum from phpBB 3.1.3 to 3.1.4
  • Upgraded forum from 3.0 to 3.1.4, installed an AnimeZone style, added header image and tweaked style for 100% widths.
  • A topic was slow to load post text. The problem was that there were 1.8 million posts and the MyISAM storage engine was inefficient because it was looking at all 1.8M posts before rendering the page. Dropping and recreating indexes and even requiring MySQL to use a particular index failed to get MySQL to use an index. I solved the problem by changing the storage engine for the posts table from MyISAM to INNODB.
  • Fixed order of advertising logos at top of page and fixing some links, and arranging alphabetically. Upgraded phpBB from 3.0.12 to 3.0.14.
  • To address numerous HTTP 406 errors, I edited client’s .htaccess and added code there to disable mod_security. In his cPanel I removed a mailman mail list that was on autopilot.
  • Upgraded a forum from 3.0.11 to 3.1.4. Added subsilver2 style and added his logo. Had to upgrade PHP from 5.3.29 to 5.4 to get rid of pool warnings.
  • Upgraded a forum from 3.0.13-PL1 to 3.1.4. Changed style from subsilver2 to prosilver. Incorporated new logo and changed slogan. Disabled cron job for digests since there is no digest extension yet for 3.1.
  • Restored a forum. Errors occurred when client tried to upgrade to 3.1.4 when he meant to upgrade to 3.0.14. Upgrade to 3.1.4 did not solve issue of a screwed up database where no posts were showing. Recovered database after trying lots of techniques that timed out and issued HTTP 500 errors. Eventually succeeded using bigdump.php and recovered files from his archive. Waiting to see if an upgrade to 3.1.4 is still wanted.
  • Fixed a registration error. After analysis I determined it was related to a bug in the Advanced Double Pack Activation mod. Had to change code in ucp_register.php to load an ACP language file instead of a nonexistent language file in /language/en. Provided upgrade quotes for 3.0 and 3.1.
  • More small tweaks to a new forum including upgrade to 3.0.14, moving links around on overall_header.html and increasing the size of login, logout and register links.

Update on converting mods to extensions

I finally got a break from consulting, which has allowed me to start to tackle the process of converting the Digests and Smartfeed mods to extensions. I’ve also been dragging my feet because writing extensions is hard work. Writing a mod is hard enough because there is a lot to learn about coding conventions and templating, and the phpBB mod team is very anal about what they will accept. There are lots of tricks you pick up over time that are not in the knowledge base. Creating extensions is even more so, with lots of added complications related to the plug and play architecture.

I’m starting with converting Smartfeed because it is easier and it shares a lot of code with Digests. Finishing Smartfeed should make Digests a more straightforward conversion. I’m starting like most extension authors by tailoring the Acme Demo example provided. It’s a process of iterating small changes and seeing if they work. Invariably you find differences and you have to puzzle through why things work differently with the extensions architecture. The extension writers forum on phpbb.com is a great place to ask questions. In any event there will be a lot of changes, even if the user interface and reader program itself won’t look or behave that much differently. For example, in the user interface I’ll be expected to use jQuery to drive the Javascript for logic checking and pop up boxes which is an additional learning experience.

I am attaching a picture of smartfeed_url. Obviously I need to plug in a lot of language variables but the hard part is going to be integrating jQuery.

smartfeed_url_2015-05-25

Digests 2.2.26 is now available

Digests 2.2.26 is now available. Upgrade instructions are available. This version will not work with phpBB 3.1. Here’s what’s new:

  • Digests now support the ability to create digests after the fact. For example, if your cron job was deleted, you can create a digest as if they had happened in the past. This is done with two new URL parameters for mail_digests.php: date and hour, both of which are required. Date must be in a YYYY-MM-DD format. Hour must be from 0 to 23. Example: http://example.com/phpBB3/mail_digests.php?date=2014-12-01&hour=12. Date and hour should be expressed in server time, not board time or GMT, since cron jobs are run based on server time. See /contrib/readme.html for more details on how to determine server time.
  • Inactive users with digest subscriptions will no longer receive digests.
  • For enhanced personalization, digests will show the board’s user name instead of “you” or “your” in three places.
  • Post subject, post text, private messages text, private message subjects and attachment comments now are parsed to remove text that should be censored.
  • Administrators can explicitly require certain forums to appear in all digests or require certain forums to never appear in a digest. This does not work if bookmarked topics only are selected by a subscriber.
  • Fixed a bug that did not embed the proper links in the HTML classic digest when no post text was desired.
  • You can now set a digest time zone in digest general settings. This is used in edit subscribers and balance load so you can more easily see when people or groups receive digests. Previously these data were shown in the board timezone only, making it hard to troubleshoot issues.
  • Fixed a bug in Balance Load that was incorrectly reporting the number of digests for a particular hour. The overall numbers were correct but they were not assigned to the proper hour.
  • Reapplied some Javascript that had mysteriously gone missing for prosilver in the forums selections page. The alert box which appeared if you unchecked all forums and tried to submit the form is now back.
  • Fixed a bug with subsilver2 and the digests user control panel interface that caused all form submission Javascript logic to not be executed. Moved this logic from an onsubmit event to the form to the onclick event of the submit button. The logic was not executing because on subsilver2 each form is embedded inside a larger form. If you use subsilver2 actively, make sure to replace /styles/subsilver2/templates/ucp_digests.html.

You can download the latest version from my digests page.

Limited phpBB 3.1 support now offered

I have installed and have been playing with phpBB 3.1. At this time I offer the following phpBB 3.1 services. More services will be supported as I feel confident about my proficiency.

  • New installations
  • Upgrades from phpBB 3.0.x or 2.x
  • Installation of approved extensions for phpBB 3.1

Pricing is the same as for phpBB 3.0, listed below. Note that I support only the styles defined for phpBB 3.1 (currently just prosilver) and approved extensions for phpBB 3.1 (as of this writing, there are only 11). Note that modifications are now called extensions, and they work similar to WordPress plug in: they can be disabled, easily acquired and easily deleted. You no longer have to worry that one extension will affect the behavior of another extension. Consequently, you may wish to install extensions and styles yourself.

phpBB 3.1 Ascraeus

Introducing phpBB 3.1 Ascraeus

October 28, 2014 will be an exciting day for the phpBB community with the release of version 3.1 of phpBB, Ascraeus. Version 3.1 will include a better and more “pluggable” architecture for phpBB, making modifications easy to install and remove. If you are familiar with WordPress, version 3.1 should work similarly with no file modifications necessary to install a modification. You can read more about the release here. This is the first new version of phpBB since phpBB 3.0 was released in December 2007.

As was true with the release of phpBB 3.0, it will take a while for new styles and modifications to be written and approved for this version of phpBB. There is a lot for everyone in the community to learn.

Support for phpBB 3.1

I will introduce support services for phpBB 3.1 gradually as my competency increases. See my services page and future posts here for details. I will start with installation and conversion services from version 3.0. In general since phpBB 3.1 automates many things that had to be done manually, I expect some decline in need for support services.

Digests and Smartfeed mods for phpBB 3.1

I do plan to write versions of my Digests and Smartfeed mods for phpBB 3.1. However, it won’t happen overnight. The Digests mod is a very complex mod so it will likely take a lot of work to port it over. It’s hard to give a time estimate on when a version of digests will be ready. My guess is it will be about a year after release of phpBB 3.1. The Smartfeed mod may be obsolete. I will need to examine the features for feeds in phpBB 3.1 to see if it can handle similar functionality. If not I will support it in time. Smartfeed is the simpler mod so I will probably start with it and use the lessons learned from it when porting the Digests mod.

While I am semi-retired, I still have limited time for this work. I provide Smartfeed and Digests as a service to the community so it will come after any requests for services and other activities that keep me busy. I don’t make money off these mods, unless someone wants me to install these mods for them. Consequently, paid work will be done first.

Simply subscribe to this blog for news of the development status for these mods.