Welcome to Geeklog, Anonymous Monday, December 23 2024 @ 11:13 am EST

Geeklog Forums

Editing User Functions


Status: offline

kilerb

Forum User
Regular Poster
Registered: 03/19/08
Posts: 119
How can I remove something from the user functions area? I was reading past posts about this and it said to go to lib-common.php but I think it might've changed since I don't see anything. I'm using the latest GL.

Thanks!
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Can you tell me witch function you need to remove?

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

kilerb

Forum User
Regular Poster
Registered: 03/19/08
Posts: 119
On my site i have a newsletter plugin, and it says "unsubscribe from newsletter" in that area. I want that gone. Reason being is the newsletter plugin is supposed to add new members to the list, however it only does it about successfully 60% of the time. So, I constantly have to click "import current users" into the newsletter subscription area. So, when I do that, it just re-imports anyone that has unsubscribed in the past and it will just annoy them anyway to be back on the list. In this particular scenario, I'd rather have them leave the site than unsubscribe from the newsletter anyway.

Thanks...
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
That would come from a plugin_getuseroption_newsletter function (or similar - search for getuseroption) in the plugin's functions.inc file.

bye, Dirk
 Quote

Status: offline

kilerb

Forum User
Regular Poster
Registered: 03/19/08
Posts: 119
Thanks Dirk, I found this in there...

Text Formatted Code
/**
 * returns the user option for this plugin
 *
 */
function plugin_getuseroption_newsletter() {
    global $_USER, $LANG_NL;
    list($whitelist) = NL_fetchWhitelist();
    if (!in_array($_USER['email'], $whitelist)) {
        return array($LANG_NL['user_menu_subscribe'], $_CONF['site_url'].'/newsletter/index.php?view=add&email='.$_USER['email'].'&disp_mode=success', 0);
    } else{
        return array($LANG_NL['user_menu_unsubscribe'], $_CONF['site_url'].'/newsletter/index.php?view=delete&email='.$_USER['email'], 0);
    }
}


Removed it, and the option "Unsubscribe from Newsletter" remains. Is there something else I have to do? Or did I remove the wrong thing?

Thanks
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Hmm. Removing (or commenting out) that function should do the trick. That's the only official API that plugins have to get something into the User Functions block.

Or do you see the unsubscribe option somewhere else now?

bye, Dirk
 Quote

Status: offline

kilerb

Forum User
Regular Poster
Registered: 03/19/08
Posts: 119
It worked... I think it was in cache memory or something still. I refreshed the page and it was still there. But now it's gone.

Thanks!
 Quote

All times are EST. The time is now 11:13 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content