Mod to Diplay Forum Info at End of Each Post that is grabbed by Other Sites

Started by humbleworld, August 27, 2009, 03:29:41 AM

Previous topic - Next topic

humbleworld

Okay, here's what I noticed lately in my forum site. Each post is being grabbed by another site, but there's no credit given to my site as the source. Of course, this forum post grabber has been automated probably using the RSS feed of my forum site.

Is there a MOD that would add the forum URL of each post so that when forum harvester grabs a post from my forum, the source is being automatically acknowledged?

I know this mod is available in Wordpress.

Arantor

There isn't a mod but I don't believe it would be that hard to add one.

Would the link link back to the thread overall, or to the specific post in question?

Arantor

Don't worry about the previous question.

Mod is written, supports both options from the admin panel, currently awaiting approval - but will be http://custom.simplemachines.org/mods/index.php?mod=2112 once it is approved.


humbleworld

Quote from: Arantor on August 27, 2009, 03:43:01 AM
There isn't a mod but I don't believe it would be that hard to add one.

Would the link link back to the thread overall, or to the specific post in question?

I would prefer the link back points to the specific post in question. I notice that the grabbed posts rank higher than source posts in search engine results. This is bad.

Arantor

Quote from: Arantor on August 27, 2009, 04:50:02 AM
Mod is written, supports both options from the admin panel, currently awaiting approval - but will be http://custom.simplemachines.org/mods/index.php?mod=2112 once it is approved.

You can pick which it does.

Arantor



humbleworld

I'm back. I tested the mod.

In every post it shows at the end: Linkback: URL

Can it be possible to make it just a clickable linkbank with the word "Link to this post". So that if I click the "link to the post" it goes to the post itself.

Arantor

In Sources/Display.php, find this:
// Add linkback
if(!empty($modSettings['linkbackStyle']) && $modSettings['linkbackStyle'] == 1) { // default to per post; 0 = post, 1 = topic
$message['body'] .= "\n\n[size=1]" . $txt['linkback'] . ': ' . $scripturl . ((!empty($modSettings['queryless_urls']) && $modSettings['queryless_urls']) ? '/topic,' . $topic . '.0.html' : '?topic=' . $topic . '.0') . '[/size]';
} else {
$message['body'] .= "\n\n[size=1]" . $txt['linkback'] . ': ' . $scripturl . ((!empty($modSettings['queryless_urls']) && $modSettings['queryless_urls']) ? '/topic,' . $topic . '.msg' . $message['id_msg'] . '.html#msg' . $message['id_msg'] : '?topic=' . $topic . '.msg' . $message['id_msg'] . '#msg' . $message['id_msg']) . '[/size]';
}


Replace with:
// Add linkback
if(!empty($modSettings['linkbackStyle']) && $modSettings['linkbackStyle'] == 1) { // default to per post; 0 = post, 1 = topic
$message['body'] .= "\n\n[size=1][url=" . $scripturl . ((!empty($modSettings['queryless_urls']) && $modSettings['queryless_urls']) ? '/topic,' . $topic . '.0.html' : '?topic=' . $topic . '.0') . ']' . $txt['linkback'] . '[/url][/size]';
} else {
$message['body'] .= "\n\n[size=1][url=" . $scripturl . ((!empty($modSettings['queryless_urls']) && $modSettings['queryless_urls']) ? '/topic,' . $topic . '.msg' . $message['id_msg'] . '.html#msg' . $message['id_msg'] : '?topic=' . $topic . '.msg' . $message['id_msg'] . '#msg' . $message['id_msg']) . ']' . $txt['linkback'] . '[/url][/size]';
}


You may need to change the definition of $txt['linkback'] to suit your preference in Themes/default/languages/Modifications.english.php too - by default it simply says Linkback.


humbleworld

Arantor,

The linkback does not appear in RSS grabbed posts. Some forum grabbers use the RSS of SMF to steal content.

How to have the linkback appear in RSS?

Arantor

It should be possible to add it to the RSS feed; I'll look at that later on today for you.

Advertisement: