TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,242
  • Total Topics: 21,353
  • Online today: 192
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 324
  • Total: 325
  • lurkalot

Shoutbox + Avea Media = spam related issue

Started by la muerte, January 11, 2012, 06:52:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

la muerte

Hi all,

Even though everything works fine, I've stumbled upon a very annoying spam related issue by using Avea Media and TinyPortal ShoutBox on my site. Users can currently post e.g. youtube links in the shoutbox, and they are automatically parsed to youtube video's. The issue is that while I'd like to keep the size of avea video's big, my users are spamming the shoutbox with way to big embed vids. I know this is not a strictly TP related issue, neither is it strictly Avea Media related. Is there a way to totally prevent the video links from being parsed into embed video's within the shoutbox?

I don't see how providing any extra info can help with resolving this spam related issue, so I'm hoping some PHP genies can give this rookie some advice here  :)

IchBin

The problem is likely that Aeva hooks into the parse_bbc() function somewhere. The shouts are run through the same function which is why Aeva then adds the giant video embed into your shout. I don't know how Aeva really works and don't have much time to look at it unfortunately.

la muerte

I have looked at the avea files myself a while back by manually parsing it and quickly overlooking the instruction files. It seems to be rather simply (although I don't rly understand it). Is it not possible to add an exception to it so that it wouldn't display within the shoutbox? I have been trying this myself but I don't rly know any PHP. (good I always make backup files :p)

IchBin

Took a quick look at the code. Aeva does exactly what I thought it did. It puts a few changes in to the parse_bbc function and that's where aeva does it's embedding stuff from what I can tell. The only option you probably have is to strip this stuff from the shoutbox posts before outputting them. What does the code look like in a post that has a video embedded?

la muerte

it looks like a simple youtube url, and gets automatically parsed into a video (without any BBC involved). one of my site members with more PHP knowledge then myself suggests to strip all "http://" from links in the shoutbox.

IchBin

Yes, but the problem is the "parsed" part. lol The output in the post is more than a URL if you look at the actually code after it's been rendered. With the shout having run through the same routines that Aeva is modifying, we will need to strip the parsed content out somehow. That's why I wanted to see what the output is. Do you have a link to one of the video's posted on your site so I can look at it?

I do believe that Aeva parses both links with and without a http:// in them. I could be wrong, but that is what I remember.

la muerte

#6
wowmod.eu/index.php/topic,4701.msg113811/topicseen.html#new

here is a music video thread, plenty of examples :)

also i tested and it doesn't seem to parse without http:// before it

IchBin

You were right. I thought that Aeva did the parsing at a different time. Looks like removing the http:// does the trick if you want to do that on your site.

Open Themes/default/TPShout.template.php and change this crazy line of code towards the very bottom:
' . (parse_bbc(censorText(strip_tags(html_entity_decode($row['value1']))),true)) . '

To this:
' . (parse_bbc(censorText(strip_tags(html_entity_decode(str_replace('http://', '', $row['value1'])))),true)) . '

la muerte

This didn't do the trick,

I've added the code, cleared site cache and posted a youtube link in the shoutbox, it got parsed to a video still.
And when I go to TPShouts admin section (where you can remove shouts), I can see there still is http:// in front of the link.

IchBin

It worked for me. Post your file and I'll test it.

This website is proudly hosted on Crocweb Cloud Website Hosting.