0
Welcome Guest! Login
0 items Join Now

Need some starthelp with Firebug. Which file to edit?

  • Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • I finally took the time to install and start playing with Firebug. It`s a great tool indead, but I need some starthelp here guys.

      I want to change some things on my site, and I have found the spesific code, but I cannot find out in which file this code is stored. I can see the .css-file to the right in the Firebug-windows and there it tells me which file the code is in, but on the left side (html-part) it doesn`t say anything about which file I need to edit.

      Take a look at the picture. You`ll see what I want to change, and you`ll se the code that need to be changed.

      i43.tinypic.com/34rcftl.jpg
  • Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • Hello,

      It's not in the template css, because the td doesn't have any id or class, but you can put something for the "td", for example:
      .sectiontableentry1 td {width: 30px;}
    • JEM's Avatar
    • JEM
    • Preeminent Rocketeer
    • Posts: 17917
    • Thanks: 4

    Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
  • Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • I don`t think either of you read my post very well.

      I quote:

      I can see the .css-file to the right in the Firebug-windows and there it tells me which file the code is in, but on the left side (html-part) it doesn`t say anything about which file I need to edit.

      The reason the .css-filename is not shown is becaus it cut the picture too much. ;)
  • Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • Hello,

      Can we get a link to your site to try and better help you?
  • Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • King-Nothing wrote:
      I don`t think either of you read my post very well.
      I also don't think this is the way to appreciate someone's reply. We might be not understand your problem like you thought, but at least we DO want to help you
      King-Nothing wrote:
      I quote:
      I can see the .css-file to the right in the Firebug-windows and there it tells me which file the code is in, but on the left side (html-part) it doesn`t say anything about which file I need to edit.

      The reason the .css-filename is not shown is becaus it cut the picture too much. ;)
      what do you mean by "it cut the picture" ? what picture?
    • Ben Lee's Avatar
    • Ben Lee
    • Elite Rocketeer
    • Posts: 4193
    • Thanks: 42

    Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • I think I see what you're asking and I don't think you got a straight answer...because there isn't one. Here's an explanation of the code you're seeing in Firebug.

      On the right side you are seeing the css files with the file names so you can look them up easily...something like "style.css" or "template.css".

      On the left side, Firebug displays the "source code" for the page you are viewing. Source code is all the HTML code that it takes to display the page in your browser. With bigger website systems, like Joomla, this can be a culmination of several other code pages and database info from the MySQL database all rolled into one.

      For that reason, you don't always find that exact code in any particular file.

      The best way to problem solve for this situation is looking at where the code you are looking at is located on the page. If this code is in an article, it is most likely the HTML code in you article...so open that article in the Joomla backend and if you have your HTML editor turned off, you'll see the html code there. The same is true for modules.

      Now, if you're looking for something that has to do with the positioning of a module or something dealing with the header code, you will find that in the template files...the first one to check being "index.php", but remember this is largely php code.

      Please post further questions if this doesn't answer what you need it to...I hope we're getting closer to an answer for you. :cheesy:
    • Ben Lee's Avatar
    • Ben Lee
    • Elite Rocketeer
    • Posts: 4193
    • Thanks: 42

    Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • Now, from looking closer at your picture...it looks like you are using a Category List Layout there...

      In Joomla 1.5.11, there is an issue with the styling not being carried over. Please see this posted fix for this release:

      Why does Category List Layout show in the wrong format in version 1.5.11?

      If you are on Joomla 1.5.11, fix this first before trying to anything else.
  • Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • Arifin FinLy wrote:
      King-Nothing wrote:
      I don`t think either of you read my post very well.
      I also don't think this is the way to appreciate someone's reply. We might be not understand your problem like you thought, but at least we DO want to help you

      Well, I didn`t mean to be rude in any way, but it has happened several times now that I ask a question and someone misunderstands me just because they haven`t read the first post good enough. That`s all. I have gotten a lot of help in here and it has helped me alot so I am very grateful for all the quick and good support you provide. :)

      The url to my site is www.trommeforum.com/joomla2
      Arifin FinLy wrote:
      what do you mean by "it cut the picture" ? what picture?

      I meant the picture I linked to, and ofcourse I ment that I cut the picture not "it" as I wrote. ;)

      Ben: That fix made it look a lot better yes. :)

      And your answer cleared up the part about the left window of Firebug showing the sourcecode. I thought it was a way for me to see which file needing editing, but as I understand there is no certain way to see this?

      What I want to change is the text "Nr" which you can see when entering the menupoint "Artikler" on my site. I want it to be centered above the numbers and not to the right like it is now. Not a big deal, but this is my first edit with Firebug and I want to learn how to use this great program so that I can keep on using it for changes instead of bugging you guys everytime. :D
    • Ben Lee's Avatar
    • Ben Lee
    • Elite Rocketeer
    • Posts: 4193
    • Thanks: 42

    Re: Need some starthelp with Firebug. Which file to edit?

    Posted 15 years 5 months ago
    • OK, this is a tough one, so hang in there with me...

      This is actually coded into the com_content component that is a Joomla core component. It's best to make a note of any changes you make to a core feature as it may be overridden by a future update so you may have to make this change again.

      Here's a screenshot of what I'm seeing in Firebug, there are two highlighted lines, one that is a url that I highlighted to show, and the other that was highlighted by Firebug when I hovered over it, it has "sectiontableheader" in it.
      This image is hidden for guests.
      Please log in or register to see it.


      With the url that is highlighted, you see "index.php?option=com_content&view=category&id=10&Itemid=48". Of this, take note of the "com_content" and the "view=category".

      "com_" is a prefix for component so I looked in the "components" directory in Joomla. Inside this directory, I chose the "views" and then "category" directories. Most code that you would have a need to change like this will be in the "tmpl" directory. In this case, I think we need the "default_items.php" file.

      Now we're here:
      joomla_root/components/com_content/views/category/tmpl/default_items.php

      In this file, you'll find the other highlighted line in Firebug that has the actual code you're looking to adjust:

      around line 42, you'll find:
      <td class="sectiontableheader<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" align="right" width="5%">

      Where it says align="right", you want to change that from right, to center or left.


      Now for the cool part..

      If you want to make a template override for this so that when you upgrade Joomla, this won't be affected, you can copy the whole "com_content" directory and paste it in the following directory:

      joomla_root/templates/rt_metamorph_j15/html/

      so you have:

      joomla_root/templates/rt_metamorph_j15/html/com_content

      Now make you changes here and as long as you're using this template, Joomla should use this code for the layout!

      When you do an override like this, it's always best to check any future Joomla updates against this directory and update it as well. This is just an easier way to keep track of what components or modules you have adjusted.

Time to create page: 0.062 seconds