1
dannie
error message when using php include
  • 2010/2/16 5:00

  • dannie

  • Just popping in

  • Posts: 36

  • Since: 2004/2/10


XOOPS Version: 2.44
Module Name/Version: custom module
PHP Version: 5
MySQL Version:5.0.77
Custom template: No
PHP Debug Messages: Warning: include() [function.include]: URL file-access is disabled in the server configuration in file /class/xoopsblock.php(163) : eval()'d code line 1

I have a game points module I am working on and it's working fine. I am trying to include the user's points in a block with php include but it's not working. I am getting the debug message listed above.

You can check out the game points module: http://www.somge.com/salc/learners/

username: blackglass
password:earthling

Click the points module to see that it is working. Basically members play educational games and get points for each game played. The site is not active yet which is why it's turned off.

http://www.somge.com/salc/learners/modules/points/getuserpoints.php is the file I am trying to include in a custom block. It shows each member their points. I am trying to get that information in a block by including the file with this: include("http://www.somge.com/salc/learners/modules/points/getuserpoints.php"); in a custom block.

I know very little php and have been using the module tutorial to create this module. Any help you can give is appreciated.

thanks

2
iHackCode
Re: error message when using php include

try

include(XOOPS_ROOT_PATH.'/modules/points/getuserpoints.php');

3
dannie
Re: error message when using php include
  • 2010/2/16 14:58

  • dannie

  • Just popping in

  • Posts: 36

  • Since: 2004/2/10


Thanks for the reply Bandit.

I tried that and it didn't work. I tried double quotes, single quotes, with
Can you suggest another way for me to show members their points. I would like it in their profile, if possible.

thanks

4
dannie
Re: error message when using php include
  • 2010/2/16 15:06

  • dannie

  • Just popping in

  • Posts: 36

  • Since: 2004/2/10


When creating a custom php block, do I include the or do I just put in the code. I have tried both ways and neither way is working.

thanks

5
dannie
Re: error message when using php include
  • 2010/2/16 20:43

  • dannie

  • Just popping in

  • Posts: 36

  • Since: 2004/2/10


I still don't know why the block isn't working. I think there is a bug because any php block I try to create isn't working. I notice only half the code shows up in the preview pane. The first part of the code gets cut off for some reason. This could be why the block isn't working.

Anyway I solved the problem by figuring out how to put the member's points in their profile. I would have preferred a block so they can see the points anywhere on the site but oh well.

6
iHackCode
Re: error message when using php include

Quote:

dannie wrote:
When creating a custom php block, do I include the or do I just put in the code. I have tried both ways and neither way is working.

thanks


just the code. no php tags needed.

could be the file cannot be displayed that way, no clue without looking at the actual code. But creating your own module block is quite easy though.

https://xoops.org/modules/mediawiki/index.php/Basic_content_of_a_module

Login

Who's Online

339 user(s) are online (289 user(s) are browsing Support Forums)


Members: 0


Guests: 339


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits