tel8618217223380 / ezstats

Automatically exported from code.google.com/p/ezstats
0 stars 0 forks source link

Invision Power Boards #242

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please enter the name of the CMS:
Invision Power Boards

Do you know a download-ressource of the CMS?:

http://www.invisionpower.com/

I dont think you download it free, but if needed I can set one up for testing, 
I bought it and can install multiple times on my site.

Original issue reported on code.google.com by mhogue3...@gmail.com on 29 Jun 2013 at 6:21

GoogleCodeExporter commented 9 years ago
Hi!

If you want to use ezStats in IPB, that would be something you could quite 
easily do with IP.Content. If you aren't using the advanced functionality then 
creating your leaderboard page would simply be a matter of running the "Add 
Page" wizard, telling it you do want to use the IP.Board Wrapper, selecting 
"Raw PHP Code" as the page type then pasting the PHP code of ezStats. Small 
changes might be needed to make it compatible, but otherwise you should be fine.

You'll get ezStats' PHP code in ezStats->Adminpanel->Plugin->Default cURL method

Kind regards, ezzemm

Original comment by ezzem...@googlemail.com on 4 Jul 2013 at 10:30

GoogleCodeExporter commented 9 years ago
I have tried to add the page as you have suggested and it does not work, I 
posted a support ticket for IPB on this and this is what they say: 

If in a content raw PHP page, the opening and closing PHP tags are created for 
you, you should not include them in your code.

So I removed the <?php and the <? and this didnt not make it work, any other 
ideas?

Original comment by mhogue3...@gmail.com on 7 Jul 2013 at 6:26

GoogleCodeExporter commented 9 years ago
What happens, if you enter this code on the PHP page:

echo "hello";

Original comment by ezzem...@googlemail.com on 8 Jul 2013 at 12:04

GoogleCodeExporter commented 9 years ago
I get a page that has the text hello, no errors

Original comment by mhogue3...@gmail.com on 8 Jul 2013 at 2:30

GoogleCodeExporter commented 9 years ago
Works well so far ;)
Now the next test. Please enter this code:

    error_reporting (E_ALL|E_STRICT);
    $ch = curl_init("http://demo.ezstats.org/plugin/");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    $output = curl_exec($ch);
    curl_close($ch);

    /* ezStats Start */
    echo $output;
    /* ezStats End */

Original comment by ezzem...@googlemail.com on 9 Jul 2013 at 1:26

GoogleCodeExporter commented 9 years ago
enter that code and get the original problem, error, page times out

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 4:32

Attachments:

GoogleCodeExporter commented 9 years ago
Please open this page (enter your URL):

www.yoursite.com/ezStats2/admin/apitest.php?curl

Which result do you get?

Original comment by ezzem...@googlemail.com on 9 Jul 2013 at 5:09

GoogleCodeExporter commented 9 years ago
This is what i get

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 5:33

Attachments:

GoogleCodeExporter commented 9 years ago
Okay. So your server supports the functions ezStats needs. Perhaps there are 
limitations of the PHP page function of IPB. Lets try this code. I hope we get 
a error message. Perhaps you can turn on error messaging in IPB?

error_reporting (E_ALL|E_STRICT);
$c=curl_init('http://api.bf3stats.com/pc/player/');
curl_setopt($c,CURLOPT_HEADER,false); curl_setopt($c,CURLOPT_POST,true); 
curl_setopt($c,CURLOPT_USERAGENT,'BF3StatsAPI/0.1'); 
curl_setopt($c,CURLOPT_HTTPHEADER,array('Expect:')); 
curl_setopt($c,CURLOPT_RETURNTRANSFER,true); 
curl_setopt($c,CURLOPT_CONNECTTIMEOUT,5); 
curl_setopt($c,CURLOPT_POSTFIELDS,$postdata);

$result = curl_exec($c);
$status = curl_getinfo($c,CURLINFO_HTTP_CODE); $error = curl_error($c); $errno 
= curl_errno($c);
curl_close($c);

echo "<br><br>BF3STATS:<br>Status: $status<br>Error: $error ($errno)<br>Result: 
$result";

Original comment by ezzem...@googlemail.com on 9 Jul 2013 at 5:44

GoogleCodeExporter commented 9 years ago
Get the same thing as #6 above, i dont see any where to turn on any error 
messaging. If there is a way I can give you access to the admin panel in 
private, maybe that will help.

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 5:55

GoogleCodeExporter commented 9 years ago
I don't want to break something, I don't know IPB ;)

What happens, if you append "var_dump($c)" after the second line?

Original comment by ezzem...@googlemail.com on 9 Jul 2013 at 6:04

GoogleCodeExporter commented 9 years ago
Like this?

error_reporting (E_ALL|E_STRICT);
$c=curl_init('http://api.bf3stats.com/pc/player/');
var_dump($c);
curl_setopt($c,CURLOPT_HEADER,false); curl_setopt($c,CURLOPT_POST,true); 
curl_setopt($c,CURLOPT_USERAGENT,'BF3StatsAPI/0.1'); 
curl_setopt($c,CURLOPT_HTTPHEADER,array('Expect:')); 
curl_setopt($c,CURLOPT_RETURNTRANSFER,true); 
curl_setopt($c,CURLOPT_CONNECTTIMEOUT,5); 
curl_setopt($c,CURLOPT_POSTFIELDS,$postdata);

$result = curl_exec($c);
$status = curl_getinfo($c,CURLINFO_HTTP_CODE); $error = curl_error($c); $errno 
= curl_errno($c);
curl_close($c);

echo "<br><br>BF3STATS:<br>Status: $status<br>Error: $error ($errno)<br>Result: 
$result";

I get the same result

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 6:13

GoogleCodeExporter commented 9 years ago
I did find this.,,,

resource(19) of type (curl)
Notice: Undefined variable: postdata in 
/home/content/74/10912674/html/admin/applications_addon/ips/ccs/sources/pages.ph
p(167) : eval()'d code on line 4

BF3STATS:
Status: 200
Error: (0)
Result: {"status":"error","error":"invalid_name","reasons":["too short"]} 

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 6:20

GoogleCodeExporter commented 9 years ago
http://www.po3squad.com/index.php?/page/test12.html

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 6:21

GoogleCodeExporter commented 9 years ago
I turn off IPB wrapper and get this..

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 6:29

Attachments:

GoogleCodeExporter commented 9 years ago
It seems it is a security function of IPB, which prevents the unwanted 
injection of Javascript. In other CMS, there are ways to circumstance this by 
using {literal} tags for example. 

Perhaps in the IPB support boards, there are thread like "how to use cURL with 
PHP page" or "how to load Javascripts with PHP page"

Original comment by ezzem...@googlemail.com on 9 Jul 2013 at 7:04

GoogleCodeExporter commented 9 years ago
Dont know if this helps.

https://www.invisionpower.com/support/guides/_/advanced-and-developers/ipcontent
/disabling-javascript-injection-r56

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 8:36

GoogleCodeExporter commented 9 years ago
I have asked for help in the IPB message boards.

Original comment by mhogue3...@gmail.com on 9 Jul 2013 at 8:45

GoogleCodeExporter commented 9 years ago
After asking in the IPB this is how to fix it.

if ( !IN_ACP )
{
    $ch = curl_init("http://po3squad.com/bf3stats/");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
    $output = curl_exec($ch);
    curl_close($ch);

    /* ezStats Start */
    echo $output;
    /* ezStats End */
}

The instead of creating a php page in IP,Content you create a php block, insert 
the block into a new page.

Check here- http://www.po3squad.com/index.php?/page/stats.html

Original comment by mhogue3...@gmail.com on 18 Jul 2013 at 5:24

GoogleCodeExporter commented 9 years ago
Hi!

This is great! I'll add a manual to ezStats for the other guys using IPB out 
there :)

Regards, ezzemm

Original comment by ezzem...@googlemail.com on 19 Jul 2013 at 10:01

GoogleCodeExporter commented 9 years ago
Can we get a update please the tables are all spaced out of wack.

Original comment by FriendsS...@gmail.com on 19 Feb 2015 at 6:22

GoogleCodeExporter commented 9 years ago
Could you give me the URL to your site?

Original comment by ezzem...@googlemail.com on 19 Feb 2015 at 11:03