Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Powered By - customise

422422 MVP
edited December 2011 in Vanilla 2.0 - 2.8

I don't want to remove Powered by, just titivate it up.

So the code is: in my theme , default.master.php

<?php
                $this->RenderAsset('Foot');
                echo Wrap(Anchor(T('Powered by Vanilla'), C('Garden.VanillaUrl')), 'div');
            ?>

I have created new var which is VanillaSkinsUrl = our url.

What I want is Powered by Vanilla , Skin by VanillaSkin Version: Echo current Style.

I found I could use span instead of div, but just not sure on the php stuff, version doesnt matter. But I would also request that in your vars, you allow us to echo in footer current version of vanilla.

There was an error rendering this rich post.

Best Answer

  • ToddTodd Vanilla Staff
    Answer ✓
    $VanillaAnchor = Anchor('Vanilla', C('Garden.VanillaUrl'));
    $SkinsAnchor = Anchor('VanillaSkin', C('VanillaSkin.Url'));
    $Version = APPLICATION_VERSION;
    
    // Without translation.
    echo "Powered by $VanillaAnchor $Version | Skin by $SkinsAnchor";
    
    // With translation.
    echo sprintf(T('Powered by %s %s | Skin by %s'), $VanillaAnchor, $Version, $SkinsAnchor);
    

    PS: Code samples are much better in this forum when you use the html5 <pre><code>...</code></pre>. However, I usually type the sample in, select it, then use the button bar.

Answers

  • The version is available as APPLICATION_VERSION.

  • How would I chain them together @Lincoln , such as:

    Powered by Vanilla | Version : 2.0.18.1

    I mean the php ( for foot , in default.master.php )

    There was an error rendering this rich post.

  • ToddTodd Vanilla Staff
    Answer ✓
    $VanillaAnchor = Anchor('Vanilla', C('Garden.VanillaUrl'));
    $SkinsAnchor = Anchor('VanillaSkin', C('VanillaSkin.Url'));
    $Version = APPLICATION_VERSION;
    
    // Without translation.
    echo "Powered by $VanillaAnchor $Version | Skin by $SkinsAnchor";
    
    // With translation.
    echo sprintf(T('Powered by %s %s | Skin by %s'), $VanillaAnchor, $Version, $SkinsAnchor);
    

    PS: Code samples are much better in this forum when you use the html5 <pre><code>...</code></pre>. However, I usually type the sample in, select it, then use the button bar.

  • Thanks @todd sicerely appreciate your help, as for markup, i dont find use it intuitively. Apologies,, i guess i am old school lol

    There was an error rendering this rich post.

Sign In or Register to comment.