1
fiammy
Apply a template to a XoopsThemeForm
  • 2008/12/30 13:41

  • fiammy

  • Just popping in

  • Posts: 19

  • Since: 2003/1/14


Hello,

Is it possible to apply a template to a XOOPS form? I want the form layout to be different depending on the theme of the site. When adding an element to the form, they all get added on a new line on the page. I would like to decide in the theme whether a form element will be added to the current line, or moved to the next.

thanks in advance

2
trabis
Re: Apply a template to a XoopsThemeForm
  • 2008/12/30 13:59

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi there, I come across the same problem one of this days.
This is a little piece of code for the new spotlight block I´m making:
$form .= ""._MB_MYTABS_USERS." ";
    
$form .= "";
    include_once 
XOOPS_ROOT_PATH."/class/xoopsformloader.php";
    
$member_handler =& xoops_gethandler('member');
    
$user_select = new XoopsFormSelect('''options[12]'explode(','$options[12]), 5true);
    
$criteria = new CriteriaCompo();
    
$criteria->setSort('uname');
    
$criteria->setOrder('ASC');
    
$user_select->addOptionArray($member_handler->getUserList($criteria));
    
$form .= $user_select->render();
    
$form .= "n  "._MB_MYTABS_USERS_DSC."";


As you can see, instead of using $form->display(), you can use $form_element->render()

This means that you will have to create your , submit buttons etc, but you are still able to use xoopsform elements to ease your task, and to place them inside divs, tables, assign them to templates, whatever!

3
kris_fr
Re: Apply a template to a XoopsThemeForm
  • 2008/12/30 16:18

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


hi trabis,

for google , replace by

@++

4
trabis
Re: Apply a template to a XoopsThemeForm
  • 2008/12/30 18:21

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

kris_fr wrote:
hi trabis,

for google , replace by

@++


Thanks Kris, but you mean google chrome or google adsense? lol
Is it css or pagerank related?

5
kris_fr
Re: Apply a template to a XoopsThemeForm
  • 2009/1/1 12:01

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


In terms of pagerank, robot google indexes best "strong" than "b"

6
trabis
Re: Apply a template to a XoopsThemeForm
  • 2009/1/1 13:31

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

kris_fr wrote:
In terms of pagerank, robot google indexes best "strong" than "b"


Well, this is for administration page but anyway, I should follow good costumes, thanks!

Login

Who's Online

335 user(s) are online (203 user(s) are browsing Support Forums)


Members: 0


Guests: 335


more...

Donat-O-Meter

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

Latest GitHub Commits