Jump to content

trace back text to it's origin


pwired
 Share

Recommended Posts

Does anyone know an on-line (ftp) tool

to trace back words/text to it's origin in a website ?

Right now I am going nuts to change a line of text in a webshop.

The line of text is on the last part of the order form but can't

find where it is generated to output or where it is hardcoded.

Firebug doesn't make me find it. A tool to find out where

text is generated/hardcoded would be handy to know where

to edit parts of a website.

Link to comment
Share on other sites

Do you have access to the filesystem on the host computer? If you do, then you can use a program called grep on *nix type systems and something like WinGrep on Windows to search all the files in the site root folder (and sub-folders) for the text you are interested in.

Link to comment
Share on other sites

Thanks netcarver, you mean this right: http://www.techonthenet.com/unix/basic/grep.php

Yes the shop is on a decent unix host so root access with a command line should be

possible. With firefox tools and firebug it is sooo easy to trace back all the css, it shows

the css file and the exact line in it. There must be something similar to find that will show

where specific text is generated by php, in what .tpl or .php file and on what line.

Going to google further for this.

Link to comment
Share on other sites

@pwired, there's no way to track that via a client side webdev tool like firebug or any other, it's just not possible (seems logical).

You need to search on filesystem either directly on server via  grep command or download all files locally and use some search provided by a IDE or Code editor like sublime text.

  • Like 1
Link to comment
Share on other sites

Thanks for stepping in Soma, so it was only wishful thinking on my side then.

Then it only leaves to try to isolate the part in the website where the text

is generated, find the php code that outputs the text and then find the

source from where the php code calls the text.

Link to comment
Share on other sites

@Macrura, thanks for that tip. Sublime Text, UltraEdit (together with ultrafinder) seem to be

one of the very few being able to search for text strings online in some webshop/site.

By the way following quote was the best I could find with Google that helps

to trace the php code that outputs specific text that you need to change in

some webshop/site.

quote found with google:

-----------------------------------------------------------------------------------------------------

You should not have to search through every file, but start with the main page
that is being accessed via the URL. If the code you need is not on that page,
then search it for "include" and "require", and see what files they load, then
search within those files. Depending on the complexity of the application,
this could recurse into additional includes/requires within those files, and so forth.

-----------------------------------------------------------------------------------------------------

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...