11
moisty70
How to declare a global variable?
  • 2007/10/1 10:46

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


Hello, I am developing a module on which a navigation bar is used.
Categories List -> Category A -> Product B

I would like to set the selected category as a global variable to avoid access the database on every user click.

I have all the module presentation on index.php with different 'op'.

I declare $GLOBALS['selectedCat']=$cat when a Category is selected on Categories list page.
Then a products page is shown.

Then when I select a product $GLOBALS['selectedCat'] is null.

How can I declare a global variable on this context?



12
moisty70
Re: Cannot translate User menu items and block titles (xlanguage module)
  • 2007/9/25 7:17

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24





13
moisty70
Re: Cannot translate User menu items and block titles (xlanguage module)
  • 2007/9/24 14:17

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


One more thing, Can I set this at module xoops_version.php?

Example:
$modversion['name'] = _MI_RAF_MOD_NAME;
$modversion['description'] = _MI_RAF_MOD_DESC;

Then I set up _MI_RAF_MOD_NAME and _MI_RAF_MOD_DESC at modinfo.php either under language/english and language/spanish, but I only see english at modules table.



14
moisty70
How to add/show a xoops form in a block?
  • 2007/9/23 9:15

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


Hello, I would like to use showCalendar in a block.
But I don't know how show the xoopsForm in a block.

I see 2 possibilities, use an external showCalendar.js or learn to show xoopsForm in a block.

Which should I use?



15
moisty70
Re: Cannot translate User menu items and block titles (xlanguage module)
  • 2007/9/23 8:30

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


Thanks.



16
moisty70
Cannot translate User menu items and block titles (xlanguage module)
  • 2007/9/21 10:35

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


Hello everybody,
I have (at last) all my website translated with xLanguage module but there is something I cannot get translated when I change between languages.

User Menu items load their name from modules table and don't know how to translate this name, even changing the database field to _MY_MODULE_NAME doesn't work.

Also I don't even know where block titles are loaded from.

How can I translate both?



17
moisty70
Re: Adding a block to a custom module
  • 2007/8/28 12:38

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


I needed one more

$modversion['blocks'][1]['show_func'] = "promo_total_rpps_show";

Sorry



18
moisty70
Adding a block to a custom module
  • 2007/8/28 11:56

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


Hello, I have finished my first module, everything ok.
Now I want to add a block to this module.
I change the xoops_config.php adding this lines
// Blocks
$modversion['blocks'][1]['file'] = "promo_total_rpps.php";
$modversion['blocks'][1]['name'] = 'Name block total rpps';
$modversion['blocks'][1]['description'] = "Desc block total rpps";
$modversion['blocks'][1]['template'] = promo_total_rpps.html";

Also I create the php and html files at blocks and templates/blocks

But the block is not created when I install the module.

Any other things I should do?

Also what goes on $modversion['blocks'][1]['options']
I cannot find any documentation about this.

Thanks.



19
moisty70
Re: New to XOOPS please help
  • 2007/8/26 11:47

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


Thanks.
One more thing.

I want a new menu item, that shows an html table filled with the data on a database table.

Example:
Menu Item -> select from table -> show table with records

What I should do?
Create a module?
Just a template.

I've been searching the documentation with no success.
I don't know how to do it at all.



20
moisty70
New to XOOPS please help
  • 2007/8/24 10:45

  • moisty70

  • Just popping in

  • Posts: 21

  • Since: 2007/8/24


Hello everybody,
I've installed XOOPS to improve my web comunity and I am doing some tests.

What I am trying is to set up a new menu item 'Test' that shows a list obtained from a database table records.

1.- I've got the XoopsObjectHandler and the XoopsObject created with module DAO Generator.
2.- I've copied notifications.php to tests.php and made some modifications, everything ok here.
3.- I've copied system_notification_list.php to system_tests_list.php and here comes the problem.

My error is :
Warning: Smarty error: unable to read resource: "db:system_tests_list.html" in file /class/smarty/Smarty.class.php line 1095

And the SQL sentence is :

SELECT f.*, s.tpl_source FROM regalos_tplfile f LEFT JOIN regalos_tplsource s ON s.tpl_id=f.tpl_id WHERE (tpl_tplset = 'default' AND tpl_file = 'system_tests_list.html') ORDER BY tpl_refid

I see the template is not at regalos_tplfile and of course I'm not inserting it by hand.

How is the right way to do this full proccess?

Please help.




TopTop
« 1 (2)



Login

Who's Online

296 user(s) are online (188 user(s) are browsing Support Forums)


Members: 0


Guests: 296


more...

Donat-O-Meter

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

Latest GitHub Commits