GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Any wordpress experts around tonight? (https://gfy.com/showthread.php?t=569419)

spacedog 01-29-2006 12:13 AM

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 01-29-2006 12:18 AM

It will most likely be in the css spacedog

BoyAlley 01-29-2006 12:24 AM

Quote:

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.

BoyAlley 01-29-2006 12:26 AM

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

spacedog 01-29-2006 12:26 AM

Quote:

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.

3M TA3 01-29-2006 12:27 AM

Quote:

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?

BoyAlley 01-29-2006 12:29 AM

Quote:

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.

3M TA3 01-29-2006 12:31 AM

Quote:

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?

BoyAlley 01-29-2006 12:32 AM

Quote:

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.... :Oh crap

spacedog 01-29-2006 12:39 AM

Quote:

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

BoyAlley 01-29-2006 12:42 AM

Quote:

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.....

BoyAlley 01-29-2006 12:46 AM

Quote:

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....

spacedog 01-29-2006 12:49 AM

Quote:

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 ' ?

BoyAlley 01-29-2006 12:52 AM

Quote:

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 :thumbsup

Veterans Day 01-29-2006 12:53 AM

Quote:

Originally Posted by BoyAlley
freddy finger fuck things :thumbsup

:1orglaugh :1orglaugh

spacedog 01-29-2006 12:56 AM

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

spacedog 01-29-2006 12:56 AM

Quote:

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 :thumbsup

lol, freddy finger fuck, lol...

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

BoyAlley 01-29-2006 01:08 AM

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.

BoyAlley 01-29-2006 01:14 AM

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?

BoyAlley 01-29-2006 01:30 AM

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.

Scotty.T 01-29-2006 02:47 AM

Quote:

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? :winkwink:


All times are GMT -7. The time now is 01:39 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123