1
beatle
Need help for addresses module please.
  • 2004/1/20 18:59

  • beatle

  • Just popping in

  • Posts: 2

  • Since: 2004/1/19


I was wondering if anyone using the addresses module could help me out. Is there a way to deactivate the popular and top rated feature for this module? Any help would be appreciated.

Thank You

2
kjs222
Re: Need help for addresses module please.
  • 2004/1/20 20:03

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


I havn't used the module myself, but I've deactivated these features in other modules; usually it's as easy as finding the right template file (assuming it has a template) and taking out the snippet that says something like "new"... if you know html and tags you should be able to find it.

Of course, you need to have your own template set (other than default) in order to edit your templates; and make sure that set is selected as your primary set. If you want to do more than this please specify.

Cheers,
Keith

3
Shine
Re: Need help for addresses module please.
  • 2004/1/20 20:11

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


I understand you want to disable this feature.
Open up (from the addresses module): include/functions.php

New link image:
Approx. line: 28-40 you'll find the code function newlinkgraphic($time, $status)
blabla

Disable these lines by putting // infront.

Popular:
Approx. line 42-48 you'll find the code function
function popgraphic($hits) {
blabla

Disable these lines by putting // infront

When you disable the popular/rating it would be wise to deactivate also the corresponding link sort function within the specific addresses template. The same goes for the possibility of rating the shown address.

grtz., Shine


4
beatle
Re: Need help for addresses module please.
  • 2004/1/20 21:43

  • beatle

  • Just popping in

  • Posts: 2

  • Since: 2004/1/19


I added the following to the script like this

//function newlinkgraphic($time, $status) {
    
$count 7;
    
$new '';
    
$startdate = (time()-(86400 $count));
    if (
$startdate $time) {
        if(
$status==1){
            
$new "&nbsp;<img src="".XOOPS_URL."/modules/addresses/images/newred.gif" alt=""._MD_NEWTHISWEEK."" />";
        }elseif(
$status==2){
            
$new "&nbsp;<img src="".XOOPS_URL."/modules/addresses/images/update.gif" alt=""._MD_UPTHISWEEK."" />";
        }
    }
    return 
$new;
}

//function popgraphic($hits) {
    
global $xoopsModuleConfig;
    if (
$hits >= $xoopsModuleConfig['popular']) {
        return 
"&nbsp;<img src="".XOOPS_URL."/modules/addresses/images/pop.gif" alt=""._MD_POPULAR."" />";
    }
    return 
'';
}


But that causes a blank page when clicking on the addresses link in the menu bar. I apologize I am very new to XOOPS so please bear with me.

I do appreciate the help

5
kjs222
Re: Need help for addresses module please.
  • 2004/1/20 22:04

  • kjs222

  • Friend of XOOPS

  • Posts: 116

  • Since: 2003/3/1 1


While I respect Shine's extensive solution; if all you want to do is not show the images on the screen then I really do recommend just editing the template... it's MUCH simpler, and the rest of the stuff isn't really necessary (at least, not that I can see - let me know if I'm wrong)

anyways, I hope you can get the php working again,

Keith

6
jlm69
Re: Need help for addresses module please.
  • 2004/1/20 22:33

  • jlm69

  • Module Developer

  • Posts: 719

  • Since: 2002/7/19


The way I do it is to go into the modules xoops_version.php file, find the menu section and remove the sub 'name' and 'url' with the numbers [2] & [3], leave [1] so you can submit. That will remove the links from the main menu. Then in the templates folder remove any links that reference popular and top rated.
Has always worked for me.

Login

Who's Online

208 user(s) are online (136 user(s) are browsing Support Forums)


Members: 0


Guests: 208


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