vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - tDigg - Digg like system for threads (https://vborg.vbsupport.ru/showthread.php?t=150751)

montsa007 03-05-2008 02:46 AM

Umm how do i digg the thread i like?
any ideas??

montsa007 03-07-2008 10:30 AM

Can somebody please answer me?

xlguy 03-28-2008 10:39 AM

See the screenshots, just click on number rating in the postbit - or perhaps you need to be logged in if you can't see the thumbs.

OP: Thanks for making this much needed modification, I'm just checking it out now ready for installing on a live and busy forum :)

Lurk 04-17-2008 03:47 AM

There a way to disable users from rating their own threads?

trustful88 04-18-2008 05:26 AM

Don't mean to sound dumb, but how do I install it

thestaton 04-19-2008 05:58 PM

anyone tried this with 3.7RC3?

apiasto 04-19-2008 09:56 PM

could be useful.but no pictures showing or ne thing else to use this rating system on the forum.

joellus 04-25-2008 11:59 PM

how works this addon with new vbulletin 3.6.10

i cant vote currently, about the new security-token Porno M?dchen

someone have a solution?

thanks!!

paulvev 04-26-2008 11:22 PM

Best mod ive seen! Working sweet and exactly what my forum needed!

valdet 04-30-2008 12:43 AM

I am trying to set the conditional so the rating system shows up on every first post of a multi-page thread.

The following conditional does that in templates, but I am not sure how can we do it on plugin code.
Quote:

<if condition="(($post[postcount]==1 and !$GLOBALS['vbulletin']->GPC['ajax']))">
CODE
</if>

I tried some variations but there was an error.
Thanks

michael million 06-09-2008 04:40 AM

I install it at 3.7. Now i have the securitytoken-problem.
Who can help me?

neodan20 06-09-2008 05:49 AM

Is there something like this for 3.7?

pcoskat 06-17-2008 12:58 PM

Quote:

Originally Posted by Dan Burtan (Post 1544740)
Is there something like this for 3.7?

I would like it , too

derekivey 08-05-2008 01:45 AM

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.

timanlee 08-09-2008 02:59 PM

bump.
wondering if anyone can get this to work on 3.7.2?

stwilson 08-09-2008 11:38 PM

A 3.7 version of this would be NICE!!!

xorex 08-12-2008 08:46 AM

need options add usergroup permision !

Glitch0r 08-21-2008 10:39 AM

Quote:

Originally Posted by stwilson (Post 1595104)
A 3.7 version of this would be NICE!!!

AMEN!, please make a 3.7 one!?

nutnut 08-23-2008 05:54 AM

Quote:

Originally Posted by Glitch0r (Post 1603697)
AMEN!, please make a 3.7 one!?

Yes!

dude14 10-22-2008 05:40 PM

^ & AMEN once again to that. Please do. :)

trigatch4 10-23-2008 09:32 PM

NEED A 3.7 (and soon after a 3.8) VERSION!!!!

I'd certainly donate/pay for something like this. Please PM me and I may consider funding the entire thing if I can offer some direction with added features.

trustful88 11-10-2008 05:11 PM

Crap guys. My sticky threads for Black Friday are all unorganized now b/c I shut off the tDigg setting... how do I fix this???

bastard1967 12-24-2008 12:32 PM

Problem it shows the digg but on klick it dosent update ... i have vb 3.7.3

squishi 01-05-2009 03:11 PM

Same for me. Tried to install it but it does not work on 3.7.3. :(

squishi 01-05-2009 03:16 PM

Man, the scriptasy forum looks so nice, but it is filled with viagra spam. So is this thread abandoned, too?

chooky 01-05-2009 04:10 PM

Please cancel the Option "Supported" because you dont support it ! :mad:




:down::down:

TimberFloorAu 01-05-2009 07:21 PM

Would happily pay for a 3.7+ version ( kick some money into the pot )

dartho 01-05-2009 07:36 PM

On the previous page (post 134) is a post with how to make it work for 3.7...

TimberFloorAu 01-05-2009 08:04 PM

*EDIT*

Ok changed XML.

The Product has been reimported. Activated in Vb Options, and assigned a forumID

Nothing, no images, nothing in source code to even indicate its functioning.
Have uploaded images to every bloody misc folder known to man lol

Still Zilch.

Include ( supposed 3.7+ version of the product )

dartho 01-06-2009 01:27 AM

my bad :( since been having a look over the code, and the automatic template edits may not work with later versions of vBulletin

I've managed to get it half working on 3.8RC2 and can dig threads and the info shows up in showthread) but no luck showing digs in forumdisplay as yet. If I get more time I'll have another crack at it

TimberFloorAu 01-06-2009 06:11 AM

Cheers Dartho.Plz PM me if you get it working :)

chooky 01-07-2009 11:53 AM

Quote:

Originally Posted by TimberFloorAu (Post 1702602)
*EDIT*

Ok changed XML.

The Product has been reimported. Activated in Vb Options, and assigned a forumID

Nothing, no images, nothing in source code to even indicate its functioning.
Have uploaded images to every bloody misc folder known to man lol

Still Zilch.

Include ( supposed 3.7+ version of the product )


Also dont works at me, I see no changes :erm:

Trana 05-19-2009 09:44 PM

Can someone please provide the template changes and we can do it manually?

marshal_ramdev 05-31-2009 04:02 PM

nice one

Blaine0002 10-12-2009 11:23 PM

soooooo this version should work with the newest version of vbulletin. tested on 3.7 but should work on 3.8

Uses template system not the unreliable system it was using before,
leave feedback.

probably a good idea if you uninstall the previous version if you have it installed.

edit: forgot, instead of putting the forumids in the vbulletin options, go into each forums options you want this enabled on, and scroll to the bottom and you should see "digg forum?" or something of the like. make it yes.

reddyink 10-17-2009 12:24 PM

I downloaded your update to tDigg MOD but still not working
1) It is showing up in forumdisplay but

nothing showing up in showthread.
Enabled in Forum via forum manager
Uploaded images to correct style.

MOD is enabled in vboptions.

vb3.8.4 version..
thanks
Quote:

Originally Posted by Blaine0002 (Post 1898861)
soooooo this version should work with the newest version of vbulletin. tested on 3.7 but should work on 3.8

Uses template system not the unreliable system it was using before,
leave feedback.

probably a good idea if you uninstall the previous version if you have it installed.

edit: forgot, instead of putting the forumids in the vbulletin options, go into each forums options you want this enabled on, and scroll to the bottom and you should see "digg forum?" or something of the like. make it yes.


artherd 10-28-2009 08:36 AM

Same problem, shows up in forumdisplay but not in showthread.

lm3a.net 11-08-2009 09:37 AM

Cool.

Will it make some load on the server ?

mytweakerart 02-09-2010 12:20 AM

awesomely close in 3.8.2. plz plz plz make it work!
problem is you can change the numbers erratically after clicking up/down over and over in a post.

http://mytweakerart.com as a sample site....

mytweakerart 02-09-2010 06:49 PM

works for me in 95% in
http://www.TweakerArt.com

but doesnt show up in the forums for me in
http://www.ToyotaBrakeRecall.org
i cant get the little thumbs to appear on the post. install and ACP options look fine.

using latest ver in post.
help


All times are GMT. The time now is 03:09 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.01510 seconds
  • Memory Usage 1,864KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete