121
goffy
Re: Restrict the "title" field
  • 2023/8/10 16:21

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi

you can add a truncate in your template file
e.g. <{$title|truncate:80}>



122
zivXP
Restrict the "title" field
  • 2023/8/10 11:51

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


How can I limit the "title" field in admin-form of "news 1.66" module to 80 characters?
In which file can this be done?

I've been trying to figure it out: modules\news\admin\index.php
case 'newarticle':
xoops_cp_header();
news_adminmenu(1);
include_once XOOPS_ROOT_PATH . '/class/module.textsanitizer.php';
newSubmissions();
autoStories();
lastStories();
expStories();
echo '<h4>' . _AM_POSTNEWARTICLE . '</h4>';
$type = 'admin';
$title = ''; - Is there any way to change this to limit the length of the field?
$topicdisplay = 0;

But that's probably not how it's done.



123
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"?



124
Mamba
Re: How to use XOOPS tree?
  • 2023/7/23 8:27

  • Mamba

  • Moderator

  • Posts: 11374

  • Since: 2004/4/23


My mistake! My apologies!

It should be /xoopstree.php and not /tree.php

Please use this line:
require_once XOOPS_ROOT_PATH '/class/xoopstree.php';
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



125
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



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

  • cadch

  • Just popping in

  • Posts: 48

  • Since: 2007/12/17


Thank Mamba~



127
Mamba
Re: How to use XOOPS tree?
  • 2023/7/20 0:42

  • Mamba

  • Moderator

  • Posts: 11374

  • Since: 2004/4/23


To utilize the XOOPS tree structure for the given array, you can follow these steps:

1. Initialize the XOOPS Tree class:

require_once XOOPS_ROOT_PATH '/class/xoopstree.php';
$tree = new XoopsTree();


2. Define the XOOPS tree structure using the array:

$treeData = 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)
);

foreach (
$treeData as $data) {
    
$tree->addNode($data['id'], $data['parent']);
}



3. Retrieve the tree structure using the XOOPS Tree class:

$treeStructure $tree->getChildTreeArray(0);


The `$treeStructure` variable will contain the hierarchical structure of the tree, starting from the root node with ID 0. You can then process and utilize this structure as per your requirements.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



128
zivXP
Re: Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home
  • 2023/7/19 10:02

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


Quote:

Masxmas wrote:
It is the error that I get and I can not enter the xoops administration. Mark a file in php and the wrong line of code.


There is no such public_html/cms directory in xoops



129
Masxmas
Re: Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home
  • 2023/7/18 14:30

  • Masxmas

  • Just popping in

  • Posts: 4

  • Since: 2023/7/8 2


It is the error that I get and I can not enter the xoops administration. Mark a file in php and the wrong line of code.



130
zivXP
Re: Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home
  • 2023/7/18 6:52

  • zivXP

  • Not too shy to talk

  • Posts: 113

  • Since: 2006/2/9 1


Quote:

Masxmas wrote:
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/midirecom/public_html/cms/class/file/folder.php on line 818

PHP 8.2


/cms/class/file/folder.php What is this?




TopTop
« 1 ... 10 11 12 (13) 14 15 16 ... 29424 »



Login

Who's Online

146 user(s) are online (69 user(s) are browsing Support Forums)


Members: 0


Guests: 146


more...

Donat-O-Meter

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

Latest GitHub Commits