logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > CMS (wordpress,Drupal,joomla etc)
Register FAQ Members List Search Today's Posts Mark Forums Read

Closed Thread
 
Thread Tools Display Modes
Old 09-06-2012, 04:43 PM   #1
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default How to find file where text element is stored?

Objective:

Change a piece of text that belongs to a template.

Discussion:

I've gotten pretty savvy at tracking down pieces of code inside these joomla templates & changing as necessary. This one has me stumped... Is there a way to derive the precise file source for a string of text on a page? The page in question is a template obviously but it doesn't seem to be contained in the usual haunts in the file system.

Specifics:

1. In chrome, go to http://www.networkingeventfinders.com/new-york-networking-guide/newmembership

2. Scroll down to bottom of page where you see the Upgrade button...

3. Immediately above that you see monetary amounts & timeframes.

4. I need to change the timeframe descriptives, i.e change '1 mo' to 'mo', '1 yr' to 'yr'...

5. The monetary amounts are handled in the CMS admin. The timeframes are a piece of hard html code inside a default php template.

6. I am looking for that php template file to make these adjustments. Where it should be, and where I have gone before to edit items on that page, the text in question is not to be found.

7. With the chrome developer tools & utilizing the search option thereof, one of course gets taken straight to the code lines in question. Is there perhaps one additional tool I'm unaware of that can give me the file path reference from which this text is being pulled?

8. The site is hosted by host gator and they have a pretty handy file search tool, but it didn't find it either...
__________________
LinkedIn: jM
johnMoss is offline  
Old 09-06-2012, 06:17 PM   #2
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

It's been a while since I've worked on a Jooma! site, but there should be in admin on the page 'configuration' or something like that an option 'debug'. It's off by default, so you have to tick the checkbox. Once you done that and you go to the site and page in question If you hover over the text you will see a frame or indicator which tells you from which file that include comes.

Like I said it's been far too long to remember exactly, but I believe it was something like this.
__________________
www.gentlemedia.nl

Last edited by gentleone; 09-06-2012 at 06:21 PM..
gentleone is offline  
Old 09-06-2012, 06:18 PM   #3
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

by the way... the includes are all dynamic content so you won't find out things with web developer or firebug.
__________________
www.gentlemedia.nl
gentleone is offline  
Old 09-06-2012, 06:18 PM   #4
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

Can you SSH to the hosting server?
If so, just search (grep) for the text you want to change.
domedia is offline  
Old 09-06-2012, 07:29 PM   #5
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default

Quote:
Originally Posted by gentleone View Post
If you hover over the text you will see a frame or indicator which tells you from which file that include comes.
I couldn't get that functionality to work. The debug (J 1.5) does pull up reference info, but simply displays known backend modules, components & such. Specifically, when turned on, additional info is placed at the bottom of the screen, as below...

Quote:
Originally Posted by domedia View Post
Can you SSH to the hosting server?
If so, just search (grep) for the text you want to change.
Was ist Das? Neu für mich

Code:
•PROFILE INFORMATION•

Application afterLoad: 0.000 seconds, 0.40 MB
Application afterInitialise: 0.161 seconds, 7.14 MB
Application afterRoute: 0.173 seconds, 8.10 MB
Application afterDispatch: 0.201 seconds, 9.56 MB
Application afterRender: 0.380 seconds, 16.01 MB
•MEMORY USAGE•

16954832
•15 QUERIES LOGGED•
  • SELECT * FROM nyg_session WHERE session_id = '70c214a7428072d476a943d5bfb8bbe5'
  • DELETE FROM nyg_session WHERE ( TIME < '1346954139' )
  • SELECT * FROM nyg_session WHERE session_id = '70c214a7428072d476a943d5bfb8bbe5'
  • UPDATE `nyg_session` SET `time`='1346955039',`userid`='0',`usertype`='',`username`='',`gid`='0',`guest`='1',`client_id`='0',`data`='__default|a:8:{s:15:\"session.counter\";i:59;s:19:\"session.timer.start\";i:1346952498;s:18:\"session.timer.last\";i:1346955026;s:17:\"session.timer.now\";i:1346955031;s:22:\"session.client.browser\";s:106:\"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1\";s:8:\"registry\";O:9:\"JRegistry\":3:{s:17:\"_defaultNameSpace\";s:7:\"session\";s:9:\"_registry\";a:1:{s:7:\"session\";a:1:{s:4:\"data\";O:8:\"stdClass\":0:{}}}s:7:\"_errors\";a:0:{}}s:4:\"user\";O:5:\"JUser\":19:{s:2:\"id\";i:0;s:4:\"name\";N;s:8:\"username\";N;s:5:\"email\";N;s:8:\"password\";N;s:14:\"password_clear\";s:0:\"\";s:8:\"usertype\";s:15:\"Public Frontend\";s:5:\"block\";N;s:9:\"sendEmail\";i:0;s:3:\"gid\";i:0;s:12:\"registerDate\";N;s:13:\"lastvisitDate\";N;s:10:\"activation\";N;s:6:\"params\";N;s:3:\"aid\";i:0;s:5:\"guest\";i:1;s:7:\"_params\";O:10:\"JParameter\":7:{s:4:\"_raw\";s:0:\"\";s:4:\"_xml\";N;s:9:\"_elements\";a:0:{}s:12:\"_elementPath\";a:1:{i:0;s:87:\"/home/nef/public_html/new-york-networking-guide/libraries/joomla/html/parameter/element\";}s:17:\"_defaultNameSpace\";s:8:\"_default\";s:9:\"_registry\";a:1:{s:8:\"_default\";a:1:{s:4:\"data\";O:8:\"stdClass\":0:{}}}s:7:\"_errors\";a:0:{}}s:9:\"_errorMsg\";N;s:7:\"_errors\";a:0:{}}s:13:\"session.token\";s:32:\"66c6ed66d886af4f370c12dbcefbf0c5\";}' WHERE session_id='70c214a7428072d476a943d5bfb8bbe5'
  • SELECT * FROM nyg_components WHERE parent = 0
  • SELECT folder AS TYPE, element AS name, params FROM nyg_plugins WHERE published >= 1 AND access <= 0 ORDER BY ordering
  • SELECT m.*, c.`option` AS component FROM nyg_menu AS m LEFT JOIN nyg_components AS c ON m.componentid = c.id WHERE m.published = 1 ORDER BY m.sublevel, m.parent, m.ordering
  • SELECT template FROM nyg_templates_menu WHERE client_id = 0 AND (menuid = 0 OR menuid = 152) ORDER BY menuid DESC LIMIT 0, 1
  • SELECT * FROM nyg_membership_features WHERE published ="1"
  • SELECT * FROM nyg_membership_type WHERE published ="1" ORDER BY id
  • SELECT a.id,a.name FROM nyg_sobipro_object AS a JOIN nyg_sobipro_category AS b ON b.id = a.id WHERE a.approved ="1" ORDER BY a.createdTime ASC
  • SELECT * FROM nyg_community_config WHERE name = 'config'
  • SELECT id, title, module, POSITION, content, showtitle, control, params FROM nyg_modules AS m LEFT JOIN nyg_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND m.access <= 0 AND m.client_id = 0 AND ( mm.menuid = 152 OR mm.menuid = 0 ) ORDER BY POSITION, ordering
  • SELECT * FROM nyg_ng_info
  • SELECT * FROM nyg_kunena_config
•LANGUAGE FILES LOADED•
  • /home/nef/public_html/new-york-networking-guide/language/en-GB/en-GB.ini 1
  • /home/nef/public_html/new-york-networking-guide/administrator/language/en-GB/en-GB.com_community.menu.ini 1
  • /home/nef/public_html/new-york-networking-guide/language/en-GB/en-GB.plg_system_debug.ini 1
  • /home/nef/public_html/new-york-networking-guide/language/en-GB/en-GB.com_memberships.ini
  • /home/nef/public_html/new-york-networking-guide/language/en-GB/en-GB.tpl_cloudbase.ini
  • /home/nef/public_html/new-york-networking-guide/language/en-GB/en-GB.com_community.ini 1
  • /home/nef/public_html/new-york-networking-guide/language/en-GB/en-GB.mod_mainmenu.ini 1
  • /home/nef/public_html/new-york-networking-guide/language/en-GB/en-GB.mod_footer.ini 1
  • /home/nef/public_html/new-york-networking-guide/language/en-GB/en-GB.mod_qloginpopup.ini 1
•UNTRANSLATED STRINGS DIAGNOSTIC• DECREASE FONT SIZE ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]DECREASE FONT SIZE ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]DEFAULT FONT SIZE ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]DEFAULT FONT SIZE ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]INCREASE FONT SIZE ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]INCREASE FONT SIZE ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]SKIP TO CONTENT ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]SKIP TO CONTENT ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]SKIP TO CONTENT ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]SKIP TO CONTENT ::include() [/home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.php:44]•UNTRANSLATED STRINGS DESIGNER• # /home/nef/public_html/new-york-networking-guide/templates/cloudbase/libs/ja.template.helper.phpDECREASE FONT SIZE=Decrease font sizeDEFAULT FONT SIZE=Default font sizeINCREASE FONT SIZE=Increase font sizeSKIP TO CONTENT=Skip to content
__________________
LinkedIn: jM
johnMoss is offline  
Old 09-06-2012, 07:31 PM   #6
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default

I do indeed gather the text string in question is buried in a plug-in script file somewhere. All the purportedly obvious file paths lead to dead ends...
__________________
LinkedIn: jM
johnMoss is offline  
Old 09-06-2012, 07:57 PM   #7
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

No... debug is your best friend when working on a joomla! site. I could find all the files/includes with that. Without debug you're pretty much nowhere in Joomla!
__________________
www.gentlemedia.nl
gentleone is offline  
Old 09-06-2012, 08:15 PM   #8
domedia
Administrator
domedia's Avatar
 
Join Date: Dec 2003
Posts: 9,730
Default

And if you can't access the server through a console like Putty, you need to download the site and search locally.
domedia is offline  
Old 09-07-2012, 07:06 PM   #9
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default

Quote:
Originally Posted by domedia View Post
And if you can't access the server through a console like Putty, you need to download the site and search locally.
ah... got it... thanx... thats the ticket
__________________
LinkedIn: jM
johnMoss is offline  
Old 09-06-2012, 08:27 PM   #10
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

I will have a look for you how I did it on a Joomla site I did in the past. I'll let you know.
__________________
www.gentlemedia.nl
gentleone is offline  
Closed Thread


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:36 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com