Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: hesham1979 on February 19, 2013, 10:13:38 PM

Title: A tip, makes you save your effort and do the job quickly
Post by: hesham1979 on February 19, 2013, 10:13:38 PM
for beginners who keep looking inside smf source files,
to save your time sp in changing texts or looking for a div or making a theme
doing such search in windows 7, will be a little bet buzy
so you can use this free program "PRGrep" to search for u inside All files in a certain folder(s)
for a sp word or keyword shoing lists contains the line no., statement and file name dir
u can download it from here

http://www.softpedia.com/progDownload/PRGrep-Download-29782.html (http://www.softpedia.com/progDownload/PRGrep-Download-29782.html)

note : if u didn't find the word althou u see it
either it is in db or encrypted
PRGrep is a search utility only
enjoy
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: Arantor on February 19, 2013, 10:16:45 PM
Eh, I wouldn't bother with that, just use Notepad++ which can do all the searching and is a strong text editor as well.
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: hesham1979 on February 19, 2013, 10:20:11 PM
Quote from: Arantor on February 19, 2013, 10:16:45 PM
Eh, I wouldn't bother with that, just use Notepad++ which can do all the searching and is a strong text editor as well.
notepad++ is an editor not a search utility  ???
by the way i visted your avatar many times  ;)
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: mashby on February 19, 2013, 10:39:13 PM
Open all files. Search all at once. Notepad++
Nice.
(http://cdn.memegenerator.net/instances/400x/25294122.jpg)
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: Arantor on February 19, 2013, 10:40:58 PM
Quotenotepad++ is an editor not a search utility

Funny, I use it for doing massive searches on SMF and related codebases every day. The entire codebase gets searched in a matter of seconds.

For example, I'm tracking down duplicate language strings. In particular, $txt['not_activated']. So I had Notepad++ open, and told it to find all the instances inside every *.php file inside my working folder. And it did.

The result begins thusly:
QuoteSearch "not_activated" (15 hits in 11 files)
  C:\Dev\public_html\wedge\trunk\Sources\Groups.php (1 hits)
   Line 596:          $last_online = '<em title="' . $txt['not_activated'] . '">' . $last_online . '</em>';
  C:\Dev\public_html\wedge\trunk\Sources\ManageMembers.php (3 hits)
   Line 566:                      $difference = sprintf(\'<em title="%1$s">%2$s</em>\', $txt[\'not_activated\'], $difference);

Double click on the match and it takes you right to that search result in the right file. Works just great. Today alone I've made... 78 searches of the entire codebase.


Mashby - not even opening all the files ;)
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: mashby on February 19, 2013, 11:19:57 PM
Aha! Find in Files...Directory. Nice. Love learning things from you.
{Insert image of Bruno next}
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: hesham1979 on February 19, 2013, 11:23:31 PM
Quote from: Arantor on February 19, 2013, 10:40:58 PM
Quotenotepad++ is an editor not a search utility

Funny, I use it for doing massive searches on SMF and related codebases every day. The entire codebase gets searched in a matter of seconds.

For example, I'm tracking down duplicate language strings. In particular, $txt['not_activated']. So I had Notepad++ open, and told it to find all the instances inside every *.php file inside my working folder. And it did.

The result begins thusly:
QuoteSearch "not_activated" (15 hits in 11 files)
  C:\Dev\public_html\wedge\trunk\Sources\Groups.php (1 hits)
   Line 596:          $last_online = '<em title="' . $txt['not_activated'] . '">' . $last_online . '</em>';
  C:\Dev\public_html\wedge\trunk\Sources\ManageMembers.php (3 hits)
   Line 566:                      $difference = sprintf(\'<em title="%1$s">%2$s</em>\', $txt[\'not_activated\'], $difference);

Double click on the match and it takes you right to that search result in the right file. Works just great. Today alone I've made... 78 searches of the entire codebase.


Mashby - not even opening all the files ;)

dear, this is a search utility it gives more functions than searching by normal editors such as phpdesigner or notepad++
u can take a look and compare  8)
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: mashby on February 19, 2013, 11:26:02 PM
A search utility that does more than search?!? ;)
QuoteDouble click on the match and it takes you right to that search result in the right file.
I think that's a lot more useful. Maybe this topic should be moved to Chit Chat.
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: Arantor on February 19, 2013, 11:29:05 PM
Please explain to me what a search utility can do that Notepad++ cannot.

I need to search thousands of files at once. I need to be able to filter it by folder, or by file type. I need it to be quick. I need regular expression searching.

Notepad++ does all these - admirably. Your tool is just for searching. It is at best a replacement for searching in Notepad++, but it does not sway from the fact that having found these things, I then need to edit them. And Notepad++ has it integrated, you might say.
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: hesham1979 on February 19, 2013, 11:40:26 PM
okay guys 2 2 1 is not fair  :D
i tried to help that is all  :o
you win !!
but for mashby there are somthing called functions inside each software and that functions
variant from application to another depending on its main purpose

okay move it to chit chat or even delete it ;)
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: Arantor on February 19, 2013, 11:48:42 PM
It is certainly a valid tool for a job - but you're saying it's better than Notepad++ because it's not a search facility.

Give me a reason why this is so good, is all I'm asking.
Title: Re: A tip, makes you save your effort and do the job quickly
Post by: Shambles on February 20, 2013, 05:08:38 AM
Quote from: hesham1979
notepad++ is an editor not a search utility  ???

I use it for searching as often as I do for editing.

In fact, earlier this morning, I searched for a $txt string in my backup folder and it found two occurrences (in .php and .php~ files) which I then compared with each other using just another couple of clicks, in Notepad++