Invite Friends question

To block spammers, I set my site to by invitation only in "site access." I tested and this works fine.

But the "invite" link only seems to be showing up where I set it in html blocs, like the dashboard notice. There I manually set a link to /mode/invitefriends.

Is it supposed to be showing up in more places automatically? It would be great if it appeared on the toolbar itself. Or at least inside the Tools dropdown.

Anybody have any suggestions about this?

Thanks,

doug

 

  • Juipo

    Doug, you can hardcode the link in toolbar itself (just like you did in your dasboard notice).  In your theme folder (theme/views/default/page_elements) there is a file elgg_topbar.php. just add the link there. Depending on your theme code and structure, you can add the link in your header_contents.php as well.

    For it to show up in Tools dropdown you'd need to edit Elgg core file even though there is a way to control it through the theme itself.

  • Thanks for your note, Juipo.

    Actually, for the dashboard notice I used an edit link that appeared there in the dashboard to edit that text.

    I was thinking of making a minor modification of vazco_topbar, which I have enabled. I like that plugin because it adds a login form to the top bar whenever you are not registered.

    Looking at that plugin, I see that was done in vazco_topbar/views/default/vazco_topbar/loginbox.php.

    In the if (isloggedin()) clause (where the logout link is) I tried just adding this before the logout link:

    <a href="<?php echo $vars['url']; ?>mod/invitefriends"><small>Invite friends</small></a>&nbsp;|&nbsp;

    But nothing looks changed. So maybe that same code appears elsewhere in his plugin also. I'm still poking around.

    Thanks,

    doug

     

  • It looks like the active code was actually in vazco_toolbar/views/default/page_elements/elgg_topbar.php.

    When I added my code in there it showed up.

    Is that how the general plugin system works? It loads in identical file names corresponding to the same hierarchy of the standard plugins overriding them as they are loaded?

    Now I just need to figure out how to tweak the CSS because my "Invite friends" link pushed the "Log out" link to the next row, out of the black background top bar.

    doug

     

  • I'm new to Elgg and trying to find Site Access to set the invitation only option, am I missing an obvious link or is it in the PHP code?

  • I ended up moving it after "settings" (borrowing the class for "usersettings") and it works fine. 

    Fun!

    Thanks!

    doug

     

  • Hi, websi7,

    If you click on the "plugins" tab above and search for "siteaccess" you will find it. You need to install that plugin to make use of the invitation only feature. It's not a standard plugin.

    doug