1
jlm69
fix for xdirectory & alumni search, no mid.
  • 2005/2/23 14:55

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I figured out how to not have to add the mid manually for xdirectory, and alumni modules. Always back up your site before making any changes.

Xdirectory,
In the file xdirectory/index.php

look for this line

$xoopsTpl->assign('lang_url', _MD_SITEURL);

after it add this line

$xoopsTpl->assign('xmid', $xoopsModule->getVar('mid'));

Then in the file xdirectory/templates/xdir_index.html replace the actual number of the module with <{$xmid}> so it looks like below.

value='<{$xmid}>' />

then update module and your done.
_________________________________________________

Alumni Module

Just a little different, go to alumni/index.php look for function index() add this line

$xoopsTpl->assign('xmid', $xoopsModule->getVar('mid'));

before this line

$xoopsTpl->assign('add_from', _ALUM_ADDFROM." ".$xoopsConfig['sitename']);

go to alumni/templates/alumni_index.html

replace the actual number of the module with <{$xmid}> so it looks like below.

value='<{$xmid}>' />

now with this module you need to add $xoopsModule, to the global like below

global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsUser, $xoopsTpl, $moderated, $myts, $mytree, $souscat, $classm, $nbsouscat, $meta, $newann, $mid;

Update the module, Thats it, This works for me, Hope you find it useful.

John

2
jlm69
Re: fix for xdirectory & alumni search, no mid.
  • 2005/2/23 16:01

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


I know this is wanted by some people so I will bump it back out a couple times today.

3
tzvook
Re: fix for xdirectory & alumni search, no mid.
  • 2005/2/23 17:07

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


10x man

works like a charm (though I had to add the line
$xoopsTpl->assign('xmid', $xoopsModule->getVar('mid'));
also in "viewcat.php" and in "viewlist.php" .... wherever I put a search show)

Your'e right, very usefull - I was looking for that "small" solution for a long time.

4
nycarpenter
Re: fix for xdirectory & alumni search, no mid.
  • 2005/3/21 4:18

  • nycarpenter

  • Just popping in

  • Posts: 9

  • Since: 2005/3/14


I am very new with XOOPS and php and programming. I was able to make the first two changes. But I got Stuck when I got to this point.

What do you mean by saying "

now with this module you need to add $xoopsModule, to the global like below

global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsUser, $xoopsTpl, $moderated, $myts, $mytree, $souscat, $classm, $nbsouscat, $meta, $newann, $mid;
"

Thnx in advance.

5
jlm69
Re: fix for xdirectory & alumni search, no mid.
  • 2005/3/21 5:47

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


If you look in the alumni/index.php file and find

function index()

you will see

global $xoopsDB, $xoopsConfig, $xoopsModule, $xoopsUser, $xoopsTpl, $moderated, $myts, $mytree, $souscat, $classm, $nbsouscat, $meta, $newann;

if $xoopsModule isn't there you will need to add it so it looks like above. if it is there don't worry about it.

John

6
nycarpenter
Re: fix for xdirectory & alumni search, no mid.
  • 2005/3/21 20:06

  • nycarpenter

  • Just popping in

  • Posts: 9

  • Since: 2005/3/14


It's easy enough...
You guys are very nice..Thank you so much..

7
nycarpenter
Re: fix for xdirectory & alumni search, no mid.
  • 2005/3/21 20:07

  • nycarpenter

  • Just popping in

  • Posts: 9

  • Since: 2005/3/14


It's easy enough...
You guys are very nice..Thank you so much..

8
bumbum
Re: fix for xdirectory & alumni search, no mid.
  • 2005/6/9 17:34

  • bumbum

  • Just popping in

  • Posts: 99

  • Since: 2004/10/18


That's a great little hack. Works a charm!

9
xueming
Re: fix for xdirectory & alumni search, no mid.
  • 2005/6/9 18:04

  • xueming

  • Not too shy to talk

  • Posts: 127

  • Since: 2005/2/7 6


hello,

I am using xdirectory also on my site. So I am interested in anything related to the module.

Forgive my ignorance, but what is this hack do? Can someone explain a little bit so more people can use it?

Thanks a lot!!

10
toddlynn
Re: fix for xdirectory & alumni search, no mid.
  • 2005/6/16 5:04

  • toddlynn

  • Just popping in

  • Posts: 52

  • Since: 2004/1/7 5


Im still totally lost. I have names the xdirectory module to Members Directory so thats what Im refering to. On the site, if I click Members Directory.. I get a blank. I have added a ton of entries so I dont know actually when this error started. Ive read here in the forum about this problem & Im still lost. I dont have Alumni & what are you refering to when you say mid?

Can you help please get the module working again without losing it all?

Login

Who's Online

90 user(s) are online (63 user(s) are browsing Support Forums)


Members: 0


Guests: 90


more...

Donat-O-Meter

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

Latest GitHub Commits