Mysql help for phpBB mod

Status
Not open for further replies.

Jordan C

New Member
Messages
433
Reaction score
0
Points
0
Hi. I'm trying to install a mod on my forum that autoposts when a rss feed updates. This requires mySql databases, and I'm having a little trouble configuring it.

Heres the only config instructions the author gives: - all configuration for feeds of lastRSS autoposting bot is in database table
phpbb_lastrss_autopost ...
Columns explanation :
`name` - name of the feed - is also used in posting
`url` - URL of the feed ...
`next_check` - next check time (from PHP function time())
`next_check_after` - number of hours between checks
`destination_id` - forum_id where BOT will try to post
`enabled` INT( 1 ) - boolean - if true, this feed will be checked

In the phpbb_lastpostrss_autopost is this:
Code:
SELECT * FROM `phpbb_lastrss_autopost` WHERE 1`name``url``next_check``next_check_after``destination_id``enabled`

I need some help setting this up.

What i want is the feed url to be http://www.macrumors.com/macrumors.xml , the name to be MacRumors, the forum id to be 47 (I think, or http://smartmaconline.com/viewforum.php?f=47 (board disabled))
I want it to start checking whenever, and it to recheck afterthat every hour.

Can anyone help, I'm not very good with Mysql.
 

xmakina

New Member
Messages
264
Reaction score
0
Points
0
This really isn't an SQL thing. MySQL is simply a database, it can't actively fill itself. I'd be interested in the solution as I'm looking to put together something similar but in the meantime I recommend you investigate CRON Jobs, they're possibly what you're after. Execute a script at (whenever) that reads the RSS feed and adds the new information into your database
 

blackhnd

New Member
Messages
53
Reaction score
0
Points
0
This really isn't an SQL thing. MySQL is simply a database, it can't actively fill itself. I'd be interested in the solution as I'm looking to put together something similar but in the meantime I recommend you investigate CRON Jobs, they're possibly what you're after. Execute a script at (whenever) that reads the RSS feed and adds the new information into your database

Yeah, for this kind of stuff, you have to have a cron task running, and you have to know PHP to make a cron script.

you should take a look at some of the phpBB default cron tasks, and program yours around them.
 

Soki

Banned
Messages
857
Reaction score
1
Points
0
This really isn't an SQL thing. MySQL is simply a database, it can't actively fill itself
Exactly. The MySQL database is a way of holding information, not doing anything much else. For example, the forums require a MySQL database, because that is where all threads, posts, and users are kept.
 

Jordan C

New Member
Messages
433
Reaction score
0
Points
0
Yes. But the confgeration is in the database, as they do not have a ACP panel yet.

All I need to know is how to setup the config.
 

xmakina

New Member
Messages
264
Reaction score
0
Points
0
You've lost me. Config for what? Who is they? Why does ACP come into this?
 

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
Do you mean opening a connection to the Database?
I think that can be done by simply using the PHP function 'include()' to include the file.
Example:
Code:
<?php
include 'config.php';
/*All the other stuff goes here*/
?>
 

Jordan C

New Member
Messages
433
Reaction score
0
Points
0
Never mind, I found out what I was doing wrong.

*Topic locked*
 
Status
Not open for further replies.
Top