Go Back   vBulletin Setup > Software & Tech > Software > vBulletin

Reply
 
LinkBack Thread Tools Display Modes
Old 06-05-2007, 09:27 PM   #1
Member
Feedback Score: 0 reviews
 
RaceJunkie's Avatar
 
Join Date: Oct 2005
Location: N.C.
Posts: 96
RaceJunkie is on a distinguished road
Show recent threads on NON vb html page (Another site)

I have a few forums I host for various race tracks.. I would like to display there last 10 threads of their forum on the homepage of their site. Is this possible?

I found this link
HowTo Display Latest Active Threads on ANY normal HTML page - vBulletin Community Forum

But not sure what I am doing wrong..

Here is the code I have put on my external page.

Quote:
<!-- show latest active threads -->
<table cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tbody>
<tr>
<td colspan="2">
<a href="search.php?do=getnew">Latest Active Threads In The County Line Forums</a>
</td>
</tr>
</tbody>
<tbody>
<tr>

<td width="100%">

<div>
<script type="text/javascript" src="external.php?forumids=109,191,135&type=js"></script>
<script language="" type="text/javascript">
<!--
for (x = 0; x < 10; x++)
{
document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />");
}
//-->
</script></div>

</td>
</tr>
</tbody>
<!-- show latest active threads -->
</table>
Forums I am trying to pull feeds from HERE

Page created HERE

I don't plan on using a single page, once I get it working I would like to put it in a table on the home page.
RaceJunkie is offline   Reply With Quote

Advertisement [Remove Advertisement]

Old 06-05-2007, 10:33 PM   #2
Forum Enthusiast

Feedback Score: 4 reviews
 
BamaStangGuy's Avatar
 
Join Date: Sep 2005
Location: Alabama
Posts: 2,483
BamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond reputeBamaStangGuy has a reputation beyond repute
Send a message via AIM to BamaStangGuy
If you use Javascript to pull the threads you won't get rewritten urls since javascript is a client side scripting language. You should use a PHP program such as simple pie to do it.

Here is my php code the shows the 15 latest threads on my sidebar that can be seen here: Ford Mustang | Mustang Forums for Ford Mustang Enthusiasts

Code:
<div class="dsl-content">
<div class="dsl-content-in">
<ul>
<?php
require($_SERVER['DOCUMENT_ROOT'] . '/php/simplepie.inc');

$feed = new SimplePie();
$feed->feed_url('http://www.mustangevolution.com/forum/external.php?type=RSS2&forumids=257,275,256,134,279,142,282,255,133,258,207,125,169,285,281,246,303,302,233,227,204,268');
$feed->cache_location($_SERVER['DOCUMENT_ROOT'] . '/cache');
$feed->init();

$feed->handle_content_type();

    $max = $feed->get_item_quantity(15);
    for ($x = 0; $x < $max; $x++) {
	    $item = $feed->get_item($x);
$url = $item->get_permalink();
$title = $item->get_title();

echo "<li style=\"list-style: none; padding-bottom: 9px;\"><a style=\"border: 0px;\" href=\"$url\">$title</a></li>";
}
?>
</ul>
</div>
</div>
You can download Simplepie here: SimplePie: Super-fast, easy-to-use, RSS and Atom Parsing.
BamaStangGuy is offline   Reply With Quote
Old 06-05-2007, 11:09 PM   #3
Member
Feedback Score: 0 reviews
 
RaceJunkie's Avatar
 
Join Date: Oct 2005
Location: N.C.
Posts: 96
RaceJunkie is on a distinguished road
Quote:
Originally Posted by BamaStangGuy View Post
If you use Javascript to pull the threads you won't get rewritten urls since javascript is a client side scripting language. You should use a PHP program such as simple pie to do it.

Here is my php code the shows the 15 latest threads on my sidebar that can be seen here: Ford Mustang | Mustang Forums for Ford Mustang Enthusiasts

Code:
<div class="dsl-content">
<div class="dsl-content-in">
<ul>
<?php
require($_SERVER['DOCUMENT_ROOT'] . '/php/simplepie.inc');

$feed = new SimplePie();
$feed->feed_url('http://www.mustangevolution.com/forum/external.php?type=RSS2&forumids=257,275,256,134,279,142,282,255,133,258,207,125,169,285,281,246,303,302,233,227,204,268');
$feed->cache_location($_SERVER['DOCUMENT_ROOT'] . '/cache');
$feed->init();

$feed->handle_content_type();

    $max = $feed->get_item_quantity(15);
    for ($x = 0; $x < $max; $x++) {
        $item = $feed->get_item($x);
$url = $item->get_permalink();
$title = $item->get_title();

echo "<li style=\"list-style: none; padding-bottom: 9px;\"><a style=\"border: 0px;\" href=\"$url\">$title</a></li>";
}
?>
</ul>
</div>
</div>
You can download Simplepie here: SimplePie: Super-fast, easy-to-use, RSS and Atom Parsing.
Thanks I'll check that out.. Like what you have done with your site..
RaceJunkie is offline   Reply With Quote
Old 06-05-2007, 11:39 PM   #4
Member
Feedback Score: 0 reviews
 
RaceJunkie's Avatar
 
Join Date: Oct 2005
Location: N.C.
Posts: 96
RaceJunkie is on a distinguished road
Looks like this is for a php page.. All the pages I have created are html.. the site I want to show the recent threads on are not on the same server and have different urls.. I do not want to create a entire new page..

I want to display the posts from THIS forum on THIS site.

I know there has got to be a way to do this, Just can't find it right now..
RaceJunkie is offline   Reply With Quote
Old 06-06-2007, 03:08 AM   #5
Member
Feedback Score: 0 reviews
 
RaceJunkie's Avatar
 
Join Date: Oct 2005
Location: N.C.
Posts: 96
RaceJunkie is on a distinguished road
Here you go works great

Build a Feed You Can Cut 'n Paste

Results.. I know I need to dress it up a bit but other than that it does the trick..

Bottom right.
County Line Raceway
RaceJunkie is offline   Reply With Quote
Old 06-06-2007, 03:09 AM   #6
Forum Addict
Feedback Score: 3 reviews
 
bdude's Avatar
 
Join Date: Jul 2006
Location: Australia
Posts: 1,625
bdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant futurebdude has a brilliant future
Send a message via AIM to bdude Send a message via MSN to bdude Send a message via Yahoo to bdude Send a message via Skype™ to bdude
I don't know if this helps: Google AJAX Feed API
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

bdude is offline   Reply With Quote
Reply
vBulletin Setup > Software & Tech > Software > vBulletin


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paid extensions for vB shellspeare Graphics and Design 5 05-20-2011 06:50 PM
Coding problem in new vb forum/skin -page loads saying 'Done but with errors on page' mbradford vBulletin 3 07-07-2006 07:47 PM
vB: Latest Threads on Forum Home shellspeare Graphics and Design 0 03-13-2006 08:21 AM
Integrate vB into my site design. The Creepshow Creep vBulletin 5 01-19-2006 09:43 PM


All times are GMT +1. The time now is 09:54 AM.

Inactive Reminders By Mished.co.uk and FTP-Anime.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133