Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
502 views
in Plugins by
Is there an Plugin or a way to preserve intellectual property rights?

I want the site name to be added automatically with every answer, or on every picture that is added to the site

Is there a way?
by
Adding stuff to an image will mean to regenerate the image and add text on top. So displaying an image will become expensive. Alternative, you could do that during upload, but you will lose the original image. I wouldn't advice to do that.

Regarding the answer, what are you thinking exactly? Just appending some text at the end?
by
+1
Yes, if it is difficult to put rights on the image
I think it's a good idea to put the name or link of the site with every answer
This is because many websites use software that steals content automatically without reading the content.

1 Answer

+2 votes
by
selected by
 
Best answer

In order to append a kind of "watermark" to answers you can follow these steps:

1. Edit file qa-theme/<your-theme>/qa-theme.php

2. Add or merge the following function:

public function a_item_content($a_item) {
    if (!empty($a_item['content'])) {
        if ($a_item['raw']['format'] === 'html') {
            $appendText = '<p>Content generated in %s - %s<p>';
        } else {
            $appendText = 'Content generated in %s - %s';
        }
        $a_item['content'] .= sprintf($appendText, qa_opt('site_title'), qa_opt('site_url'));
    }
    parent::a_item_content($a_item);
}

Alternatively, you can append this text for the HTML-based answers to hide the content but bots will most likely pick it:

$appendText = '<p style="display: none">Content generated in %s - %s<p>';
by
Thank you very much
i will trying it
by
+1
i am trying it
it working fine ^_^
...