Support Forum
interesting as the bbcode standard does not support either of those... the img tags should not have the :1ni7nvys in it so certainly throwing off the regex stuff... same for a video tag...
so you are saying after the import they show in the content of an SP post - which is what I would expect - just checking...
are you good with regexp? probably take one either in php or mysql to remove...
if you want to strip out with php, you probably can use one of our hooks, the sph_save_post_content_filter filter and remove...
Visit Cruise Talk Central and Mr Papa's World
The issue - as I understand it - is that these are embedded keys to an attachment. This makes every one a unique pointer. As far as I am aware - and I am not that familiar with phpBB - we have had many users import without these tags. So I am thinking it might be a circumstance of version or perhaps some sot of setup option.
But they are non-standard accepted bbCode tags which make them very difficult to predict and parse for.
If anyone reading this has any specific information on these phpBB specific bbCode structures then we would be interested to hear more about them.
YELLOW
SWORDFISH
|
I tried to use the sph_display_post_content_filter hook since I didn't want to save each post again, but it just showed the url but not the image, video, etc. Did I miss something or should I give sql a try?
By the way, this is the code I used in case anyone is interested (see attachment)
Sorry, maybe I didn't make myself clear
I mean, I had this imported bbcode tag: [img:1ni7nvys]url[/img:1ni7nvys]
I replaced it using the sph_display_post_content_filter and I got: [img ]url[ /img]
But the image wasn't showing on the post, just the url. Nothing to do with attachments..
and the image location is valid? ie, can you load it up in the browser?
ah, you did it in the display filter... that is really too late as it really needs to be stored in the database as html, ie converted... so when a post is made, we convert bbcode to html and save it... doing it on display means its in the db as bbcode and thus wont get displayed in an html (ie wysiwyg tinymce) browser...
Visit Cruise Talk Central and Mr Papa's World
Ok, I get it.. So, using the sph_display_post_content_filter hook, I could remove the tags before and then call the oEmbed method passing the url
Something like this:
add_filter('sph_display_post_content_filter','replace_bbcode');
function replace_bbcode($text) {
return oembed(preg_replace(...));
}
I think this would work but I have no idea on how to call the oembed method from fuctions.php, does anyone know?
No that wont work.
I think in your case - and to do this - then we need a new filter positioned before any of ours are actioned.
I have no objection to adding a new one and if we agree on one now then I can make sure iot will be added to the core in 5.1
Are you happy to make a small edit to core SP code?
YELLOW
SWORDFISH
|
1 Guest(s)