what is ?
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
what is ?
hi there, i just viewed the source output of my joomla page, and noticed this...
what is this text, and how do I get rid of it (i am parsing the output and i dont want this text)
what is this text, and how do I get rid of it (i am parsing the output and i dont want this text)
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Re: what is ?
That's actually an XML comment. The "" ends it. Everything between should be ignored. You'll see this sort of thing from time to time in generated HTML. It's probably some sort of debug code.
__________________
Bruce Scherzinger
Bruce Scherzinger
- matthewhayashida
- Joomla! Enthusiast
- Posts: 114
- Joined: Sat Feb 10, 2007 8:26 pm
- Location: Abbotsford, BC
- Contact:
Re: what is ?
I have also noticed the number increases all the time. It must be some type of timestamp? or counter?
I remember seeing a post that explained it. I will look.
I remember seeing a post that explained it. I will look.
-Matt Hayashida
Re: what is ?
Don't know what it's used for, but the number is a UNIX Timestamp. This is a time representation that is the number of seconds since 1970. A converter can be found here.
Antonie de Wilde - Forum admin
- matthewhayashida
- Joomla! Enthusiast
- Posts: 114
- Joined: Sat Feb 10, 2007 8:26 pm
- Location: Abbotsford, BC
- Contact:
Re: what is ?
Oh. Thanks for that. I was wondering. Is it safe to remove? If so how do I do it?
-Matt Hayashida
Re: what is ?
I need to know too how to remove it... any ideas?
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Re: what is ?
You'll need to look at the code of the module, template, or whatever it is you are working on and search for the "<--". There is going to be a line of code that either echoes that string or appends it to a variable, followed by a time string and the "-->" ending part. Just delete any lines of code involved in outputting that string and you should be fine.
__________________
Bruce Scherzinger
Bruce Scherzinger
- matthewhayashida
- Joomla! Enthusiast
- Posts: 114
- Joined: Sat Feb 10, 2007 8:26 pm
- Location: Abbotsford, BC
- Contact:
Re: what is ?
This code isn't in templates or modules/plugins/components. Its somewhere in the core.
-Matt Hayashida
Re: what is ?
So, do a recursive grep for it. It should be safe to remove.
__________________
Bruce Scherzinger
Bruce Scherzinger
Re: what is ?
Look almost at the end of main Joomla index.php file
// loads template file
if ( !file_exists( $mosConfig_absolute_path .'/templates/'. $cur_template .'/index.php' ) ) {
echo _TEMPLATE_WARN . $cur_template;
} else {
require_once( $mosConfig_absolute_path .'/templates/'. $cur_template .'/index.php' );
echo '';
}
That's the code that generates the timestamp.
// loads template file
if ( !file_exists( $mosConfig_absolute_path .'/templates/'. $cur_template .'/index.php' ) ) {
echo _TEMPLATE_WARN . $cur_template;
} else {
require_once( $mosConfig_absolute_path .'/templates/'. $cur_template .'/index.php' );
echo '';
}
That's the code that generates the timestamp.
Re: what is ?
you rock GMassi!!!! Thanks!!!
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&
Re: what is ?
do you just remove this line?....
echo '';
and nothing else?
any reason not to remove it?
echo '';
and nothing else?
any reason not to remove it?
Last edited by ctf20 on Fri Sep 07, 2007 8:34 pm, edited 1 time in total.
- Puckeye
- Joomla! Fledgling
- Posts: 1
- Joined: Mon Jul 30, 2007 11:07 pm
- Location: Joliette, QC, Canada
- Contact:
Re: what is ?
I don't know if there's a reason that you need to keep it but I must say I don't think there's any reason to remove it.
But if you want to remove it I'd remove the whole else block
Note you have to keep the closing } located in front of the else keyword.
But if you want to remove it I'd remove the whole else block
Code: Select all
else {
require_once( $mosConfig_absolute_path .'/templates/'. $cur_template .'/index.php' );
echo '<!-- '. time() .' -->';
}
Note you have to keep the closing } located in front of the else keyword.
Last edited by Puckeye on Fri Sep 07, 2007 11:28 pm, edited 1 time in total.
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: what is ?
i'm writing code to utilise that bit of information in future. if you remove it your site will be unique and would not be able to use the component i haven't made
Re: what is ?
Puckeye wrote:I don't know if there's a reason that you need to keep it but I must say I don't think there's any reason to remove it.
But if you want to remove it I'd remove the whole else blockCode: Select all
else {
require_once( $mosConfig_absolute_path .'/templates/'. $cur_template .'/index.php' );
echo '<!-- '. time() .' -->';
}
Note you have to keep the closing } located in front of the else keyword.
i removed that you said, and the site disappeared, just blank. --so i put it back...
- ChiefGoFor
- Joomla! Engineer
- Posts: 282
- Joined: Tue Sep 13, 2005 12:22 am
- Location: Omaha, Nebraska, USA
Re: what is ?
Personally, I do not think it hurts anything to leave it in. If you use the "Cache" setting withing Joomla, you can use that timestamp to know if you are looking at a cached version.
If you hit "refresh", the timestamp should change. If it does not change, then you know that you are looking at a cached version of that page.
I'm sure there are other reasons, but that is what I use it for.
If you hit "refresh", the timestamp should change. If it does not change, then you know that you are looking at a cached version of that page.
I'm sure there are other reasons, but that is what I use it for.
Kenneth Crowder - Omaha, Nebraska, USA
Joomla! ...because open source matters
Joomla! ...because open source matters
- jalil
- Joomla! Enthusiast
- Posts: 128
- Joined: Wed Jul 04, 2007 4:54 am
- Location: Kuala Lumpur, Malaysia
- Contact:
Re: what is ?
also the timestamp, since it is there can be used to measure time delays between user request and response, which is extremely useful to manage users coming from various types of links. so it is a useful subtle feature.
- DeanMarshall
- Joomla! Apprentice
- Posts: 46
- Joined: Fri Aug 19, 2005 2:26 am
- Location: Lancaster, Lancashire, United Kingdom
- Contact:
Re: what is ?
This debug code has been removed from the SVN (latest development version) of Joomla.
Dean
Dean
Dean Marshall - http://www.deanmarshall.co.uk/
Mambo and Joomla Consultant
Add an Amazon Store to your site: http://www.Project-TinA.com/ (coming soon)
Mambo and Joomla Consultant
Add an Amazon Store to your site: http://www.Project-TinA.com/ (coming soon)