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.
Options

Need to copy some core files from library to my theme

422422 Developer MVP
edited April 2012 in Vanilla 2.0 - 2.8

Where should I put them ?

ie. library > core > blah.php

There was an error rendering this rich post.

Answers

  • Options
    422422 Developer MVP

    To explain, i need to change some functions. Nothing to mad.. But they would need to be pulled from my theme.

    There was an error rendering this rich post.

  • Options
    422422 Developer MVP
    edited April 2012

    I was wondering if we could put it in locale/en-ca/definitions.php file.

    The code I wanna add is. located in functions.definitions.php

    But If I add new code, wont this conflict with esisting code?

    The code is:

    return '< a class="tip" title="Posted By' . htmlspecialchars($Name) . '" href="'.htmlspecialchars(Url('/profile/'.($NameUnique ? '' : "$UserID/").rawurlencode($Name))).'"'.$CssClass.'>'.htmlspecialchars($Name).'</ a>';
    

    This is only a slight modification to existing core file, by adding class to the href and a title tag

    There was an error rendering this rich post.

  • Options
    peregrineperegrine MVP
    edited April 2012

    copy the function into your theme and give it a new name. or add the class via jquery.

    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
    422422 Developer MVP

    Hmm now that has me stumped.

    There was an error rendering this rich post.

  • Options
    422422 Developer MVP

    Decided in the end to edit the core file, with notes in theme on what user needs to do.

    There was an error rendering this rich post.

  • Options
    peregrineperegrine MVP
    edited April 2012

    My thought was if you need such and such a function

    e.g. userbuilder

    find the function in the core

    and copy it into your theme rename to myuserbuilder
    and modify the function.

    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
    422422 Developer MVP

    No i need to append class and title attributes to a pre existing function. Its ok, can live with a core edit. Prefer not to but ho hum.

    Works fine.

    There was an error rendering this rich post.

  • Options
    peregrineperegrine MVP
    edited April 2012

    find the tag and use jquery add class if you want, and look at the Johnny Example and the plugin. They do kind of what you may be looking for.

    http://vanillaforums.org/discussion/comment/157166#Comment_157166

    http://vanillaforums.org/addon/onlyread-plugin

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

Sign In or Register to comment.