vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   RSS News Feed Hack (https://vborg.vbsupport.ru/showthread.php?t=60899)

sjau 04-06-2004 05:10 PM

Quote:

Originally Posted by Entourage
Installed it, works perfect. got 3 news feeds working lovely.

Have only a 2 questions:
- Is it possible to delete a complete bot?
- Possible to filter out the HTML tags?

How do you mean to delete a complete bot?

Filter out HTML - You can use php replace tags for that

Entourage 04-06-2004 05:15 PM

Quote:

Originally Posted by sjau
How do you mean to delete a complete bot?


Well I added three bots now, I want to delete a bot from the Motify bot list.

jluerken 04-07-2004 05:33 AM

Quote:

Originally Posted by Entourage
Well I added three bots now, I want to delete a bot from the Motify bot list.

I had the same problem Entourage and deleted the bot with phpMyAdmin directly from the DB. There is no build in option to do so.

I have also a question. The news feed is working well but only if there aren't already posts in the forum.

How can I use the sheduled task option to prune all posts from a special forum at a explicit time?

pgowder 04-08-2004 01:35 PM

When and how do the posts to the forum happen?

I've installed it and added a bot, when will the posts show up?

PranK 04-08-2004 02:25 PM

hooooolllleeeeey crap!

I installed this and I have never seen my server load and mem usage go so high before!!!

any ideas why?

Thanks.

Christian

Okiewan 04-08-2004 02:34 PM

Quote:

Originally Posted by PranK
hooooolllleeeeey crap!

I installed this and I have never seen my server load and mem usage go so high before!!!

any ideas why?

Thanks.

Christian

I uninstalled it for the same reason.

pgowder 04-09-2004 12:59 PM

Quote:

Originally Posted by pgowder
When and how do the posts to the forum happen?

I've installed it and added a bot, when will the posts show up?

Can anyone help? The source I'm using is:

http://IndianCountry.com/rss/index.php

rockergrrl 04-09-2004 01:44 PM

Did you remember to add a cron to the rss.php file ??

As the instructions say:
Open up your cron manager (in admincp->scheduled tasks -> add scheduled task) and add an entry for rss.php. You should update every hour at the most. The filename for this is ./rss.php.

pgowder 04-09-2004 03:25 PM

Quote:

Originally Posted by rockergrrl
Did you remember to add a cron to the rss.php file ??

As the instructions say:
Open up your cron manager (in admincp->scheduled tasks -> add scheduled task) and add an entry for rss.php. You should update every hour at the most. The filename for this is ./rss.php.

I think I missed that!

pgowder 04-09-2004 03:27 PM

Quote:

Originally Posted by rockergrrl
Did you remember to add a cron to the rss.php file ??

As the instructions say:
Open up your cron manager (in admincp->scheduled tasks -> add scheduled task) and add an entry for rss.php. You should update every hour at the most. The filename for this is ./rss.php.

I just downloaded the zip again, where did you see that?

This is what I have in the instructions:

HTML Code:

Copy the files to your web server... keep the same directory structure as in the zip file.

Run the rss_install.php file to setup the RSS script.
If you're upgrading run the rss_upgrade.php file to setup the RSS script.

#### open the /index.php script ####

Find this:
require_once('./includes/functions_forumlist.php');

Add below it:
require_once('./includes/RSS/rss_update.php');

#### open the /forumdisplay.php script ####

Find this:
require_once('./includes/functions_forumdisplay.php');

Add below it:
require_once('./includes/RSS/rss_update.php');

#### open the /admincp/index.php script ####

Find this:
construct_nav_group("$vbphrase[styles] &amp; $vbphrase[templates]", '<hr />');

Add below it:
// Manage Hacks
// by: Andrew Wickham
// LiquidPro Inc.
//
        construct_nav_option('RSS News Feed', 'rss_admin.php', '<br />');
        construct_nav_group('Hacks');
//
// End Manage Hacks

You're done, thanks for installing the hack.


pgowder 04-09-2004 03:31 PM

And I don't have a rss.php file in my unzipped directory???

Slapyo 04-09-2004 04:19 PM

ok, here is the code to use the build_new_post function in vB to insert the data. this will make the post number increase automatically, make the posts searchable, make similar threads work. however, there is one tiny problem.

- the posts have \n\n in them, when they should be actual new lines. anyone know how to fix this?

other than that, it works just fine. i just need to figure this last thing out.

original authors code commented out:
PHP Code:

<?php

require('./global.php');
require(
'./includes/functions_newpost.php');

// RSS News Feed Hack
// ------------------------------
// By: Andrew Wickham of
// LiquidPro Inc.
//

// get the rss settings
$query $DB_site->query("SELECT * FROM " TABLE_PREFIX "rss_settings");
$data $DB_site->fetch_array($query);

$rss_enabled $data[enabled];

if(
$rss_enabled == 1) {
    
// include the RSS class
    
require_once('class.RSS.php');

    
$query $DB_site->query("SELECT * FROM " TABLE_PREFIX "rss_user WHERE enabled = '1'");
    while(
$data $DB_site->fetch_array($query)) {
        
$rss_source $data[source];
        
$rss_forumid $data[forumid];
        
$rss_userid $data[userid];

        
$foruminfo fetch_foruminfo($rss_forumid);
        
$bbuserinfo fetch_userinfo($rss_userid);

        
//$query2 = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = '$rss_userid'");
        //$data2 = $DB_site->fetch_array($query2);

        //$rss_user_data[username] = $data2[username];
        //$rss_user_data[posts] = $data2[posts];

        // get the bot`s username
        //$rss_user_query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = '$rss_userid'");
        //$rss_user_data = $DB_site->fetch_array($rss_user_query);
        //$rss_username = $rss_user_data[username];
        //$rss_posts = $rss_user_data[posts];
        
$rss_data implode("",file($rss_source));

        
$rss = new RSS($rss_data1);
        
$rss_allItems $rss->getAllItems();

        
// check and see what items are in the database, and mark the old ones as old
        
$rss_query $DB_site->query("SELECT * FROM " TABLE_PREFIX "thread WHERE rss_feed = '1' AND postuserid = '$rss_userid'");

        for(
$i count($rss_allItems) - 1$i >= 0$i--) {
            
$rss_allItems[$i][OLD] = false;
        }

        
// if there's no items in the database
        
if($DB_site->num_rows($rss_query) == 0) {
            for(
$i count($rss_allItems) - 1$i >= 0$i--) {
                
$rss_allItems[$i][OLD] = false;
            }
        }

        
// filter out the old items
        
while($rss_thread_data $DB_site->fetch_array($rss_query)) {
            for(
$j count($rss_allItems) - 1$j >= 0$j--) {
                if(
$rss_thread_data[title] == $rss_allItems[$j][TITLE] &&
                   
$rss_thread_data[rss_date] == $rss_allItems[$j][pubDate]) {
                    
$rss_allItems[$j][OLD] = true;
                }
            }
        }

        
// insert the new items into the database
        
for($j count($rss_allItems) - 1$j >= 0$j--) {
            if(!
$rss_allItems[$j][OLD]) {
                
// update the user profile
                //$rss_posts++;

                
$rss_title $rss_allItems[$j][TITLE];
                
$rss_dateline =  $rss_allItems[$j]['pubDate'];
                
$current_dateline time();
                
$rss_description $rss_allItems[$j][DESCRIPTION];
                
$rss_description .= "\r\n\r\n[url=" $rss_allItems[$j][LINK] . "]View the Entire Article[/url]\r\n";

                
// change <br> tags to newline
                
$rss_description str_replace("<br>", \n$rss_description);
                
$rss_description str_replace("<br />", \n$rss_description);


                
$rss_title html_entity_decode($rss_titleENT_NOQUOTES);
                
$rss_description html_entity_decode($rss_descriptionENT_NOQUOTES);
                
/*
                //$rss_title = str_replace("&apos;", "\'", $rss_title);
                //$rss_description = str_replace("&apos;", "\'", $rss_description);
                //$rss_title = str_replace("?", "--", $rss_title);
                //$rss_description = str_replace("?", "--", $rss_description);
                //$rss_title = str_replace("$", "\$", $rss_title);
                //$rss_description = str_replace("$", "\$", $rss_description);
                //sql and php don't recognize the html escape strings.
                */
                
$rss_description=mysql_escape_string($rss_description);
                 
$rss_title=mysql_escape_string($rss_title);

                
// get the next available threadid
                //$rss_threadid_query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "thread ORDER BY threadid DESC");
                //$rss_threadid_data = $DB_site->fetch_array($rss_threadid_query);
                //$rss_threadid = $rss_threadid_data[threadid] + 1;

                // get the next available postid
                //$rss_postid_query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "post ORDER By postid DESC");
                //$rss_postid_data = $DB_site->fetch_array($rss_postid_query);
                //$rss_postid = $rss_postid_data[postid] + 1;

                //$DB_site->query("INSERT INTO " . TABLE_PREFIX . "post (`threadid`, `username`, `userid`, `title`, `dateline`, `pagetext`, `allowsmilie`, `showsignature`, `visible`) VALUES ('$rss_threadid', '$rss_username', '$rss_userid', '$rss_title', '$current_dateline', '$rss_description', '1', '1', '1')");
                //$DB_site->query("INSERT INTO " . TABLE_PREFIX . "thread (`title`, `forumid`, `firstpostid`, `lastpost`, `open`, `postusername`, `postuserid`, `lastposter`, `dateline`, `visible`, `rss_feed`, `rss_date`) VALUES ('$rss_title', '$rss_forumid', '$rss_postid', '$current_dateline', '1', '$rss_username', '$rss_userid', '$rss_username', '$current_dateline', '1', '1', '$rss_dateline')");
                //$DB_site->query("UPDATE " . TABLE_PREFIX . "forum SET lastpost = '$current_dateline', lastposter = '$rss_username', lastthread = '$rss_title', lastthreadid = '$rss_threadid' WHERE forumid = '$rss_forumid'");

                // Setup the thread
                
$post['signature'] = true;
                
$post[title] = $rss_title;
                
$post[message] = $rss_description;
                
$post[poststarttime] = TIMENOW;
                
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']);

                
// build the thread
                
build_new_post('thread'$foruminfo, array(), 0$post$errors$rss_userid);
            }
        }
        
// update the posts in the database
        //$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET posts = '$rss_posts' WHERE userid = '$rss_userid'");
    
}
}

//
// ------------------------------
// End of RSS News Hack

?>

and in functions_newpost.php i added a variable into the function and wrapped the global statement around an IF/ELSE:
PHP Code:

// ###################### Start newpost #######################
function build_new_post($type 'thread'$foruminfo$threadinfo$parentid, &$post, &$errors$rss_userid '0')
{
    
//NOTE: permissions are not checked in this function

    // $post is passed by reference, so that any changes (wordwrap, censor, etc) here are reflected on the copy outside the function
    // $post[] includes:
    // title, iconid, message, parseurl, email, signature, preview, disablesmilies, rating
    // $errors will become any error messages that come from the checks before preview kicks in
    
if ($rss_userid == '0')
    {
        global 
$DB_site$vboptions$vbphrase$bbuserinfo$forumperms$usergroupcache$_REQUEST;
    }
    else
    {
        global 
$DB_site$vboptions$vbphrase$bbuserinfo$forumperms$usergroupcache$_REQUEST;
        
$bbuserinfo fetch_userinfo($rss_userid);
    } 


pgowder 04-09-2004 05:49 PM

Ok, went back and installed the new version posted in the thread. It seems to be working better.

Couple of questions now.

Will thread views increase??

Only one of my feeds is working. I have all of them going to the same forum with the same userid, is that a problem??

Here are all of my feeds:
http://IndianCountry.com/rss/index.php
http://rss.news.yahoo.com/rss/mostemailed
http://groups.yahoo.com/group/native...messages?rss=1
http://www.nativenationsnet.net/backend.php

The 2nd one is the only one that shows up in the forum.

When I run the cron job by hand through Admin CP I get this error:


Error:

Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/virtual/site2/fst/var/www/html/gathering/includes/RSS/rss_update.php on line 36

Warning: file(http://www.nativenationsnet.net/backend.php): failed to open stream: Resource temporarily unavailable in /home/virtual/site2/fst/var/www/html/gathering/includes/RSS/rss_update.php on line 36

Warning: implode(): Bad arguments. in /home/virtual/site2/fst/var/www/html/gathering/includes/RSS/rss_update.php on line 36

vau7 04-10-2004 01:38 PM

I thin kit is a great great hack but I've a Problem with it.

If i let i generate the link from a backend.php it looks like this:

http://www.wavebone.net/modules.php?...le&amp;sid=118

But the real link is

http://www.wavebone.net/modules.php?...rder=0&thold=0

So it wont work for me.

How can i fix it?


Thanks in advance,

regardly

v7

dethfire 04-10-2004 02:46 PM

someone just needs to rewrite this :(

Slapyo 04-10-2004 02:58 PM

that is what i am trying to do. i am at the last step basically. i just need to figure out how to insert the post with newlines. the way i wrote it uses vB's build_new_post function so that it works. look at post #174 in this thread. here is the code i have been working with. i just need to find out how i can insert the post with actual newlines, instead of viewing \n\n on the post. otherwise it works just fine and it uses vB's build_new_post function which means it will be searchable, post counts go up, similiar threads will work ... everything.

modified rss_update.php, my new way to insert the post:
PHP Code:

<?php

require('./global.php');
require(
'./includes/functions_newpost.php');

// RSS News Feed Hack
// ------------------------------
// By: Andrew Wickham of
// LiquidPro Inc.
// Updated By: Donnie La Curan
//

// get the rss settings
$query $DB_site->query("SELECT * FROM " TABLE_PREFIX "rss_settings");
$data $DB_site->fetch_array($query);

$rss_enabled $data[enabled];

if(
$rss_enabled == 1) {
    
// include the RSS class
    
require_once('class.RSS.php');

    
$query $DB_site->query("SELECT * FROM " TABLE_PREFIX "rss_user WHERE enabled = '1'");
    while(
$data $DB_site->fetch_array($query)) {
        
$rss_source $data[source];
        
$rss_forumid $data[forumid];
        
$rss_userid $data[userid];

        
$foruminfo fetch_foruminfo($rss_forumid);
        
$bbuserinfo fetch_userinfo($rss_userid);

        
$rss_data implode("",file($rss_source));

        
$rss = new RSS($rss_data1);
        
$rss_allItems $rss->getAllItems();

        
// check and see what items are in the database, and mark the old ones as old
        
$rss_query $DB_site->query("SELECT * FROM " TABLE_PREFIX "thread WHERE rss_feed = '1' AND postuserid = '$rss_userid'");

        for(
$i count($rss_allItems) - 1$i >= 0$i--) {
            
$rss_allItems[$i][OLD] = false;
        }

        
// if there's no items in the database
        
if($DB_site->num_rows($rss_query) == 0) {
            for(
$i count($rss_allItems) - 1$i >= 0$i--) {
                
$rss_allItems[$i][OLD] = false;
            }
        }

        
// filter out the old items
        
while($rss_thread_data $DB_site->fetch_array($rss_query)) {
            for(
$j count($rss_allItems) - 1$j >= 0$j--) {
                if(
$rss_thread_data[title] == $rss_allItems[$j][TITLE] &&
                   
$rss_thread_data[rss_date] == $rss_allItems[$j][pubDate]) {
                    
$rss_allItems[$j][OLD] = true;
                }
            }
        }

        
// insert the new items into the database
        
for($j count($rss_allItems) - 1$j >= 0$j--) {
            if(!
$rss_allItems[$j][OLD]) {

                
$rss_title $rss_allItems[$j][TITLE];
                
$rss_dateline =  $rss_allItems[$j]['pubDate'];
                
$current_dateline time();
                
$rss_description $rss_allItems[$j][DESCRIPTION];
                
$rss_description .= "\r\n\r\n[url=" $rss_allItems[$j][LINK] . "]View the Entire Article[/url]\r\n";

                
// change <br> tags to newline
                
$rss_description str_replace("<br>", \n$rss_description);
                
$rss_description str_replace("<br />", \n$rss_description);

                
$rss_title html_entity_decode($rss_titleENT_NOQUOTES);
                
$rss_description html_entity_decode($rss_descriptionENT_NOQUOTES);

                
$rss_description=mysql_escape_string($rss_description);
                
$rss_title=mysql_escape_string($rss_title);

                
// Setup the thread
                
$post['signature'] = true;
                
$post[title] = $rss_title;
                
$post[message] = $rss_description;
                
$post[poststarttime] = TIMENOW;
                
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']);

                
// build the thread
                
build_new_post('thread'$foruminfo, array(), 0$post$errors$rss_userid);
            }
        }
    }
}

//
// ------------------------------
// End of RSS News Hack

?>

and in functions_newpost.php i did this:

FIND:
PHP Code:

function build_new_post($type 'thread'$foruminfo$threadinfo$parentid, &$post, &$errors

REPLACE WITH:
PHP Code:

function build_new_post($type 'thread'$foruminfo$threadinfo$parentid, &$post, &$errors$rss_userid '0'

FIND:
PHP Code:

// $errors will become any error messages that come from the checks before preview kicks in
global $DB_site$vboptions$vbphrase$bbuserinfo$forumperms$usergroupcache$_REQUEST

REPLACE WITH:
PHP Code:

    // $errors will become any error messages that come from the checks before preview kicks in
    
if ($rss_userid == '0')
    {
        global 
$DB_site$vboptions$vbphrase$bbuserinfo$forumperms$usergroupcache$_REQUEST;
    }
    else
    {
        global 
$DB_site$vboptions$vbphrase$bbuserinfo$forumperms$usergroupcache$_REQUEST;
        
$bbuserinfo fetch_userinfo($rss_userid);
    } 


vau7 04-10-2004 06:14 PM

If i do it your way i get just cryprtical signs on index.php

Slapyo 04-10-2004 06:58 PM

Quote:

Originally Posted by vau7
If i do it your way i get just cryprtical signs on index.php

what do you mean? i have no problems with it at all and i didn't touch index.php ... what are these cryptical signs you are talking about? do you have a screenshot or link so we can see. but like i said, i've made these changes and have had no problems at all with the bot making posts, users making posts/polls. the only problem i am running into, is pretty much getting the newlines to actually be newlines instead of just the text \n\n in the posts.

dethfire 04-10-2004 07:57 PM

Slapyo, thanks! Can you zip your final version?

AWS 04-11-2004 03:27 AM

Quote:

Originally Posted by dethfire
Slapyo, thanks! Can you zip your final version?

This should work to correct the newline problem. Create a replacement var.
{br} as the tag and text to replace with <br />.
I have a similiar tag for use when posting code on one of my forums. It will act as the break tag even in a forum that doesn't have html enabled.

rockergrrl 04-11-2004 04:39 AM

How would I got about replacing the &nbsp; tags in the post feeds

I tried putting something like " - " put it doesn't want to take.
or even " " with a space - nothing.

Suggestions?
Thanks

Slapyo 04-11-2004 05:11 AM

@aws ... thanks, i will look into this and see if it works. from the sounds of it, it should! how exactly would i go about making a replacement variable? forgive the silly question, i just bought vB and am very new to it.

@rockergrrl ... this function should replace all those.

PHP Code:

$rss_title html_entity_decode($rss_titleENT_NOQUOTES); 
$rss_description html_entity_decode($rss_descriptionENT_NOQUOTES); 


rockergrrl 04-11-2004 05:35 AM

I have that already in the rss_update.php file...

Still getting &nbsp; tags showing up in posts. :/

Check attachment

Slapyo 04-11-2004 06:15 AM

what about this?

PHP Code:

$rss_title str_replace("&nbsp;"" "$rss_title); 
$rss_description str_replace("&nbsp;"" "$rss_description); 


redlabour 04-11-2004 12:00 PM

And when is the Version 2 coming ?

If i use : http://www.redlabour.de/vbulletin/in...RSS/rss_update

i get

Fatal error: Call to a member function on a non-object in /is/htdocs/53751/www.redlabour.de/vbulletin/includes/RSS/rss_update.php on line 10

on line 10 is : $query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rss_settings");

And i even have the Problem with no updates for the Feeds.

Can somebody post a new install.txt or post a complete *.zip with all corrections for this Hack ? :tired:

Slapyo 04-11-2004 12:54 PM

Quote:

Originally Posted by redlabour
And when is the Version 2 coming ?

If i use : http://www.redlabour.de/vbulletin/i.../RSS/rss_update

i get

Fatal error: Call to a member function on a non-object in /is/htdocs/53751/www.redlabour.de/vbulletin/includes/RSS/rss_update.php on line 10

on line 10 is : $query = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "rss_settings");

And i even have the Problem with no updates for the Feeds.

Can somebody post a new install.txt or post a complete *.zip with all corrections for this Hack ? :tired:

i might have something ready tonight. i'm not at my machine so i can test the final thing out. but i will be out there later tonight and can give it a shot. if everything is good, i will package it up and include a install.txt file as well.

vau7 04-11-2004 01:55 PM

Quote:

Originally Posted by Slapyo
what do you mean? i have no problems with it at all and i didn't touch index.php ... what are these cryptical signs you are talking about? do you have a screenshot or link so we can see. but like i said, i've made these changes and have had no problems at all with the bot making posts, users making posts/polls. the only problem i am running into, is pretty much getting the newlines to actually be newlines instead of just the text \n\n in the posts.


In the description of the first post are Modifications at the index.php.
Why do you wrote
Quote:

i have no problems with it at all and i didn't touch index.php ...
?

I've mixed up your edits and the Hack from the #1 Post. Wrong?
If i only do yours there is no abilty do the options in the acp?

I'm so confused now. Please tell it me slowly :disappointed:

rockergrrl 04-11-2004 02:35 PM

Quote:

Originally Posted by Slapyo
what about this?

PHP Code:

$rss_title str_replace("&nbsp;"" "$rss_title); 
$rss_description str_replace("&nbsp;"" "$rss_description); 


Nope, that didn't work :/

Now I have a problems with bold and italics in posts as well...

I tried:
PHP Code:

// change <b> tags
$rss_description str_replace("<b>""[b]"$rss_description);
$rss_description str_replace("</b>""[/b]"$rss_description);
 
// change <i> tags
$rss_description str_replace("<i>""[i]"$rss_description);
$rss_description str_replace("</i>""[/i]"$rss_description); 

But that didn't work. Should I just do a replacement var for those?

Thanks again!

redlabour 04-11-2004 03:03 PM

I wrote a PM to Xyphen - maybe he can tell us when V2 is coming out.

For the first i uninstall this Hack - i wait for a stable version or some stable feedbacks from other Users of the changes from "Slapyo" !

redlabour 04-11-2004 03:41 PM

Quote:

Originally Posted by vau7
In the description of the first post are Modifications at the index.php.
Why do you wrote
?

I've mixed up your edits and the Hack from the #1 Post. Wrong?
If i only do yours there is no abilty do the options in the acp?

I'm so confused now. Please tell it me slowly :disappointed:

:rolleyes:

Hey is not the Coder of the first posting !

The original ist from 'Xyphen' - his name is 'Slapyo' !! :tired:

redlabour 04-11-2004 03:52 PM

Sorry - me again :

Did i understand your rigtht @Slapyo - with your changes to the Code this Hack is automatically posting new News from the Feeds without deleting the new ones ?

Or is it overwriting the old ones ?

And is there a option to delete one of my Feeds in the AdminCP ?

Slapyo 04-11-2004 05:03 PM

@vau7 ... my changes were to the rss_update.php and functions_newpost.php, that's it. i think the original coder had changes in other files. here is the post that includes the file that i downloaded and have been working with.

https://vborg.vbsupport.ru/showpost....&postcount=139

when i get home tonight i will throw together a package that will include everything that i have done and give the install. it will be a complete package.

just the code i have shown will not work just by itself. you have to have everything else installed properly. see the link i posted for the files that i used to install.

@rockergrrl ... that should work actually. i noticed you have 2 $rss_descriptions for each one. i think that's my fault for some code i posted for you. this should work because when inserting the data it uses the url tags to make the link.

PHP Code:

// change <b> tags
$rss_title str_replace("<b>""[b]"$rss_title);
$rss_description str_replace("</b>""[/b]"$rss_description);

// change <i> tags
$rss_title str_replace("<i>""[i]"$rss_title);
$rss_description str_replace("</i>""[/i]"$rss_description); 

@redlabour ... my changes in code only change the way the actual post is made. instead of manually inserting the post (original), my code uses vB's built in function to insert the post enabling searching, similiar threads, and correct post counts.

if you installed the code properly there is a link in the admincp to HACKS which has RSS News Bot under that. you can add, edit, or delete a bot. if you don't want to delete it, you can just turn it off. however, this is all part of the original code. i make no changes to the way the bot collects the data, or admincp changes, just how the data is posted.

rockergrrl 04-11-2004 05:25 PM

Oy....

Can't get it to work.. even updated threads... no go... :ermm:

I can't ge the &nbsp problem fixed either.....

And then changing the bold and italics tags it puts ".&lt;br&gt;&lt;i&gt;" in the posts. :ermm:

Thanks again for all your help, I greatly appreciate it!

Screens...

redlabour 04-11-2004 05:30 PM

@Slapyo - no in the Admin CP you can only edit the Feeds - there is no "Delete" Funktion.

And sorry - i have to ask again (i know i have written it a little bit confusing before !) :

If the Hack is working correctly does the robot post the News and overwrite them if there are new ones or does he add all of them - means old and new News. I can?t know it by now because it did only worked one time with no more update of the News. ;)
Can somebody tell me this ? (Sorry - my english is a little bit untrained - i work on it again ! ;)

Slapyo 04-11-2004 06:33 PM

oh, ok i though there was a way to delete a bot in there...wasn't sure.

the way it works is this. when the bot grabs the news it will check all the news articles. if there is a new one, it will skip that news article. sometimes i have noticed that with Yahoo! news i get repeated titles, but the content of the article is different, so they are different posts. but it should not repeat an article, it will just goto the next one.

new news, will be new posts and the old news will be kept, no posts are deleted. but no repeat posts should be made.

redlabour 04-11-2004 06:51 PM

That was something i understand no definitely !! ;) Thanx ...

Slapyo 04-11-2004 10:36 PM

ok, here it is. i just ran it on my server and it worked fine. there are a couple things...

1 - might be a cleaner/neater way to convert the ASCII to normal characters
2 - might not convert all the ASCII to normal characters

so you may end up with like &apos; or &nbsp; or &#010 .... whatever it may be ... if someone wants to look at the code and see if they could clean it up that would be great. that code is in /includes/RSS/rss_update.php ... it's towards the bottom.

i have it running on my forums that i just started up ... you can see it here, http://www.sportsbabble.net

Host Visions 04-12-2004 12:33 AM

if anyone would help me get these RSS feeds running on my vb3 I will gladly pay you funds via paypal! If interested, please PM me here.

mirdin 04-12-2004 05:28 PM

Quote:

Originally Posted by Slapyo
ok, here it is. i just ran it on my server and it worked fine. there are a couple things...

Great work! Thanks!

I have one minor issue though.
I've set the user id in rss_admin, but the threads show a different user id as the poster.

EDIT:
Actually it seems to be a random user id every time the rss feeds are posted...

Slapyo 04-12-2004 06:28 PM

Quote:

Originally Posted by mirdin
Great work! Thanks!

I have one minor issue though.
I've set the user id in rss_admin, but the threads show a different user id as the poster.

EDIT:
Actually it seems to be a random user id every time the rss feeds are posted...

my problem use to be that it would post the news as whoever the person was that triggered the cron script. but i fixed that, and have had other users, and visitors trigger the script and it always posts as my bot.

after thinking about your problem some, it sounds like the problem that i had before. did you make the changes in your functions_newpost.php? it should change the build_new_post function and then change the global variables just below that in the function.


All times are GMT. The time now is 07:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02044 seconds
  • Memory Usage 2,028KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (12)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete