Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    i need to edit this

    Code:
    <script>
    var User = new Array();
    //Username,Clan
    User[0] = ["Warden","<b><P align=center>Clan: </b><a href=' http://z6.invisionfree.com/d2traders/index.php?act=SR&f=47'>D2light</a>"]
    User[1] = ["Ctrl-Alt-Delete","<P align=center><b><P align=center>Clan:</b> <a href=' http://z6.invisionfree.com/d2traders/index.php?act=SR&f=47'>D2light</a>"]
    User[2] = ["Drakel","</center><b><P align=center>Clan:</b> <a href=' http://z6.invisionfree.com/d2traders/index.php?act=SR&f=47'>D2light</a><center></P>"]
    
    if(location.href.match("showtopic=")){
    for(i=0; i<User.length; i++){
    a = document.getElementsByTagName("span")
    for (n=0; n<a.length; n++){
    if(a[n].innerHTML.match(User[i][0])&&a[n].className=="normalname"){
    a[n+2].innerHTML = a[n+2].innerHTML + "<b></b> "+User[i][1]+"";
    }}}}
    </script>
    i need to edit this so the link will show's under
    Join Date

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    a[n+2].innerHTML = a[n+2].innerHTML + "<b></b> "+User[i][1]+"<br>";
    Its really simple html.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    but i dont know where to put The Join date script

    make could you do it from me ?

  • #4
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Bring my topic up

  • #5
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Bumps

  • #6
    Senior Coder
    Join Date
    Nov 2006
    Posts
    1,000
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Instead of bumping your topic try looking at your question to try and see why people might not be answering.

    - does my question make sense?
    - do I need to give more information?
    - is the script I posted enough for people to answer my question?
    - do I already have the answer and just need to implement it?
    - would it help if I gave a link to my page?

    I can only speak for myself but I see you saying you want a link below a join date. I see a bunch of links and I see no join date. Not to mention the fact that I don't understand your code. I see you adding bold tags around nothing and nested anchor links. Does that even work?

    Once again Aero impresses in that he even tried to answer. You can try his solution by looking at your code to find the line he suggested changing and making that line look like his. (line 12 in your code)

    Just some thoughts to ponder on. Sorry but I couldn't answer your question even if I wanted to because I have no idea what you are trying to do.

    david_kw

  • #7
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    bumpss

  • #8
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i made this But not works :

    Code:
    <script type="text/javascript">
    <!--
    
    var User = new Array();
    
    // Username, Clan
    User[0] = ["Warden", "<a href='http://z6.invisionfree.com/d2traders/index.php?act=SR&f=47'>D2light</a>"];
    User[1] = ["Ctrl-Alt-Delete", "<a href='http://z6.invisionfree.com/d2traders/index.php?act=SR&f=47'>D2light</a>"];
    User[2] = ["Drakel", "<a href='http://z6.invisionfree.com/d2traders/index.php?act=SR&f=54'>CookieMonsters Army</a>"];
    User[3] = ["CmA-Projekt", "<a href='http://z6.invisionfree.com/d2traders/index.php?act=SR&f=54'>CookieMonsters Army</a>"];
    
    if(location.href.match(/showtopic=\d+/i)) {
    var a = document.getElementsByTagName("span")
    for(var b = 0; b < a.length; b ++) {
       for(var c = 0; c < User.length; c ++) {
          if(a[b].className == "normalname" && a[b].innerHTML.match(new RegExp(User[c][0], "gi"))) {
             var s = a[b].parentNode.parentNode.parentNode.rows[1].cells[0].getElementsByTagName("span")[0];
             s.innerHTML = s.innerHTML.replace(new RegExp("(Joined.*\\d{4})", "gi"), "$1<br>Clan: " + User[c][1]);
          }
       }
    }
    }
    // -->
    </script>

  • #9
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Since you sent me a PM asking for help here, I'm taking another look - yes, I did already view this topic and decided I had no idea what was going on.

    After taking another look, I still
    Quote Originally Posted by whizard
    [have] no idea what['s] going on
    Could you explain a little more clearly exactly what your problem is?

    Dan
    Last edited by whizard; 12-16-2006 at 08:13 PM.
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #10
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok i try to explain

    i made this code for add a new link to a user i want that you can view here:

    http://z6.invisionfree.com/d2traders...228&st=0&#last
    You can see The user got Clan: d2light

    But the link show's under the warn level that i want to do so the link will shows under join date like here: http://forums.d2evil.org/index.php?s...0&#entry614549

    Im Trying to make a nice clan system

    Hope you understand.

  • #11
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Code:
    <script>
    var User = new Array();
    //Username,Clan
    User[0] = ["Warden","<b><P align=center>Clan: </b><a href=' http://z6.invisionfree.com/d2traders/index.php?act=SR&f=47'>D2light</a>"]
    
    if(location.href.match("showtopic=")){
    for(i=0; i<User.length; i++){
    a = document.getElementsByTagName("span")
    for (n=0; n<a.length; n++){
    if(a[n].innerHTML.match(User[i][0])&&a[n].className=="normalname"){
    a[n+2].innerHTML = a[n+2].innerHTML + "<b></b> "+User[i][1]+"";
    }}}}
    </script>
    Change the part in red to:
    <P align=center style="display:inline;">

    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #12
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Did not worked i mean the link should shows over warn level and shows under join date.

    Like here.. http://forums.d2evil.org/index.php?s...0&#entry614549

  • #13
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    :S plz help me .

  • #14
    Lfe
    Lfe is offline
    New Coder
    Join Date
    Dec 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    bumpfr

  • #15
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Quote Originally Posted by lfe
    Did not worked i mean the link should shows over warn level and shows under join date.
    Like here.. http://forums.d2evil.org/index.php?s...0&#entry614549
    A: Don't bump your posts. If people want to help you, they will. You're not going to win them over by posting almost NO information and then bumping the thread and sending them private messages with the attitude that they are somehow required to help you.

    B: I went to the link (that I quoted above) and I got the forum index. There was no 'warn level' or 'join date'.

    If you want help, be SPECIFIC.

    Although I fear this thread is reaching the end of shelf life.

    <EDIT>
    Found your link farther up in the post and it worked, I got a thread. As far as I could tell, the 'Clan:' WAS above 'Warn Level' and below 'Join Date'....

    Not sure what the problem is then...

    Note: Please don't link to pages with porn on them
    </EDIT>

    Dan
    Last edited by whizard; 12-20-2006 at 07:31 PM.
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •