Please upgrade here. These earlier versions are no longer being updated and have security issues.

{profile_link} to lead to Notifications instead of Activity Wall

phreakphreak VanillaAPP - White label iOS and Android App MVP
edited August 2015 in Vanilla 2.0 - 2.8

Hi all,

I use {profile_link} to display a shortlink to the profile for a mobile theme. It's convenient because it also shows the number of unread Notifications. The link leads directly to the Activity Wall Profile Page by default.

Is there a way to make the link point to the Notifications page? Something like {profile_link_notification} or similar. :awesome:

I've already brought this one up here. But it didn't work for me and threw me a Smarty Template Error. I wonder if it is easy just to link the link to another destination and where in Vanilla i can find this code.

Have also been looking through this but i can't make any solution out of it, how to implement own smarty tags in Vanilla.
http://vanillawiki.homebrewforums.net/index.php/Using_Smarty_with_Vanilla
http://docs.vanillaforums.com/theming/smarty/link/
http://vanillaforums.org/discussion/20533/solved-documentation-smarty-templates-default-master-tpl-usage-question

Thanx fo help,
phreak


  • Vanilla APP » Learn more «
  • iOS & Android App for Vanilla - White label app for your forum
Tagged:

Comments

  • custom smarty function:

    function.profile_link_notifications.php

    <?php
    
    function smarty_function_profile_link_notifications($Params, &$Smarty) {
        return Gdn_Theme::link(
            'profile',
            val('text', $Params, ''),
            '<li><a href="%url/notifications" class="%class">%text</a><li>'
        );
    }
    

    My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations

    • Vanilla APP » Learn more «
    • iOS & Android App for Vanilla - White label app for your forum
    peregrinephreakhgtonight
  • phreakphreak VanillaAPP - White label iOS and Android App MVP

    Hui, now i got it. Thanx a lot Bleistivt.


    • Vanilla APP » Learn more «
    • iOS & Android App for Vanilla - White label app for your forum
Sign In or Register to comment.