Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Post Award Hack 1.2 Details »»
Post Award Hack 1.2
Version: 1.2, by Abe1 Abe1 is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 09-06-2004 Last Update: 10-23-2004 Installs: 67
DB Changes
 
No support by the author.

Post Award Hack version 1.2

Overview:
This hack will allow you to award individual posts. It will give you an option to add or remove the award. It will show a rosette on a post that has been awarded.

Features:
Shows a rosette on all awarded posts
Search for individuals awarded posts
Search for all awarded posts
Allow either just admin, super mod and admin, or all moderators to give awards


Files to upload: 2 (one php and one gif)
Files to edit: Zero
Templates to add: Zero
Templates to edit: Five
Queries to run: Two
Time to install: Less then 5 minutes.

Please click ?install? if you use it.

Please post feedback as this is my first big hack.

Updates:
Version 1.0 -
Release

Version 1.1 -
Security Update
Find all awarded posts

Version 1.2 -
Fixed if you want moderators to give awards
Fixed Search page title
I no longer make the search options manual to implement

Show Your Support

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

Comments
  #62  
Old 10-12-2004, 04:31 PM
Abe1's Avatar
Abe1 Abe1 is offline
 
Join Date: Feb 2004
Location: I LOVE New York!
Posts: 2,886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
I'll be happy just to customize that line as per image
I noticed that also. I didn't look much into it. I'm going to look into it what I have time. I'd love to get the award pic there.
Reply With Quote
  #63  
Old 10-12-2004, 04:58 PM
teksigns's Avatar
teksigns teksigns is offline
 
Join Date: Sep 2003
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to be able to leave a award note with each one that i give
and have it appear under the award in the post .....

is this Possible ?
Reply With Quote
  #64  
Old 10-12-2004, 05:00 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Abe1
I noticed that also. I didn't look much into it. I'm going to look into it what I have time. I'd love to get the award pic there.
wonder if that could be done with preg_replace?
Reply With Quote
  #65  
Old 10-12-2004, 09:08 PM
Abe1's Avatar
Abe1 Abe1 is offline
 
Join Date: Feb 2004
Location: I LOVE New York!
Posts: 2,886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by teksigns
I would like to be able to leave a award note with each one that i give
and have it appear under the award in the post .....


is this Possible ?
I'm sure it is. I'll see what I can do.
Reply With Quote
  #66  
Old 10-12-2004, 09:08 PM
Abe1's Avatar
Abe1 Abe1 is offline
 
Join Date: Feb 2004
Location: I LOVE New York!
Posts: 2,886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
wonder if that could be done with preg_replace?
I'll look into it.
Reply With Quote
  #67  
Old 10-13-2004, 02:16 AM
theArchitect's Avatar
theArchitect theArchitect is offline
 
Join Date: Sep 2004
Location: Sydney
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*theArchitect clicks install*.

Great hack. It will really help our less regular users to make the most of their forum viewing time.
Reply With Quote
  #68  
Old 10-13-2004, 02:37 AM
theArchitect's Avatar
theArchitect theArchitect is offline
 
Join Date: Sep 2004
Location: Sydney
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there anything that should stop one from giving other user groups the power to give awards. I tried to alter the conditionals but must either being doing something wrong or am missing something. Here is the recoded if statement I am using:
Code:
<if condition="$bbuserinfo[usergroupid]=='5' OR $bbuserinfo[usergroupid]=='6' OR $bbuserinfo[usergroupid]=='7'">
   		<if condition="$post[award]=='0'">&nbsp;
 		<a href="award.php?$session[sessionurl]do=award&postid=$post[postid]">Add Award</a>
 		<else />&nbsp;<a href="award.php?$session[sessionurl]do=award_remove&postid=$post[postid]">Remove Award</a>
   		</if>
   		</if>
Reply With Quote
  #69  
Old 10-13-2004, 12:22 PM
Abe1's Avatar
Abe1 Abe1 is offline
 
Join Date: Feb 2004
Location: I LOVE New York!
Posts: 2,886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theArchitect
Is there anything that should stop one from giving other user groups the power to give awards. I tried to alter the conditionals but must either being doing something wrong or am missing something. Here is the recoded if statement I am using:
Code:
<if condition="$bbuserinfo[usergroupid]=='5' OR $bbuserinfo[usergroupid]=='6' OR $bbuserinfo[usergroupid]=='7'">
   		<if condition="$post[award]=='0'">&nbsp;
 		<a href="award.php?$session[sessionurl]do=award&postid=$post[postid]">Add Award</a>
 		<else />&nbsp;<a href="award.php?$session[sessionurl]do=award_remove&postid=$post[postid]">Remove Award</a>
   		</if>
   		</if>
In the php I stop anyone who isn't a moderator of that forum form giving an award.
Reply With Quote
  #70  
Old 10-13-2004, 12:34 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In postbit this is how I handled it:

<if condition="$bbuserinfo[usergroupid]=='6'">
<if condition="$post[award]=='0'">&nbsp;
<a href="award.php?$session[sessionurl]do=award&postid=$post[postid]">Select for Editor's Pick</a>
<else />&nbsp;<a href="award.php?$session[sessionurl]do=award_remove&postid=$post[postid]">Remove Editor's Pick</a>
</if>
</if>

just like you, but for one group and that works

try putting $condition= in front of the other groups
Reply With Quote
  #71  
Old 10-13-2004, 02:14 PM
Lionel Lionel is offline
 
Join Date: Dec 2001
Location: Delray Beach, Florida
Posts: 3,277
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lionel
wonder if that could be done with preg_replace?
in search.php

find:

$displayUsers = implode(" $vbphrase[or] ", $display['users']);

under it put:

$award="mytest"; //or whatever just to create the condition

then in search_results template, after:

<phrase 1="$searchtime">$vbphrase[search_took_x_seconds]</phrase>
</span>


put in

<if condition="$award"><img src="images/misc/rosette.gif"> <else />

and before the close of the </td>

you close the condition

</if>

you can put whatever you want next to image
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 02:14 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.04554 seconds
  • Memory Usage 2,311KB
  • 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
  • (2)bbcode_code
  • (6)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
  • (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