1
Diabl0
Re: Dynamic Main Menu module sub options
  • 2004/8/5 6:12

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Hi Harvet

Unfortunently, you don't understand me. I know about $modversion['sub'] in xoops_version.php (and i use it too), but i'm looking for solution to add some submenu position from inside module source, depending on some database values.

Exactly in this case, i want to add something like "Your submisions" submenu depending on whatewer user has submited some infos stored in database and marked with his uid.

Something like:

Quote:

$result = $xoopsDB->query( "select COUNT(uid) AS il_n from ".$xoopsDB->prefix("noclegi")." WHERE uid=".$XoopsUser->getVar('uid') );
$row = $xoopsDB->fetchArray( $result);
if ($row['il_n']>0) {
// Add submenu "Your submisions"
}




2
Diabl0
Dynamic Main Menu module sub options
  • 2004/8/3 5:49

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


After many many helping answers on this forum, my module is working, and now i'm working on extending it. Now i got 2 next questions:

I want add some custom menu positions to Mainmenu under my module for users that submited their datas (something like "Edit/View your submision". It's like in MyLinks or MyAlbum modules where there is option to add maincategories to main menu.

Seccond litle "less" question, is how to add submisions on my module to counts on userinfo page as another post, and show it under other links, photos, forum posts, news and so on?

Thanks in advance for help



3
Diabl0
Re: Mailing user using Xoops routines
  • 2004/7/30 16:34

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Big thanks...

This is exactly i was looking for.

Once again thanks for your time and realy fast help.



4
Diabl0
Mailing user using Xoops routines
  • 2004/7/30 15:50

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Still learning this whole XOOPS API's, and now i'm looking for API with functions to send mail to specified user using XOOPS setings.

I have module with submision option, and I want to send emails to all administrators (notification of submision), submiter, and to email given in form. I want do it proper, not using php mail function, but using XOOPS API, but can't find any suitable.

Any help?

Btw.: I don't want make whis whole "Notification Options" or so. Just send some emails.



5
Diabl0
Re: Seeking hint for Config Settings in xoops_version
  • 2004/7/20 15:15

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Previusly i have problem with modyfing database when form was submited by GET method, not POST. Use of queryF insted of query. This wasn't mentioned on kickstart.

Now I'm fighting with XoopsFormClass, and stuck on creating Select :P, but still trying to figure it out.

Anyway, IMHO whole Module Development Docs shuld have more "human" readable informations about some XOOPS API's (classes) like $xoopsDB, XoopsForm, accessing XOOPS global config and module config values (how, and what can be accesed).

Now i'm begingin working on huge module for XOOPS for my site, and i want make it proper as XOOPS module, to avoid any problems in future when mooving/reinstaling/upgrading xoops. But now instead of working on my mod, i still learning whole API's and trying what is what and how it work (or why it not working). If i stuck on something else i give know on this forum :P

Anyway, once again thanx for great and fast support on forum, but i think if someone spend some time on making good Module Development Documentation, you All (dev's) will have much more time to work on XOOPS instead replaying to basic forum questions. Think about it.

Btw. Sry for my poor english



6
Diabl0
Re: Seeking hint for Config Settings in xoops_version
  • 2004/7/20 14:51

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Heh... Great thx, and sorry for silly problem...
IMHO this should be in mod dev on wiki (And lot more)...



7
Diabl0
Re: Seeking hint for Config Settings in xoops_version
  • 2004/7/20 14:07

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Quote:
<?php
include "../../../mainfile.php";
include XOOPS_ROOT_PATH."/include/cp_functions.php";
include_once XOOPS_ROOT_PATH."/class/xoopsmodule.php";
include_once XOOPS_ROOT_PATH."/class/xoopstree.php";

if (is_object($xoopsUser)) {
$xoopsModule =& XoopsModule::getByDirname("informatory");
if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) {
redirect_header(XOOPS_URL."/",3,_NOPERM);
exit();
}
$admintest=1;
} else {
redirect_header(XOOPS_URL."/",3,_NOPERM);
exit();
}



8
Diabl0
Re: Seeking hint for Config Settings in xoops_version
  • 2004/7/20 13:45

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Ok. I got my config value accesible in module pages, but still can't access it from module admin pages. Maybe there is other way to get this config values from module admin level?



9
Diabl0
Re: Seeking hint for Config Settings in xoops_version
  • 2004/7/20 12:31

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Can you present more complex example. Coz i have done everything like was writen before:

in xoops_version.php:
Quote:
$modversion['config'][] = array(
'name' => 'test' ,
'title' => 'test value' ,
'description' => 'test desc' ,
'formtype' => 'textbox' ,
'valuetype' => 'text' ,
'default' => "2760" ,
'options' => array()
) ;


And in admin file:
Quote:
global $xoopsModuleConfig; // needed if in a function

echo "Hi there, I am test, and my value is {$xoopsModuleConfig['test']}!";


and i don't get my 'test' default value set in xoops_version.php
return is:
Quote:
Hi there, I am test, and my value is !


WTF is wrong?

And when/where will be some good complex MODDev API? This on http://wiki.xoops.org/wakka.php?wakka=XoopsModuleDoc is very simple and short, not presenting any more complicated situatins and examples.



10
Diabl0
Re: DB problem, updating my module table resulting "Action not allowed"
  • 2004/7/3 18:07

  • Diabl0

  • Just popping in

  • Posts: 11

  • Since: 2004/7/3 1


Thanks a lot for answer, and sory that i don't find solution myself... Next time i will try..




TopTop
(1) 2 »



Login

Who's Online

235 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 235


more...

Donat-O-Meter

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

Latest GitHub Commits