Smartfeed extension ACP update

After weeks of wrestling with issues mostly related to adding and deleting extensions in the new phpBB 3.1 architecture, I finally got past them with a lot of support from the extension writers forum on phpbb.com. The Administration Control Panel user interface is now pretty much done, and the actual user interface part got done in just a morning of work. Fortunately I was able to plug in a lot of code from the old version once I had a framework working, which I got from examining the ACP board settings program. See attached screenshots. As you can see, Smartfeed now appears on the Extensions tab, which is generally where extensions should appear.

With the user interface mostly done I can now begin rewriting the program that actually generates the feed, formerly smartfeed.php. Due to the extension architecture, it will have a different URL.

Primary performance throttles

Security settings

Additional settings and options

 

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.