Jump to content

is it possible to stop media tag quote?


ørret

Recommended Posts

I am wonder if it is possible to somehow stop quote of media tag, that it instead, quote a person with the youtube link for example instead of the link between /media tags... It is annoying when 3 people quote and the video is posted 3 times more -.-

Link to comment
Share on other sites

I have not tried that, but I'd half consider that to be a bug even though its probably working as intended (for media only at least)

You could turn off quote embedding, although if they are quoting the actual post that contains the 'original' media it will not achieve much.

:)

Link to comment
Share on other sites

This is how i do it now: I manually go edit their quote and remove tags and let the youtube link stay. I was hoping that there were a hook, or maybe that the ipb team would consider removing this in the next version :S.

I see you got the same "problem" on this forum, if i may call it a problem. And i would like to avoid turning quote embedding off if they cant comment on the actual post. ;)

Link to comment
Share on other sites

AndyF, if you could move the topic i would be happy. I would really like to hear IPB Team's opinion on this.

@ Michael: This is a problem, i don't want the bbc code to be stripped in quote. I just need the media tag removed, cause it looks messy when it's the same video going in 3 posts in a row. Also takes much space.

At the same time, if it is possible to add so that "code" tag, add a scroller (like in phpBB - brilliant function!) i would be happy if you "IPB Team" would consider this in next release as well. I also have some bad experience with IPB and the code tag, when there is much code, and then again, someone quote it... add a scroller and it's solved.

Link to comment
Share on other sites

This may take a modification, but since each bbcode is in a plugin couldn't you do something like this on the text inside the quote tags:



This would effectively remove the media tags and leave the link to the media.

If you have the ability for the contents of a bbcode tag to be not parsed further, a file modification like this should be possible.

$content = str_ireplace(array('[media]', '[/media]'), '', $content);
Link to comment
Share on other sites

I'm not a good coder at all, but wont this remove the media tag in first post too? I just want it as a link in quotes. Any tips regarding scroller for code tag?

I'd like IPB team to add this in next version so we don't have to mod this our self. I don't see the point of quoting media tags really and it just spam the forum with videos xD. Whenever i mention this is a ticket, the response is always "look for a plugin", i don't know why the IPB Team is not willing to take suggestions :/. I mean, a scroller for code tag as well, for large code snippets, is a good idea right? Not everyone uses pastebin, and with the solution ipb forum got now, it will display 1million lines of code inside a post, and no scrollers! It's like a never ending post. Just imagine if people quote this ;)

Link to comment
Share on other sites

[quote name='ørret' date='25 November 2009 - 11:57 PM' timestamp='1259193460' post='1882498']
I'm not a good coder at all, but wont this remove the media tag in first post too? I just want it as a link in quotes. Any tips regarding scroller for code tag?

I'd like IPB team to add this in next version so we don't have to mod this our self. I don't see the point of quoting media tags really and it just spam the forum with videos xD. Whenever i mention this is a ticket, the response is always "look for a plugin", i don't know why the IPB Team is not willing to take suggestions :/. I mean, a scroller for code tag as well, for large code snippets, is a good idea right? Not everyone uses pastebin, and with the solution ipb forum got now, it will display 1million lines of code inside a post, and no scrollers! It's like a never ending post. Just imagine if people quote this ;)


When I say "$content" I mean just the text between [ quote][ /quote] (without space). IPB has a plugin system for bbcode tags. Likely there is a function that allows you to modify the content in-between the tags.

Link to comment
Share on other sites

[quote name='Michael' date='25 November 2009 - 06:53 PM' timestamp='1259175231' post='1882418']
The only built-in workaround for this I can think of is turning the setting 'Prevent other codes parsing?' for the quote bbcode off, but that would stop all other bbcodes from being parsed inside of quote tags too.


Right, I guess i can try this, as this is not a problem with tag only, but %7Boption%7D tag as well. It's sad there's no function that let you choose which tags to keep, because

 tag for example, is no issue at all, it is just these tags taking a lot of space that's the issue. I really hope IPB Team could consider this. Thanks for help.
Link to comment
Share on other sites

The problem with what you need is that there'd have to be a huge matrix of settings to handle that. Each bbcode would need it defined how it interacts with each other bbcode. For example, you'd need to define which bbcodes are parsed inside of code tags, which are parsed inside of quote tags, which are parsed inside of url tags, etc. And then since all bbcodes are custom bbcodes, and new ones like iframe could be added, each new bbcode would again need it defined how bbcodes inside of that work. It's a lot of stuff to check.

Link to comment
Share on other sites

You know what else would be neat:

1) Have the media tag show a link within a quote.
2) Have img tags and uploaded images show a link or icon that you click to show the image (image doesn't load by default, but loads when clicked). That way images that get quoted don't get in the way.

Link to comment
Share on other sites

@Michael: I'm sure you IPS team of masterminds will find a solution if you want to get it solved. Maybe my idea was a bad one, but I'm sure that there's room for some better ideas on this. Tags linking to video/images or anything that's related to a link in general (any code), should show the content in the main post, and when quoted, show a link to the content only, not the content itself (as Luke say, or maybe thumb for images, but personally i think a link is enough). Right, now what to do with tags not containing links: We keep it untouched in quote, because this is most likely pure text anyway.

The big frustration i have with the code tag for example is that it's never ending in IPB. Here you (the IPB Team) with all respect to your team, have to look at phpBB's solution for this problem in their version 3.0. As you may have seen, they use a scroller for code tag, so that it wrap the code inside a box, instead of having a post of 100 lines of code, 5 lines are shown, and to see the rest you need to scroll inside this code box to see remaining lines of code. I hope you are open for constructive criticism, or feedback like i would rather call it when it comes to this issue. I'm scared thinking of people quoting never ending codes as well...
dwddww.png

@Luke: Like all of your ideas! :)

Link to comment
Share on other sites

[quote name='Michael' date='04 December 2009 - 06:15 AM' timestamp='1259864152' post='1884627']
The problem with what you need is that there'd have to be a huge matrix of settings to handle that. Each bbcode would need it defined how it interacts with each other bbcode. For example, you'd need to define which bbcodes are parsed inside of code tags, which are parsed inside of quote tags, which are parsed inside of url tags, etc. And then since all bbcodes are custom bbcodes, and new ones like iframe could be added, each new bbcode would again need it defined how bbcodes inside of that work. It's a lot of stuff to check.


Not really. You know how we've already got "don't parse other BBCode inside of this BBCode"? Just add an extra one, "don't parse this BBCode inside of other BBCode", because to be honest you probably don't want a video parsing inside of anything else.

Link to comment
Share on other sites

[quote name='Dark Slipstream' date='06 December 2009 - 06:35 PM' timestamp='1260081343' post='1885362']
So wouldn't it be simpler to check if a (successful / working) media tag is contained between two other tags, and just output it differently?


No. No it wouldn't. Remember, all BBCode is custom BBCode, so none of them are treated in any special fashion by the parser. What you're suggesting would require the post parser specifically look for media tags, which might fail if you happen to rename them or something, and parse it differently. That's bad.

Link to comment
Share on other sites

[quote name='Mat (FDNZ)' date='06 December 2009 - 01:12 AM' timestamp='1260079935' post='1885358']
Not really. You know how we've already got "don't parse other BBCode inside of this BBCode"? Just add an extra one, "don't parse this BBCode inside of other BBCode", because to be honest you probably don't want a video parsing inside of anything else.

What about sites that might want media to work inside of quote tags, but not code tags?

Link to comment
Share on other sites

[quote name='Mat (FDNZ)' date='06 December 2009 - 01:36 PM' timestamp='1260124606' post='1885476']
No. No it wouldn't. Remember, all BBCode is custom BBCode, so none of them are treated in any special fashion by the parser. What you're suggesting would require the post parser specifically look for media tags, which might fail if you happen to rename them or something, and parse it differently. That's bad.


Actually, this is only partially true.

It's true that every bbcode is a custom tag, and is treated in the same manner. HOWEVER, custom bbcodes can execute plugin files, instead of run through the central routine, and in fact media tags are already run through a custom plugin file to parse (the /custom/defaults.php file in the bbcode directory). So it would be trivial to add additional processing to media tags specifically. It would not necessarily be easy to identify from within the parsing of a media tag, however, what other tags it is inside.

Link to comment
Share on other sites

Isn't the quote tag run through a plugin? I'm pretty sure that it is given that there is an option to strip out sub-quoted items. Assuming that it is, couldn't you do something along the lines of this to the content inside the quote tag that's passed to the plugin:



That way when the quote plugin returns the contents there are no media and img tags to parse further. And the only thing left behind are the links between media and img.

$content = str_ireplace(array('[media]', '[/media]', '[img]', '[/img]'), '', $content);
Link to comment
Share on other sites

[quote name='Luke' date='08 December 2009 - 11:41 AM' timestamp='1260290510' post='1886177']
Isn't the quote tag run through a plugin? I'm pretty sure that it is given that there is an option to strip out sub-quoted items. Assuming that it is, couldn't you do something along the lines of this to the content inside the quote tag that's passed to the plugin:



That way when the quote plugin returns the contents there are no media and img tags to parse further. And the only thing left behind are the links between media and img.


That would work fine...assuming the media tag/img tag bbcode hasn't already been parsed.

$content = str_ireplace(array('[media]', '[/media]', '[img]', '[/img]'), '', $content);
Link to comment
Share on other sites

[quote name='bfarber' date='08 December 2009 - 10:31 PM' timestamp='1260311463' post='1886317']
That would work fine...assuming the media tag/img tag bbcode hasn't already been parsed.


Given that there is an option to prevent tags from being parsed within a set of tags, wouldn't that mean that tags are processed in the order of nesting, meaning that they wouldn't be parsed yet?

Link to comment
Share on other sites

No. ;)

What happens is any tags that don't allow parsing within them are specifically looked for first and replaced with a macro. Then bbcodes are parsed in the order they're stored in the array, then the ones that don't allow parsing are put back in and the outer tags parsed.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...