modified quote-comments (Make new Plugin?)
-
I recently tried the different Bb quote Plugins that exists but neither of them fit my taste in a WYSIWYG environment.
I wanted a plugin with javascript that can multiquote, and quote small parts without reload, and insert to a Wysiwyg environment.
Then I remembered that the “quote-comments” plugin in WordPress works even with TinyMCE,
so I copied it over to bbpress and modified it so it would call the bbpress functions instead of wordpress.
Needed to change some calls to the post_content instead of comments too..
It works fine for me now, but the only problem is that I can’t use the quote link from another page than the form itself. So If Im in a thread with 2 pages, the first page won’t redirect me to the form of the last page.
Somehow I need to make a link with the quote info to get saved (somehow?) and then called into the javascript function.
As im not the best at PhP / javascript maybe some of you here can help me.
I managed so the PHP outputs the necessary info for the javascript to grab. But problem is how to call it from another page with a link to the last page with the form.
1. First I need to make a Php function that outputs a different link if im not on the same page as the form. Alright but how do I send it to the last page and how do I call the javascript from the last page?
I put the files into the my-plugins folder with a folder called quote-comments
Here is the PHP file (It gets outputed below the post) :
quote-comments.php
2. As you can see the javascript gets called from the Link, so I need to call it in another way when it’s redirected to the last page.
Here is the JS file:
quote-comments.js
Mark that the addQuote function ISNT used if you use TinyMCE and I set to use TinyMCE = true in the php file.
As im not so good at php im kind of lost here. But it would be nice to make it all work and clean it up and make a plugin out of it.
You must be logged in to reply to this topic.

