Page 17 of 44

Posted: Tue Sep 26, 2006 12:34 am
by MarkDHamill
There is so GROUP BY syntax in any of the SQL statements in smartfeed.php or smartfeed_url.php. Perhaps you changed the SQL yourself? If you use a GROUP BY you have to have some sort of column function like COUNT or SUM.

Javascript error

Posted: Wed Sep 27, 2006 3:05 pm
by stephen_a
I get an error when I try to use smartfeed when I'm logged in. When I'm not logged in the button generates a URL with no problems. If I'm logged in then Firefox reports : createURL is not defined.

Posted: Wed Sep 27, 2006 4:17 pm
by MarkDHamill
Unless you edited smartfeed_url_body.tpl or are using some some odd phpBB theme which mangles HTML and Javascript in overall_header.tpl or overall_footer.tpl, it should be there. It starts on line 80 of smartfeed_url_body.tpl.

That it works though when logged out indicates that the Javascript createURL function is working. So I am wondering if any of these lines starting at Line 158 were changed.

Code: Select all

			if (logged_in)
			{
				url = url + "&feed_type=" + document.news.feed_type.options[document.news.feed_type.selectedIndex].value;
			}
			else
			{
				url = url + "feed_type=" + document.news.feed_type.options[document.news.feed_type.selectedIndex].value;
			}

Posted: Wed Sep 27, 2006 4:23 pm
by stephen_a
I hadn't changed anything and the version I had installed worked fine (and worked fine when I put it back).

If I get time I'll drop it onto my test copy of the forum and see if I can work out what is going on

DB connection for each forum subscribed to ?

Posted: Fri Sep 29, 2006 7:16 pm
by mtracey
Hey,

I have this installed for the past week and have noticed on a few occasions open DB connections for each forum subscribed to. Thats over 30.

The open connections plus 15+ members logged in has caused issues on the site.

Can anything be done to link the connections when people are using this add-on ?

thanks in advance
Mark

Re: DB connection for each forum subscribed to ?

Posted: Fri Sep 29, 2006 8:45 pm
by MarkDHamill
mtracey wrote: Hey,

I have this installed for the past week and have noticed on a few occasions open DB connections for each forum subscribed to. Thats over 30.

The open connections plus 15+ members logged in has caused issues on the site.

Can anything be done to link the connections when people are using this add-on ?

thanks in advance
Mark


Out of curiosity, are you using a database other than MySQL?

My mod does not explicitly open any database connections, but a connection is created as part of creating a normal session. In other words, it just calls the appropriate phpBB libraries.

Posted: Fri Sep 29, 2006 10:09 pm
by mtracey
Ah ok. I'm using MySQL 4 only. Any idea as to what I could do to prevent the issue at all ?

thanks for the reply :)
Mark

Posted: Fri Sep 29, 2006 10:50 pm
by MarkDHamill
By DB open connections, do you mean you are checking how many MySQL sessions are used? Or how many phpBB sessions show up in the Administrator Control Panel?

Posted: Sat Sep 30, 2006 12:50 pm
by mtracey
I've only checked by looking at the number of phpbb sessions.
I only see one when I read the rss myself.

When there has been a high number of 'guest' rss reader sessions, there have
been connectivity issues with the site in general, ie people can't get on.

Thanks
Mark

Posted: Sat Sep 30, 2006 12:57 pm
by MarkDHamill
Smartfeed calls session_pagestart which will invoke a phpBB session. I do this because it is a simple way to get a phpBB environment, access all the libraries, get at the database etc. These sessions do time out and shouldn't cause connectivity issues for other users.

I will make a note when I next upgrade Smartfeed to examine this issue. There may be a way to end the session when Smartfeed is done with it.

To my knowledge this is the first time anyone has said this has had an impact on their board's performance.

Posted: Sun Oct 01, 2006 1:11 am
by chasetec
MarkDHamill wrote: smartfeed_url_body.tpl is of course based on the subSilver theme but it should work fine for any theme, because it doesn't carry any code that displays specific colors. It does carry certain tag attributes like class="row2" and class="gen" that assume your theme has an underlying and attached cascading style sheet that will render appropriate colors that match your theme.

Here is the code that generates the text box where the URL appears:

Code: Select all

	  <tr>
		<td colspan="2" align="center" class="row1" style="padding: 5px;"><span class="gen"><input type="text" name="url" id="url" size="120" maxlength="3000" /></span></td>
	  </tr>
I would check your theme's cascading style sheet to see how it renders class="row1" and class="gen". The problem is likely there. You might want to overwrite the template to specify the colors and background colors you want.


No, as per one of my earlier messages smartfeed_url_body.tpl is LACKING the correct CSS classes to allow dark colored versions of a subSilver theme. This is corrected in my mod of the smartfeed mod. I've also added any bug fixes mentioned in this thread for those of you that find my additions helpful. As always http://www.osdev.org/smartfeed.zip. From one of my earlier posts:
chasetec wrote: I also just included a modifed templates/subSilver/smartfeed_url_body.tpl that adds the correct subsilver css class to the text input fields so that the smartfeed_url.php is usable with dark colored color styles with white text.


Mark, since some people have found my extra features helpful is there any chance of adding them to the official mod?

Posted: Sun Oct 01, 2006 1:48 am
by MarkDHamill
So I just need to add class="post" to the input fields to allow dark colored versions?

As for your enhancement to add a minimum number of posts, how can you ensure a minimum number of posts for a topic if they do not exist? Or does it show only topics with a minimum number of news posts?

Posted: Sun Oct 01, 2006 3:08 am
by chasetec
MarkDHamill wrote: So I just need to add class="post" to the input fields to allow dark colored versions?

Yep I think that was all.
MarkDHamill wrote: As for your enhancement to add a minimum number of posts, how can you ensure a minimum number of posts for a topic if they do not exist? Or does it show only topics with a minimum number of news posts?

It only takes effect when "When fetching posts, limit newsfeed to posts: In the last 12 hours" doesn't return a number of posts greater than "Minimum posts to display" and of course it can't force more posts than exist. Has no effect if the time based limit returns more than the specified limit.

I think it extremely useful if you want to use RSS/ATOM to syndicate your forum on other websites and you don't want your content to "disappear" if there is a dry spell.

The other feature, "Show only first post in a topic?" is great for monitoring new threads.

Posted: Sun Oct 01, 2006 3:16 pm
by MarkDHamill
Okay, I incorporated the class="post" into my baseline and will show up in the next version.

It strikes me that minimum posts is actually maximum posts. If you select Sort by Post Date/Time, Last Posts First in my last version a box appears where you can specify the maximum number of posts to return. I made it only available for this option because it all reduces to a SQL statement to get the data and this was the only way I could guarantee a consistent set of results. It should work with any time period.

Posted: Tue Oct 03, 2006 12:36 am
by EwaldB
Hello,

I have no idea about my problem :-( I get only a part of the last topic displayed on the upper(!) window

Attached you'll see the generated code (rss-code.zip).

Link for tests: http://www.line6forum.com/phpBB2/smartfeed_url.php
generated code: http://www.line6forum.com/phpBB2/files/rss-code.zip

I'm using phpBB2 plus 1.53. Hopefully waiting for help.
Thank you in advance