
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
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?
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..
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!
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...
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");
?>