Please or Register to create posts and topics.

Image Alignment

Page 1 of 3Next

When I insert image using choose file button the image always remain in left side , how can I make image center align.

Thank you

for refrence I am attaching image here

 

Uploaded files:
  • refrence.PNG

Now you can also view this image is in left align also in this topic too. can I make image center align

Hello @nabeelpommy

Please add the following CSS-rule to your style.css file of your theme. It should help you to center-align uploaded images.

#af-wrapper .uploaded-file {
    text-align: center;
}

 

nabeelpommy has reacted to this post.
nabeelpommy
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

Well thank you for your reply and I have solved this problem, but dear I am facing another problem.

When users try to post reply here and attach an image file , but they do not write anything in this box

they got an error to type something here. dear suppose user only want to upload image without text

so it should post without any text. is it possible to do this. ?

Suppose one user creates a forum of poetry to share poetry with images, and a user shares images only

so it will be difficult for a user to share image if he dont want to add any text with image, he just want

to upload only image, I hope you got my point.

 

Hello @nabeelpommy

No, this is not possible. The upload-functionality is an optional feature. Allowing posts without content means that users could create posts with nothing inside it. This would be meaningless.

If they really dont want to write anything a simple dot in the text-area should do it. 🙂

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

but dear may we solve this problem by entering placeholder in text area and can add

few words in text area.Like we can set place holder as “You type nothing” so if user

will not type anything and just upload image then this line will go with image.

I hope you understand what I am saying.

Hello again @nabeelpommy

This would still not fix the problem when an user does not upload anything. In this case there would be just a simple post with “nothing” inside it.

Maybe I add some settings for it in a future version but I am not sure about this now.

If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!

But dear there are two options in forum, once user will type something or he will upload an image, if he dont want to upload an image defiantly he will type something and if he dont want to type he will upload an image, he will do any one of both work. suppose he only want to upload an image without text then placeholder will remove the error for typing something or he will type something.

I hope you understand now what I am saying.

Regards

 

 

Yes, I get the point. But you referring to the normal intended behavior of users.

One of the things I always have to keep in mind when developing software is: How could user exploit a certain functionality? Imagine an user registrate on your site with just the intention to annoy you. What he can do is: He creates posts without uploaded files and/or text so they just contain nothing. The only way to prevent this is to check if there is at least some text.

So, why do I check for text and not for uploads? Because: Uploads are an optional feature but text is always a part of a post which cannot be optional. Thats why a post can have:

  • a text, but no uploads
  • a text and uploads
  • BUT NOT no text and uploads
If you want to support the development of Asgaros Forum, you can leave a good review or donate. Thank you very much!
Page 1 of 3Next