[BETA] Smartfeed

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! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Mon Feb 06, 2006 2:47 pm

This is good news and validates the reason for having a Beta process. Otherwise issues like this would get passed into a production release. Please let me know of other issues so I can release a fine production grade Mod. Thanks for your extensive testing.

zasdf
Registered User
Posts: 5
Joined: Wed Jan 25, 2006 12:56 am

Post by zasdf » Mon Feb 06, 2006 10:21 pm

MarkDHamill wrote: I fixed the smilies path problem in the last release.


I am using the release in the first post of this thread.

2006-01-28 - Version 0.3

Code: Select all

$siteURL = $server_protocol . $server_name . $server_port . $script_name;
$smilies_url = $siteURL . $board_config['smilies_path'];
$smilies_path = preg_replace("/\//", "\/", $board_config['smilies_path']);
// End copied code

if (substr($siteURL,(strlen($siteURL)-1),1) <> '/')
{
  $siteURL .= '/';
} 
You are appending the / after the $smilies_ variables have already been set. It should be set before. The following fixes it for me.

Code: Select all

$siteURL = $server_protocol . $server_name . $server_port . $script_name;
if (substr($siteURL,(strlen($siteURL)-1),1) <> '/')
{
  $siteURL .= '/';
} 
$smilies_url = $siteURL . $board_config['smilies_path'];
$smilies_path = preg_replace("/\//", "\/", $board_config['smilies_path']);
// End copied code

User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Mon Feb 06, 2006 10:30 pm

Good catch! I'll apply the change to the next version. Thanks.

Rebell
Registered User
Posts: 93
Joined: Tue Nov 08, 2005 8:31 am
Contact:

Post by Rebell » Wed Feb 15, 2006 9:20 am

Hello,

any news for us about the next version ?

Greetz :D
OLDSKOOLDEMOMAKER FORUMS : http://kickme.to/osdm
make demos like in the good old days on amiga or c64 without programming knowledge !

User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Wed Feb 15, 2006 12:42 pm

Just me getting around to it. I have a four day weekend coming up so perhaps something. I still don't think it's quite ready for a production release. I could use more beta testers!

User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Mon Feb 20, 2006 11:19 pm

Okay, what I hope is the "final" beta version 0.4 is now ready for download. It's pretty well tested at this point. One issue that still bothers me is that it needs to be less MySQL centric, since I use some pretty specific MySQL functions. If anyone has any great ideas on how to make portable ugly SQL like this let me know:

Code: Select all

$topics_only_str = ' AND t.topic_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL ' . $limit . '))'
Changes:

Code: Select all

##   2006-02-20 - Version 0.4 (Hopefully final Beta version!)
##      - Fixed Smilies URL problem
##      - An appropriate error message is generated if no arguments are used calling smartfeed.php
##      - Included xml.gif image. Does not need to be used but can be used to link to smartfeed_url.php.
##      - Included change to lang_faq.php to add a FAQ question about newsfeeds
##		- Added a smartfeeds_constant.php include file, to fully separate out the non-language components of lang_constants.php
##		- Tweaked feedcreator.class.php a bit in order to remove some feed validator warnings
It can be downloaded from:

http://www.potomactavern.org/tavern/smartfeed.zip

Rebell
Registered User
Posts: 93
Joined: Tue Nov 08, 2005 8:31 am
Contact:

Post by Rebell » Tue Feb 21, 2006 6:56 am

Hi,

v0.4 dont really work for me... try out at my testspace : http://test.deltaforceteam.de/smartfeed_url.php

v0.3 running better at: http://forum.deltaforceteam.de/smartfeed_url.php it gives me good results to http://www.deltaforceteam.de - look in the OSDM FORUM box !

cya :D
OLDSKOOLDEMOMAKER FORUMS : http://kickme.to/osdm
make demos like in the good old days on amiga or c64 without programming knowledge !

User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Tue Feb 21, 2006 2:19 pm

I tried both and didn't notice a problem. Response was a little slow but I think that was because there were so many posts in the feed. What is not working right?

The only thing obvious to me is that the fonts are somewhat larger on the smartfeed_url.php page in the test area.

User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Version 1.0 at last

Post by MarkDHamill » Sat Feb 25, 2006 3:14 am

Okay! I am releasing Version 1.0 and submitting it as an official mod. In the past the phpBB gods have been slow about approving mods and have demanded reworks, but hopefully I've learned my painful lessons and it will move through expeditiously with no errors.

I could have used more Beta testers and I thank those who did Alpha and Beta testing, but you got to work with what you got.

You can download it from:

http://www.potomactavern.org/tavern/smartfeed.zip

My changes were fairly minor as far as functionality, but the code is prettier and it should be DBAL compliant now:

Code: Select all

##   2006-02-25 - Version 1.0 (Production Release, if the phpBB gods approve)
##		- Took out all MySQL specific functions and created equivalent functionality in PHP. Hopefully software is now DBAL compliant.
##		- Renamed some variables to more accurately describe their functions
##		- Moved fake email address to smartfeed_constants.php where it belongs

Rebell
Registered User
Posts: 93
Joined: Tue Nov 08, 2005 8:31 am
Contact:

Post by Rebell » Sun Feb 26, 2006 10:42 am

Everything seems to be ok !
All works good without any errors and good results.
But wit would be cool to get a link and copy button for the generated URL !

thank you work your good work here ... cya :wink:
OLDSKOOLDEMOMAKER FORUMS : http://kickme.to/osdm
make demos like in the good old days on amiga or c64 without programming knowledge !

User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Sun Feb 26, 2006 1:10 pm

I wasn't sure what to do about a link to the button. I figured I'd leave that to each person using the mod. On my site I added it to overall_footer.tpl but artistically that graphic does not integrate well into the images already there. Nor would it be appropriate to put it in overall_header.tpl.

If someone were to design for me an icon that matches the FAQ, Search and other icons I would consider code to place it there is a future release. Unfortunately, I am not a graphic artist.

User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Sun Feb 26, 2006 9:40 pm

Okay, minor bug noted in version 1.0. I corrected my archive. Change line 546 in smartfeed.php from:

Code: Select all

				$post_text = '<em>' . $row['username'] . '</em> ' . $lang['smartfeed_wrote'] . ' ' . $lang['smartfeed_at'] . ' <em>' . $row['Post Time'] . ' ' . $timezone . '</em>: ' . $row['post_text'];
to:

Code: Select all

				$post_text = '<em>' . $row['username'] . '</em> ' . $lang['smartfeed_wrote'] . ' ' . $lang['smartfeed_at'] . ' <em>' . date('d M Y h:i A ',$row['post_time']) . ' ' . $timezone . '</em>: ' . $row['post_text'];
This is a little ripple from moving the time conversion logic from MySQL to PHP.

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Fri Apr 21, 2006 11:51 pm

Mark, just installed SmartFeed - very impressed, but we're finding some issues when running under IntegraMod, these are:

- Font size / colour settings seem to generate weird codes instead of the changes indicates by the BBCode. i.e.

Code: Select all

>[size=9:ea495928ee][color=blue:ea495928ee][b:ea495928ee]Daron Brewood[/b:ea495928ee][/color:ea495928ee] 
- The feed insists on trying to use the subSilver logo even though we have a different Style as standard. i.e.

Code: Select all

http://www.4winmobile.com/templates/subSilver/images/logo_phpBB.gif
You can see the SmartFed setup here:

http://www.4winmobile.com/smartfeed_url.php

and an example feed showing the issues here:

http://www.4winmobile.com/smartfeed.php ... y=standard

Hope you can help!

Cheers

P.S. The underlying forum code has been updated in accordance with the latest PhpBB 2.20xx functionality

User avatar
tekguru
Registered User
Posts: 139
Joined: Thu Jul 03, 2003 1:33 pm

Post by tekguru » Sat Apr 22, 2006 12:00 am

Argh, forget the bit about the template patch - just spotted one should edit the constants file :)

The colour/font formatting is still an issue though.

User avatar
MarkDHamill
Registered User
Posts: 3959
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Post by MarkDHamill » Sat Apr 22, 2006 12:03 am

Unfortunately I no nothing about this mod or how it changes the default installation of phpBB. I'm guessing it messes with bbcode.php, since I stole some code that translates bbcode starting at line 545:

Code: Select all

				// Code from rss.php by Sascha Carlin, slightly modified 
				$post_text = '<em>' . $row['username'] . '</em> ' . $lang['smartfeed_wrote'] . ' ' . $lang['smartfeed_at'] . ' <em>' . date('d M Y h:i A ',$row['post_time']) . ' ' . $timezone . '</em>: ' . $row['post_text'];
				$post_text = str_replace("\n", "\n<br />\n", $post_text);
				$post_text = bbencode_second_pass($post_text, $row['bbcode_uid']);
				$post_text = smilies_pass($post_text);
				$post_text = preg_replace("/$smilies_path/", SMILIES_URL, $post_text);
				$post_text = make_clickable($post_text);
				// Variable reassignment and reformatting for user sig
				$user_sig = $row['user_sig'];
				$user_sig = bbencode_second_pass($user_sig, $post['user_sig_bbcode_uid']);
				$user_sig = smilies_pass($user_sig);
				$user_sig = preg_replace("/$smilies_path/", SMILIES_URL, $user_sig);
				$user_sig = make_clickable($user_sig);
				// End Code from rss.php by Sascha Carlin, slightly modified 
Not sure how to fix something like this without me installing the mod and then doing some grunt level work debugging, which I am not inclined to do, at least not without some money. If you have some skill with PHP and phpBB you could probably figure it out. My guess is you would have to make a mod to bbencode_second_pass.

Post Reply

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