what is ?

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
User avatar
fire2006
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jun 06, 2006 7:46 am
Location: Seoul
Contact:

what is ?

Post by fire2006 » Thu Aug 30, 2007 4:34 pm

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)
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&

User avatar
bascherz
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Mon Jan 16, 2006 1:33 am
Location: Vienna, VA
Contact:

Re: what is ?

Post by bascherz » Thu Aug 30, 2007 4:45 pm

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

User avatar
matthewhayashida
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Sat Feb 10, 2007 8:26 pm
Location: Abbotsford, BC
Contact:

Re: what is ?

Post by matthewhayashida » Thu Aug 30, 2007 5:03 pm

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.
-Matt Hayashida

User avatar
Tonie
Joomla! Ace
Joomla! Ace
Posts: 1585
Joined: Thu Aug 18, 2005 7:13 am
Contact:

Re: what is ?

Post by Tonie » Thu Aug 30, 2007 5:10 pm

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

User avatar
matthewhayashida
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Sat Feb 10, 2007 8:26 pm
Location: Abbotsford, BC
Contact:

Re: what is ?

Post by matthewhayashida » Thu Aug 30, 2007 6:21 pm

Oh. Thanks for that. I was wondering. Is it safe to remove? If so how do I do it?
-Matt Hayashida

User avatar
fire2006
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jun 06, 2006 7:46 am
Location: Seoul
Contact:

Re: what is ?

Post by fire2006 » Fri Aug 31, 2007 6:38 pm

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&

User avatar
bascherz
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Mon Jan 16, 2006 1:33 am
Location: Vienna, VA
Contact:

Re: what is ?

Post by bascherz » Fri Aug 31, 2007 7:08 pm

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

User avatar
matthewhayashida
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 114
Joined: Sat Feb 10, 2007 8:26 pm
Location: Abbotsford, BC
Contact:

Re: what is ?

Post by matthewhayashida » Fri Aug 31, 2007 7:27 pm

This code isn't in templates or modules/plugins/components. Its somewhere in the core.
-Matt Hayashida

User avatar
bascherz
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Mon Jan 16, 2006 1:33 am
Location: Vienna, VA
Contact:

Re: what is ?

Post by bascherz » Fri Aug 31, 2007 8:22 pm

So, do a recursive grep for it. It should be safe to remove.
__________________
Bruce Scherzinger

GMassi
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jun 23, 2006 1:45 pm

Re: what is ?

Post by GMassi » Fri Aug 31, 2007 8:25 pm

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.

User avatar
fire2006
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue Jun 06, 2006 7:46 am
Location: Seoul
Contact:

Re: what is ?

Post by fire2006 » Sat Sep 01, 2007 3:57 am

you rock GMassi!!!! Thanks!!!
Paul Preibisch - Educational Technologist
Fire Centaur - English Village - Secondlife
http://slurl.com/secondlife/English%20V ... 20Village&

ctf20

Re: what is ?

Post by ctf20 » Fri Sep 07, 2007 8:32 pm

do you just remove this line?....

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.

User avatar
Puckeye
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Jul 30, 2007 11:07 pm
Location: Joliette, QC, Canada
Contact:

Re: what is ?

Post by Puckeye » Fri Sep 07, 2007 11:25 pm

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

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.

User avatar
jalil
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 128
Joined: Wed Jul 04, 2007 4:54 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: what is ?

Post by jalil » Sat Sep 08, 2007 7:46 am

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 :)  :pop

ctf20

Re: what is ?

Post by ctf20 » Mon Sep 10, 2007 4:08 pm

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 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.


i removed that you said, and the site disappeared, just blank. --so i put it back...

User avatar
ChiefGoFor
Joomla! Engineer
Joomla! Engineer
Posts: 282
Joined: Tue Sep 13, 2005 12:22 am
Location: Omaha, Nebraska, USA

Re: what is ?

Post by ChiefGoFor » Tue Sep 11, 2007 3:49 pm

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. :)
Kenneth Crowder - Omaha, Nebraska, USA
Joomla! ...because open source matters

User avatar
jalil
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 128
Joined: Wed Jul 04, 2007 4:54 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: what is ?

Post by jalil » Tue Sep 11, 2007 11:58 pm

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.

User avatar
DeanMarshall
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Fri Aug 19, 2005 2:26 am
Location: Lancaster, Lancashire, United Kingdom
Contact:

Re: what is ?

Post by DeanMarshall » Wed Sep 12, 2007 2:03 am

This debug code has been removed from the SVN (latest development version) of Joomla.

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)


Post Reply