How do I add HTML code in photo/video description

I'm curious if there is a safe way to add HTML code (hyperlinks) to photo or video descriptions (and other modules).

"instead of BX_TAGS_STRIP set BX_TAGS_NO_ACTION" is said to work, but not safe.

Wish they had a tinymce editor.

Quote · 16 Apr 2014

This is what I have - would something like this work for you?

link in description block.png · 103.3K · 213 views
caredesign.net
Quote · 16 Apr 2014

Can I change the description + hyperlink for each photo or video?

Quote · 16 Apr 2014

photos and videos don't have a description block - so please provide screenshot of exactly where on the photos/video page you are referring to. Other modules - such as Groups - do have a description, similar to my screenshot. For those - yes - you can have a description + hyperlink for each one independently.

caredesign.net
Quote · 16 Apr 2014

 

photos and videos don't have a description block - so please provide screenshot of exactly where on the photos/video page you are referring to. Other modules - such as Groups - do have a description, similar to my screenshot. For those - yes - you can have a description + hyperlink for each one independently.

 i think he means the popup box when you upload a photo or video (and edit them), where you give it a title, tags, DESCRIPTION, and choose a category

Quote · 16 Apr 2014

I've attached an image below.

Yes, I'd like to add html & links in the description box for photos, videos, etc.

photo-description-on-html.png · 34.7K · 185 views
Quote · 16 Apr 2014

 

I've attached an image below.

Yes, I'd like to add html & links in the description box for photos, videos, etc.

Ah, now we understand.  I have played with that myself.  First of all, the file uploader is shared among the modules.  That form is also added dynamically to the page.  I had some difficulty with it and my solution was to leave that form alone and add adding HTML to the pop-up edit form that appears when you click on the edit button on the page.  I did limit the HTML that could be added mostly leaving it to text and photos.  To do this, I created a fourth TinyMCE toolbar set just for the pop-up editor.

Geeks, making the world a better place
Quote · 17 Apr 2014

I ran into a problem that I am unsure of so just remove that from the editor.  See: http://www.boonex.com/forums/topic/Adding-TinyMCE-Pop-up-Modal-Dialogue-Boxes-issue.htm

Geeks, making the world a better place
Quote · 17 Apr 2014

 

I've attached an image below.

Yes, I'd like to add html & links in the description box for photos, videos, etc.

 
Due to the way boonex wrote that section and the fact that the contents of the entire form is passed to a javascript function for it's ajax style update, it is impossible to add html in that form. I tried for a couple of hours and could not do it.

https://www.deanbassett.com
Quote · 17 Apr 2014

 

 

I've attached an image below.

Yes, I'd like to add html & links in the description box for photos, videos, etc.

 
Due to the way boonex wrote that section and the fact that the contents of the entire form is passed to a javascript function for it's ajax style update, it is impossible to add html in that form. I tried for a couple of hours and could not do it.

Yes, I tried as well.  That is why I went to the pop-up edit on the view page of the item.  I instructed my members that they can do a "post edit" of the item to add the necessary bits.  It works fairly well except for the font thing mentioned in the post that I linked to.

Geeks, making the world a better place
Quote · 17 Apr 2014

is it possible to add an additional field to that form?

caredesign.net
Quote · 17 Apr 2014

geek_girl, you're awesome.

Thank you!

Here's what I did. I'm sure more people have the same question.

I opened inc/classes/BxDolFilesDb.php and went to line 182. I changed BX_TAGS_STRIP to BX_TAGS_VALIDATE. Re-uploaded the file.

I then went to a photo I already uploaded, scrolled down to the ACTIONS box and clicked EDIT. I added <a href="... to make a hyperlink plus added some <strong> and <u> tags. Clicked save. Worked like a charm.

I also tried it for new photos and videos. I was now able to add the same html tags above (<a href="... and <b>) to the description box form in my above attached screenshot.

Making this change will affect all modules.

If you want to limit html to a specific module, copy the entire function _SetData to modules/boonex/(files/photos/videos,etc.)/classes/BxFilesDb.php. I think I got that right. I personally want it for all modules.

Hope a future version of Dolphin updates this so hacks aren't necessary. We should be able to add html to descriptions.

Very happy in the meantime.

Quote · 17 Apr 2014

 

geek_girl, you're awesome.

Thank you!

Here's what I did. I'm sure more people have the same question.

I opened inc/classes/BxDolFilesDb.php and went to line 182. I changed BX_TAGS_STRIP to BX_TAGS_VALIDATE. Re-uploaded the file.

I then went to a photo I already uploaded, scrolled down to the ACTIONS box and clicked EDIT. I added <a href="... to make a hyperlink plus added some <strong> and <u> tags. Clicked save. Worked like a charm.

I also tried it for new photos and videos. I was now able to add the same html tags above (<a href="... and <b>) to the description box form in my above attached screenshot.

Making this change will affect all modules.

If you want to limit html to a specific module, copy the entire function _SetData to modules/boonex/(files/photos/videos,etc.)/classes/BxFilesDb.php. I think I got that right. I personally want it for all modules.

Hope a future version of Dolphin updates this so hacks aren't necessary. We should be able to add html to descriptions.

Very happy in the meantime.

Note that any html can be added including iframes; so you are introducing a security risk.  That is whey I changed the pop-up edit box from text to HTML so it would have the TinyMCE editor.  That way I could limit what my members could add to the description box.  I created a special TinyMCE set just for the pop-up editor.

Geeks, making the world a better place
Quote · 18 Apr 2014

I will be moderating all content to prevent security problems, but I am hoping that in their infinite wisdom, a boonex update will clear this issue up at some point. Other areas of the site have TinyMCE/html entry. This should too.

I'm curious how you created a custom TinyMCE editor.

Quote · 22 Apr 2014

 

I will be moderating all content to prevent security problems, but I am hoping that in their infinite wisdom, a boonex update will clear this issue up at some point. Other areas of the site have TinyMCE/html entry. This should too.

I'm curious how you created a custom TinyMCE editor.

Just look at the code in /templates/base/scripts/BxBaseEditorTinyMCE.php and it will be evident.  You also edit a second file which I can not recall at the moment to add the number to the list of available html editors so you can use 'HTML' => 4;

Maybe someone else will come in; if not, then I will see if I can recall the second file that handles the html number.

Geeks, making the world a better place
Quote · 22 Apr 2014

 RE:

but I am hoping that in their infinite wisdom, a boonex update will clear this issue up at some point.

 It's not an issue.  To most people, including myself, links and html formatting for something as simple as a comment on a photo, makes no sense at all.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 22 Apr 2014

I have to agree with HL on that one. So it's not a issue, and very unlikely boonex will change it.

https://www.deanbassett.com
Quote · 22 Apr 2014

As an internet/affiliate marketer, if I post a video, picture, sound, file, etc, having the ability to add an html link in the description box directly below it to upsell a related product or service, that's been a sizeable part of my full-time income for 15 years.

Quote · 22 Apr 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.