#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    England
    Posts
    2
    Rep Power
    0

    Code that uses short cuts...


    Hi. I've inherited a website that has code that I'm not sure what to do with. Bit new to this.

    There are what looks like shortcuts dotted around the code which are great to use from an admin point of view. An example would be:

    ||BACK_TO_TOP||

    This simple piece of code renders as a nicely formatted up arrow coded to take the user back to the top of the page when clicked. So, obviously this 'short cut' is tapping into some more code somewhere. The problem is that I can't find that code.

    Anyone come across something similar or could point me to the most likely place it is likely to be filed in the code structure.

    Thanks. Much appreciated.
  2. #2
  3. Confused badger
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    1,112
    Rep Power
    487
    Hello AJT, welcome to the forum; I'm sorry to say that we don't have access to your server and there literally is no way on the earth of knowing where the "controller" is that would do this replacing. It might not even be in a file, it could be in a DB somewhere.

    Is it a CMS like Joomla, Drupal for example?
    Are you able to contact the former developer at all assistance?
    Did they document this project at all?
    Perhaps you could try installing one of the PHP Documentation tools that have been discussed elsewhere on this forum; by the looks of it, they'd tell you but of course, you'd need to be able to understand the output and if you're new to this (php or coding in general?) then you're probably gonna struggle.

    I suppose, presuming it's a linux server, you could do a file-system search for the phrase "BACK_TO_TOP" and then read each file that contains it and determine if that's your baby?
    "For if leisure and security were enjoyed by all alike, the great mass of human beings who are normally stupefied by poverty would become literate and would learn to think for themselves; and when once they had done this, they would sooner or later realise that the privileged minority had no function and they would sweep it away"
    - George Orwell, 1984
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    England
    Posts
    2
    Rep Power
    0
    Hi Badger Fruit! Thanks for the response. I think I'll have to try contacting the developer. There is no documentation unfortunately but knowing I'm looking for a 'controller' is helpful. Thanks.
  6. #4
  7. Confused badger
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Mar 2009
    Location
    West Yorkshire
    Posts
    1,112
    Rep Power
    487
    Yeah, sorry I don't have a better answer but development is a double-edged sword; one side, you can create anything your heart desires but on the other, unless it's documented (well or even just the basics), when you get hit by a bus, the guy taking over the maintenance doesn't stand a chance!

    Good luck with that one and please feel free to post any futher questions back here!
    "For if leisure and security were enjoyed by all alike, the great mass of human beings who are normally stupefied by poverty would become literate and would learn to think for themselves; and when once they had done this, they would sooner or later realise that the privileged minority had no function and they would sweep it away"
    - George Orwell, 1984

IMN logo majestic logo threadwatch logo seochat tools logo