Is there a mod, that allows you to show recent posts on a non vbulletin page?

Dani AI

Generated

As noted there are built-in ways to get vBulletin content and was right to think in terms of a feed. ’s drop‑in script and ’s include/echo idea are useful if you want something ready-made. For most sites the most robust pattern is: fetch the forum’s public feed server‑side, cache it, sanitize the items, and render trimmed links. That keeps load low, preserves forum visibility rules, and avoids bootstrapping the whole forum on every request.

A minimal, practical PHP pattern (replace the feed URL and paths for your site):

<?php
$feed_url = 'https://your-forum.example/path/to/feed'; // set to your forum feed
$cache_file = __DIR__ . '/cache/vb_recent.xml';
$ttl = 300; // seconds

if (!is_dir(dirname($cache_file))) mkdir(dirname($cache_file), 0755, true);

if (!file_exists($cache_file) || (time() - filemtime($cache_file) > $ttl)) {
    $ch = curl_init($feed_url);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_TIMEOUT => 5,
        CURLOPT_USERAGENT => 'SiteBot/1.0'
    ]);
    $xml = curl_exec($ch);
    $http = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    if ($http === 200 && $xml) file_put_contents($cache_file, $xml);
}

$xml = @simplexml_load_file($cache_file);
if ($xml && isset($xml->channel->item)) {
    echo "<ul>";
    $max = 8;
    foreach ($xml->channel->item as $i => $item) {
        if ($i >= $max) break;
        $t = htmlspecialchars((string)$item->title, ENT_QUOTES, 'UTF-8');
        $l = htmlspecialchars((string)$item->link, ENT_QUOTES, 'UTF-8');
        echo "<li><a href=\"$l\">$t</a></li>";
    }
    echo "</ul>";
}
?>

Troubleshooting and cautions: ensure the cache folder is writable, set a sensible TTL for your traffic, add a fallback when fetch fails, and always escape output (no raw descriptions). If you need richer data (BBcode, avatars, permission-aware content) consider a controlled server-side DB integration or bootstrapping vBulletin — but only after weighing complexity, performance, and security (use read‑only DB credentials, honor visibility flags, and cache aggressively).

Recommended Answers

All 6 Replies

You can do this without any hacks via javascript by utilizing the external.php?type=js

If you want to have recent posts via php on a non-vBulletin php based page, I'm pretty sure the hack already exists somewhere on www.vbulletin.org (99.99% positive, actually)

Should also be an RSS version of the recent posts, shouldn't there?

Yes, I would try vbulletin.org. I've been running one on one of my sites.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.