1
cadch
Re: Assign Smarty variable to PHP with XOOPS 2.5.11-Stable
  • 2/11 12:11

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


Quote:

liomj wrote:
lasttime before the xoops upgrade to smarty 3 this is working
<{assign var="cid" value=$downloads.cid}>    
<{
php}>
$catid=$this->get_template_vars('cid'); 
<{/
php}>


now after using
XOOPS 2.5.11-Stable with smarty 3

i receive this error
Error ErrorUsing $this when not in object context


how to update this code ?


<{assign var="cid" value=$downloads.cid}>    
<{
php}>
$catid=$_smarty_tpl->get_template_vars('cid'); 
<{/
php}>

try it~



2
cadch
Re: Error: Call to undefined method stdClass::getVar() in file /class/tree.php line 66
  • 2023/11/11 10:56

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


I'm going to study now~
Thank you~



3
cadch
Re: Error: Call to undefined method stdClass::getVar() in file /class/tree.php line 66
  • 2023/11/9 14:04

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


Thank Mamba.But I don't know how to use XoopsObject,Can you give me demo.
If My database TABLE name 'tree' content
cid  pid  name
1     0     aa
2     1     bb
3     2     cc

How to use XoopsObjectTree achieve this result
<select name="pid">
<
option value="0">----</option>
<
option value="1">aa</option>
<
option value="2">-bb</option>
<
option value="3">---cc</option>
</
select>

Sorry for wasting your time.



4
cadch
Error: Call to undefined method stdClass::getVar() in file /class/tree.php line 66
  • 2023/11/8 15:42

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


My object
Array ( [0] => stdClass Object ( [cid] => [pid] => [name] => name [icon] => bi-folder-plus [weight] => 10 [update_date] => 1514736000 [cid_type] => _top [description] => description [picture] => 1.jpg [status_code] => [user_ip] => 127.0.0.1 [user_id] => ) )

my code
$tree = new XoopsObjectTree($object'cid''pid'null);

have Error: Call to undefined method stdClass::getVar() in file /class/tree.php line 66
How to fix it?



5
cadch
Re: How to use XOOPS tree?
  • 2023/8/5 16:52

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


Thank Mamba~
I connect database change
$tree = new XoopsTree($table,'id','parent');

Is succeeded.
I have a request
"class XoopsTree function"
Is it possible to add options for "ASC" and "DESC"?



6
cadch
Re: How to use XOOPS tree?
  • 2023/7/21 14:33

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


I have a message
Error: Class "XoopsTree" not found

Can you help me



7
cadch
Re: How to use XOOPS tree?
  • 2023/7/21 11:38

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


Thank Mamba~



8
cadch
How to use XOOPS tree?
  • 2023/7/17 14:41

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


Hello~
My tree used
array(
array(
'id' => 1'parent' => 0),
array(
'id' => 2'parent' => 0),
array(
'id' => 3'parent' => 0),
array(
'id' => 4'parent' => 1),
array(
'id' => 5'parent' => 4),
array(
'id' => 6'parent' => 5)
);

How can I use XOOPS tree?



9
cadch
XOOPS 2.5..11 beta 2 search.php need fix line 229
  • 2022/9/25 10:19

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


line 229:
$count          count($results);


fix:
if ($results) {
    
$count count($results);
}else{
    
$count 0;
}



10
cadch
Re: If undefined function escapeshellcmd()
  • 2022/6/12 8:18

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


SMTP is ok~




TopTop
(1) 2 3 4 »



Login

Who's Online

224 user(s) are online (39 user(s) are browsing Support Forums)


Members: 0


Guests: 224


more...

Donat-O-Meter

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

Latest GitHub Commits