1
hey XOOPS community,
we are working on some mods, first of all a mod of wf-downloads.
but we need some help on this mod and others mods, we will give you more infos about our mods if they are working as we want it
my first questionwe have a pop-up window, and in this window we have a button. so when user click on this button the window should close and in the original window (where the site is) should open a page/link.
so we got that to work Quote:
so maybe you see the problem what we have, we are using the static url for that, because we dont got it to work with xoops_url.
we looked in the misc.php and we found that Quote:
echo ''.$avatar." | getVar('uid')."';window.close();\">".$onlineUsers[$i]['user']->getVar('uname')."";
so here is the .XOOPS_URL. variable but we dont got it work in our code, maybe someone could help us with this problem.
my second question this question is about another problem in another modul, we have a admin menu and in this admin menu we want that it will display a specific modul with its modul name. how can i do that? (in a php file)
hopefully someone can help us
2
1. For XOOPS_URL to work, you must include mainfile.php from the XOOPS root directory [i.e. include ('../../mainfile.php');] 2. You can use the XoopsModule object // Create instance of module handler $hModule = xoops_gethandler('module'); // Retrieve module object $module =& $hModule->getByDirname('module_name'); // Will put the name of the module in $module_name $module_name = $module->getVar('name');
3
thx i have included the mainfile.php, so it should work. but we dont know how to write the syntax that xoops_url will be used.
4
You would do it the same way as in the misc.php example that you quoted earlier
5
ok we tried it but then we had problem with " and ' so we decided to use the static url, so the function works for the beginning we even dont know when we should use " and ' , so we got syntax error when we tried to do it the same way as in misc.php.
6
Can you paste in the line that you tried and didn't work? Its kind of hard to understand fully without an example.
7
i will post it tomorrow because today i'm to tired
8
hey i tried to use the xoops_url variable but when i click on the button nothing happend and i dont get any error. Quote:
9
i think this maybe because ur using the backslashes \ for the html part
location=\ and uid=1\'
try removing those slashes.. as i'm not sure they're actually needed in this case..
10
so i tried it without that slashes Quote: and i get this error Quote: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/.sites/60/site362/web/testumgebung/modules/PDMembers/rank.php on line 58 rank.php is the file where i work on and this is link 58
262 user(s) are online (215 user(s) are browsing Support Forums)
Members: 0
Guests: 262
more...
Stats |
Goal: |
$100.00 |
Due Date: |
Nov 30 |
Gross Amount: |
$0.00 |
Net Balance: |
$0.00 |
Left to go: |
$100.00 |
|
|