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)
-   -   NNTP Gateway for Usenet ( Newsgroups ), Mailing Lists (https://vborg.vbsupport.ru/showthread.php?t=65152)

DaveLogic 05-25-2004 10:08 PM

Just upgraded from the previous version (which worked fine) and installed perfectly so many thanks....What would be a great improvement would be be this IMO...

1 - A random default avatar for guest NNTP posts - Would tie in with forum based posts better and look better.

2 - Use the same quotation code as in the forum...i.e the tidy box that surrounds quotes normally within forum posts...I don't know how this would transfer back to the newsgroups however....??? Anyway, the Admin cp section really helps...really nice stuff...

Odoin 05-25-2004 10:09 PM

Now keep in mind not every servers handles the same newsgroups... but here is a list I go by...

http://205.215.62.111/groups-list.txt (2mb in size).

Odoin 05-25-2004 10:10 PM

I like the avatar idea... The quotes might be sorda hard because of the different ways the news clients quote messages... maybe a default for the standard ones could be built in?

Mark
Quote:

Originally Posted by DaveLogic
Just upgraded from the previous version (which worked fine) and installed perfectly so many thanks....What would be a great improvement would be be this IMO...

1 - A random default avatar for guest NNTP posts - Would tie in with forum based posts better and look better.

2 - Use the same quotation code as in the forum...i.e the tidy box that surrounds quotes normally within forum posts...I don't know how this would transfer back to the newsgroups however....??? Anyway, the Admin cp section really helps...really nice stuff...


DaveLogic 05-25-2004 10:19 PM

Quote:

Originally Posted by Odoin
I like the avatar idea... The quotes might be sorda hard because of the different ways the news clients quote messages... maybe a default for the standard ones could be built in?

Mark

My Newsgroup stuff gets a tad ignored because all of the NNTP guest post members don't/can't have an avatar which sort of gives the game away...I would imagine that this would better be placed as a "generic" hack as even it it were a static guest avatar it woud be a plausable idea being that boards could use a site logo as default...???

lierduh 05-26-2004 01:10 PM

Quote:

Originally Posted by DaveLogic
Just upgraded from the previous version (which worked fine) and installed perfectly so many thanks....What would be a great improvement would be be this IMO...

1 - A random default avatar for guest NNTP posts - Would tie in with forum based posts better and look better.

2 - Use the same quotation code as in the forum...i.e the tidy box that surrounds quotes normally within forum posts...I don't know how this would transfer back to the newsgroups however....??? Anyway, the Admin cp section really helps...really nice stuff...

1. I am not sure it will work, but if someone wants to try it out. Add a user with the user ID of 0. And add avatars etc for the user 0.

2. What really matters is what contents is ended up on Usenet. If the normal usenet users see BB tags etc, they will start to hate your forums. So a text based message will be more acceptable. Even the script gets rid of the BB tags before sending them, there are always users who miss one "[" or "]" and stuff up the formating.:)

Princeton 05-26-2004 08:49 PM

thanks for the list

SUGGESTION on next update
Create a script (ala cron job) to remove certain post(s) (by subject) that contains "porn", "$", "buy", etc, etc...

KevinM 05-28-2004 05:07 PM

I've been playing with getting the email notifications to work with this script. If you find

PHP Code:

// send out email notices 

in gateway.php and after it put:

PHP Code:

exec_send_notification($threadid$userid$postid); 

It seems to work (well, it did the few times I tested it :speechless: )
Let me know if it works for you.

Imhotep 05-29-2004 03:17 PM

Quote:

Originally Posted by princeton
thanks for the list

SUGGESTION on next update
Create a script (ala cron job) to remove certain post(s) (by subject) that contains "porn", "$", "buy", etc, etc...



After a long battle with my host and finding a good NSP, I finally got this hack to work but only through port 23... which is fine with me as long as it works.

I would like to add to what Princeton has suggested. We absolutely need a filter system to screen out not only offensive headers but also attachments. One of my subscribed groups is a binary group. (alt.binaries.3d.lightwave) Lately, I have been deleting virii that come through and plant themselves as simple attachments. The main type has been the .scr variety. I would hate to see one of my members click on one of these attachments before I can find it and del it. Perhaps we can intergrate the attachment file extension permissions from VB into this hack, no?

www.cghaus.com

KevinM 05-29-2004 03:33 PM

Quote:

Originally Posted by Imhotep
The main type has been the .scr variety. I would hate to see one of my members click on one of these attachments before I can find it and del it. Perhaps we can intergrate the attachment file extension permissions from VB into this hack, no?

I have been writing that today (coincidence). I am just testing it, and will post the instructions tomorrow. It checks the extension type aginst what has been allowed in the vb control panel.

KevinM 05-30-2004 05:56 AM

These code changes use vb's attachment permissions (extensions only) before inserting attachments into the database - so no more .scr files :squareeyed:

If the file extension is not set up in the 'Attachment Manager' 'Extensions and Sizes' section of the control panel then the attachment is ignored.

I have tested it on version 2.1.0. All changes are to 'gateway.php'. There are 6 additions or changes to the script to be made to 'gateway.php'.

Find

PHP Code:

require_once("global.php"); 

CHANGE it to:

PHP Code:

$specialtemplates = array(
    
'attachmentcache'
);
require_once(
"global.php");
$attachtypes unserialize($datastore['attachmentcache']); 

Find:

PHP Code:

function process_attachments ($date$postid$threadid) {
    global 
$message$DB_site

AFTER it put:

PHP Code:

global $attachtypes

Find:

PHP Code:

$attachcount 0

AFTER it put:

PHP Code:

$attaches 0

Find:

PHP Code:

for ($i 1$i <= $message['attachments']; $i++) { 

AFTER it put:

PHP Code:

// now we check the file extension against the vb settings to check that it exists, and if it does, check it is enabled.
        
$attachment_name2 strtolower($message['attachment' $i]['headers']['filename']);
                
$extension file_extension($attachment_name2);
        
    if (!
$attachtypes["$extension"] OR !$attachtypes["$extension"]['enabled'])
    {
        
// invalid extension
        
logging($extension " extensions are not accepted, as currently set up in the control panel \n");
    }
    else { 

Find:

PHP Code:

fclose($handle);
        
unlink($tempfile); 

CHANGE to:

PHP Code:

$attaches++;
        
fclose($handle);
        
unlink($tempfile);
        } 

Find:

PHP Code:

$DB_site->query("UPDATE " TABLE_PREFIX "post 
    SET attach = attach + " 
$attachcount " WHERE postid = $postid");
    
$DB_site->query("UPDATE " TABLE_PREFIX "thread
    SET attach = attach + " 
$attachcount " WHERE threadid = $threadid");
    
logging("Inserted " $attachcount " attachment(s).");


CHANGE to:

PHP Code:

$DB_site->query("UPDATE " TABLE_PREFIX "post 
    SET attach = attach + " 
$attaches " WHERE postid = $postid");
    
$DB_site->query("UPDATE " TABLE_PREFIX "thread
    SET attach = attach + " 
$attaches " WHERE threadid = $threadid");
    
logging("Inserted " $attaches " attachment(s)."); 

And that is it :nervous:

This script doesn't check against the maximum file size or image dimensions permissions, but it would be fairly easy to add on however I'm not sure of how useful this would be, as people posting to newsgroups would be unaware of your boards limits.


All times are GMT. The time now is 03:37 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.01711 seconds
  • Memory Usage 1,786KB
  • 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
  • (14)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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