w cron Skip to content

Google!

Archive

Tag: cron

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 , , , , , , , , , , ,

This post is for the guys at vbulletin.org, by request.

First of all, here’s the current source:

http://tmm.tornevall.net/dev/nntpgw-100312.tar

Changes made:

  • admincp/nntp_settings.php
    • Added settings for ”static email” for the from-header. Using this, will set a non-dynamic sender e-mail.
  • gateway.php
    • Added ”support” for console-runs (fix for vBulletin 4.0 that doesn’t like this)
    • ”Debug”-modes: 1 = Activate debug (not used), 2 = Unlock the script if it got stuck (this is a console thing)
    • Added some info into a logfunction to get more verbose info on connection
    • Dupechecker for threads/posts. If the xref/lastpost-value changes due to the nntpserver, this function avoids duplicate posts from the newsserver. This is extremely nice, if the newsserver used in some reason has been reset due to reinstallations, crashes etc (yes, this has happened to me – this is the fix)
    • Last-Insert-ID fixed, an old issue that happens when trying to read a new post from a forum
  • includes/functions_nntp.php
    • Small fixes, including footer changes – in some reason the original footer added to posts, made from a forum disturbed me, so this has been cleaned up so it looks more like a ”real” post on usenet. This fix was something about the signatures, so to speak.
    • Message-ID, References and From manipulated (partially referred to the static-email-setting above)
    • Another first-post-id/last-post-id fix
    • An old issue about attachments fixed here (observer that this is always accepting attachments/thumbnails). It also includes some kind of extension fix. Well, this is a very old fix and one of the first made to the script and my memory is quite blurry in this case… But I’ve never needed to change this back to it’s original state
    • require class_image.php replaced for attachments support. Also this is an old issue, and documented somewhere in the thread at vbulletin.org
  • includes/nntp.php
    • Fix for handling usenet-traffic if the webserver where the script is running, happens to run a peer for the nntp-server (sending MODE READER on connection – if the server is a peer, some servers initially are expecting MODE  STREAM, which the script won’t understand)

This is it I think. Wishes and questions will be answered if possible!

See you at vbulletin.org!


Läs även andra bloggares åsikter om , , , , , , , , , ,

FireStats icon Använder FireStats