[FIX] Line break in wall/platoon posts - Better Battlelog Forums #1811

Sitemap
Topicstarter
When you write a post in your wall or your platoon, you can change line by just clicking [Enter] BUT this change of line is not visible after posting!

This plug in FIXES this problem :P

Image:

http://i617.photobucket.com/albums/tt260/goldisever/Apo/linebreakFIX.png


Link
:
Battlelog-Line-break-FIX by GreatApo
http://apo.users.uth.gr/other_projects/line-break-fix.js


BETA Verision
:
http://apo.users.uth.gr/other_projects/line-break-fix-beta.js

(I may work on the beta version so if you see any alert do not be afraid :P)

My Homepage:

http://apo.users.uth.gr/


Notes:

- This can also become a BBlog feature - Answer: "won't include it into BBLog but its a nice addition"
- The elements can also be found with JQuery and that may be faster. - Done

Change log:
(Betas are not included)
- v0.1 (25/6/2012): First release
- v0.2 (26/6/2012): Pure javascript was converted to JQuery

GreatApo :D
But, will everyone without BBLOG be able to see the line break?
You really should use jQuery instead of native javascript functions.
Nice plugin :-)
Em, i don't know why you say it makes no sense?
The plugin just make the overview for the feeds better.
If anybody wants to use it, they can use it without restrictions for non plugin users.
The line breaks still exist in the battlelog feeds, but not shown.
The plugin only enable the line breaks for the user that uses this plugin.

Thats the main part of bblog, make things better and more usefull for the user :-)

So, i won't include it into BBLog but its a nice addition.
Topicstarter
But, will everyone without BBLOG be able to see the line break?
The line break exist, i only make it visible... people that will use this will be able to see posts better. Everyone has the ability to make a line break, and they actually use it but it is then not visible...

brain wrote:
Em, i don't know why you say it makes no sense?
Who said that? I missed sth? lol

brain wrote:
The plugin just make the overview for the feeds better.
If anybody wants to use it, they can use it without restrictions for non plugin users.
The line breaks still exist in the battlelog feeds, but not shown.
The plugin only enable the line breaks for the user that uses this plugin.

Thats the main part of bblog, make things better and more usefull for the user :-)

So, i won't include it into BBLog but its a nice addition.
Everyone uses break lines when they post... when you enable them, you have a much better understanding of what they say... this must be a battlelog bug, that's why i say FIX.

I am happy that you find it useful! I will make it work with JQuery, that was the first step :)

Question:
What are the featured Plugins?
About "makes no sense", ORFK edited his post.
About featured plugins, this plugins would be scripts that are very good and well developed.
Tiny scripts like yours without much functionality are not for featured plugins.
Topicstarter
Nice... i was just curious :P
Ready with JQuery... u like it? I am not very used to working with it :)
Looks as it should be.
But why you use this 2 replaces instead of one

$(this).html($(this).html().replace(/\n/gi,'').replace('',''));
this should also work
$(this).html($.trim($(this).html()).replace(/\n/gi,''));
Topicstarter
brain wrote:
Looks as it should be.
But why you use this 2 replaces instead of one

$(this).html($(this).html().replace(/\n/gi,'').replace('',''));
this should also work
$(this).html($.trim($(this).html()).replace(/\n/gi,''));
Take a better look. What i do is that i change the first back to a space... when i do it this way an extra break line appear at the start so i have to change it back ;)...
Found a small little bug in the plugin. All messages left on someone's battle feed will be a little bit messed up. I'll write up a small example below :P
This also makes it so you can't mark the text if you want to copy it.

----Without the Plugin----
xXJumpyXx» DJ-Brainnrg: Great work on BBLog :)

----With the Plugin----
xXJumpyXx»
DJ-Brainnrg: Great work on BBLog :)

I'm using Firefox, I haven't tried this on Chrome.
Topicstarter
xXJumpyXx wrote:
Found a small little bug in the plugin. All messages left on someone's battle feed will be a little bit messed up. I'll write up a small example below :P
This also makes it so you can't mark the text if you want to copy it.

----Without the Plugin----
xXJumpyXx» DJ-Brainnrg: Great work on BBLog :)

----With the Plugin----
xXJumpyXx»
DJ-Brainnrg: Great work on BBLog :)

I'm using Firefox, I haven't tried this on Chrome.
I can't understand where the bug is... this is what this plug in does...
GreatApo wrote:
xXJumpyXx wrote:
Found a small little bug in the plugin. All messages left on someone's battle feed will be a little bit messed up. I'll write up a small example below :P
This also makes it so you can't mark the text if you want to copy it.

----Without the Plugin----
xXJumpyXx» DJ-Brainnrg: Great work on BBLog :)

----With the Plugin----
xXJumpyXx»
DJ-Brainnrg: Great work on BBLog :)

I'm using Firefox, I haven't tried this on Chrome.
I can't understand where the bug is... this is what this plug in does...


make a comment in a friend's profile, and you'll se.
GreatApo wrote:
I can't understand where the bug is... this is what this plug in does...
The reason I called it a bug was because it makes all messages left in battle feeds look broken.
It might not really be a bug but you have to agree, it looks better the normal way.

xXJumpyXx» DJ-Brainnrg: {message}
VS.
xXJumpyXx»
DJ-Brainnrg: {message}

I'm just trying to help.

EDIT: In case you misunderstood what I meant, do what wasakakero said :)
Topicstarter
xXJumpyXx wrote:
The reason I called it a bug was because it makes all messages left in battle feeds look broken.
It might not really be a bug but you have to agree, it looks better the normal way.

xXJumpyXx» DJ-Brainnrg: {message}
VS.
xXJumpyXx»
DJ-Brainnrg: {message}

I'm just trying to help.

EDIT: In case you misunderstood what I meant, do what wasakakero said :)
Yes, you are right but this is up to you how you will write it... when you write a big comment and you break lines to make paragrafs or just go to a new line, you have a far more better look...
GreatApo wrote:
Yes, you are right but this is up to you how you will write it... when you write a big comment and you break lines to make paragrafs or just go to a new line, you have a far more better look...
The thing is that the part that gets broken (the names) aren't written by the user. It's automatic. It doesn't matter if the message is 1 letter or 100 letters long.
Topicstarter
xXJumpyXx wrote:
The thing is that the part that gets broken (the names) aren't written by the user. It's automatic. It doesn't matter if the message is 1 letter or 100 letters long.
Yea, i just found out what you mean, i will try to fix such isues... thanks for informing me.