Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
kingjames
Hangin' Around



Joined: Sep 27, 2011
Posts: 33

PostPosted: Tue Dec 06, 2011 8:53 pm Reply with quote

I was wondering how I could remove the (Score: 0) line? I looked in Theme directory which I assume is where I would do it but can't find it.


Last edited by kingjames on Tue Dec 06, 2011 10:50 pm; edited 1 time in total 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Dec 06, 2011 9:23 pm Reply with quote

In the modules/News/index.php file, find:
Code:


$morelink .= ' | ' . _SCORE . ' ' . $rated;


and change it to:
Code:


//$morelink .= ' | ' . _SCORE . ' ' . $rated;

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
kingjames







PostPosted: Tue Dec 06, 2011 9:58 pm Reply with quote

I would have never found it there but it worked and it was quite easy as well. Of course I assumed that removing the Score was going to remove the () as well and it did not. What is required to get rid of that? Thanks.
 
nuken







PostPosted: Tue Dec 06, 2011 10:12 pm Reply with quote

You will find two lines on line 149 and line 181 that look like this:

Code:


               $morelink = '(';
                $morelink .= ')';

      


change to

Code:


              $morelink = '';
             $morelink .= '';

 
nuken







PostPosted: Tue Dec 06, 2011 10:18 pm Reply with quote

or after
$morelink = str_replace('( | ', '(', $morelink); //RN0000646

add:
Code:


$morelink = str_replace('(', '', $morelink);
$morelink = str_replace(')', '', $morelink);
 
kingjames







PostPosted: Tue Dec 06, 2011 10:49 pm Reply with quote

That did it ! Thanks again.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Dec 07, 2011 7:16 am Reply with quote

kingjames wrote:
I would have never found it there but it worked and it was quite easy as well.


kingjames, one way to help you find where certain literals are being placed onto the page, is to take the text - in this case "Score" - and search for that literal in the respective language files (I just use an IDE or good text editor that can scan the entire directory structure of source code and look specifically within the lang-*.php scripts).

A key element of the *nuke design for multi-language support is the use of these language files where all the literals are defined. In the above case, you would have found the constant _SCORE as being the more likely candidate and then you can search for "_SCORE" to find where it is being used.

Just a little insight into how to find these things... Wink

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
kingjames







PostPosted: Fri Dec 30, 2011 5:09 pm Reply with quote

Well I did some of this, obviously I first searched the forums to see if my particular question had been answered, and then I searched the files I thought most likely to contain _SCORE, but no I didn't search the whole of the RN installation. Thanks for the info.
 
montego







PostPosted: Sat Dec 31, 2011 9:46 am Reply with quote

kingjames, on Windows, you can use TextPad and use its find in files feature. It is a fantastic tool for this. On Linux, I use Eclipse and it has a similar feature but one can also use a command of find . -name 'lang*.php' | xargs grep 'Score'.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©