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.

converting nomobile_link wrap="span" to PHP

hi guys i need help converting this one from SMARTY TPL format to PHP

nomobile_link wrap="span"

i'm not sure how to echo this one on PHP format. can anyone help?

@peregrine :D


  • Options
    peregrineperegrine MVP
    edited December 2012

    al you have to do is use the normal .tpl and take a snapshot of your screen source to see how it is interpreted.

    wrap - means surround by span

    echo "what you want surrounded by single or double quotes depending on your need";

    <a href="/vanilla/index.php?p=/profile/nomobile" class="">
    View Full Screen

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    KasperKasper Scholar of the Bits Copenhagen Vanilla Staff
    edited December 2012

    What I usually due in situations like these, is take a look in library/vendors/SmartPlugins. Here you'll find the code that handles all of the Smarty tags related to Vanilla, the nomobile_link included:

    function smarty_function_nomobile_link($Params, &$Smarty) {
        $Path = GetValue('path', $Params, '', TRUE);
        $Text = GetValue('text', $Params, '', TRUE);
        $Wrap = GetValue('wrap', $Params, 'li');
        return Gdn_Theme::Link('profile/nomobile',
            GetValue('text', $Params, T("Full Site")),
            GetValue('format', $Params, Wrap('<a href="%url" class="%class">%text</a>', $Wrap)));

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • Options
    LincLinc Detroit Admin
    edited December 2012

    The cheap way is to view source on a page using the template, then copy that bit of HTML and paste it into the PHP template. :D

  • Options

    hey guys thank you so much for your help, another knowledge added on my little brain :)

Sign In or Register to comment.