Open GoogleCodeExporter opened 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
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
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
I get a page that has the text hello, no errors
Original comment by mhogue3...@gmail.com
on 8 Jul 2013 at 2:30
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
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
This is what i get
Original comment by mhogue3...@gmail.com
on 9 Jul 2013 at 5:33
Attachments:
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
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
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
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
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
http://www.po3squad.com/index.php?/page/test12.html
Original comment by mhogue3...@gmail.com
on 9 Jul 2013 at 6:21
I turn off IPB wrapper and get this..
Original comment by mhogue3...@gmail.com
on 9 Jul 2013 at 6:29
Attachments:
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
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
I have asked for help in the IPB message boards.
Original comment by mhogue3...@gmail.com
on 9 Jul 2013 at 8:45
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
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
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
Could you give me the URL to your site?
Original comment by ezzem...@googlemail.com
on 19 Feb 2015 at 11:03
Original issue reported on code.google.com by
mhogue3...@gmail.com
on 29 Jun 2013 at 6:21