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)
-   -   NEW Modified RSS News Feed Hack (https://vborg.vbsupport.ru/showthread.php?t=63798)

Aceman 05-12-2004 08:40 PM

I have a display problem when it comes to showing TITLES of threads created from the RSS from scifi.com

http://www.scifi.com/scifiwire/rss/index.xml

The threads titles appear like this:

'Potter' Designer Talks Challenges

THE ORGINAL TEXT IS: 'Potter' Designer Talks Challenges

Now I fixed my display problems in the thread with replacement for "'" to " ' " and those are showing fine.. however the thread titles are not.. What can I do to fix this?

Aceman

Link to my news forum: http://www.scifi-meshes.com/forums/f...splay.php?f=90

Aceman 05-12-2004 08:46 PM

I'm a duffis.. I fixed it buy using the code you placed eariler:

$rss_title = str_replace("'", "'", $rss_title);
$rss_description = str_replace("'", "'", $rss_description);

Aceman 05-12-2004 11:37 PM

I'm getting duplicated threads when the rss runs on the hour. I checked the (scifi.com) rss link and it DOES have a pubdate.

<pubDate>Wed, 12 May 2004 12:26:39 EST</pubDate>

Yet I still have duplicates?? Any suggestions.

Slapyo 05-12-2004 11:41 PM

newest version: 1.25 (PHP > 4.3.0) and 1.25a (PHP < 4.3.0)

this update fixes the problems with &quot; and it also will insert into the scheduled task log if you have it turned on ... atleast it should. heh, of course any problems let me know.

files changed are: rss.php and rss_update.php ... so if you want to make the changes yourself, or just upload those 2 files ... that's fine.

in rss.php FIND:
Code:

?>
ABOVE ADD:
Code:

log_cron_action('RSS News Feed Posted', $nextitem);
in rss_update.php FIND:
Code:

                                // Setup the thread
ABOVE ADD:
Code:

$rss_title = str_replace("&quot;", "\"", $rss_title);
$rss_description = str_replace("&quot;", "\"", $rss_description);
$rss_title = str_replace("&apos;", "'", $rss_title);
$rss_description = str_replace("&apos;", "'", $rss_description);


Slapyo 05-12-2004 11:50 PM

Quote:

Originally Posted by Aceman
I'm getting duplicated threads when the rss runs on the hour. I checked the (scifi.com) rss link and it DOES have a pubdate.

<pubDate>Wed, 12 May 2004 12:26:39 EST</pubDate>

Yet I still have duplicates?? Any suggestions.

i think the problem lies within the &quot; and &apos; problem. if there is a " or ' in the title it is changed and then in the database it is checked.

" != &quot;
' != &apos;

so it thinks it's a new title and it then posts. could you please check in phpMyAdmin and see if it is storing the data for the title with the &quot; or &apos; .... unfortunately i have not seen this in my news articles yet so i can't verify this.

Aceman 05-13-2004 12:51 AM

I'm not sure if this was the fix YET.. but I did notice something about code..

Code:

// 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;
                                }
                        }
                }

Around pubDate there was NO ' ' so I put them in.. seems to be working.. but I'm still testing.. I'll post soon.. if you already know (cause your a php pro) that this isn't the solution.. please tell me.. cause I'm definately NOT a php pro..

Aceman

***UPDATE*** This did NOT fix my duplication problem. I'm getting ALOT of duplicated threads.. help me!

Aceman 05-13-2004 04:46 PM

Quote:

Originally Posted by Slapyo
... could you please check in phpMyAdmin and see if it is storing the data for the title with the &quot; or &apos; .... unfortunately i have not seen this in my news articles yet so i can't verify this.

I just checked my phpMyAdmin and this is how threads that are replicated are having their TITLES stored in the database.

New &quot;Mobile Console&quot; Plays PC Games

Does this help? is their a fix?

Certain threads ARE still duplicating.. and I reuploaded your files to my server again to make sure it wasn't something I'd screwed up. I'm using 1.25 as my version of PHP is higher then 4.3.0.

Aceman

Slapyo 05-13-2004 05:45 PM

ya ok, then it is what i think it is and this should be fixed by my update i am hoping. i made it fix the titles with " and ' in them instead of having &quot; or &apos; they will have " and ' .... here is the problem:

New &quot;Mobile Console&quot; Plays PC Games

does not equal

New "Mobile Console" Plays PC Games

when compared to each other the " and ' are not converted to &quot; or &apos; ... or vice versa. the literal strings do not match each other even though to me and you they are the same. let it run for a little bit on the new 1.25 and let me know if this fixes the problem with the multiple posts.

P.Jackson 05-15-2004 10:34 PM

any ideas why the thread and post count isnt updating in subforums?

Slapyo 05-17-2004 02:35 AM

it should. the newest version takes care of that. make sure you have the latest version. it updates on mine and i am running the same version i have uploaded here, no changes.


All times are GMT. The time now is 06:15 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.01589 seconds
  • Memory Usage 1,744KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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