How do I edit and view the html file

Discussion regarding Joomla! security issues.
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Priscillam
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Aug 11, 2008 1:28 pm

How do I edit and view the html file

Postby Priscillam » Wed Aug 13, 2008 8:20 am

I have been trying to get help about this issue and its beginning to slow my work down. I'm using Joomla ver 1.0.11.
I have downloaded a couple of joomla templates to try on my website. Now I want to change some things on the html index file, but I cant because the html file have either java script and php script like the following:

<div class="pway"><?php mosPathWay(); ?></div>
<div id="logo"><a class="logo" href="index.php"><?php echo $GLOBALS['mosConfig_sitename']?></a></div>
<?php include'menu.php'; ?>
<div id="container">
<table cellpadding="0" cellspacing="0">
<tr> <td class="leftcol" valign="top">
<?php mosLoadModulles('left'); ?>
</td>


And I cant edit this cause I dont know where to find the files on the templates. But when I publish the site and view the source, the code comes out as I want it to be on the back end so I can edit and change as it suits my look.

If I edit the html file on the internet or using other programs and save it, the links of the index dont work.
I want the back end of the html file to come out looking like the below code to be easy for me to edit it:

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left"><td><a href="http://localhost/index.php?option=com_frontpage&amp;Itemid=1" class="mainlevel" id="active_menu">Home</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_search&amp;Itemid=5" class="mainlevel" >Search</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_content&amp;task=section&amp;id=4&amp;Itemid=35" class="mainlevel" >Products and services</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_content&amp;task=section&amp;id=12&amp;Itemid=40" class="mainlevel" >Liquidcapital News</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_content&amp;task=view&amp;id=27&amp;Itemid=42" class="mainlevel" >Liquidcapital</a></td></tr>
<tr align="left"><td><a href="http://localhost/index.php?option=com_content&amp;task=view&amp;id=28&amp;Itemid=43" class="mainlevel" >Group profile</a></td></tr>
</table> </td>

Please help...

dragonrider
Joomla! Ace
Joomla! Ace
Posts: 1045
Joined: Mon Aug 22, 2005 7:53 pm
Location: Ilkley, West Yorkshire, UK
Contact:

Re: How do I edit and view the html file

Postby dragonrider » Wed Aug 13, 2008 3:33 pm

You want to edit a template's file? Is that right?

If so, then log in to your Joomla admin, thenselect Site>Template Manager>Site Templates
This takes you to a page with your installed templates, click the radio button to the left of your chosen template, then click Edit HTML on the upper right of the page.

This opens up the actual php file that controls your joomla pages. If you are unsure about what you are doing, SAVE a copy BEFORE you start, just copy & paste into notepad or something, NOT Word!

Then you can save it, providing you set the permissions to 666 whilst saving, then return to 644, or if you update to 1.0.15 (highly advised) I think you find a Make Writable for saving option on the actual template edit page.

Priscillam
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Aug 11, 2008 1:28 pm

Re: How do I edit and view the html file

Postby Priscillam » Mon Aug 18, 2008 7:06 am

Thank you for your reply dragonrider...

But I'm still in a puzzle, its clear how I can edit the php file and upload, that I can do with no problem.
But why does the file come up in php? I dont want it to come up in a php form. I want it to appear like it does when the site is published and you go to view source. It shows you the file html file without the php scripts or js.

My problem is I cant edit the php file (template), because I find it difficult to understand the script and where they come from.

But if a go view source of the website I see what is happening and I can edit without the php file.

Or is the any joomla template that i can download without the php scripts?

dragonrider
Joomla! Ace
Joomla! Ace
Posts: 1045
Joined: Mon Aug 22, 2005 7:53 pm
Location: Ilkley, West Yorkshire, UK
Contact:

Re: How do I edit and view the html file

Postby dragonrider » Mon Aug 18, 2008 8:50 am

All the Joomla pages are created from php files, be they index pages or whatever.

They are no HTML files in Joomla that you can edit, they are created from the template/index.php files when viewed.

Priscillam
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Aug 11, 2008 1:28 pm

Re: How do I edit and view the html file

Postby Priscillam » Wed Aug 20, 2008 1:06 pm

So where can I edit the php scripts on my template? I have tried looking under site - modules.
For example, if I wanted to change the following scripts;

<?php mosLoadModulles( 'debug', -1 );?>
<?php include_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/footer.php' ); ?>

Where would I do it?

dragonrider
Joomla! Ace
Joomla! Ace
Posts: 1045
Joined: Mon Aug 22, 2005 7:53 pm
Location: Ilkley, West Yorkshire, UK
Contact:

Re: How do I edit and view the html file

Postby dragonrider » Wed Aug 20, 2008 6:01 pm

Priscillam wrote:So where can I edit the php scripts on my template?

Where would I do it?


Log in to your Joomla admin, then select Site>Template Manager>Site Templates
This takes you to a page with your installed templates, click the radio button to the left of your chosen template, then click Edit HTML on the upper right of the page.

This opens up the actual php file that controls your joomla pages. If you are unsure about what you are doing, SAVE a copy BEFORE you start, just copy & paste into notepad or something, NOT Word!

BlueFin
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Thu Nov 27, 2008 11:32 pm
Contact:

Re: How do I edit and view the html file

Postby BlueFin » Sun Dec 21, 2008 11:45 pm

Dragonrider:

Your tips were helpful and it pointed the way. I pasted my Google tracking code in the template page saved it and checked in IE and it was there. When I go to Google analytics to check on the tracking code status, it still says it is still not installed. :( Does it take a while to populate?

The developer who set up our site does not have a template created for each page. Just one template for the home page. How then, can I add tracking code so it tracks on all pages..... I am new to this so be patient. I am not a joomla developer. Just trying to fill in where our "no longer on duty" developer left off.

Thanks

dragonrider
Joomla! Ace
Joomla! Ace
Posts: 1045
Joined: Mon Aug 22, 2005 7:53 pm
Location: Ilkley, West Yorkshire, UK
Contact:

Re: How do I edit and view the html file

Postby dragonrider » Mon Dec 22, 2008 8:16 am

Check the template page again, the template you are using for your homepage should be shown as Default, that way, your site has a uniform look to it.

As long as the template you are using is et to default, this will be used on each and every page your site displays.

Google, yes, as far as I know, it does/can take some time to re-populate a changed page.

BlueFin
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Thu Nov 27, 2008 11:32 pm
Contact:

Re: How do I edit and view the html file

Postby BlueFin » Mon Dec 22, 2008 9:14 am

Thanks for the tips.

All things working now. Had code in twice also and was not looking at the correct analytics pages.

Thanks

smcclure
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Wed Sep 19, 2012 10:07 pm

Re: How do I edit and view the html file

Postby smcclure » Thu Aug 22, 2013 6:29 pm

This is one of the biggest problems with Joomla. They claim to be fully open-source but it is virtually impossible to edit any html files. If you ask anyone they will say its all in the PHP file. First off, PHP and html barely have anything in common with each other and second you can view the index.php file to be that the required code is NOT in there. IF you use Firebug or Inspect Element you can see that there IS an html file containing the code necessary to make amy of the changes. But you simply cannot find this file anywhere in your ftp folders and definitely no in admin. It's a ridiculous limitation of Joomla and probably why most serious developers are turning to Drupal.


Return to “Security - 1.0.x”

Who is online

Users browsing this forum: No registered users and 5 guests