1
nyman
Re: Objetc method use in templage problem
  • 2005/3/10 17:37

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


You are the One.
Tnx.



2
nyman
Re: Objetc method use in templage problem
  • 2005/3/10 17:28

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


Workaruond works.

What I don't understand is that $object->propertie is known ( so class definition is known, isn't it ) and $object->method() is not

Any way, as I've said, workaround works. Thank you very much !!



3
nyman
[Solved] Objetc method use in templage problem
  • 2005/3/10 16:50

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


Hi, I'm writing a new module and I've a problem:

This is the context:

Have a defined class:

class myClass{
var $name;
function myClass
{
$this->name="This is the name";
}
function getName()
{
echo $this->name;
}
}

ok, in my index.php :

<?
...
includes ...
...

myObject = new myClass();

...

...

$tplXoops->assign( 'myObject', $myObject );

include XOOPS_ROOT_PATH."/footer.php";
?>


and last, in template ...

This is the value: <{$object->getName()}>


Well, if I write in template :

This is the value: <{$object->name}>

it works perfectly ... but when I try to call a method function I get a Non-object call function etc etc
when compiling template ... but this is not all ... I get the error, but module and template works ...


Why do I get that error when updating module ??
Any one has a possible response ?

Thanx in advance !



4
nyman
Xoops can't manage big sessions
  • 2005/3/8 12:29

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


Hi, I had problems with big sessions and session vars where lost ...

Problem is sess_data at xoops_session table is too small ( TEXT, max=65535 )

Should it be changed to LONGBLOB ??



5
nyman
Re: SOLVED Extrange problem with session vars ...
  • 2005/3/8 12:18

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


I have change sess_data at xoops_session table from text ( max 65535 ) to longblob and now I can manage big sessions.



6
nyman
Re: Extrange problem with session vars ...
  • 2005/3/8 12:11

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


OK, I've seen sess_data at xoops_session table is not able of holding more than 65535 bytes ...

I think this is the problem ...

So ... ¿ How can I avoid sess_data size limitation ??

Thanx.



7
nyman
Extrange problem with session vars ...
  • 2005/3/8 11:02

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


Hi, I have a big problem with session vars:

I have a class:

class myClass
{
var $records;
function get()
{
$this->records = array();
...
Populate array
...
}
}


In index.php:

...

includes
...

if ( !isset( $_SESSION['myVar'] ) )
{
$_SESSION['myVar'] = new myClass();
echo "First Time, session var created !!";
}

$_SESSION['myVar']->get();

...

assign to template
and dysplay

...


Well, this works perfectly for few records ( <= 160 ) ... but when method returns more than aprox 170
records, $_SESSION['myVar'] DISAPPEARS and object is created again !!!!!

Uffff, I've read a lot and I have not get answer ...

I've tried globals=ON and OFF, changing max memory ...

Has any one the same problem ? any idea ??

It's really frustrating ...

Note: I use PHP4.2.1, I've tried this out XOOPS and it works perfectly with many records ... may it be some XOOPS session managing limitation ???

My php.ini:

[ Moved, so it wasn't the cause ... ]



8
nyman
PHPLOT: Charts in XOOPS
  • 2005/1/28 17:39

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


Hi !!

I need to draw some nice charts in new XOOPS module I'm writing.

I've try PHPLOT/PHP outside XOOPS and It works really fine ...

But I can't get it working under XOOPS ...

How can I use PHPLOT with XOOPS/templates ( smarty ) or any other chart engine ???

Thanx.



9
nyman
Use of object in smarty template
  • 2005/1/28 17:22

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


Hi all

I have a class:

## file class/my_class.php

class myClass
{
var $data;
function myClass()
{
$data = "this is data";
}
function oneMethod()
{
echo ("result");
}
}

## file index.php

<?
include "header.php";

$xoopsOption['template_main'] = 'controlcenter.tpl';

if($xoopsConfig['startpage'] == "controlcenter"){
$xoopsOption['show_rblock'] =1;
include XOOPS_ROOT_PATH."/header.php";
make_cblock();
}else{
$xoopsOption['show_rblock'] =0;
include XOOPS_ROOT_PATH."/header.php";
}

$myObject = new myClass();

$xoopsTpl->assign( 'object', $myObject );

include XOOPS_ROOT_PATH."/footer.php";
?>

... of course, header.php includes class definition ...


Then, I have a template

If I put

<{$object->data}>

It installs and runs perfectly ... So I see "this is data"
so smarty <i>knows</i> myClass object definition ...

But my problem is when I write:

<{$object->oneMethod()}>

Then I can't update module so It says:

Fatal error: Call to a member function on a non-object in bla bla bla

I've tried smarty with PHP out of XOOPS and I do can do what I want ...

Any one can help me ??? how can I call object method from xoops/smarty ???


Thanx is advance !!!



10
nyman
system configuration lost ...
  • 2004/2/12 18:24

  • nyman

  • Just popping in

  • Posts: 11

  • Since: 2004/1/9 1


Hi !!

When I enter Administration menu ... System Configuration button is lost ...

How can I recover it ??

Thanx in advance !!




TopTop
(1) 2 »



Login

Who's Online

255 user(s) are online (185 user(s) are browsing Support Forums)


Members: 0


Guests: 255


more...

Donat-O-Meter

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

Latest GitHub Commits