By Fagault Eric on Thursday, 22 June 2017
Posted in General
Replies 8
Likes 0
Views 316
Votes 0
Hello,
I wanted to allow members to choose a style for stream content.
To test my idea, I created a class (In the Wireframe theme / styles, then in style.min.css)
#es .es-stream-content2

And then I call this class,
<Div class = "es-stream-content2" data-contents = ""> Content to be formatted. </ Div>

But it is not seen
Would you know why when I try to call this class, it is not?

Best regards.

Eric
Hi Eric,

I'm not really sure how you implement the class <div> But I've try to hardcoded the classname in the
/components/com_easysocial/themes/wireframe/stream/default/item.php
seems like it was populate the correct classname and get the styling.
https://www.screencast.com/t/WqECBrqX
-> Perhaps, can you explain more on how you implement this? so we can try help you.

For the css code we not encourage user to include it in the style.min.css where it will be overwritten as you undergo update.
I suggest to you to make custom.css for your customize code so it will not effected as you update.
reference: https://stackideas.com/docs/easysocial/administrators/templating/adding-custom-css-codes
·
Thursday, 22 June 2017 18:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
Thank you very much.
I copied / pasted the class concerned, then renamed it (by adding sufix 2)
I changed the font size for my tests in this new class.
Then in the console, I added the suffix in the named calsse, exactly as on your screenshot.
The existing CSS are obviously no longer seen, but the new ones are not.

My idea would be to propose several styles at the time of the entry of the post in the stream. (As found on Facebook)

Regards.
Eric
·
Thursday, 22 June 2017 19:27
·
0 Likes
·
0 Votes
·
0 Comments
·
I think the ideas to implement this you have to add a new columns from this stream table #__social_stream to allow user to set what kind of styles they want to put into their stream.

So after they submit a new stream, this new columns have to store what kind of styles they choose, so it will populate on their stream output.

Then your custom css can populate the correct styling on their stream.
·
Thursday, 22 June 2017 23:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
Thank you very much.
I like this idea very much.
If I add a column for styling the style class, when updating, will this cause problems?

I'm afraid of having to ask you questions to locate the files concerned (so as not to waste too much time if you do not mind)

For example, what is the file to publish and display the "Status" in the stream?

Bests regards.
Eric
·
Friday, 23 June 2017 17:47
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome.

If I add a column for styling the style class, when updating, will this cause problems?

Currently I can't guarantee what issue will have when update to next version, but when I think further a bit, it seems like my ideas will cause you that will difficult to update to next new version is because it required to add a lot of stuff into Easysocial core library file, that is not simple just to add a new columns from database.

Perhaps you can use bbcode concept like allow user to put those bbcode into the stream content.
For example :

[bgcolor=yellow]your text goes here[/bgcolor]


Once the stream content already stored this above content, you can process it during display stream content on the page, so you do not need to add any new columns from database and it also not need to add any custom code into Easysocial core library file.

What you need to do is convert that bbcode to the HTML style code from this Easysocial story app.
JoomlaFolder/media/com_easysocial/apps/user/story/story.php
Under the onPrepareStream method, this method is show the stream output on the page.


[EDITED]
·
Friday, 23 June 2017 18:45
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post