vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - [AJAX] Helpful Answers - Allow users to rate individual posts (https://vborg.vbsupport.ru/showthread.php?t=233296)

bfdzio 04-04-2012 02:17 PM

Quote:

Originally Posted by Ted S (Post 2316442)
You can simply copy that routine and add one addition WHERE statement to the mySQL query along the lines of

createddate >= DATE_SUB(NOW(),INTERVAL 1 day)


Tried several different things and can't get it to work...where excactly? Also it can't find any 'createddate' but at least got rid of the error when I changed it to post dateline..but nothing shows.

$helpfulanswers = $db->query_read_slave("
SELECT post.postid,post.title as posttile,helpfulpost.goodrank,helpfulpost.totalran k,helpfulpost.lastvote,
thread.threadid,thread.title as title,thread.postusername as postusername,forum.title as ftitle $helpful_selectby
$hook_query_fields
FROM " . TABLE_PREFIX . "helpfulpost as helpfulpost
INNER JOIN " . TABLE_PREFIX . "post AS post ON(helpfulpost.postid = post.postid)
INNER JOIN " . TABLE_PREFIX . "thread AS thread ON(post.threadid = thread.threadid)
INNER JOIN " . TABLE_PREFIX . "forum AS forum ON(thread.forumid = forum.forumid)
WHERE helpfulpost.goodrank > 0
$conditions
$hook_query_joins
ORDER BY $sqlsort $sortorder
LIMIT " . ($limitlower - 1) . ", $perpage
");

Ted S 04-04-2012 04:03 PM

Shoot... createddate is the attribute I usually use in mods but in this one it would be

helpfulanswer.lastvote

However I've over simplified as this is a UNIXTIMESTAMP made by vBulletin rather than a datestamp. That means you have to get more complex in the query...

helpfulanswer.lastvote >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL 1 day))

Or something like that

Shill360 04-07-2012 04:19 PM

Bit of a strange one this.

I am entering {vb:raw post.totalrank} in my postbit_legacy template.

And it is showing the number of thanks under the user avatar. But only on that particular post. Is there anyway to show the total number of thanks on all posts for a user. The old variable on the 3.x version was $post[hatotalrank] which showed the total number of thanks on multiple posts for users.

Am I doing something wrong ?

Ted S 04-08-2012 12:22 AM

Quote:

Originally Posted by Shill360 (Post 2317784)
Bit of a strange one this.

I am entering {vb:raw post.totalrank} in my postbit_legacy template.

And it is showing the number of thanks under the user avatar. But only on that particular post. Is there anyway to show the total number of thanks on all posts for a user. The old variable on the 3.x version was $post[hatotalrank] which showed the total number of thanks on multiple posts for users.

Am I doing something wrong ?

post.totalrank is a post variable so it's not strange that it only shows what that post got :D

If you scroll back to the first page of the mod there's a list of accessible variables with brief descriptions. I don't recall them all off hand but if I had any common sense when making this version it would have been post.hatotalrank

bfdzio 04-08-2012 01:42 PM

Quote:

Originally Posted by Ted S (Post 2316736)
Shoot... createddate is the attribute I usually use in mods but in this one it would be

helpfulanswer.lastvote

However I've over simplified as this is a UNIXTIMESTAMP made by vBulletin rather than a datestamp. That means you have to get more complex in the query...

helpfulanswer.lastvote >= UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL 1 day))

Or something like that


Got it working, now I just need to make it show a preview of the post (or the whole post).

Probably more work involved in that though.

Trevor Matthews 04-16-2012 02:06 PM

Hi
I have this installed and all is fine, except that I have just installed Pird of Preys Simple Postbit modification and this mod no longer works in the sections where I have activated Simple Postbits.
Simple Postbits has a box that says Use Postbit Control Hooks, the description is below;

"Choose whether you want to enable the postbit controls template hook. If yes mods that use this hook will be able to place their code in the simple postbit. Enable this if you want a "Like" button or other 3rd party buttons to show."

Does anyone know how I can get Helpful Answers to work again in those sections?
Thanks for any suggestions.

Ted S 04-16-2012 05:19 PM

Quote:

Originally Posted by Trevor Matthews (Post 2320618)
Hi
I have this installed and all is fine, except that I have just installed Pird of Preys Simple Postbit modification and this mod no longer works in the sections where I have activated Simple Postbits.
Simple Postbits has a box that says Use Postbit Control Hooks, the description is below;

"Choose whether you want to enable the postbit controls template hook. If yes mods that use this hook will be able to place their code in the simple postbit. Enable this if you want a "Like" button or other 3rd party buttons to show."

Does anyone know how I can get Helpful Answers to work again in those sections?
Thanks for any suggestions.

I can't debug specific cross-mod issues as there's simply too many combinations but I'd suggest trying the manual placement option and adding the template hook yourself. This takes a couple lines of editing but may solve your issue.

Trevor Matthews 04-16-2012 05:28 PM

Ok, thanks, Pird of Prey is having a look at it for me.
I will report back if I can solve the problem.

Ted S 04-16-2012 05:37 PM

Quote:

Originally Posted by Trevor Matthews (Post 2320662)
Ok, thanks, Pird of Prey is having a look at it for me.
I will report back if I can solve the problem.

If they find a conflict please let me know. It's _generally_ not hard to fix those, it's finding them that's a pain.

Trevor Matthews 04-16-2012 05:47 PM

It has been sorted, I had to modify the template.
Details are Here, should be sorted in later releases.


All times are GMT. The time now is 11:52 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.03757 seconds
  • Memory Usage 1,746KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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