Digg In Topics

Started by Charles Hill, March 29, 2008, 12:49:25 AM

Previous topic - Next topic

Charles Hill

Link to Mod

Name: Digg in Topics
Version: 1.3
Author: charlesh
Email: [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Description:

This modification integrates Digg (digg.com) into every topic on your forum.  In the Admin area of your forum you can
enable icon-only digg, enable compact digg, enable full digg, or disable the feature entirely.  Clicking
the digg link will open a new browser window where the user can submit the topic as a news story to Digg.  The topic's
subject, body, and link are filled in for the user automatically (though they can modify the subject and topic description
as they like).

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Files Modified:

Sources/ManagePosts.php
Themes/default/Display.template.php
Themes/default/Admin.template.php        
Themes/default/languages/Admin.english.php

Database changes via add_setting.php

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Features:

Enable icon-only digg, enable compact digg, enable full digg, or disable the
feature entirely via Admin => Posts and Topics => Topic Settings.

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Instructions:

Uninstall any previous version before installing a new version.

To install, simply upload the entire zip file to the package manager (Admin -> Packages -> Download Packages).

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Custom Themes:

To install this mod on a theme other than Core-Default you will need to follow the xml modification file.
      
- - - - - - - - - - - - - - - - - - - - - - - - - - -

Version Info:

1.1 - Fixed minor errors with html tags in Admin.template.php
1.2 - Modified Display.template.php... the message body will now have its bbc parsed and html/php removed when
submitted to digg (html/php/bbc in the body text caused problems when submitting).
1.3 - Fixed problem where the widget wouldn't load and would display an error instead when the body of a message was too long.

- - - - - - - - - - - - - - - - - - - - - - - - - - -

Notes:

I. Important note about language files in SMF 2.0 upwards:

1) All language entries in SMF 2.0 are cached. All edits should therefore be made through the admin menu. If you do edit a language file manually you will not see the changes in SMF until the cache refreshes. To manually refresh the cache go to Admin => Maintenance => Forum Maintenance => Common Tasks => Miscellaneous: Empty the file cache.

2) Please also note that strings should use single quotes, not double quotes for enclosing the string except for line breaks.
      
- - - - - - - - - - - - - - - - - - - - - - - - - - -

erlend_sh

Sweet! But what if I want digg only to appear in a specific board, say, an announcements board? Could that be possible?

Charles Hill

I'll work on allowing users to turn it on/off in specific boards.

Final60

Hello,
Does this work with 1.1.4?:)

Apllicmz




Mick.

Very cool.  Please make this available to 1.1.4

Charles Hill

Added SMF 1.1.4 version.  I'll get to work on adding individual board settings for this mod as well.

Chachafance

Not working on my 1.1.4 forum. :(

erlend_sh

Why don't all of you guys upgrade / wait for stable 2.0 version instead? There's a chance this mod might be a harder, at least different to make in 1.1.4. Asking for 2.0 support is one thing (the future), but asking mod makers to spend their precious time on backwards support (past) is a bit much if you ask me.

Charles Hill

Quote from: Chachafance on April 01, 2008, 06:59:44 AM
Not working on my 1.1.4 forum. :(
When you click apply, what file modifications are failing?

Mick.

Quote from: Charles Hill on April 01, 2008, 05:59:38 AM
Added SMF 1.1.4 version.  I'll get to work on adding individual board settings for this mod as well.

Thanx.  Loaded just fine on both my 1.1.4 sites.

Mick.

Quote from: Sadr on April 01, 2008, 12:16:54 PM
Why don't all of you guys upgrade / wait for stable 2.0 version instead? There's a chance this mod might be a harder, at least different to make in 1.1.4. Asking for 2.0 support is one thing (the future), but asking mod makers to spend their precious time on backwards support (past) is a bit much if you ask me.

Did you made the mod?  Nope.

Nothing wrong with asking.  If the mod maker wants to do it,so be it.

1.1.4 is still a choice and it will run for a great while and yes, i have 2.0 but wont load it until you sort out the bugs.

denzil69

unable to install

using default theme and 1.1.4, i get:

Themes\default/languages/Admin.english-utf8.php File not found

when trying to install

dannbass

Are you using english-utf8? I guess you're not, there is no problem... you can install the mod without any troubles.


denzil69

thanks for the speedy reply.

installed the mode, enabled it, it shows a white box where the "digg" should be.
its not clickable either?

any ideas please?

Charles Hill

There are problems with the digg widget and Internet Explorer... I assume IE is the browser you are using.

Also I've been having performance issues with the digg widget (the diggthis.js file on their server lags like crazy sometimes).  I will try to figure out ways to fix these issues.

denzil69

#16
Thanks Charles... yep IE7 browser is what im using.

ill keep popping back in for when its updated.

Cheers

ADDITIONAL: i left it showing the white box on a topic, then went and had my tea, when i returned, the digg it logo was there and it was clickable.
it appears as if theres some delay from digg it?
i refreshed the page and got the white box again.

Charles Hill

Yea I'm getting the impression that digg.com is very slow.  I just tested the digg widget using IE6 and I got the same thing you just said.  In FF if digg.com is lagging the widget just takes forever to load (slowing down the page load as a whole).  Internet Explorer actually handles the laggyness better in that it loads the rest of the page and then waits for the widget to load.  Rare occasion where IE is actually better than FF.... go figure ;)

Jelle Mees

I found a bug. The mod no longer works when there is a lot of text in the post.
The mod works fine on every single topic I've posted so far, but not on this one:
http://www.tm-belgium.info/index.php?topic=58.0

Request-URI Too Large

Can this be fixed?

Charles Hill

Quote from: Jelle Mees on May 10, 2008, 12:24:40 PM
I found a bug. The mod no longer works when there is a lot of text in the post.
The mod works fine on every single topic I've posted so far, but not on this one:
http://www.tm-belgium.info/index.php?topic=58.0

Request-URI Too Large

Can this be fixed?

Fixed :)

I tested the fix with 20k characters in a topic and it still loaded.  The overall performance should be be better now as well.

Advertisement: