We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to put Embeded images? | Forum

Topic location: Forum home » Development » Themes
Piska
Piska Apr 3 '13
Hello,


I do not want to allow html in blogs, forum etc ( it is not 100% safe). How can a user put Embeded images in newsfeed, blogs etc? Is there way to change "upload image" to "Embeded image", like Video's ? 


Any ideas?


Thanx!

Alia Team
Alia Apr 4 '13
Piska, what about just inserting link to image:
See screen shot:


Piska
Piska Apr 4 '13
Hi Aliia,


Thanks for your help! 


Unfortunately it does not work for Blog and Forum:(


I have found another way:


A user can put a image in "Insert video" as IFrame


<iframe width="560" height="315" src="http://www.WEBSITE.com/IMAGE.jpg" frameborder="0" allowfullscreen></iframe>


1. I have changed the text of Video window in Setting->Language:

"INSERT VIDEO OR IMAGE"

"Embed your video or image code here:"

The Forum post is edited by Piska Apr 4 '13
Piska
Piska Apr 4 '13
Piska
Piska Apr 4 '13

How can I hide the Image Button?


Many thanks!

iPhil

The Forum post is edited by Piska Apr 4 '13
Alia Team
Alia Apr 5 '13
Piska,

>>How can I hide the Image Button?

admin panel>>edit css>> add following styles:

body .jhtmlarea .toolbar ul li a.image {
    background-position: -177px -1px;
    display: none;
}

Note: you might have another line instead of "  background-position: -177px -1px;" (depends on theme). Use debug tool ( for example firebug) to find out what is used on your site.


Alia Team
Alia Apr 5 '13
>>Please is there a way of displaying the full image in newsfeed?

Requires custom code modification.  Which images you mean? Images when adding the link like in my first screen shot or images uploaded via "photo" plugin?
Piska
Piska Apr 5 '13
Hi Aliia,


Thanks!


I have found .css file:

web /www/ow_static/plugins/base/css/htmlarea.css
and added your code:
.jhtmlarea .toolbar ul li a.image { background-position: -177px -1px; display: none;}


The image button is hidden now but, it some how did hide the Letter B from the B button:


You see, there is a button but not B on it any more. But if I click ont it, the B would appear. Push F5 is B disappear again:(


Alia Team
Alia Apr 5 '13
Piska,

I don't recommend changing CSS directly in files.
Use admin panel instead. Whatever you do within the source code will be erased if you update the software. But styles added via admin panel are saved if you update the software.

Regarding  the "B" button, can you check in other browsers?
Piska
Piska Apr 5 '13
I did it your way now (add your code in css via admin). The problem is solved! The icon is hidden now in Forum and Blogs.


How can I hide it in Newsfeed?


Thanks!

Alia Team
Alia Apr 5 '13
Piska,

body .ow_attachments a.video {
    border-radius: 0 0 0 0;
    display: none;
    margin: 0;
}

Alia Team
Alia Apr 5 '13
Topic was moved from General Questions.
Piska
Piska Apr 5 '13
Hi Aliia,


It works!


PS:


Here is a small "How to" for all people like me: 


-----------How to use only EMBEDED IMAGES on your oxwall----------------------


Step 1

Disable upload images in Admin admin/settings/user-input


Step 2

Hide Image button in Forum and Blog


Go to Admin panel>>edit css>> add following styles: 

body .jhtmlarea .toolbar ul li a.image {
    background-position: -177px -1px;
    display: none;
}


Step 3 


Hide Image button in NewsFeed:


Go to Admin panel>>edit css>> add following styles: 


body .ow_attachments a.image {    border-radius: 0 0 0 0;    display: none;    margin: 0;}


Step 4


Allow Custom HTML in admin/settings/user-input.

The HTML icon will appear in Forum and Blogs. This one I use as Image icon.


-Change the name of the window of HTML icon in admin/languages (search Insert Html)


-Upload new changed icon from the attachment in ow_static/plugins/base/css/wysiwyg.png


 
Done!

The Forum post is edited by Piska Apr 5 '13
Attachments:
  wysiwyg.png (4.58Kb)
  How to use only EMBEDED IMAGES on your.doc (56.5Kb)
  READY FOR USE.zip (8.62Kb)
Piska
Piska Apr 5 '13
Aliia many thanks for your help!!!
The Forum post is edited by Piska Apr 5 '13
Alia Team
Alia Apr 8 '13
You are welcome!!!
Thanks for posting detailed instructions!
Piska
Piska Apr 8 '13
You are welcome!!!


PS: Thanks for your help!