DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • December 14, 2017, 10:07:30 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Pets In The Gardens  (Read 656 times)
0 Members and 1 Guest are viewing this topic.
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« on: October 23, 2017, 12:27:04 PM »

I have forever been trying, without success...to figure out WHERE in the coding or settings, that you end up with the addnews about someone's pet devouring a fairy in the Gardens.

I find it annoying to have four or five news items like that added and I want to stop that news from adding.

But I cannot find where it happens.

It is NOT in the hook to the gardens from petshop.php and it is not anywhere in gardens.php either.

So where is it coming from?

I also don't see it in the settings in the petshop module, or in the individual pets settings.

Can someone point me to the right place so I can take this out?

Thanks
Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1796


You're welcome.


View Profile WWW
« Reply #1 on: October 23, 2017, 09:08:05 PM »

Open up all of the files associated with the pet shop module, and do a CTRL+F search for addnews.
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #2 on: October 23, 2017, 11:18:15 PM »

Open up all of the files associated with the pet shop module, and do a CTRL+F search for addnews.

I did that.

The only module I see associated with the pets is petshop.php

There are no modularized folders/files there.

I also looked in gardens.php to see if I could find anything, no luck.  Just need to know where it is coming from so I can take it out.
Just want to comment out the addnews lines so that it does not waste space in my news feed.
Logged
Aeolus
Mod God
*****
Offline Offline

Posts: 1796


You're welcome.


View Profile WWW
« Reply #3 on: October 24, 2017, 02:31:28 AM »

In that case, you can use the Code String Search module. You can insert a string to search for, and it will search all of your files for that string.
Logged

TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #4 on: October 24, 2017, 08:34:55 AM »

In that case, you can use the Code String Search module. You can insert a string to search for, and it will search all of your files for that string.

Thank you, that worked.  The offending part was actually in fairydragon.php
Like I said, i just did not need to see that in the news feed six times on one trip to the gardens.

Thanks for turning me on to that very useful codestring search module!  I am keeping that baby installed!
Logged
phu
Militia
**
Offline Offline

Posts: 25

Web and mobile dev


View Profile
« Reply #5 on: November 20, 2017, 08:04:00 PM »

For a well-maintained, powerful utility designed specifically to search code, I recommend ack. I've been using it for years instead of grep for searching projects.

This will search the modules/ directory for the text addnews( (the parenthesis will be interpreted as part of an incomplete regular expression if you don't escape it; this isn't necessary, but if you don't use it, you'll see a lot of comments in this directory that are just #://addnews ready):

Code:
you@yourpc:/tmp/lotgd$ ack --php "addnews\(" modules/

You could also just use this to search all PHP files in the current directory (recursively) for the string "addnews":

Code:
you@yourpc:/tmp/lotgd$ ack --php addnews
« Last Edit: November 20, 2017, 08:06:21 PM by phu » Logged
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #6 on: November 24, 2017, 03:24:25 PM »

For a well-maintained, powerful utility designed specifically to search code, I recommend ack. I've been using it for years instead of grep for searching projects.

This will search the modules/ directory for the text addnews( (the parenthesis will be interpreted as part of an incomplete regular expression if you don't escape it; this isn't necessary, but if you don't use it, you'll see a lot of comments in this directory that are just #://addnews ready):

Code:
you@yourpc:/tmp/lotgd$ ack --php "addnews\(" modules/

You could also just use this to search all PHP files in the current directory (recursively) for the string "addnews":

Code:
you@yourpc:/tmp/lotgd$ ack --php addnews

Thanks.
Can it search for other code strings?
Logged
phu
Militia
**
Offline Offline

Posts: 25

Web and mobile dev


View Profile
« Reply #7 on: November 26, 2017, 07:11:58 PM »

Thanks.
Can it search for other code strings?

Not sure what you mean. It can search just about any string you want.

Code:
ack "String you want to search goes here"

Specifying the programming language and the directory to search are both optional (there are other options as well, including ignoring certain directories by name).
Logged
TGTarheel
Captain of the Guard
***
Offline Offline

Posts: 189


View Profile
« Reply #8 on: November 27, 2017, 10:48:41 PM »

Thanks.
Can it search for other code strings?

Not sure what you mean. It can search just about any string you want.

Code:
ack "String you want to search goes here"

Specifying the programming language and the directory to search are both optional (there are other options as well, including ignoring certain directories by name).

That code line...basically just answered my question, thanks.
Logged
phu
Militia
**
Offline Offline

Posts: 25

Web and mobile dev


View Profile
« Reply #9 on: November 27, 2017, 11:51:57 PM »

You're welcome. Note that the quotes are optional if your search term is a single word, but necessary if you want to search a phrase that contains spaces; you can also use single quotes, which you may need to if your phrase contains double quotes.

ack testphrase
ack "test phrase"
ack 'test "this" phrase'
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
24 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search