Posted by john on 2005/9/29 13:50:00 (2392 reads)
To add numbers to the view alpha
__________________________________________________________________


Add after Alpha sort in include/functions.php

//Numerical Sort

function numbers()
{
global $xoopsModule;
$numberchoice = "";
$numbers = array ("1", "2", "3","4", "5", "6","7", "8", "9", "0");
while (list(, $numb) = each($numbers))
{
$numbchoice .= "<a href='viewalpha.php?list=$numb' style='font-size: 8px;'>$numb</a>";
$numbchoice .= "&nbsp;|&nbsp;";
}
return $numbchoice;
}

____________________________________________________________

then in index.php and viewalpha.php - before or after

$letters = letters();
$xoopsTpl->assign('letters', $letters);

ADD

$numbers = numbers();
$xoopsTpl->assign('numbers', $numbers);

____________________________________________________________

Then in xdir_index.html and xdir_viewalpha.html it should look like this

<{if $usealpha != "0"}> <{$letters}> <br /> <{$numbers}>

____________________________________________________________

That should do it, any problems let me know

John
Posted by john on 2005/2/25 14:50:00 (3849 reads)
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
Login
Username:

Password:

Remember me



Lost Password?

Register now!
 
Main Menu
 
Who's Online
3 user(s) are online (1 user(s) are browsing News)

Members: 0
Guests: 3

more...
 
Donat-O-Meter
Make donations with PayPal!
Stats
Goal: $25.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $25.00