With a quite simple solution based on a version-check ($vbulletin->versionnumber actually), this script now seem to be compatible with both 3.x and 4.x. My (only) test was at least successful – at last. The solution to (hopefully) make the gateway compatible with both vBulletin 3.x and 4.x, was to separate the insertion data into two sections: one for the old attachment-query, and one for attachments handled by vBulletin 4.x (where attachment-tables are separated), starting with this little helping row…
if (!preg_match("[^4]", $vbulletin->versionnumber))
Probably, this is not a foolproof solution, but it seem to work! The script was tested with vB 4.0.2 with a successful output, so far. So here we go!
includes/functions_nntp.php version 2010-03-26 22:17
http://tmm.tornevall.net/dev/functions_nntp_vb4_100326_2217.tar
Example post from de.alt.dateien.misc
http://forum.tornevall.net/showthread.php?343942-Eislutscher-am-Wiener-Heldenplatz
Läs även andra bloggares åsikter om console, cron, gateway, news, nntp, NNTP Gateway Modification - vb4 Compatibility Fix, php, script, usenet, vb4.0, vbulletin, vbulletin 4.0

