1
krobi
some dev/mod question
  • 2004/11/30 19:50

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


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 question
we 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:
echo '

';

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:

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
ejuden01
Re: some dev/mod question
  • 2004/11/30 21:33

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


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
krobi
Re: some dev/mod question
  • 2004/11/30 21:39

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


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
ejuden01
Re: some dev/mod question
  • 2004/11/30 21:41

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


You would do it the same way as in the misc.php example that you quoted earlier

5
krobi
Re: some dev/mod question
  • 2004/11/30 21:45

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


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
ejuden01
Re: some dev/mod question
  • 2004/11/30 21:47

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


Can you paste in the line that you tried and didn't work? Its kind of hard to understand fully without an example.

7
krobi
Re: some dev/mod question
  • 2004/11/30 21:51

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


i will post it tomorrow because today i'm to tired

8
krobi
Re: some dev/mod question
  • 2004/12/2 11:58

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


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:
echo '

';

9
m0nty
Re: some dev/mod question
  • 2004/12/2 12:11

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


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
krobi
Re: some dev/mod question
  • 2004/12/2 12:22

  • krobi

  • Quite a regular

  • Posts: 290

  • Since: 2003/12/21


so i tried it without that slashes

Quote:
echo '

';


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

Login

Who's Online

190 user(s) are online (51 user(s) are browsing Support Forums)


Members: 0


Guests: 190


more...

Donat-O-Meter

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

Latest GitHub Commits