vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   PSN & XBox Live Server Status Widget (https://vborg.vbsupport.ru/showthread.php?t=316255)

OUTL4W 01-15-2015 02:04 PM

thanks andrew,

Works great on my vb4 forum within forum blocks, just paste as is and it picks up all the class names....but for the life of me can't figure out how to implement it on my vb3 forum....
even tried an iframe to capture it from my vb4 site but all it showed was the raw code.

CharlieDelta 01-15-2015 07:57 PM

Works great! Thanks again Andrew!!!

AndrewSimm 01-16-2015 02:38 AM

Quote:

Originally Posted by OUTL4W (Post 2532672)
thanks andrew,

Works great on my vb4 forum within forum blocks, just paste as is and it picks up all the class names....but for the life of me can't figure out how to implement it on my vb3 forum....
even tried an iframe to capture it from my vb4 site but all it showed was the raw code.

Where do you want it on your forum?

OUTL4W 01-16-2015 07:05 AM

Quote:

Originally Posted by AndrewSimm (Post 2532751)
Where do you want it on your forum?

Would like to see it on ForumHome and vbadvanced.

i don't own the vb3 server and the owner is always traveling....I tried creating a plugin pointing to my site:
PHP Code:

ob_start();
   include(
'http://mysite.com/status/consolestatus2.php');
   
$console ob_get_contents();
ob_end_clean(); 

but I get:
PHP Code:

HP User Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in ..../global.php(400) : eval()'d code on line 401

PHP User Warning: include(http://mysite.com/status/consolestatus2.php) [function.include]: failed to open stream: no suitable wrapper could be found in ..../global.php(400) : eval()'d code on line 401

PHP User Warning: include() [function.include]: Failed opening 'http://mysite.com/status/consolestatus2.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php'in ..../global.php(400) : eval()'d code on line 401 

So I'm thinking its a server configuration issue.....

AndrewSimm 01-17-2015 02:53 AM

Quote:

Originally Posted by OUTL4W (Post 2532771)
Would like to see it on ForumHome and vbadvanced.

i don't own the vb3 server and the owner is always traveling....I tried creating a plugin pointing to my site:
PHP Code:

ob_start();
   include(
'http://mysite.com/status/consolestatus2.php');
   
$console ob_get_contents();
ob_end_clean(); 

but I get:
PHP Code:

HP User Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in ..../global.php(400) : eval()'d code on line 401

PHP User Warning: include(http://mysite.com/status/consolestatus2.php) [function.include]: failed to open stream: no suitable wrapper could be found in ..../global.php(400) : eval()'d code on line 401

PHP User Warning: include() [function.include]: Failed opening 'http://mysite.com/status/consolestatus2.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php'in ..../global.php(400) : eval()'d code on line 401 

So I'm thinking its a server configuration issue.....

Are your sites on separate servers?

OUTL4W 01-17-2015 10:01 AM

Quote:

Originally Posted by AndrewSimm (Post 2532878)
Are your sites on separate servers?

Yeah...I guess, hence the configuration error? Will this work like it should, on vb3, once the file is uploaded to server? Then place $console wherever I want it to show up?

AndrewSimm 01-17-2015 12:51 PM

Quote:

Originally Posted by OUTL4W (Post 2532902)
Yeah...I guess, hence the configuration error? Will this work like it should, on vb3, once the file is uploaded to server? Then place $console wherever I want it to show up?

Well lets first make sure it will work on your server.

Put the following in a php file and upload to your server. The only difference is I am echo'ing out the $output and putting everything in between the php tags. If it shows with this then it isn't a server issue. If it doesn't show then we need to make sure that server can use "file_get_contents"

PHP Code:

<?php

error_reporting
(E_ERROR);

$PSN_url 'http://support.us.playstation.com/app/answers/detail/a_id/237/';
$PSNhtml file_get_contents($PSN_url);
$PSNdom = new DOMDocument();
@
$PSNdom->loadHTML($PSNhtml);
$PSNxpath = new DOMXPath($PSNdom);
 
//PSN Query
$PSN_query "/html/body[@id='scea_body']/div[@id='wrap']/div[@class='boxshadow']/div[@id='main']/div[@id='search_main_box']/div[@id='rn_PageContent']/div[@id='rn_AnswerTop']/h1[@id='rn_Summary']";

$PSN_rows $PSNxpath->query($PSN_query);
 
//PSN Status
foreach ($PSN_rows as $PSN_object){
    
$PSNstatus =  $PSN_object->childNodes->item(0)->nodeValue;
}
$PSNstatus str_replace('PSN Status:'''$PSNstatus);

$XBOX_url 'http://support.xbox.com/en-US/xbox-live-status';
$XBOXhtml file_get_contents($XBOX_url);
$XBOXdom = new DOMDocument();
@
$XBOXdom->loadHTML($XBOXhtml);
$XBOXxpath = new DOMXPath($XBOXdom);
 
//Xbox Social And Gaming
$XBOXSocialAndGaming_query "/html/body[@id='DocumentBody']/div[@id='bodycolumn']/div[@id='BodyContent']/div[@class='liveStatusPage']/div[2]/ul[@class='core']/li[@id='SocialandGaming']/div[@class='item']/h3";
$XBOXSocialAndGaming_rows $XBOXxpath->query($XBOXSocialAndGaming_query);
 
//Xbox Social And Gaming loop
foreach ($XBOXSocialAndGaming_rows as $XBOXSocialAndGaming_object){
    
$XBOXSocialAndGamingStatus =  $XBOXSocialAndGaming_object->childNodes->item(1)->nodeValue;
}


//Xbox Live Core Services
$XBOXLiveCore_query "/html/body[@id='DocumentBody']/div[@id='bodycolumn']/div[@id='BodyContent']/div[@class='liveStatusPage']/div[2]/ul[@class='core']/li[@id='XboxLiveCoreServices']/div[@class='item']/h3";
$XBOXLiveCore_rows $XBOXxpath->query($XBOXLiveCore_query);
 
//Xbox Live Core Status
foreach ($XBOXLiveCore_rows as $XBOXLiveCore_object){
    
$XBOXLiveCoreStatus $XBOXLiveCore_object->childNodes->item(1)->nodeValue;
}

$output "
<style>
.xboxtitle {
    font-weight:600;
}
.xboxstatus a{
    color:#107C10;
}
.psntitle {
    font-weight:600;
}
.psnstatus a{
    color:#665cbe;
}
</style>
<span class='psntitle'>PSN Status:</span><span class='psnstatus'> <a href='https://support.us.playstation.com/app/answers/detail/a_id/237/'>" 
.
 
$PSNstatus "</a></span><br /><br /><span class='xboxtitle'>XBOX Status:</span><span class='xboxstatus'><a href='http://support.xbox.com/en-US/xbox-live-status'> " $XBOXSocialAndGamingStatus "</a></span><br /><br /><span class='xboxtitle'>XBOX Live Core Status: </span><span class='xboxstatus'><a href='http://support.xbox.com/en-US/xbox-live-status'>" $XBOXLiveCoreStatus "</a></span>"

echo 
$output;

 
?>


OUTL4W 01-18-2015 06:49 PM

Thanks Andrew
The owner is traveling so I just tried the <iframe src from my server and works perfectly....I would give you another like but it seemed I exceeded the limit of giving you "luvin's" ---(no homo). Anyways just using the iframe to get the stylings correct ...then I'll have owner upload to server.

CAG CheechDogg 01-18-2015 09:54 PM

Quote:

Originally Posted by OUTL4W (Post 2533208)
Thanks Andrew
The owner is traveling so I just tried the <iframe src from my server and works perfectly....I would give you another like but it seemed I exceeded the limit of giving you "luvin's" ---(no homo). Anyways just using the iframe to get the stylings correct ...then I'll have owner upload to server.

I gave him the like for you !! :)

AndrewSimm 01-19-2015 02:06 AM

Cool, has anyone come across any other issues?


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