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)

Stoebi 07-02-2007 02:28 PM

Quote:

Originally Posted by The Geek (Post 1281112)
Cool idea, but I cant seem to get it to work on my site. I have put 0,39 in the forumids but its a no go. If I check the page source, no dig info was added to the page so I am assuming either the forumid check failed or the preg_replace did. No errors in the php error log either.

Any advice?

I've changed the hook forumdisplay_query:
PHP Code:

if ($vbulletin->options['tDigg_enabled'])
{
    
$show['tDigg_forums'] = false;

    if (
in_array($foruminfo['forumid'], explode(','$vbulletin->options['tDigg_forums'])))
    {
        
$lastpost_info2 .= ', thread.tdiggs';
        
$sqlsortfield 'tdiggs DESC,' $sqlsortfield;
        
$show['tDigg_forums'] = true;
    }


I've removed the threadbit patch in hook parse_templates.

Open template threadbit and search for:
Code:

        $thread[title_editable]
        <div>

insert below:
Code:

            <if condition="$vbulletin->options['tDigg_enabled'] AND $show['tDigg_forums'] AND !$show['rmanage']">
                <span style='float: right'>&nbsp;<b><span id='votecount_$threadnum' style='position: relative; top: -5px;'>$thread[tdiggs]</span></b>
                    <if condition="$thread['tdiggs'] >= 0">
                        <img src="$stylevar[imgdir_misc]/t-us.png" width="18px" height="18px">
                    <else />
                        <img src="$stylevar[imgdir_misc]/t-ds.png" width="18px" height="18px">
                    </if>
                </span>
            </if>

Done!

@Coders Shack
Good work, nice idea. Thank you very much :)


Regards, Stoebi

The Geek 07-02-2007 04:22 PM

Hey coders if you want to PM me your email addy, Ill send you a package I tweaked. It includes the ability to sort by default, sort on click, usergroup restrictions on viewing and digging and several other overhead tweaks.

Vic123 07-03-2007 11:49 AM

Thanks for this great mod! Works fine for me.

I think this mod can replace the standart vb- thread rating very easy. It would be awesome if it could be rewritten like this:

- allow threads in forums 1,2,3,... to be rated.
- when rated: do NOT sort them in forums 1,2,3,... by diggs
- show top-digged threads in extra forum, extra site, forumhome and/or in extra box.


So it would end up in a forumwide rating system where only threads from certain forums (e.g. no off-topic) can be digged. I think such a system could motivate users to post informative and helpfull topics.

please excuse my humble english ;)

bye
Vic

tyrionlannister 07-03-2007 05:10 PM

Is the rating supposed to work when the thumb is pressed on forumdisplay? By default, it only seems to work when pressed inside of the thread. Perhaps I'm doing something wrong.

abg 07-03-2007 05:42 PM

Installed it, but have the following problem when trying to vote:

Quote:

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in /ajax.php(44) : eval()'d code on line 3

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /ajax.php(44) : eval()'d code on line 3

Database Error Database error
Your database has encountered a problem.
Please try the following:
Load the page again by clicking the Refresh button in your web browser.
Open your home page, then try to open another page.
Click the Back button to try another link.
The forum technical staff have been notified of the error, though you may contact them if the problem persists.

We apologise for any inconvenience.

Lowfyr 07-04-2007 06:39 AM

awesome!

just some suggestions:
https://vborg.vbsupport.ru/showthread.php?t=150177

iamcommie 07-04-2007 11:27 PM

is there a way to show the tdiggs on the "new posts" results page?

Vic123 07-05-2007 07:55 AM

Quote:

Originally Posted by Lowfyr (Post 1282468)

that's exactly what I am searching for, too. :)

bye
Vic

Lowfyr 07-06-2007 06:41 AM

yep, I think this could improve the whole thread/overview quality of any forum.

anzo 07-08-2007 09:31 PM

I can get it to work :( Help please!
I can see green thumbs and diggs count (http://latforums.lv/forum1.html), but no "digg this" button (http://latforums.lv/thread21237.html) :(
How do I fix this? What is wrong?


All times are GMT. The time now is 11:49 AM.

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.01202 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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