Any wordpress experts around tonight?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spacedog
    Yes that IS me. Bitch.
    • Nov 2001
    • 14149

    #1

    Any wordpress experts around tonight?

    I'd like to add onMouseOver string to links in the sidebar.

    The only logical way for me to be able to do this is if I were adding links manually, directly in the sidebar.php template instead of using the wp-admin/link-add.php

    Is there a way to configure wp so that i am able to add onMouseOver to links added via wp-admin/link-add.php
  • Hardlinks
    Confirmed User
    • May 2005
    • 1333

    #2
    It will most likely be in the css spacedog
    Find out how I make Fabulous Cash !!

    Comment

    • BoyAlley
      So Fucking Gay
      • Nov 2004
      • 19714

      #3
      Originally posted by Hardlinks
      It will most likely be in the css spacedog
      No, can't do that with CSS.

      You need to do a little code hack. I just dug into the code really quick for you, here's what ya need to do:

      Go into wp-includes and find link.php open it up and find this line:

      PHP Code:
      $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>'; 
      
      That's where you need to add your onmouse over. It'll effect all links that you add.

      Comment

      • BoyAlley
        So Fucking Gay
        • Nov 2004
        • 19714

        #4
        TexasDream: You might wanna go in and edit the php code tag colors bud

        Comment

        • spacedog
          Yes that IS me. Bitch.
          • Nov 2001
          • 14149

          #5
          Originally posted by Hardlinks
          It will most likely be in the css spacedog
          That's what I originally started messing with & it's just not happening.

          the link-add.php takes the link info added via the admin & rewrites it in html for normal html linking structure.

          In the .css I can add attributes for links, however, the onMouseOver needs to be after the closing link url ' & before the link closing >, & in the css I can't figure a way to insert a code inside a closed tag. Sure it would be very easy if I wanted to add a code that was tagged alone to appear after the link, but that's not the case here as the onMouseOver code goes inside the same tags as the link url. Even in the admin, one can add html before or after a link, but nothing inside the linking tag itself?

          I hope that made sense, I wasn't sure how to word all this.

          Comment

          • 3M TA3
            Confirmed User
            • Aug 2005
            • 2972

            #6
            Originally posted by BoyAlley
            No, can't do that with CSS.

            You need to do a little code hack. I just dug into the code really quick for you, here's what ya need to do:

            Go into wp-includes and find link.php open it up and find this line:

            PHP Code:
            $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>'; 
            
            That's where you need to add your onmouse over. It'll effect all links that you add.

            what line number is it? what version?

            Dedicated and colo hosting: ICQ 291313057

            "A problem cannot be solved from the same consciousness that created it. We must learn to see the world anew." - Albert Einstein

            Comment

            • BoyAlley
              So Fucking Gay
              • Nov 2004
              • 19714

              #7
              Originally posted by 3M TA3
              what line number is it? what version?
              It's the only instance so just search for a subsection of it and you'll find it.
              I'm on version 2.

              Comment

              • 3M TA3
                Confirmed User
                • Aug 2005
                • 2972

                #8
                Originally posted by BoyAlley
                It's the only instance so just search for a subsection of it and you'll find it.
                I'm on version 2.
                cool, thanks...


                you have much experience with php?

                Dedicated and colo hosting: ICQ 291313057

                "A problem cannot be solved from the same consciousness that created it. We must learn to see the world anew." - Albert Einstein

                Comment

                • BoyAlley
                  So Fucking Gay
                  • Nov 2004
                  • 19714

                  #9
                  Originally posted by 3M TA3
                  you have much experience with php?
                  Yeah, actually, I'm a full fledged nerd to be honest with you.

                  Before I got into porn I owned a company that did Information Warfare research for the Pentagon....

                  Comment

                  • spacedog
                    Yes that IS me. Bitch.
                    • Nov 2001
                    • 14149

                    #10
                    Originally posted by BoyAlley
                    No, can't do that with CSS.

                    You need to do a little code hack. I just dug into the code really quick for you, here's what ya need to do:

                    Go into wp-includes and find link.php open it up and find this line:

                    PHP Code:
                    $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>'; 
                    
                    That's where you need to add your onmouse over. It'll effect all links that you add.
                    hmm... ok, but this would give each link the same onmouse over, & I wanted each link to have it's own. but, you did inspire an idea....
                    I'm going to try something & come back & let you know if it works.

                    what if I take the
                    PHP Code:
                    $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>'; 
                    
                    & delete the closing " so in the wp-admin/link-add.php, when I add a url in the uri field, after the url, I add the onmouseover code with a " at the beginning, so this will replace the deleted " & the php output will add the required closing "> I'm going to try & see if this works

                    Comment

                    • BoyAlley
                      So Fucking Gay
                      • Nov 2004
                      • 19714

                      #11
                      Originally posted by spacedog
                      hmm... ok, but this would give each link the same onmouse over, & I wanted each link to have it's own.
                      Well you left that part out now didn't you? Hahaha...

                      If your idea doesn't work let me know.....

                      Comment

                      • BoyAlley
                        So Fucking Gay
                        • Nov 2004
                        • 19714

                        #12
                        Originally posted by spacedog
                        what if I take the
                        PHP Code:
                        $output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>'; 
                        
                        & delete the closing " so in the wp-admin/link-add.php, when I add a url in the uri field, after the url, I add the onmouseover code with a " at the beginning, so this will replace the deleted " & the php output will add the required closing "> I'm going to try & see if this works
                        I think you're on the right track, I'm not sure if that variable gets parsed out anywhere along the way though or not as I didn't look. I would THINK it would have a routine somewhere that would parse out chars. like that to prevent things from falling apart, but I dunno for sure.

                        Let me know.

                        Really that's an afro-engineered solution, it'd probably be better to make an actual plugin that allows you to set per-link variables in the control pannel, but that would take some effort....
                        Last edited by BoyAlley; 01-28-2006, 10:48 PM.

                        Comment

                        • spacedog
                          Yes that IS me. Bitch.
                          • Nov 2001
                          • 14149

                          #13
                          Originally posted by BoyAlley
                          Well you left that part out now didn't you? Hahaha...

                          If your idea doesn't work let me know.....
                          I'm editing the file now, but I got confused... with this '"' , after link .
                          which of these indicates the closing for link? is the first ' , the " in the middle, or the closing ' ?

                          Comment

                          • BoyAlley
                            So Fucking Gay
                            • Nov 2004
                            • 19714

                            #14
                            Originally posted by spacedog
                            I'm editing the file now, but I got confused... with this '"' , after link .
                            which of these indicates the closing for link? is the first ' , the " in the middle, or the closing ' ?
                            Give me a couple of minutes i'll test some things out for you and report back. Be easier than having you freddy finger fuck things

                            Comment

                            • Veterans Day
                              Confirmed User
                              • Jul 2003
                              • 8403

                              #15
                              Originally posted by BoyAlley
                              freddy finger fuck things
                              Build a Massive Traffic Network, Hands FREE, Totally Automated

                              Comment

                              • spacedog
                                Yes that IS me. Bitch.
                                • Nov 2001
                                • 14149

                                #16
                                oh well. Didnt work, my theory made all the links have %20rel=/ at the end of them.

                                Comment

                                • spacedog
                                  Yes that IS me. Bitch.
                                  • Nov 2001
                                  • 14149

                                  #17
                                  Originally posted by BoyAlley
                                  Give me a couple of minutes i'll test some things out for you and report back. Be easier than having you freddy finger fuck things
                                  lol, freddy finger fuck, lol...

                                  I tested on a blog that's not active....

                                  Comment

                                  • BoyAlley
                                    So Fucking Gay
                                    • Nov 2004
                                    • 19714

                                    #18
                                    Yeah shit gets parsed out every which way, so that's definately not going to be a solution without having to touch several files, which would make upgrading a bitch.

                                    Let me look into a better solution for ya, brb.

                                    Comment

                                    • BoyAlley
                                      So Fucking Gay
                                      • Nov 2004
                                      • 19714

                                      #19
                                      I've been under the assumption you're using the onmouseover to trigger some javascript function and not just change the color or some shit like that which CAN be done with css right?

                                      Comment

                                      • BoyAlley
                                        So Fucking Gay
                                        • Nov 2004
                                        • 19714

                                        #20
                                        Ok, I went ahead and hacked the files necessary for you and it's all working. Hit me up on ICQ I'll send em to ya.

                                        Comment

                                        • Scotty.T
                                          Confirmed User
                                          • Nov 2004
                                          • 1062

                                          #21
                                          Originally posted by BoyAlley
                                          Ok, I went ahead and hacked the files necessary for you and it's all working. Hit me up on ICQ I'll send em to ya.
                                          That's very generous of you. You don't fancy extending this offer for someone else that's been looking for the same thing and found this thread do you?
                                          .

                                          Comment

                                          Working...