By Brendan Cunningham on Thursday, 16 July 2015
Posted in General Issues
Replies 5
Likes 0
Views 318
Votes 0
Hi.

I am looking to use JavaScript and custom fields dynamically within blog posts as part of our service. What is the best way to achieve this?

In terms of JavaScript, I have tried this using the <HTML> block, but it doesn't seem to be working.

I was hoping to use the custom fields in dynamic locations through curly bracket replaceres, or something similar.

I am new to EasyBlog, so apologies if these are novice questions. Our application will be updating content through an external service and content will be dumped into the MySQL database. So it is not a case that an end-user will ever be updating JS, CSS or the proposed curly brackets at any time.

Thanks in advacen,

BC
Hey Brendan,

HTML blocks doesn't allow javascript and I personally think there should not be a block that allows you to run javascript codes. Because if we were to allow this, users might abuse this by injecting malicious codes. It may work for you because you have a list of trusted users but many EasyBlog sites allows users to create blog posts on the site and it would be pretty risky.
·
Friday, 17 July 2015 15:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks for that. Good to know.
Any feedback on the custom field integration within the content (possibly using curly bracket replacers).
Thanks.
·
Friday, 17 July 2015 15:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Brendan,

We don't actually trigger events during the display of the custom fields but you could actually write custom codes in /administrator/components/com_easysocial/includes/fields/types/ and modify them in the "display" method
·
Friday, 17 July 2015 15:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Great, thanks.
·
Friday, 17 July 2015 15:36
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Brendan
·
Friday, 17 July 2015 15:41
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post