Support Forum
Hi,
One my old forum (version 4.45) I had changed (with help) the reply with just one blockquote added. See the example how it was on the old forum:
And below a sample on the new version now:
Change of code was done at the file sf-forum.js. See the code how we changed it.
'+content+'
\r\r';
I tried to change it but it doesn't work. Hopefully you can help me with this.
first, what are you trying to do? I dont understand the relationship of the first image to the second image???
are you just wanting a single blockquote in the post content? just filter the post content and remove... probably using the same regex you used before...
something link:
add_filter('sph_save_post_content_filter', 'my_content_filter'); function my_content_filter($content) { # do your blockquote regex or other code to change multi blockquote }
stick that in the spFunctions.php file of your theme...
in 5.0, you wont need to be editing core code to customize... extensive theme work and api of hooks, filters and actions...
Visit Cruise Talk Central and Mr Papa's World
Hi, both images are form different forums. The first one is how it is now at the old version (4.45) en de second one how it is at my testsite. What happens is if someone add a reply and another one quote this, then it will get one blockquote with the text of the quoted post. But if someone else quote on this message you'll get 2 blockquotes with all the text. That's how it standard works. On my old forum it was changed by the code and add just the latest reply on the post in the blockquote. Hopes this makes it a bit more clear.
Thanks.
my answer still stands... just filter the post content with the hook I showed you...
Visit Cruise Talk Central and Mr Papa's World
afraid I dont know what they did either... would have to spend bunch of time studying it...
you will want a regex to replace all occurrences of blockquote with a div except for the first (negative lookahead?)... If I get some time, I will think on it...
Visit Cruise Talk Central and Mr Papa's World
here is one that strips all blockquote
$out = preg_replace("~<blockquote(.*?)>(.*)</blockquote>~si","",' '.$out.' ');
would need to add a negative lookahead to skip the first one...
Visit Cruise Talk Central and Mr Papa's World
Mr Papa said
here is one that strips all blockquote$out = preg_replace("~<blockquote(.*?)>(.*)</blockquote>~si","",' '.$out.' ');
would need to add a negative lookahead to skip the first one...
Thanks. I would prefer to keep the blockquote only from the first quoted post. Quote button would be unnecessary.
Yes, I know... why I said that quick piece of code wouldnt do it...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)