561
edipinho
Re: Modulos xForms dificultade de criar campo em branco (sem dados)
  • 2021/11/27 17:34

  • edipinho

  • Not too shy to talk

  • Posts: 107

  • Since: 2003/10/15


It still has the same error as the non-mandatory field, and in your form the fields are all mandatory and in this case it's working perfectly.

(Portugues BR)
Continua com o mesmo erro do campo não obrigatório, e no teu formulário os campos são todos obrigatório e neste caso está funcionando perfeito.

Resized Image



562
heyula
Re: Modulos xForms dificultade de criar campo em branco (sem dados)
  • 2021/11/27 16:58

  • heyula

  • Theme Designer

  • Posts: 594

  • Since: 2008/4/24


@goffy fixed existing bugs. It works stably on my own site.

Demo:
https://www.togaysan.com.tr/insan-kaynaklari



563
edipinho
Re: Modulos xForms dificultade de criar campo em branco (sem dados)
  • 2021/11/27 16:55

  • edipinho

  • Not too shy to talk

  • Posts: 107

  • Since: 2003/10/15


Hi heyula, I will do this update and soon post if I can, thanks for the super quick response.

Portugues BR
Oi heyula, irei fazer está atualização e logo posto se conseguir, obrigado pela resposta super rápida.



564
heyula
Re: Modulos xForms dificultade de criar campo em branco (sem dados)
  • 2021/11/27 16:40

  • heyula

  • Theme Designer

  • Posts: 594

  • Since: 2008/4/24


Quote:

edipinho wrote:
Hi guys, I need help, the xForms module is not assimilating the "Required" field because I disable it and the module continues to check this field.


Portugues BR
Oi pessoal, preciso de ajuda, o módulo xForms não está assimilando o campo "Required" pois eu desabilito e o módulo continua a fazer a verificação deste campo.



XOOPS 2.5.10 - Module xForms 2.00 Alpha 3 (14-02-2021)


Hi:

https://github.com/XoopsModules25x/xforms/archive/refs/heads/master.zip

Can you update and try again?



565
edipinho
Modulos xForms dificultade de criar campo em branco (sem dados)
  • 2021/11/27 16:26

  • edipinho

  • Not too shy to talk

  • Posts: 107

  • Since: 2003/10/15


Hi guys, I need help, the xForms module is not assimilating the "Required" field because I disable it and the module continues to check this field. (some "Caption" fields it doesn't translate correctly)


Portugues BR
Oi pessoal, preciso de ajuda, o módulo xForms não está assimilando o campo "Required" pois eu desabilito e o módulo continua a fazer a verificação deste campo. (alguns campos "Caption" ele não traduz correto)



XOOPS 2.5.10 - Module xForms 2.00 Alpha 3 (14-02-2021)



566
Mamba
Re: New Block for Publisher Module
  • 2021/11/27 11:53

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


AWESOME!!!!

BTW - you don't need to use the "q" in "includeq" anymore - just use "include"
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



567
heyula
Re: New Block for Publisher Module
  • 2021/11/27 11:19

  • heyula

  • Theme Designer

  • Posts: 594

  • Since: 2008/4/24





568
heyula
New Block for Publisher Module
  • 2021/11/27 11:11

  • heyula

  • Theme Designer

  • Posts: 594

  • Since: 2008/4/24


With this code, you can pull content added to the publisher module wherever you want in your theme. Add to your theme:
<{includeq file="$theme_name/random-news.tpl"}>
or 
<{
includeq file="$theme_name/date-news.tpl"}>
Code Content : Random News :
<{php}>
use 
XoopsModulesPublisher;
use 
XoopsModulesPublisherConstants;

$helper PublisherHelper::getInstance();
$myts =& MyTextSanitizer::getInstance();
$itemsObj $helper->getHandler('Item')->getItems($limit 3$start 0, [Constants::PUBLISHER_STATUS_PUBLISHED], -1$sort 'RAND()'$order=''''true$criteria null);
$totalItems count($itemsObj);

global 
$items;
$items = array();
if (
$itemsObj) {
    for ( 
$i 0$i $totalItems$i++ ) {
        
$newItems['itemid']       = $itemsObj[$i]->itemid();
        
$newItems['title']        = $itemsObj[$i]->title();
        
$newItems['body']         = $itemsObj[$i]->body();
        
$newItems['votes']        = $itemsObj[$i]->votes();
        
$newItems['image']        = XOOPS_URL '/uploads/blank.gif';
        
$images $itemsObj[$i]->getImages();
        if (
is_object($images['main'])) {
            
$newItems['image'] = XOOPS_URL '/uploads/' $images['main']->getVar('image_name');
        }
    
$items[] = $newItems;
    }
}
<{/
php}>

        
        
            <{
php}>
        foreach ( 
$GLOBALS['items'] as $myrow )
        {
            
$GLOBALS['xoopsTpl']->assign('itemid'$myrow['itemid']);
            
$GLOBALS['xoopsTpl']->assign('title'$myrow['title']);
            
$GLOBALS['xoopsTpl']->assign('body'$myrow['body']);
            
$GLOBALS['xoopsTpl']->assign('votes'$myrow['votes']);
            
$GLOBALS['xoopsTpl']->assign('image'$myrow['image']);
        <{/
php}>
<
div class="col-lg-4 col-md-12 col-xl-4">
<
div class="card">
                <
div class="img-fix-height cover-image">
                <
img src="<{$image}>">
                div>
                <
div class="card-body p-4">
                    <
a href="<{$xoops_url}>/modules/publisher/item.php?itemid=<{$itemid}>" class="text-dark"><h4 class="font-weight-semibold text-truncate mb-3"><{$title}>h4>a>
                    <
class="fix-max-height"><{$body|truncate:230}>p>
                    <
br>
                    <
class="btn btn-primary btn-teal" href="<{$xoops_url}>/modules/publisher/item.php?itemid=<{$itemid}>">Read morea>
                div>
div>
div>
        <{
php}>
        }
        <{/
php}>
Date News :
<{php}>
use 
XoopsModulesPublisher;
use 
XoopsModulesPublisherConstants;

$helper PublisherHelper::getInstance();
$myts =& MyTextSanitizer::getInstance();
$itemsObj $helper->getHandler('Item')->getItems($limit 3$start 0, [Constants::PUBLISHER_STATUS_PUBLISHED], -1$sort 'datesub'$order='DESC'''true$criteria null);
$totalItems count($itemsObj);

global 
$items;
$items = array();
if (
$itemsObj) {
    for ( 
$i 0$i $totalItems$i++ ) {
        
$newItems['itemid']       = $itemsObj[$i]->itemid();
        
$newItems['title']        = $itemsObj[$i]->title();
        
$newItems['body']         = $itemsObj[$i]->body();
        
$newItems['votes']        = $itemsObj[$i]->votes();
        
$newItems['image']        = XOOPS_URL '/uploads/blank.gif';
        
$images $itemsObj[$i]->getImages();
        if (
is_object($images['main'])) {
            
$newItems['image'] = XOOPS_URL '/uploads/' $images['main']->getVar('image_name');
        }
    
$items[] = $newItems;
    }
}
<{/
php}>

        
        
            <{
php}>
        foreach ( 
$GLOBALS['items'] as $myrow )
        {
            
$GLOBALS['xoopsTpl']->assign('itemid'$myrow['itemid']);
            
$GLOBALS['xoopsTpl']->assign('title'$myrow['title']);
            
$GLOBALS['xoopsTpl']->assign('body'$myrow['body']);
            
$GLOBALS['xoopsTpl']->assign('votes'$myrow['votes']);
            
$GLOBALS['xoopsTpl']->assign('image'$myrow['image']);
        <{/
php}>
<
div class="col-lg-4 col-md-12 col-xl-4">
<
div class="card">
                <
div class="img-fix-height cover-image">
                <
img src="<{$image}>">
                div>
                <
div class="card-body p-4">
                    <
a href="<{$xoops_url}>/modules/publisher/item.php?itemid=<{$itemid}>" class="text-dark"><h4 class="font-weight-semibold text-truncate mb-3"><{$title}>h4>a>
                    <
class="fix-max-height"><{$body|truncate:230}>p>
                    <
br>
                    <
class="btn btn-primary btn-teal" href="<{$xoops_url}>/modules/publisher/item.php?itemid=<{$itemid}>">Read morea>
                div>
div>
div>
        <{
php}>
        }
        <{/
php}>
Definitions in Code : 7th in line of code
$limit 3  How many articles are published
$start 
0  From which category (for all categories)
Template:
<{$title}> = Article Title
<{$itemid}> = Article ID
<{$body|truncate:230}> = Article Content
<{$xoops_url}>/modules/publisher/item.php?itemid=<{$itemid}> = Article Link
<{$image}> = Article Image
<{$votes}> = Article Votes
Sample: Resized Image
Download: https://erenyumak.com/modules/TDMDownloads/singlefile.php?lid=12



569
Mamba
Re: use smartys in theme
  • 2021/11/27 9:19

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


that code will not work, because it is outdated. For example, the line:

$publisher =& PublisherPublisher::getInstance();


won't work because "PublisherPublisher" doesn't exist anymore, it has been replaced by "Helper" and namespaces.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



570
heyula
Re: use smartys in theme
  • 2021/11/27 8:48

  • heyula

  • Theme Designer

  • Posts: 594

  • Since: 2008/4/24


Quote:
function.xoMemberInfo.php
Not working in new Publisher module

function smarty_function_publisher_latest($params, &$smarty
{
    
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");

    include_once 
XOOPS_ROOT_PATH '/modules/publisher/include/common.php';
       
    
$publisher =& PublisherPublisher::getInstance();
    
$myts =& MyTextSanitizer::getInstance();    

    
$itemsObj $publisher->getHandler('item')->getItems($limit 1$start 0'', -1$sort 'datesub'$order='DESC'''true$criteria nulltrue);
    
$totalItems count($itemsObj); 
    
    for ( 
$i 0$i $totalItems$i++ ) {
        
$title $itemsObj[$i]->title(); 
        
$images $itemsObj[$i]->getImages(); 
        if (
is_object($images['main'])) { 
                
$image XOOPS_URL '/uploads/' $images['main']->getVar('image_name'); 
            } 
        
        switch (
$params['ret']) {
            case 
'image':
                echo 
$image;        
                break;
            
            case 
'title':
                echo 
$title;
                break;
            
            default:
                echo 
$image;
                break;
        }
        
    }
}
?>
I think there is a problem because of the following codes
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");

    include_once 
XOOPS_ROOT_PATH '/modules/publisher/include/common.php';
       
    
$publisher =& PublisherPublisher::getInstance();
    
$myts =& MyTextSanitizer::getInstance();    

    
$itemsObj $publisher->getHandler('item')->getItems($limit 1$start 0'', -1$sort 'datesub'$order='DESC'''true$criteria nulltrue);




TopTop
« 1 ... 54 55 56 (57) 58 59 60 ... 29425 »



Login

Who's Online

1056 user(s) are online (305 user(s) are browsing Support Forums)


Members: 0


Guests: 1056


more...

Donat-O-Meter

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

Latest GitHub Commits