Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
0 + 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: XOOPS 2.5.9 Notes for Theme Creators
by alain01 on 2020/4/8 10:41:36

Quote:
geekwright wrote:
There is a XoopsFormRendererBootstrap4 that will be included in 2.5.11

you can copy the file XoopsFormRendererBootstrap4.php into your theme's directory and use:
<?php include_once 'XoopsFormRendererBootstrap4.php'; XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());
Ok, i 've tried on XOOPS 2.5.10
but it was not clear for me, i believed that i should modify theme.tpl...

But, in fact, we should modify the theme_autorun.php file like that :
<?php /* xoops_load('XoopsFormRendererBootstrap4'); XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4()); */ include_once 'XoopsFormRendererBootstrap4.php'; XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());

and NOW, it's ok !

(No need action for xoops 2.5.11*)
Re: XOOPS 2.5.9 Notes for Theme Creators
by alain01 on 2019/11/12 1:03:04

Thank you for this advice !

Here, by mage (little bug, it would be ok by mage next days)
Re: XOOPS 2.5.9 Notes for Theme Creators
by geekwright on 2019/11/11 3:47:53

The $xoops_page variable only gives the module and script. It was intended to allow adding menus or style variations for a specific function, not specific content.

If I needed the content_id exposed as well, I would probably ask Mage to add it to the smarty variables that xmcontent assigns.
Re: XOOPS 2.5.9 Notes for Theme Creators
by alain01 on 2019/11/11 0:16:25

Quote:

geekwright wrote:
New Smarty variables added in XOOPS 2.5.9


$xoops_page contains a condensed version of the current page name. For example, for http://myurl/index.php, $xoops_page would be "index". For http://myurl/modules/profile/edituser.php, $xoops_page would be "profile/edituser".

$xoops_startpage contains the module configured as the start page, or "system" if no module is selected.

A "rendered" key is now set by XoopForm assign() method

Some scripts use the assign() method as an alternative to the display() method. This method assigns the form details to a stem variable named with the form's name. This assignment is done with code that looks like this:

$form->assign($GLOBALS['xoopsTpl']);

This technique has often been done to give the theme more control over the display of the form. It requires the template to loop through the individual form elements, and decide how to display it. This level of control is good if you need it, but can be a nuisance if you just want to position the form inside the page, and you would prefer the system to handle the details.

Very usefull !
Just use now in XOOPS 2.5.11 beta + new theme that i'm working on (boostrap 4).

But how can i use $xoops_page
with
http://myurl/modules/xmcontent/viewcontent.php?content_id=2
and
http://myurl/modules/xmcontent/viewcontent.php?content_id=8

2 different links...
Re: XOOPS 2.5.9 Notes for Theme Creators
by geekwright on 2019/11/2 17:20:30

There is a XoopsFormRendererBootstrap4 that will be included in 2.5.11 To use it now, either use the 2.5.11 alpha version, and the code looks like this:
<?php xoops_load('XoopsFormRendererBootstrap4'); XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());
or you can copy the file XoopsFormRendererBootstrap4.php into your theme's directory and use:
<?php include_once 'XoopsFormRendererBootstrap4.php'; XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());

Who's Online

253 user(s) are online (156 user(s) are browsing Support Forums)


Members: 0


Guests: 253


more...

Donat-O-Meter

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

Latest GitHub Commits