WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-25-2008, 07:20 AM
pagetta's Avatar
pagetta pagetta is offline
WebProWorld Veteran
 

Join Date: Nov 2004
Location: UK
Posts: 504
pagetta RepRank 2
Default PHPBB Question

I have taken over some sites, and one has a PHPBB forum running on it. We would like to add a 'latest posts' section to the home page of the site - any ideas how i do this? I have never worked with PHPBB before so any tips greatly appreciated!

thanks

fiona
Reply With Quote
  #2 (permalink)  
Old 02-25-2008, 12:06 PM
purplepaisley purplepaisley is offline
WebProWorld New Member
 

Join Date: Dec 2005
Location: UK
Posts: 16
purplepaisley RepRank 0
Default Re: PHPBB Question

I haven't worked with PHPBB but some forums have an SSI tool for including forum posts or a login box, you might check their support site for one, alternatively if there is an rss/xml feed of the latest posts you can use an rss feed parser like SimplePie.
__________________
Open Source CMS Integrations & Customisations *website under development*
(Dokuwiki / Simple Machines Forum / Drupal)
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 12:23 AM
kgun's Avatar
kgun kgun is online now
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 4,690
kgun RepRank 3kgun RepRank 3
Default Re: PHPBB Question

Try this:
  1. Note: There is a panel in the forum where you can install modifications.
  2. Search: phpbb modification + KeyWords
  3. Look here: phpBBHacks.com - phpBB hacks, mods, templates, styles, downloads, support and much more!
  4. Then here: phpBB • Modifications
  5. Last option ask here: phpBB • Community Home More precisely in the Modifications Forums
  6. phpBB • View forum - 2.0.x Modifications Forums
Example of search:

phpbb modification latest posts section

"exact" or free and variations thereoff.

Here PHPBB Admin ToolKit :: Starfoxtj is a toolkit that may save you much work.

Examples of use:
  1. WPW: Search (Below subscribe button).
  2. Click: first "Advanced Search"
  3. User name: kgun
  4. Key Word(s): Starfoxtj
  5. Search in Forum(s): Internet Security Discussion Forum
  6. Click: Search Now
I get 3 hits, where the first is:
An excellent forum phpBB toolkit.

Last edited by kgun : 02-26-2008 at 02:49 AM.
Reply With Quote
  #4 (permalink)  
Old 02-26-2008, 03:59 AM
mikesmith76 mikesmith76 is offline
WebProWorld Pro
 

Join Date: Sep 2005
Location: Manchester, UK
Posts: 253
mikesmith76 RepRank 0
Default Re: PHPBB Question

Which version of phpbb are you using? if it's one of the 2.x series the following code may be of use

Code:
$strSQL = "SELECT * " .
		"FROM phpbb_posts INNER JOIN phpbb_users ON phpbb_users.user_id = phpbb_posts.poster_id " .
		"INNER JOIN phpbb_topics ON phpbb_topics.topic_id = phpbb_posts.topic_id " .
		"ORDER BY post_time DESC " .
		"LIMIT 0 , 3 ";
			
		$result = mysql_query($strSQL);
					
		while($row = mysql_fetch_assoc($result))
                {
                    print '<pre>';
                    print_r( $row );
                    print '</pre>';
		}

		mysql_free_result($result);
		?>
That should pull out the last 3 posts in your forum.
Reply With Quote
  #5 (permalink)  
Old 02-26-2008, 08:34 PM
Highway of Life Highway of Life is offline
WebProWorld Member
 

Join Date: Oct 2005
Location: In my brain
Posts: 38
Highway of Life RepRank 0
Default Re: PHPBB Question

What version of phpBB are you using?
They just released version 3, if it is that version, I could give you a bit of advise on how to easily do that.
__________________
- Highway of Life
Programmers guide to phpBB3 'Olympus'
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 06:12 AM
kgun's Avatar
kgun kgun is online now
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 4,690
kgun RepRank 3kgun RepRank 3
Default Re: PHPBB Question

As a default, earlier versions of phpBB had to be installed in a BB subfolder like:

mysite.com/BB

Questions:
  1. How easy is it to install version 3 on mysite.com?
  2. How easy is it to plug in modifications if you choose 1?
Reply With Quote
  #7 (permalink)  
Old 03-05-2008, 06:12 AM
pagetta's Avatar
pagetta pagetta is offline
WebProWorld Veteran
 

Join Date: Nov 2004
Location: UK
Posts: 504
pagetta RepRank 2
Default Re: PHPBB Question

MikeSmith, I am using asp pages not php but thank you!

I have found an rss topic feed for our forum so figured I could display this on our home page, I have some asp code that SHOULD display the last few posts. It works perfectly when I put in any RSS feed url - EXCEPT for our PHPBB forum feed - I get an error saying:
msxml3.dll error '800c0005'
The system cannot locate the resource specified.
/default2.asp, line 122


this is the section of code giving an error message:

Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlHttp.Open "Get", URLToRSS, false
line 122: xmlHttp.Send()
RSSXML = xmlHttp.ResponseText

Set xmlDOM = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlDOM.async = False
xmlDOM.validateOnParse = False
xmlDom.resolveExternals = False


Does anyone know why i get this or how to fix it? As i Said, in the code when i put in any other rss feed, say, for example, alistapart, bbc, yahoo, the last posts display perfectly. But the rss feed from our forum (hosted on the same server as the site) gives this error message.

I have searched and searched online but cannot seem to find an answer!
Reply With Quote
  #8 (permalink)  
Old 03-05-2008, 06:44 AM
kgun's Avatar
kgun kgun is online now
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 4,690
kgun RepRank 3kgun RepRank 3
Default Re: PHPBB Question

Quote:
Originally Posted by pagetta View Post
MikeSmith, I am using asp pages not php but thank you!

I have found an rss topic feed for our forum so figured I could display this on our home page, I have some asp code that SHOULD display the last few posts. It works perfectly when I put in any RSS feed url - EXCEPT for our PHPBB forum feed - I get an error saying:
msxml3.dll error '800c0005'
The system cannot locate the resource specified.
/default2.asp, line 122

this is the section of code giving an error message:

Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlHttp.Open "Get", URLToRSS, false
line 122: xmlHttp.Send()
RSSXML = xmlHttp.ResponseText

Set xmlDOM = Server.CreateObject("MSXML2.XMLHTTP.3.0")
xmlDOM.async = False
xmlDOM.validateOnParse = False
xmlDom.resolveExternals = False

Does anyone know why i get this or how to fix it? As i Said, in the code when i put in any other rss feed, say, for example, alistapart, bbc, yahoo, the last posts display perfectly. But the rss feed from our forum (hosted on the same server as the site) gives this error message.

I have searched and searched online but cannot seem to find an answer!
I do not know ASP, but that seems like traditional oop code using ASP's XMLHttpRequest object (??) with a "Send metod". Can you use that method on the same server is my obvious first question? In other words, look up the documentation for the Send method of the xmlHttp object.

Last edited by kgun : 03-05-2008 at 06:48 AM.
Reply With Quote
  #9 (permalink)  
Old 03-05-2008, 11:24 AM
purplepaisley purplepaisley is offline
WebProWorld New Member
 

Join Date: Dec 2005
Location: UK
Posts: 16
purplepaisley RepRank 0
Default Re: PHPBB Question

kgun makes sense, I don't know asp either.

I'd try checking that you can view the feed in your browser, and if not, check that the feed is enabled perhaps somewhere in phpBB settings. Also check that guests can view the feed. I'm not sure of phpBB group permissions system, it would be what I would try in another forum software first. Then I might experiment with the url/path used in the feed parser. Hope that helps.
__________________
Open Source CMS Integrations & Customisations *website under development*
(Dokuwiki / Simple Machines Forum / Drupal)
Reply With Quote
  #10 (permalink)  
Old 03-05-2008, 12:05 PM
pagetta's Avatar
pagetta pagetta is offline
WebProWorld Veteran
 

Join Date: Nov 2004
Location: UK
Posts: 504
pagetta RepRank 2
Default Re: PHPBB Question

thnx for the tips

the feed definitely displays normally in a browser. I will have a look at the phpbb settings see what i can find

thanks!
Reply With Quote
  #11 (permalink)  
Old 03-07-2008, 02:57 PM
mikesmith76 mikesmith76 is offline
WebProWorld Pro
 

Join Date: Sep 2005
Location: Manchester, UK
Posts: 253
mikesmith76 RepRank 0
Default Re: PHPBB Question

it's been a long time since i did any ASP but the sql statement I provided should allow you to pull out the records in ASP also. You'd just have to use the ASP syntax for calling that query.

Just seems a bit overkill to be using an rss feed reader to display records from the same site.
Reply With Quote
  #12 (permalink)  
Old 03-08-2008, 04:24 AM
purplepaisley purplepaisley is offline
WebProWorld New Member
 

Join Date: Dec 2005
Location: UK
Posts: 16
purplepaisley RepRank 0
Default Re: PHPBB Question

Just a note to add that some php feed readers cache the feed data for specified period so that scripts and queries don't need to be run every page visit, saving on server loads which can be crucial to a high traffic website.
__________________
Open Source CMS Integrations & Customisations *website under development*
(Dokuwiki / Simple Machines Forum / Drupal)
Reply With Quote
  #13 (permalink)  
Old 03-11-2008, 08:41 AM
pagetta's Avatar
pagetta pagetta is offline
WebProWorld Veteran
 

Join Date: Nov 2004
Location: UK
Posts: 504
pagetta RepRank 2
Default Re: PHPBB Question

thnx mike I will have a go with that script then.

can i ask what you mean by overkill? the forum is only one part of the site, so surely having latest feeds running on the home page will encourage people to click through and use it?
Reply With Quote
  #14 (permalink)  
Old 03-12-2008, 04:19 AM
mikesmith76 mikesmith76 is offline
WebProWorld Pro
 

Join Date: Sep 2005
Location: Manchester, UK
Posts: 253
mikesmith76 RepRank 0
Default Re: PHPBB Question

Sorry I'll clear that point up. I'm not against the idea of having the latest forum posts on your homepage and in fact have done this myself on a number of occasions. What seems overkill to me is using an rss feed reader to achieve this, unless of course you're forced to because the forum is hosted on another server.

For me it would seem much simpler to just pull the posts from the db directly, as per my example.

Hope that makes sence and if you need any more help with the query please let me know.
Reply With Quote
  #15 (permalink)  
Old 03-17-2008, 11:19 AM
pagetta's Avatar
pagetta pagetta is offline
WebProWorld Veteran
 

Join Date: Nov 2004
Location: UK
Posts: 504
pagetta RepRank 2
Default Re: PHPBB Question

hi mike - i am a a complete newbie to all of this - how woud i translate that PHP into ASP syntax?! thnx so much for the help!
Reply With Quote
  #16 (permalink)  
Old 03-17-2008, 03:31 PM
mikesmith76 mikesmith76 is offline
WebProWorld Pro
 

Join Date: Sep 2005
Location: Manchester, UK
Posts: 253
mikesmith76 RepRank 0
Default Re: PHPBB Question

Hi again

Before I start do you really need to do this in ASP? It's just how have you got phpbb running if you need to use ASP?

Had to ask.

Anyway on to the ASP. This will be really rough as like I said previously i've not touched ASP in a long time, plus I don't know anything about your server setup.

Assuming you're using ODBC to connect to your database the following code may be useful

Code:
sql = "SELECT * FROM phpbb_posts INNER JOIN phpbb_users ON phpbb_users.user_id = phpbb_posts.poster_id INNER JOIN phpbb_topics ON phpbb_topics.topic_id = phpbb_posts.topic_id ORDER BY post_time DESC LIMIT 0 , 3 "

set conn=Server.CreateObject("ADODB.Connection") 
conn.Open "northwind"

set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql, conn

While Not rs.EOF
    Response.Write( rs("title") );

    rs.MoveNext
Loop
Hopefully this will get you started. If you can provide some more information about your server set up I may be able to guide you further.

Hope this helps
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
phpbb formating question. Darkstar Graphics & Design Discussion Forum 3 02-02-2008 09:13 AM
phpBB - IE7 - XP vittorio IT Discussion Forum 2 09-06-2007 09:16 AM
PhpBB Question p8r Web Programming Discussion Forum 1 07-26-2005 09:09 AM
phpbb.com david123 Web Programming Discussion Forum 1 04-29-2005 10:33 PM
Powered by phpBB Lordmk WebProWorld: Guidelines/Announcements/Suggestions 2 02-12-2004 12:29 PM


Search Engine Friendly URLs by vBSEO 3.0.0