The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#21
|
|||
|
|||
PHP Code:
PHP Code:
Does strip_quotes(); need to be redefined from within the plugin? |
#22
|
|||
|
|||
Well to be honest I don't know the details of what any of those functions do, just thought since (I believe) it's doing something like what you're trying, maybe something would be useful.
As it turns out, it looks like "strip_quotes" (which is in functions.php) strips [quote] tags out of the text. So I guess it had nothing to do with your quote problem, sorry about that. Maybe you can use the php str_replace function to replace ' with \' (put a backslash in front of it)? I'm afraid I'm not much help at this point - maybe worse than none if I lead you astray. |
#23
|
|||
|
|||
-Phew- First of all, thanks for pointing me to functions.php. It's really helping me to begin understanding how vbulletin works.
After a lot of learning (particularly noteworthy is the php str_replace) as well as furthering my understanding of vbulletin's functions, I've managed to create a working concept. Any character I throw at it it replaces with a javascript-friendly version. I set up a live example here. You'll see though in the example that the thread on the right doesn't show the tooltip. This is because the post preview (pagetext) has a line break in it. To remedy this problem, I did the following: PHP Code:
So my question is, why would a line break in pagetext cause the tooltip to cease functioning? Is there something about how vbulletin handles line breaks in pagetext that I'm unaware of? Or is this a javascript syntax conflict? I know that javascript ignores whitespace so I'm leaning towards the possibility this is more a vbulletin issue than a javascript one... |
#24
|
|||
|
|||
Hmm...I think what you have is an actual newline character in the string which I don't think is allowed in a javascript string constant. Maybe try replacing "\n" with "\\n" (which will hopefully put "\n" in the javascript string instead of the actual newline).
|
#25
|
|||
|
|||
Aweeesome. I was not aware of this newline character. Interesting.
Well, it took over a week but we did it! Thanks so much for your time and help. You have no idea. Thankfully the rest of the site's development will involve mostly CSS and HTML, which I'm much more adept at. After I get a solid handling of PHP functions and loops though, I plan to learn javascript as well as other programming languages. My feeling is, once I get a firm grasp of one, the rest will be much easier to learn as I've become accustomed to typical programming language syntax. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|