News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

@mention members

Started by Dragooon, May 02, 2014, 01:07:58 PM

Previous topic - Next topic

Dragooon

Quote from: FrizzleFried on May 20, 2014, 12:44:52 PM
The guy who posted this one is one of my MODERATORS...

:D
Oh dear god :|

FrizzleFried

******... the members took off and kept replying with mentions on the post and has killed the thread due to that MEMORY issue we talked about earlier.

It looks like this mod needs a LIMIT set to it somehow else people are going to kill threads left and right with mentions.

:(

Unless a limit can be added... I'm going to have to pull the mod.

:(


Dragooon

Quote from: FrizzleFried on May 20, 2014, 12:48:29 PM
******... the members took off and kept replying with mentions on the post and has killed the thread due to that MEMORY issue we talked about earlier.

It looks like this mod needs a LIMIT set to it somehow else people are going to kill threads left and right with mentions.

:(

Unless a limit can be added... I'm going to have to pull the mod.

:(


This is true if they decide to spam any kind of BBC, it's just easier to spam with this.

FrizzleFried

...and I have yet to find a way to limit BBC in a post.  I really wish someone would write that mod... LIMIT BBC mod...

>sigh<

Dragooon

Quote from: FrizzleFried on May 20, 2014, 12:52:54 PM
...and I have yet to find a way to limit BBC in a post.  I really wish someone would write that mod... LIMIT BBC mod...

>sigh<
A *better* solution would be to make the BBC parser use less memory

FrizzleFried

Quote from: Dragooon on May 20, 2014, 12:56:04 PM
Quote from: FrizzleFried on May 20, 2014, 12:52:54 PM
...and I have yet to find a way to limit BBC in a post.  I really wish someone would write that mod... LIMIT BBC mod...

>sigh<
A *better* solution would be to make the BBC parser use less memory

I'm all for that as well.  :D

I fixed the thread by deleting the response with the other 300 mentions...


Arantor

To drastically reduce memory usage in the parser requires a rewrite. However it is possible to reduce memory usage with the changes from 2.0.7. I know, I already provided the details to the team. I'm just hoping they test it more thoroughly than I asked them to for 2.0.7.

Dragooon

Quote from: FrizzleFried on May 20, 2014, 12:57:05 PM
Quote from: Dragooon on May 20, 2014, 12:56:04 PM
Quote from: FrizzleFried on May 20, 2014, 12:52:54 PM
...and I have yet to find a way to limit BBC in a post.  I really wish someone would write that mod... LIMIT BBC mod...

>sigh<
A *better* solution would be to make the BBC parser use less memory

I'm all for that as well.  :D

I fixed the thread by deleting the response with the other 300 mentions...


I figured out why it wasn't working, the members name were being cut off internally. To fix,

Code (Mentions.php (find)) Select
if (count($matches[count($matches) - $i]) > 60)
{
    $depth--;
    break;
}

Code (Replace) Select
if (count($matches[count($matches) - $i]) > 60)
{
    $depth--;
    continue;
}

Although I guess something like 128M limit will help your forum in this scenarios. Atleast it won't go boom

FrizzleFried

Is that code limiting the number of mentions?   Maybe I want to keep it as-is?  I am guessing if I fix it,  it will be easier for the users to "break" a post...

Am I guessing right that the issue comes up because the number of mentions hit 60?


Dragooon

Quote from: FrizzleFried on May 20, 2014, 01:32:08 PM
Is that code limiting the number of mentions?   Maybe I want to keep it as-is?  I am guessing if I fix it,  it will be easier for the users to "break" a post...

Am I guessing right that the issue comes up because the number of mentions hit 60?
Nope, that code doesn't limit anything. it's a part of identifying possible usernames code and a username can be maximum 60 characters. So it won't really help with the members breaking everything part

NoPasaran

tapatalk not supported :(

have any solution ?
kralkartal.net SMF 2.0.8

fapencio

Hi, good job with the new version, is awesome!   :laugh:

i add the translate to spanish:

STEP 1:
in:
./Themes/default/languages/Modifications.spanish_es-utf8.php
and/or
./Themes/default/languages/Modifications.spanish_latin-utf8.php
Find (at the end of the file):
?>
Add Before:
$txt['mentions'] = 'Menciones';

STEP 2:
download the php files which are attachments in this post:

Mentions.spanish_es-utf8
Mentions.spanish_latin-utf8

upload both files to:
./Themes/default/languages/

refresh f5, thats all

enjoy
   
My smf forum is 2.0.10 version
my theme is default
language spanish es utf8

margarett

Quote from: NoPasaran on May 21, 2014, 04:52:51 PM
tapatalk not supported :(

have any solution ?
Tapatalk uses it's own set of files, including Sources, they don't respect hooks, etc, so... The solution is not to use Tapatalk :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Adrek

I have small problem with one username.

It contains  <")))/
Username <")))/ and mod doesn't recognize it as username. I'm using version 1.1.2, and it worked fine on 1.0.
Github version doesn't fix it.
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

ExSpirit

When someone does the mention in topic every time someone opens that topis I get strange error in my error log files:

QuoteUndefined index: online
File: /usr/home/public_html/Themes/default/languages/Mentions.english.php (main sub template - eval?)
Line: 275

In my Display.template.php I am using $message['member']['online']['is_online'] to check is user is online or not and that works, but I don't know why this error is shown.

Arantor

Are there any guest posts (or posts from deleted users) on that page? If so, $message['member']['online'] wouldn't exist.

Also, I'd be willing to bet the issue is on line 275 of Display.template.php rather than Mentions.english.php. Any time the eval? is listed, it's almost never the actual place it says it was.

ExSpirit

Arantor; that's it, I had one post from guest. I removed it and looks like it's working great now. Thanks.

Squash

The one issue I notice is if a user posts their email address and if the part of it after @ matches anyone forum names it assumes it should tag them. It makes it impossible to post links to some email addresses.

Is there a to stop the app from mentioning if their are letters before the @ symbol? So it recognizes it's an email not a mention.

Dragooon

This is a slightly hacky fix but it should work. Open Mentions.php, find

	
foreach (
$string as $char)
	
{
	
	
if (
$char == '@')

Replace
	
foreach (
$string as $k => $char)
	
{
	
	
if (
$char == '@' && (!isset($string[$k 1]) || $string[$k 1] != ' '))

Squash

I did it and it did not fix the issue.....

Advertisement: