Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications

Reply
 
Thread Tools
Digg Display & Digg Count Details »»
Digg Display & Digg Count
Version: 1.01, by ericgtr ericgtr is offline
Developer Last Online: Feb 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.7.0 Beta 3 Rating:
Released: 12-28-2007 Last Update: Never Installs: 54
Template Edits
 
No support by the author.

Get your users to Digg more threads with this simple modification. It's more visible and will promote more Diggs.

What this does differently from the stock Bookmarks is put the Digg button on top of the post in a nice little box and displays how many diggs the post has gotten. This uses javascript provided by Digg. The background color can also be defined.

Update: Fixed the javascript so it will now show the thread title if it has special characters in it.

In SHOWTHREAD find:
Code:
<td class="vbmenu_control" id="threadtools" nowrap="nowrap">
Add this just above: (be sure to add your forum URL so it Digg can grab the title, you may optionally remove that line if you have an SEO mod installed but the title will have to be submitted manually)
Code:
<!-- Digg -->
<td class="vbmenu_control" id="digg" nowrap="nowrap">
<script type="text/javascript">
digg_url = 'SITE URL/showthread.php?t=$thread[threadid]';
digg_title = "$threadinfo[title]";
digg_skin = 'compact';
digg_window = 'new';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</td>
<!-- / Digg -->
Please click install if you use this.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-11-2008, 09:43 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jay... View Post
is there anyway to make the background transparent or use a gradient as the bar where my digg button is has a gradient image in the background
Unfortunately not, that's one of the disadvantages and I have also not been able to find a way to change the text color.
Reply With Quote
  #13  
Old 01-14-2008, 12:19 AM
993ti 993ti is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also works with 3.6.8
Reply With Quote
  #14  
Old 01-14-2008, 10:06 PM
CoryHawk CoryHawk is offline
 
Join Date: Apr 2005
Location: Oklahoma City, OK
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Greetings..

Was wondering 2 things.. First.. is this possible.. and second.. can someone help me with the variables..


I have installed a snippet of code on my vbseo 1.0 template for vb 3.7beta3

The code is the following..

Code:
<!-- Digg -->
<td class="vbmenu_control" id="digg" nowrap="nowrap">
<script type="text/javascript">
digg_url = 'http://forums.prisonofficer.org/showthread.php?t=$thread[threadid]';
digg_title = "$threadinfo[title]";
digg_bgcolor = '#ffffff';
digg_skin = 'compact';
digg_window = 'new';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</td>
<!-- / Digg -->
In the digg_url code.. it works be uses the old VB urls and not the seo-friendly vbSEO urls.. I was wondering if there was variables for vbSEO to have the same effect but with the correct SEO rewrote URLs.

The button works to digg the post (which is already a function in vbSEO) however I would like it to show the digg count which will not work since the URLs get rewritten.


Does that make sense or am I babbling?

Example URLs Below


vbSEO url = http://forums.prisonofficer.org/offi...ed-escape.html

VB Normal URL = http://forums.prisonofficer.org/showthread.php?t=543




Thanks in advance.


Cory
Reply With Quote
  #15  
Old 01-14-2008, 10:30 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CoryHawk View Post
Greetings..

Was wondering 2 things.. First.. is this possible.. and second.. can someone help me with the variables..


I have installed a snippet of code on my vbseo 1.0 template for vb 3.7beta3

The code is the following..

Code:
<!-- Digg -->
<td class="vbmenu_control" id="digg" nowrap="nowrap">
<script type="text/javascript">
digg_url = 'http://forums.prisonofficer.org/showthread.php?t=$thread[threadid]';
digg_title = "$threadinfo[title]";
digg_bgcolor = '#ffffff';
digg_skin = 'compact';
digg_window = 'new';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</td>
<!-- / Digg -->
In the digg_url code.. it works be uses the old VB urls and not the seo-friendly vbSEO urls.. I was wondering if there was variables for vbSEO to have the same effect but with the correct SEO rewrote URLs.

The button works to digg the post (which is already a function in vbSEO) however I would like it to show the digg count which will not work since the URLs get rewritten.


Does that make sense or am I babbling?

Example URLs Below


vbSEO url = http://forums.prisonofficer.org/offi...ed-escape.html

VB Normal URL = http://forums.prisonofficer.org/showthread.php?t=543




Thanks in advance.


Cory
I have tried to find an answer to this but cannot and have ended up disabling Zoints SEO on my site because of it, which has really hurt my search engine results. For each SEO system the have a replacement variable, it's a matter of locating it.
Reply With Quote
  #16  
Old 01-15-2008, 07:18 PM
Andy92 Andy92 is offline
 
Join Date: Jan 2008
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am searching showthread.php and i cant find this line...

Quote:
<td class="vbmenu_control" id="threadtools" nowrap="nowrap">
Reply With Quote
  #17  
Old 01-15-2008, 09:42 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Andy92 View Post
I am searching showthread.php and i cant find this line...
What version of vB are you using? Either way just looking for
id="threadtools"
should work.
Reply With Quote
  #18  
Old 01-16-2008, 03:53 PM
CoryHawk CoryHawk is offline
 
Join Date: Apr 2005
Location: Oklahoma City, OK
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is a document on vBSEO's variables... could anyone with knowledge of this help me out?

http://www.vbseo.com/f2/vbseo-functi...sibility-1662/

I have no idea what needs to be replaced in the code.
Reply With Quote
  #19  
Old 01-16-2008, 09:50 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CoryHawk View Post
Here is a document on vBSEO's variables... could anyone with knowledge of this help me out?

http://www.vbseo.com/f2/vbseo-functi...sibility-1662/

I have no idea what needs to be replaced in the code.
I'm not exactly sure what the replacement variables are for VBSEO because I don't have it otherwise I would mess with it for you, ultimately though you are after replacements for:

Code:
$thread[threadid]

and 

$threadinfo[title]
Maybe they can give these to you over there.
Reply With Quote
  #20  
Old 01-21-2008, 04:05 PM
ericgtr's Avatar
ericgtr ericgtr is offline
 
Join Date: Apr 2003
Location: Portland, Oregon
Posts: 1,407
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

CoryHawk, I have figured out how to get this to work with vBseo as I have it installed now. Here is the code

Code:
<!-- Digg -->
<td class="vbmenu_control" id="digg" nowrap="nowrap">
<script type="text/javascript">
digg_url = 'http://www.yoursite.com$_SERVER[VBSEO_URI]';
digg_title = "$threadinfo[title]";
digg_skin = 'compact';
digg_window = 'new';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>
</td>
<!-- / Digg -->
Reply With Quote
  #21  
Old 01-22-2008, 03:33 AM
CoryHawk CoryHawk is offline
 
Join Date: Apr 2005
Location: Oklahoma City, OK
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Eric!

Should that be _SERVER[VBSEO_URL] or VBSEO_URI ?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:15 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05082 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete