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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-04-2004, 05:27 AM
will_lean will_lean is offline
 
Join Date: Apr 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default cannot include files?

hi
im tryin to sort a problem im having with a hack,
but maybe its my board setup?

im not that familiar with vb's function but whenever i try to include a file in the
phpinclude_end template
it gives me a white page and nobody can access my forum anymore?

usually when a white page is displayed its because a template is broken or missing?

can anyone shed a lil light on my problem? :disappointed:
Reply With Quote
  #2  
Old 06-04-2004, 09:30 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does your included file have some direct output devices (like echo 'xjfur'; or plain html not in <?php tags)?

If yes, you should get rid of those, as they broke vb's outputsystem (i have had to find out myself, often in the past..^^)
Reply With Quote
  #3  
Old 06-04-2004, 04:02 PM
will_lean will_lean is offline
 
Join Date: Apr 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the help
the includes file is as below and all is enclosed in php tags.
however adding this to phpinclude_end template breaks the output as you said.
same thing happens if i include the data below directly into a file?

would the
print "<head>";
print "<script>";
portion of the file be creating my problem?if so how can i fix it?


Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # v3 SMS System 1.0. by PcFreak [http://at-lantis.de]				||
|| # SMS empfangen auf jeder Seite.										||
|| # Please click install if you used this hack							||
|| #################################################################### ||
\*======================================================================*/
// ##### SMS SYSTEM #####
$smsvorhanden = $DB_site->query_first("
	SELECT id_vom_empfaenger
	FROM " . TABLE_PREFIX . "sms 
	WHERE id_vom_empfaenger = $bbuserinfo[userid]		
	");		
	
	if ($smsvorhanden[id_vom_empfaenger] == '')
	{} 
	else
    	{
			
				
	print "<head>";
	print "<script>";
	print "function popsms(){";
	print "win = window.open('sms.php?do=sms_lesen','_blank','toolbar=no,location=no,menubar=no,scrollbars=yes,width=550,height=500,resizeable=no,status=no');";
	print "}";
	print "</script>";
	print "</head>";
	print "<body onLoad='popsms()'>";
	print "</body>";			    
			
		} 
// ##### SMS SYSTEM #####
?>
thanks :nervous: again
Reply With Quote
  #4  
Old 06-04-2004, 04:27 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, include that file into your phpinclude_start template:

PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # v3 SMS System 1.0. by PcFreak [[url]http://at-lantis.de][/url]                ||
|| # SMS empfangen auf jeder Seite.                                        ||
|| # Please click install if you used this hack                            ||
|| #################################################################### ||
\*======================================================================*/
// ##### SMS SYSTEM #####
$smsvorhanden $DB_site->query_first("
    SELECT id_vom_empfaenger
    FROM " 
TABLE_PREFIX "sms 
    WHERE id_vom_empfaenger = 
$bbuserinfo[userid]        
    "
);        
    
    if (
$smsvorhanden[id_vom_empfaenger] == '')
    { 
$smshtml '';} 
    else
        {
        
$smshtml "
            <script>
            function popsms(){
            win = window.open('sms.php?do=sms_lesen','_blank','toolbar=no,location=no,menubar=no,scrollbars=yes,width=5  50,height=500,resizeable=no,status=no');
            }
            </script>
            <body onLoad='popsms()'></body>"
;                
            
        } 
// ##### SMS SYSTEM #####
?>
and then put $smshtml into your header template, i assume that should work.
Reply With Quote
  #5  
Old 06-04-2004, 04:44 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ouch thats a query every load, regged or not.

Try this block:

PHP Code:
if ($bbuserinfo['userid'])
{
$smsvorhanden $DB_site->query_first("
    SELECT id_vom_empfaenger
    FROM " 
TABLE_PREFIX "sms
    WHERE id_vom_empfaenger = 
$bbuserinfo[userid]        
    "
);   
}
else
{
   
$smsvorhanden = array();

Reply With Quote
  #6  
Old 06-04-2004, 08:37 PM
will_lean will_lean is offline
 
Join Date: Apr 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

big thankx xenon worked great!

@brad.loo

is this correct?
Code:
if ($bbuserinfo['userid']) 
{
$smsvorhanden = $DB_site->query_first(" 
    SELECT id_vom_empfaenger 
    FROM " . TABLE_PREFIX . "sms 
    WHERE id_vom_empfaenger = $bbuserinfo[userid]         
    ");         
     } 
else 
{ 
   $smsvorhanden = array(); 
}
    if ($smsvorhanden[id_vom_empfaenger] == '') 
    { $smshtml = '';} 
    else 
        { 
        $smshtml = " 
            <script> 
            function popsms(){ 
            win = window.open('sms.php?do=sms_lesen','_blank','toolbar=no,location=no,menubar=no,scrollbars=yes,width=550,height=500,resizeable=no,status=no'); 
            } 
            </script> 
            <body onLoad='popsms()'></body>";                 
             
        } 
// ##### SMS SYSTEM ##### 
?>
Reply With Quote
  #7  
Old 06-04-2004, 10:36 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're welcome

yes, seems correct
Reply With Quote
  #8  
Old 06-05-2004, 05:16 PM
will_lean will_lean is offline
 
Join Date: Apr 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi xenon
im wondering if you can maybe help me further with this?

the sms system seems to work but the original includes file makes it so a message is received by popup when sent,
i.e i send a sms msg to myself and the popup should display right away,
the way i have it working now will only load the replying msg when i refresh the page?

is it possible to make the javascript portion timed instead of onload?

sorry for all the trouble :squareeyed:
Reply With Quote
  #9  
Old 06-06-2004, 12:22 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, sorry, i don't know that much about JS, but i don't believe the original did it that way.

that will just appear, when you send an SMS to yourself, as it was in the phpinclude_end.

but when others sent you an SMS the old and the new one would have required to refresh the page, at least from what i see.
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 12:51 AM.


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.04189 seconds
  • Memory Usage 2,250KB
  • 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_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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