Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
tDigg - Digg like system for threads Details »»
tDigg - Digg like system for threads
Version: 1.00, by Coders Shack Coders Shack is offline
Developer Last Online: Sep 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.7 Rating:
Released: 06-26-2007 Last Update: 06-26-2007 Installs: 215
DB Changes Uses Plugins
 
No support by the author.

[hr]value[/hr]
. . . . . . . . Brought to you by

. . . http://www.Scriptasy.com
[hr]value[/hr]
Installation Time: < 1 mins
Product: 1
File: 1
VB Version: 3.6.X


Description: [hr]value[/hr]
Creates a digg-like system that runs alongside your threads, stuck threads always stay on top but threads with more than one "digg" will show up before threads with 0 or less than zero "diggs"

[DEMO]

Installation Instructions: [hr]value[/hr]
  1. Install Product
  2. Upload the misc folder to your style directory
[hr]value[/hr]
If you like then [Mark As Installed]
[hr]value[/hr]

Show Your Support

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

Comments
  #132  
Old 06-09-2008, 04:40 AM
michael million michael million is offline
 
Join Date: Apr 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I install it at 3.7. Now i have the securitytoken-problem.
Who can help me?
Reply With Quote
  #133  
Old 06-09-2008, 05:49 AM
neodan20 neodan20 is offline
 
Join Date: Apr 2008
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there something like this for 3.7?
Reply With Quote
  #134  
Old 06-17-2008, 12:58 PM
pcoskat pcoskat is offline
 
Join Date: Apr 2002
Location: atlanta
Posts: 423
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dan Burtan View Post
Is there something like this for 3.7?
I would like it , too
Reply With Quote
  #135  
Old 08-05-2008, 01:45 AM
derekivey derekivey is offline
 
Join Date: Apr 2005
Location: Pennsylvania, USA
Posts: 1,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

To fix the security token problem, use this modified code for the tDigg - Template Edits plugin:

PHP Code:
if ($vbulletin->options['tDigg_enabled']) {
            
$vbulletin->templatecache['SHOWTHREAD'] = preg_replace('#</head>#i''
            ".((!in_array($forum[forumid], explode(",", "' 
$vbulletin->options['tDigg_forums'] . '", -1))) ? ("") : ("
            <script type="text/javascript" language="javascript">
   var tdigg_request = false;
   var threadnum = null;
   function maketdiggRequest(url, parameters) {
      tdigg_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         tdigg_request = new XMLHttpRequest();
         if (tdigg_request.overrideMimeType) {
             // set type accordingly to anticipated content type
            //tdigg_request.overrideMimeType(\'text/xml\');
            tdigg_request.overrideMimeType(\'text/html\');
         }
      } else if (window.ActiveXObject) { // IE
         try {
            tdigg_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               tdigg_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }
      if (!tdigg_request) {
         alert(\'Cannot create XMLHTTP instance\');
         return false;
      }
      
      tdigg_request.onreadystatechange = alerttdiggContents;
      tdigg_request.open(\'POST\', url, true);
      tdigg_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      tdigg_request.setRequestHeader("Content-length", parameters.length);
      tdigg_request.setRequestHeader("Connection", "close");
      tdigg_request.send(parameters);
   }

   function alerttdiggContents() { 
      if (tdigg_request.readyState == 4) {
         if (tdigg_request.status == 200) {
            document.getElementById(\'votecount_\' + threadnum).innerHTML = tdigg_request.responseText;
         } else {
            alert(\'There was a problem with the request.\');
         }
      }
   }
   
function vote(ID,type) {
    var threadid = document.getElementById(\'qr_threadid\').value;
    threadnum = ID;
    if (type == \'give\'){
            var poststr = "threadid=" + encodeURI( threadid ) +
            "&action=give&securitytoken=" + SECURITYTOKEN;
            document.getElementById(\'votecount_\' + ID).innerHTML = \'<img src="$stylevar[imgdir_misc]/13x13progress.gif">\';
            maketdiggRequest( \'ajax.php?do=tdigg\', poststr);
    } else if (type == \'take\') {
            var poststr = "threadid=" + encodeURI( threadid ) +
            "&action=take&securitytoken=" + SECURITYTOKEN;
            document.getElementById(\'votecount_\' + ID).innerHTML = \'<img src="$stylevar[imgdir_misc]/13x13progress.gif">\';
            maketdiggRequest( \'ajax.php?do=tdigg\', poststr);
    }
}
</script>
<style type="text/css"> <!--
.topicv {
    position:relative;
    height: 18px;
}
.countbg {    
    position:relative;
    top: -5px;
    text-align: center;
    color: #000000;
    font-weight:bold
}
.news-tDigg {
    position: relative;
    top: 0.8em;
    text-align: center;
    font-size: 85%;
    margin: 0;
    padding: 0;
    list-style: none;
    background: url($stylevar[imgdir_misc]/t-shade.gif) no-repeat;
}
.news-tDigg li {
    margin: 0;
    padding: 0;
}
.tDigg-count a , .tDigg-count span, .tDigg-count-s a, .tDigg-count-s span {
    display: block;
    position: relative;
    padding: 6px 0 4px 0;
    text-decoration: none;
    width: 50px;
    min-height: 20px;
    color: #93883F;
    text-align: center;
    font: 13px arial, sans-serif;
}
.news-summary .tDigg-count strong, .news-full .tDigg-count strong, .news-summary .tDigg-count-s strong, .news-full .tDigg-count-s strong {
    font-size: 160%;
    font-weight: normal;
    letter-spacing: -1px;
    line-height: 1;
    display: block;
    position: relative;
    color: #736926;
}
.news-summary .tDigg-count-s strong, .news-full .tDigg-count-s strong {
    font-size: 160%;
}
.tDigg-count img, .tDigg-count-s img {
    position: relative;
    top: 0;
    left: 0;
    border: none;
}
.tDigg-count a:hover, .tDigg-count-s a:hover, .tDigg-count a:hover strong, .tDigg-count-s a:hover strong {
    color: #998D43;
}
--></style>
")) . "
</head>'
$vbulletin->templatecache['SHOWTHREAD']);
$vbulletin->templatecache['threadbit'] = preg_replace('#"\.\(\(\$show\[\'moderated\'\] OR #i','
".((!in_array($thread[forumid], explode(",", "' 
$vbulletin->options['tDigg_forums'] . '", -1))) ? ("") : ("
<span style=\'float: right;\' ><b><span id=\'votecount_$threadnum\' style=\'position: relative; top: -5px;\'>$thread[tdiggs]</span></b> " . (($thread[\'tdiggs\'] >= 0) ? ("<img src="$stylevar[imgdir_misc]/t-us.png" width="18px" height="18px">") : ("<img src="$stylevar[imgdir_misc]/t-ds.png" width="18px" height="18px">")) . "</span>")) . "
".(($show[\'moderated\'] OR '
$vbulletin->templatecache['threadbit']);
if (
$vbulletin->options['legacypostbit']) {
    
$vbulletin->templatecache['postbit_legacy'] = preg_replace('#<div id=\\"post_message_\$post\[postid\]\\" 
class=\\"vb_postbit\\">\$post\[message\]</div>#i'
,'
".((!in_array($forum[forumid], explode(",", "' 
$vbulletin->options['tDigg_forums'] . '", -1))) ? ("") : ("
            ".(($post[postcount] == 1) ? ("
            <div style=\'position: relative; display: inline; float: right; padding: 0px 10px 0px 0px;\'>
                <div class="news-summary">
                    <ul class="news-tDigg">
                        <li class="tDigg-count">
                            <a><strong id="votecount_$thread[threadid]">$thread[tdiggs]</strong></a>
                        </li>
                        '
.(($vbulletin->userinfo['usergroupid'] != 1) ? ('<li><img src="$stylevar[imgdir_misc]/t-dg.png" onmouseover="this.src=\'$stylevar[imgdir_misc]/t-d.png\'" onmouseout="this.src=\'$stylevar[imgdir_misc]/t-dg.png\'" onclick="javascript: vote($thread[threadid],\'take\');" width="25px" height="18px"><img src="$stylevar[imgdir_misc]/t-ug.png" onmouseover="this.src=\'$stylevar[imgdir_misc]/t-u.png\'" onmouseout="this.src=\'$stylevar[imgdir_misc]/t-ug.png\'" onclick="javascript: vote($thread[threadid],\'give\');" width="25px" height="18px"></li>') : ('')).'
                    </ul>
                </div>
            </div>") : ("")) . "")) . "
        <div id="post_message_$post[postid]">$post[message]</div>
        <div style="display: block; clear: both;">&nbsp;</div>'
$vbulletin->templatecache['postbit_legacy']);
} else {
    
$vbulletin->templatecache['postbit'] = preg_replace('#<div id=\\"post_message_\$post\[postid\]\\">\$post\[message\]</div>#i','
".((!in_array($forum[forumid], explode(",", "' 
$vbulletin->options['tDigg_forums'] . '", -1))) ? ("") : ("
            ".(($post[postcount] == 1) ? ("
            <div style=\'position: relative; display: inline; float: right; padding: 0px 10px 0px 0px;\'>
                <div class="news-summary">
                    <ul class="news-tDigg">
                        <li class="tDigg-count">
                            <a><strong id="votecount_$thread[threadid]">$thread[tdiggs]</strong></a>
                        </li>
                        '
.(($vbulletin->userinfo['usergroupid'] != 1) ? ('<li><img src="$stylevar[imgdir_misc]/t-dg.png" onmouseover="this.src=\'$stylevar[imgdir_misc]/t-d.png\'" onmouseout="this.src=\'$stylevar[imgdir_misc]/t-dg.png\'" onclick="javascript: vote($thread[threadid],\'take\');" width="25px" height="18px"><img src="$stylevar[imgdir_misc]/t-ug.png" onmouseover="this.src=\'$stylevar[imgdir_misc]/t-u.png\'" onmouseout="this.src=\'$stylevar[imgdir_misc]/t-ug.png\'" onclick="javascript: vote($thread[threadid],\'give\');" width="25px" height="18px"></li>') : ('')).'
                    </ul>
                </div>
            </div>") : ("")) . "")) . "
        <div id="post_message_$post[postid]">$post[message]</div>
        <div style="display: block; clear: both;">&nbsp;</div>'
$vbulletin->templatecache['postbit']);
}

I had to help someone get this working, so I thought I'd share the modified code.
Reply With Quote
  #136  
Old 08-09-2008, 02:59 PM
timanlee timanlee is offline
 
Join Date: May 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump.
wondering if anyone can get this to work on 3.7.2?
Reply With Quote
  #137  
Old 08-09-2008, 11:38 PM
stwilson stwilson is offline
 
Join Date: Dec 2006
Location: USA
Posts: 209
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A 3.7 version of this would be NICE!!!
Reply With Quote
  #138  
Old 08-12-2008, 08:46 AM
xorex's Avatar
xorex xorex is offline
 
Join Date: Jan 2008
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

need options add usergroup permision !
Reply With Quote
  #139  
Old 08-21-2008, 10:39 AM
Glitch0r Glitch0r is offline
 
Join Date: Dec 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stwilson View Post
A 3.7 version of this would be NICE!!!
AMEN!, please make a 3.7 one!?
Reply With Quote
  #140  
Old 08-23-2008, 05:54 AM
nutnut nutnut is offline
 
Join Date: Feb 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Glitch0r View Post
AMEN!, please make a 3.7 one!?
Yes!
Reply With Quote
  #141  
Old 10-22-2008, 05:40 PM
dude14 dude14 is offline
 
Join Date: Jan 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^ & AMEN once again to that. Please do.
Reply With Quote
Reply


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 01:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08757 seconds
  • Memory Usage 2,355KB
  • 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
  • (1)bbcode_php
  • (3)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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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