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)

4x4 Mecca 06-28-2007 05:32 AM

I like it, and have installed it in a vehicle gallery forum. But if 15 posts get rated with thumbs ups... and someone else replies to a thread with 0 votes or someone makes a new thread... they display below the ranked threads. That kinda seems like a problem. Is there any way to limit the number? Like let us choose the number of threads... maybe 5 or so. Or to make them stay at the top for X hours or days?

Coders Shack 06-28-2007 06:07 AM

Quote:

Originally Posted by 4x4 Mecca (Post 1278217)
I like it, and have installed it in a vehicle gallery forum. But if 15 posts get rated with thumbs ups... and someone else replies to a thread with 0 votes or someone makes a new thread... they display below the ranked threads. That kinda seems like a problem. Is there any way to limit the number? Like let us choose the number of threads... maybe 5 or so. Or to make them stay at the top for X hours or days?

hmm ill see what i can do but like if X diggs on thread display before recent post?

4x4 Mecca 06-28-2007 06:30 AM

Sort of, more like instead of 20 threads with a ranking of +1 being above the other threads, let us choose the number of threads that stay on the top of the forums.

Coders Shack 06-28-2007 06:39 AM

Quote:

Originally Posted by 4x4 Mecca (Post 1278241)
Sort of, more like instead of 20 threads with a ranking of +1 being above the other threads, let us choose the number of threads that stay on the top of the forums.

well im not sure how many threads you have your display set to but its well over 20, But im pretty sure that a recent post will never be sent to the 2nd page. I'm not sure how to make it work the way you want it to.

4x4 Mecca 06-28-2007 07:10 AM

No they won't be sent to the 2nd page, but they are put below any post that has been "dugg". I just want it to keep 5 posts above the rest, not 20. I looked in the XML but didn't see the number 20 anywhere. I may be confusing you, so I'll just see if I can get it to do what I want. :) Thanks for your help.

4x4 Mecca 06-28-2007 07:33 AM

I misread the posts. I was under the impression it only kept the top 20 posts with diggs above the rest. But I created a new thread, and it still displayed below the dugg posts. Is that normal? How many dugg posts will the new threads display under?

Coders Shack 06-28-2007 07:49 AM

Quote:

Originally Posted by 4x4 Mecca (Post 1278287)
I misread the posts. I was under the impression it only kept the top 20 posts with diggs above the rest. But I created a new thread, and it still displayed below the dugg posts. Is that normal? How many dugg posts will the new threads display under?

ok I havent tested it on a forum with over 10 threads.

but what it is supposed to do is the normal query (the last X recent posts) then its supposed to order them by the total digg count.

yankidank 06-28-2007 01:53 PM

Yeah, this isn't adding the needed template changes to my postbit. Anyone have example postbit code for me to insert into my template to display the vote buttons on the threads? Right now I can see the vote results on the forum index pages, but not on the individual thread pages.

hollosch 06-28-2007 03:37 PM

The german translation is available here.

Coders Shack 06-28-2007 06:35 PM

ok ill work on a replacement var for both, i really don't like edits :P

rootnik 06-28-2007 11:26 PM

I had to edit the plugin to make it work in my post bit. In most cases, if it doesn't work for you the div container that the plugin is looking to replace has a css class in it.

For example, I had to change
Code:

'#<div id=\\\"post_message_\$post\[postid\]\\\">\$post\[message\]</div>#i'
to this:

Code:

'#<div id=\\\"post_message_\$post\[postid\]\\\"
class=\\\"vb_postbit\\\">\$post\[message\]</div>#i'

in the "tDigg - Template Edits" plugin.

If you are having trouble, search your postbit template for $post[message], PM me the entire div container that $post[message] is in, and I'll reply with what you need to edit when i have a chance.

hollosch 06-29-2007 07:51 AM

My vBulletin says version 1.01 is available. Where can I get the new version?

mcyates 06-30-2007 08:32 AM

Could you make this so there is an option where the posts are not ranked on how many diggs they have? This way, this can be used as another rating of the threads like the vbulletin rating!!

Thanks in advance.

Coders Shack 06-30-2007 08:46 AM

Quote:

Originally Posted by mcyates (Post 1279768)
Could you make this so there is an option where the posts are not ranked on how many diggs they have? This way, this can be used as another rating of the threads like the vbulletin rating!!

Thanks in advance.

Go to your plugin manager and disabled the one titled "tDigg - Change Sort". And thats it.

mcyates 06-30-2007 01:55 PM

Quote:

Originally Posted by Coders Shack (Post 1279774)
Go to your plugin manager and disabled the one titled "tDigg - Change Sort". And thats it.

oh right nice one, thank you :) Great hack

Expertu 06-30-2007 09:01 PM

I installed the product, uploaded the misc/ folder, but nothing shows up in the forum.

Nothing at all.

Coders Shack 06-30-2007 09:32 PM

did you go to the ACP section and add 0, then the forum id's you want. like

0,5,12,28

i haven't had time to build on the idea of this modification yet.

Expertu 06-30-2007 09:37 PM

There was no mention at all, that I had to add 0 before..

Now it works, altough I have no images on the ratings :

http://forum.seopedia.ro/forumdisplay.php?f=10

As you can see, only a 0 appears.

I uploaded the misc/ in :

cpstyles/vBulletin_3_Default

is that ok ?

Expertu 06-30-2007 09:41 PM

Moreoever, the old star ratings, as well as the "subscribed" icon show very weird, around that vote image.

4x4 Mecca 06-30-2007 09:59 PM

In my thread here http://www.4x4mecca.com/forum/other-...evelle-ss.html if I click thumbs down to remove 1 of the 2 votes, it goes to zero. When I click thumbs up again, it jumps back to 2.

Coders Shack 06-30-2007 10:06 PM

Quote:

Originally Posted by 4x4 Mecca (Post 1280173)
In my thread here http://www.4x4mecca.com/forum/other-...evelle-ss.html if I click thumbs down to remove 1 of the 2 votes, it goes to zero. When I click thumbs up again, it jumps back to 2.

well its working the way i made it to work.

you thumb up right? so its +1 but then you want to thumb down so its subtracting your first vote and gives it another -1. Same if you -1 first then want to +1.

4x4 Mecca 06-30-2007 10:38 PM

Well someone else thumbs up'd the post, so it had +1. Then later I thumbs up'd it, so it had +2. Then today I wanted to test the ordering thing some more, so I clicked thumbs down on the thread with 2 thumbs up, and it went to zero. It may be how it's written to remove 2 thumbs per click.... but I'm not quite sure if it will do that no matter how many thumbs... I mean if 6 people click thumbs up, and 3 of them click thumbs down, will it zero it out?

Coders Shack 06-30-2007 10:44 PM

Quote:

Originally Posted by 4x4 Mecca (Post 1280202)
Well someone else thumbs up'd the post, so it had +1. Then later I thumbs up'd it, so it had +2. Then today I wanted to test the ordering thing some more, so I clicked thumbs down on the thread with 2 thumbs up, and it went to zero. It may be how it's written to remove 2 thumbs per click.... but I'm not quite sure if it will do that no matter how many thumbs... I mean if 6 people click thumbs up, and 3 of them click thumbs down, will it zero it out?

well no like i explained before and you said it your self it had +1 by someone else then you added +1 so it was 2. But you decided to thumb down, that means you take away your original +1 and then -1. Like you could of just not thumbed it up in the first place and thumb it down and it would of been zero too :D.

Stoebi 06-30-2007 11:18 PM

Hi,

thank you very much for this hack. :)

Try to move a digged thread with more than 0 diggs to another forum, where tDigg is not active. The moved thread stays on the first place in this forum, but it's not the actual thread.

A second fix is needed for move thread with the 'Leave Permanent Redirect' option.

Can you make public the template patches for SHOWTHREAD, threadbit, postbit and postbit_legacy, please?


Regards, Stoebi

ayoko555 07-01-2007 03:23 AM

Quote:

Originally Posted by Coders Shack (Post 1279774)
Go to your plugin manager and disabled the one titled "tDigg - Change Sort". And thats it.

But after I disable the "tDigg - change sort", the Digg numbers don't show on the forumdisplay anymore, it's only showing the green thumb. :confused:

4x4 Mecca 07-01-2007 04:00 PM

Quote:

Originally Posted by ayoko555 (Post 1280310)
But after I disable the "tDigg - change sort", the Digg numbers don't show on the forumdisplay anymore, it's only showing the green thumb. :confused:

Change the plug in titled "tDigg - Change Sort"
to have this content
Code:

if ($vbulletin->options['tDigg_enabled']) {
                        $lastpost_info2 .= ', thread.tdiggs';
                }

I removed the sort order, but left the number displayed. :) If you are worried, copy the original content to notepad before you paste over it.

MikeF 07-02-2007 01:07 AM

A VBadvanced module for this would be interesting.

The Geek 07-02-2007 07:53 AM

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?

Coders Shack 07-02-2007 08:26 AM

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?

try it on the standard vbulletin template if it does work then its a forumid issue.

i really wana expand on this when i have time, but college/parties and shit is time consuming...

Filgga 07-02-2007 01:38 PM

hey

I installed it on my forum and everything works

but i cant "dig" it just says 0

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 01:31 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.01472 seconds
  • Memory Usage 1,841KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_php_printable
  • (13)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