vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: [R] Category Name on Head Image - View Topic
Topic Rating: *****
Printable View
This topic was locked 2nd Apr 08 at 12:07am by Michael
dog199200
Guest
[R] Category Name on Head Image (31st Mar 08 at 4:35am UTC)
{Smile} the name says it all {Smile} , also i already am using a code that centers the text, so if you were going to add that in you dont have to {Smile}
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Category Name on Head Image (31st Mar 08 at 11:45am UTC)
So you want it in the center of the head image? {Smile}


<script>
/*Category Name in Head Image
by Wrighty
No Repost, Rip or Claiming*/

var row = 1; //Are you showing the 'Board Name' row? 1 = yes, 0 = no.

var r = get('tr','tag');
for(i=0;i<r.length;i++){
    if(r[i].cells[0].className == 'title2 categorytitle' && r[i].cells[0].innerHTML.match(/\/category\//)){
        r[i].cells[0].getElementsByTagName("a")[1].removeAttribute("href");
        r[i].cells[0].getElementsByTagName("font")[0].removeAttribute("size");
        var x = (row==1)? 1 : -1;
        var num = parseInt(2 + x);
        var a = r[i-num].insertCell(1);
        with(a){
            width="100%";
            align="center";
        }
        a.appendChild(r[i].cells[0].firstChild);
        r[i].style.display = 'none';
    }
}
</script>


Edit the part in red. That is the row that appears just above where the 'category' name normally is. If you're showing it, put a 1 otherwise, a 0 {Smile}

Any problems, post back.

Global Footer
dog199200
Guest
Re: Category Name on Head Image (31st Mar 08 at 10:14pm UTC)
{Smile} ok well the code works, but it doesn't work with the code i have to already center the text so can you please have the code center the text then?
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Category Name on Head Image (31st Mar 08 at 10:16pm UTC)
It should do! {Smile}
dog199200
Guest
Re: Category Name on Head Image (31st Mar 08 at 10:19pm UTC)
it doesn't and do to the board mod you made me it messes up the forum when i set it to 1 and when i set it to 0 it puts the text on the left.


Edit: I think i know whats wrong is it possibly this code?

Code:
 
  1. <style type="text/css"/>
  2. #forum table.head {
  3.     width: 700px;
  4.     height: 30px;
  5.     display: block;
  6.     background-image: url('http://i25.photobucket.com/albums/c51/dog199200/FMA%20Images/head.png');
  7.     background-position: bottom center;
  8. }
  9. #forum table.base {
  10.     width: 700px;
  11.     height: 30px;
  12.     display: block;
  13.     background-image: url('http://i25.photobucket.com/albums/c51/dog199200/FMA%20Images/base.png');
  14.     background-position: top center;
  15. }
  16. #forum .slip_bg .border{
  17.    width: 700px !important;
  18.    margin: auto;
  19. }
  20.  
  21. #forum .slip_bg .border .border {
  22.     width: auto !important;
  23. }
  24.  
  25. #forum_table, #forum {
  26.     margin: auto;
  27. }
  28. </style>
 
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Category Name on Head Image (31st Mar 08 at 10:27pm UTC)
Send me the forum link? {Smile}
dog199200
Guest
Re: Category Name on Head Image (31st Mar 08 at 10:41pm UTC)
http://fmaadvanced.virtualforums.co.uk


Edit: also why you are looking into the error can you please make the code so that it also removes the link from the text as well, because the one that does that in the datebase doesn't work with the code.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Category Name on Head Image (1st Apr 08 at 11:32am UTC)
Right, well I have modified the code to remove the category link. (Recopy it from above)

also, Why not just use the normal head/base method? Instead of this one? {Unsure}
dog199200
Guest
Re: Category Name on Head Image (1st Apr 08 at 11:52pm UTC)
because of how the images are made, it would be hard to redo them to have them fit right, but did you ever find out why the code doesn't center?
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Category Name on Head Image (2nd Apr 08 at 12:07am UTC)
Sorry, but those head and base images are ripped from Pho's skin.

You will need to get new ones.

As of now this request is locked. If you feel this is wrong, PM me. Otherwise, change them!
 Printable View

All times are GMT+0 :: The current time is 12:25am
Page generated in 0.1951 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums