katsushiro
Forum Replies Created
-
Forum: Plugins
In reply to: Trying to create new pluginringmaster: thanks again for the help! I get most of what you’re saying, I think I can hack it from here. Some of it might not be as ‘integrated’ as I’d have liked, but it’ll do for a 1.0, and since I’m learning WP hacking as I go. Wish me luck, and hopefully I’ll have something to show by this weekend.
Forum: Plugins
In reply to: Trying to create new pluginOkay, I’ve been reading through the Wiki, and I’ve gotten some ideas, but I’m still fairly clueless on some other things. Here’s more or less what I need to do to get my floaty tooltip plugin to work as I envision it:
– The plugin needs to add some scripts into the header of the main index page, and also somewhere in the body section of the page as well, which define the tooltip styles and positioning, and define the div that will contain the tooltips. I know I can use wp_head to insert the code into the header, but not sure how I’ll get the chunk of code that goes in the body section to show up (I usually stick that last chunk of code near the bottom of th epage, before the closing body tag). A dirty hack might be to write a filter that looks for some unique bit of HTML that WP always creates at the footer of the index page, and have the filter replace it with itself + extra code I need. However, I don’t know how doable that might be what with the things different templates can insert, e.g. if a template might modify the HTML at the bottom of the main index page. Right now, on my blog, I have the codes hardcoded into the Main index file.
– The plugin would also need to make it possible for me to insert some onMouseOver and onMouseOut JS actions to tags in the posts in order to have the tooltips appear and dissapear. These actions could be inserted into pretty much any tag, not just links. Ideally, I would like for it to be a button I click on in the editing interface, like the link button, that pops up a dialog asking you for what text to show in the tooltip. I’m guessing I could write a filter that goes something like _TOOLTIP:”Text To Insert”_ and have it parse the ‘Text To Insert’ bit and replace the _TOOLTIP_ bits with the onMouse events, but I’m kinda hoping to avoid making the user type in _TOOLTIP_, I’d rather it be a button they can click that will insert the onMouse code, or the filter text, into the editing window. I don’t quite see where I could hook into to insert the new button code, though. Right now, on my blog, I have it hard-coded into the quicktags.js file. I inserted a couple of new functions for parsing and inserting the onMouse code, and I had to modify a couple of the existing functions in there to get the button to show and assign it the proper functions to pop up the dialog asking for text. Also, I’d like to be able to give the user the choice to enter the background color and tooltip width at the same time, but that’s not critical. My problem is that I don’t really see where I could hook into quicktags.js or the editing interface through a plugin.
I’ll keep digging, but if anyone has any suggestions for me, I’d appreciate it a lot.Forum: Plugins
In reply to: Trying to create new pluginHey ringmaster, thanks a lot for the info, I’m looking through the Wiki now. Thanks a lot for the pointer, and many many thanks for the quick primer, after reading it I’ve allready got a couple of ideas on what I would need to do to make my little hack work. The ‘wp_head’ action was particularly useful, since the plugin would need to insert some css style tags into the head of the document. I’ll have to play around a bit to make it externally configurable, but I’m starting to see where I need to hook into WP to make things work. I’ll likely put a few hours into it this weekend and see if I can’t put out something usable by then. I’ve been getting a lot of use out of WP lately, would love to be able to contribute at least a silly little hack to the community in return. ?? I think I can figure the rest out through the Wiki so far…
Forum: Plugins
In reply to: Trying to create new pluginThanks for the tip, I might just do that (though most likely over the weekend when I have time to hack away at my leisure) ??