View Single Post
  #910  
Old 07-06-2005, 08:29 AM
Kadence Kadence is offline
 
Join Date: Nov 2004
Location: New Jersey
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After a lot more work than I expected :speechless:, I was able to modify this so that it works with 3.5 Beta 3.

What I did:
  • Replace $DB_site with $db in gateway.php, nntp_groups.php, nntp_settings.php, and functions_nntp.php.
  • In those same files, replace all instances of globalize( with $vbulletin->input->clean_array_gpc( ; and the tricky part: alter $_GET, $_POST, and $_REQUEST parameter inputs within clean_array_gpc to 'g', 'p', and 'r' respectively; and change the variable calls from $variablename to $vbulletin->GPC['variablename'].

Note that altering nntp_groups.php isn't entirely necessary, as the nttp_groups table can be directly modified via phpMyAdmin.

In nntp_settings.php the affected lines (in terms of the original line numbers) are around lines 92, 107, 141, 192, and 223. In nntp_groups.php the lines are around 324, 336, 368, 414, and 451.

Rather than replace all variable instances with $vbulletin->GPC['...'] calls, I just set new variables with the same names as the old ones, using $vBulletin->GPC['...']. e.g., add the line $ngid = $vBulletin->GPC['ngid'] right after the clean_array_gpc call; the variable $ngid can then be used the same as before.

One thing that gave me a bit of trouble was line 241 (in my modified file, line 263) of nntp_groups.php. In this line $group[?forum?] must be changed to ?forum?. Otherwise the form variable name comes up as ?0? on the post form, rather than ?forum?; and thus the table update doesn't work.

Note that I made a change to gateway.php line 71, and I'm not sure if it was complete; this would affect the 'log' and 'debug' variables, but those don't seem to be used anywhere that I could find.

The 4 files that were changed (nntp_groups.php, nntp_settings.php, gateway.php, and functions_nntp.php) are attached in .zip format. Note that I did not test thoroughly, so "Use at your own risk" warnings apply!

To add a menu item in the admin control panel, copy the file "cpnav_nntp_gateway.xml" to the /includes/xml directory.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01116 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete