Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2002, 06:01 PM
Marv Marv is offline
 
Join Date: Jun 2002
Location: Germany
Posts: 372
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default No idea how to use this in php..

Hi,

on our site we´ve got this Newsserver-script installed. Now I have a problem: I would like to include a function and I have no glue how to do that. Í´m just at the very beginning of working with php.files so may be someone could assist me with this?

The hack I´m talking about is this one: <a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=37888&perpage=15&displa y=&pagenumber=1" target="_blank">https://vborg.vbsupport.ru/showt...=&pagenumber=1</a>

gateway.php has to be run in your browser everytime you want to synchronize posts with the newsserver. (BTW: I have to do this with Opera or Netscape cause MSIE always wants to <i>download</i> gateway.php instead of executing the file..)

As someone mentioned you could use opera and the built-in refresh-option or do it seperatly in a html-file like this <div style="margin:5px 10px"> <div class="smallfont" style="margin-bottom:2px">Code:</div> <pre class="alt2" dir="ltr" style=" margin: 0px; margin-top: 5px; padding: 4px; border: 1px inset; width: 650px; height: 338px; text-align: left; overflow: auto"><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta HTTP-EQUIV="Refresh" CONTENT="900"><meta NAME="Robots" CONTENT="NOINDEX,NOFOLLOW"><title>Iframe Newsgroup Synchronizer</title></head><body>Iframe Newsgroup-Synchronizer<iframe src="http://www.yourdomain.com/forums/gateway.php" width="100%" height="400" name="gateway.php in a box"><p>Ihr Browser kann leider keine eingebetteten Frames anzeigen:Sie k&ouml;nnen die eingebettete Seite &uuml;ber den folgenden Verweisaufrufen: <a href="http://www.yourdomain.com/forums/gateway.php">manuelle Newsserver-Abfrage</a></p></iframe></body></html></pre></div>or you could include a hidden link to the newsgroups forum (thanks for the idea firewars) which would cause a reload of the gateway.php . As said before, MSIE tries to donwload the file instead of executing - so a few members would be irritated what´s happening.

We´re on a shared server and so we´re not allowed to run cronjobs. Is it possible to let this job be done by another php.file ?

What I was thinking of:
I guess the most users here - assumed 98 percent of all german bb´s are installed on shared web-servers - can´t do cronjobs.

A solution to that could be to include a - let me call it - "pusher-option" which forces gateway.php to execute without any browser output. (in case the script won´t work proper vb´s db is already configged to send you an eMail-notification every time the error appears)

To reduce bandwith and transfer-volume a new function should be added to this that gateway.php is only executable every 15 (or whatever) minutes.

In practice it would happen like this:
User clicks the newsgroup-forum-link --> this one opens the forum and at the same time is executing gateway.php in a hidden way (without output to the users browser).
After that certain others are viewing this newsgroup-forum but only after [x]-minutes the gateway.php should be executed again by a click on the forum-link.
Otherwise on Boards with a heavy user load your transfer-volume would increase rapidly - and it´s not necsessary to synchronize with the newsserver every 60 seconds and let the users wait another 30 seconds until gateway.php is through with this job until they can view the threads inside..

Dunno exactly which would be the apropriate forum for this so I put it in here and posted it in the thread where I´ve got the hack from. If this forum ist totally wrong please feel free to move this thread to wherever you think it´s in the right place.

Regards,
Marv.
Reply With Quote
  #2  
Old 06-27-2002, 06:07 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, im not sure if i have understood everything

but i think you want to do something like this:
open forumdisplay.php
find:
PHP Code:
$getperms=getpermissions($forumid,-1,-1,$foruminfo['parentlist']);
if (!
$getperms[canview]) {
  
show_nopermission();

below it add:
PHP Code:
if($forumid==X) include("gateway.php"); 
replace the X with your Newsforumid
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03812 seconds
  • Memory Usage 2,174KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete