[2.0.6] FIND - Forum Integrated News Delivery - Input

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
93
62%
Very Good
34
23%
Good
14
9%
Fair
3
2%
Poor
6
4%
 
Total votes: 150

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Thu Jun 16, 2005 3:21 am

My wild guess would be that you specified that the news_url field could not be blank but you didn't give it a default value. It looks like you used the database tool to create this query, so it seems like the syntax should be accurate...

:!:

nuci
Registered User
Posts: 5
Joined: Wed Jun 15, 2005 3:07 pm

Post by nuci » Thu Jun 16, 2005 9:02 am

Could be, but it gives an error already in the first field.
It seems to be that the error is in the type of character. The readme says it has to be int4, I presumed type integer, length 4. Is this correct? I tried others, like char, any, text, but the error stays the same. Only error near character changes

nuci
Registered User
Posts: 5
Joined: Wed Jun 15, 2005 3:07 pm

Post by nuci » Thu Jun 16, 2005 3:21 pm

CREATE TABLE tablename (
colname SERIAL
);is equivalent to specifying:

CREATE SEQUENCE tablename_colname_seq;
CREATE TABLE tablename (
colname integer DEFAULT nextval('tablename_colname_seq') NOT NULL

Found at:

http://www.postgresql.org/docs/7.3/inte ... YPE-SERIAL

thebassman
Registered User
Posts: 103
Joined: Fri Mar 26, 2004 2:00 am
Location: Toronto, Ontario, Canada

Post by thebassman » Sat Jun 18, 2005 9:14 pm

I've had this mod installed for a couple of weeks, and I'm beginning to notice double and triple posts of the exactly the same article... any ideas?

redsoxrss
Registered User
Posts: 2
Joined: Thu Jun 23, 2005 4:03 pm
Contact:

SQL Error : 1046

Post by redsoxrss » Thu Jun 23, 2005 5:28 pm

Unfortunately this isn't as active as I was hoping, but I'm having a problem.

This works find updating the feeds via the admin panel and it also works when I point my browser to the find_input page... but ... it is VERY erradic in a cronjob on my server.

I have a cron set up to point to the file... and it worked at first... sending the correct output to my e-mail address. However, it only works if I run the script manually shortly before then (by pointing my browser to it)... if I don't point my own browser to the find_input.php page shortly before (within a few minutes) the cron runs the script, it returns an error.

The error can be found here:
http://www.osmar.net/mike/error.html
General Error

Could not read list informations

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND pa.pic_cat_id = 0)' at line 3

SELECT pa.*, (pa.pic_id) AS _list_key, (pa.pic_title) AS _list_txt, (pa.pic_id) AS _list_img
FROM (phpbb_album AS pa)
WHERE (pa.pic_user_id = AND pa.pic_cat_id = 0)



Line : 508
File : def_userfuncs.php


Somebody said that they had the same error and fixed it, but that person did not say how... and I am out of ideas, especially because it works if I point my browser to the file and then the cron runs the script. It's very strange and defeats the point of automatic updates to it.

If anybody could help me out, I'd be grateful.
Thanks,
Mike

redsoxrss
Registered User
Posts: 2
Joined: Thu Jun 23, 2005 4:03 pm
Contact:

Post by redsoxrss » Thu Jun 23, 2005 5:30 pm

thebassman wrote: I've had this mod installed for a couple of weeks, and I'm beginning to notice double and triple posts of the exactly the same article... any ideas?


Some feeds, I've noticed, are weird... or are handled weird. Though most of my feeds work fine, there's one from one website (Boston Blood Sox -- I run a Red Sox feed site) that keeps posting over and over the same articles, so I removed them from my list. The others work alright and don't post multiple articles.

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Re: Cron job

Post by NightriderXP » Fri Jun 24, 2005 5:59 am

haalaaluu wrote: there is auto-prune function and set it whatever timing you want. it's auto delete back those feeding news post. for e.g. i command cron to check every 1 hour to update 0 * * * * and auto prune those news after 24 hours if my members are not touch/interested..

What is the auto-prune file that I can run using cron? I can see the prune function in the includes/prune.php file, but I don't see any way to run it through a cron job. Would I be able to run one cron command on multiple forums or would I need to set a different cron job for each forum that I want auto pruned? What would be the cron syntax???

:?:

afterlife_69
I've Been Banned!
Posts: 630
Joined: Tue Nov 30, 2004 10:35 am

Post by afterlife_69 » Tue Jun 28, 2005 5:57 pm

i seem to have a BBcode problem with phpBB.com's RSS feed.
http://phpbbworld.com/forum/viewforum.php?f=14&sid=

gr33n
Registered User
Posts: 20
Joined: Mon Aug 23, 2004 11:13 pm

Post by gr33n » Mon Jul 04, 2005 12:10 pm

does this RSS downloading take more bandwidth than usual search.php?search_id=newposts ?

beltic
Registered User
Posts: 12
Joined: Tue Jul 05, 2005 7:58 pm

Post by beltic » Tue Jul 05, 2005 8:05 pm

I have tried reading thru this forum, but didnt see it. (could of missed it) BUT..

I have have a RSS newsfeed that isnt part of your mod. How hard is it to add that? I have been given a php file that parses the XML for the news.

Thanks!

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Tue Jul 05, 2005 8:34 pm

beltic wrote: I have tried reading thru this forum, but didnt see it. (could of missed it) BUT..

I have have a RSS newsfeed that isnt part of your mod. How hard is it to add that? I have been given a php file that parses the XML for the news.

Thanks!

Just take the URL for your RSS newsfeed and add it through the ACP. It's not hard at all...

:lol:

beltic
Registered User
Posts: 12
Joined: Tue Jul 05, 2005 7:58 pm

Post by beltic » Tue Jul 05, 2005 9:52 pm

NightriderXP wrote:
beltic wrote:I have tried reading thru this forum, but didnt see it. (could of missed it) BUT..

I have have a RSS newsfeed that isnt part of your mod. How hard is it to add that? I have been given a php file that parses the XML for the news.

Thanks!

Just take the URL for your RSS newsfeed and add it through the ACP. It's not hard at all...

:lol:


Forgive me, sometimes Im pretty slow. Where is the latest version of ACP?
Do I add the path to the php file they gave me, or the url inside the php (which pulls the xml?)? I put the path to my php file, and when I hit "get news" it "completed with errors".. Where are the errors?

Here is the file, just in case it helps.

Code: Select all

<?php 
$_item = array(); 
$_depth = array(); 
$_tags = array("dummy"); 

function initArray()
{ 
global $_item; 

$_item = array ("TITLE"=>"", "LINK"=>"", 
"DESCRIPTION"=>"", "URL"=>""); 
}

function startElement($parser, $name){ 
global $_depth, $_tags, $_item; 

if (($name=="ITEM") || 
($name=="CHANNEL") 
|| ($name=="IMAGE")) { 
initArray(); 
} 
@$_depth[$parser]++; 
array_push($_tags, $name); 
} 

function endElement($parser, $name){ 
global $_depth, $_tags, $_item; 

array_pop($_tags); 
$_depth[$parser]--; 
switch ($name) { 
case "ITEM": 
echo "<a href=\"{$_item['LINK']}
\">" . 
"{$_item['TITLE']}</a><br>"; 
initArray(); 
break; 

case "IMAGE": 
echo "<a href=’{$_item['LINK']}’>" . 
"<DEFANGED_IMG src=’{$_item
['URL']}’ " . 
"alt=’{$_item['TITLE']}; 
border=’0’></a>\n\n"; 
initArray(); 
break; 

case "CHANNEL": 
echo "<h3>{$_item['TITLE']}</h3>\n"; 
initArray(); 
break; 
} 
}

function parseData($parser, $text){ 
global $_depth, $_tags, $_item; 

$crap = preg_replace ("/\s/", "", $text); 
/* is the data just whitespace? 
if so, we don't want it! */ 

if ($crap) { 
$text = preg_replace ("/^\s+/", "", $text); 
/* get rid of leading whitespace */ 
if (@$_item[$_tags[$_depth[$parser]]]) { 
$_item[$_tags[$_depth[$parser]]] .= 
$text; 
} else { 
$_item[$_tags[$_depth[$parser]]] = 
$text; 
} 
} 
} 

function parseRDF($file){ 
global $_depth, $_tags, $_item; 

$xml_parser = xml_parser_create(); 
initArray(); 

/* Set up event handlers */ 
xml_set_element_handler
($xml_parser, "startElement", "endElement"); 
xml_set_character_data_handler
($xml_parser, "parseData"); 

/* Open up the file */ 
$fp = fopen ($file, "r") or die ("Could not 
open $file for input"); 

while ($data = fread ($fp, 4096)) { 
if (!xml_parse($xml_parser, $data, feof
($fp))) { 
die (sprintf("XML error: %s at line %d", 
xml_error_string(xml_get_error_code 
($xml_parser)), 
xml_get_current_line_number
($xml_parser))); 
} 
} 

fclose($fp); 
xml_parser_free($xml_parser); 
}

parseRDF
("http://www.worldofwar.net/news/news.xml");
?> 

NightriderXP
Registered User
Posts: 1418
Joined: Sat Oct 09, 2004 8:17 am
Location: Florida, US
Contact:

Post by NightriderXP » Tue Jul 05, 2005 10:29 pm

You don't need to modify your files to add XML/RSS Newsfeeds to your board. The ACP is your Admin Control Panel. Just log into your ACP and go to the Newsfeeds category on the left:

Image

Click on Input Newsfeeds and you will see this in the right panel:

Image

Let me know if you need further help from here on...

:lol:

rjay
Registered User
Posts: 9
Joined: Thu May 27, 2004 8:47 pm

HTML problems

Post by rjay » Wed Jul 06, 2005 5:41 pm

I'm having a problem with HTML commands such as span and block being shown in their entirety rather than being parsed. For example here is an example:

<div xmlns="http://www.w3.org/1999/xhtml">
<span style="font-style: italic;">Here's an item from the Buzz Factor e-zine archives. I think this one is worth a second look. And if you're celebrating it in your part of the world, have a great Indie-Pendence Day weekend!</span>

How do I get this to parse properly ??

In PHPBB's General Configuration, my "Allowed HTML Tags" looks like this:

br,b,i,u,pre,p,ul,li,strong,img,a,center,td,tr,table,font,hr,span,div

Adam Angels
Registered User
Posts: 16
Joined: Fri May 20, 2005 9:46 am

Post by Adam Angels » Wed Jul 13, 2005 7:00 am

Does anyone know if this mod works with the phpBB google keyword URLs 2.2.1 SEO MOD by webmedic.net ? http://www.webmedic.net/released-phpbb- ... 25564.html

Thanks!

Post Reply

Return to “[2.0.x] MOD Database Cleanup”

cron