vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Post Award Hack (https://vborg.vbsupport.ru/showthread.php?t=92677)

Abe1 07-21-2005 10:00 PM

Post Award Hack
 
Post Award Hack 2.1


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
  • Settings to allow what users or usergroups can give thanks
Installation information on hack:
  • Files edited: 0
  • Templates edited: 4
  • Files to upload: 1
  • Time to install: 5 minutes max
Updates:

Version 2.1 (2/8/06):
  • GOLD Release of this hack for vBulletin version 3.5
  • Added user and usergroup permissions via the acp options
  • Rewrote the template edits

Please post your comments or suggestions for this hack. I read ALL posts.

MAKE SURE YOU CLICK INSTALL!
You will get an email when a new version is released.

This hack is created for your use free of charge. No payment is requested. However, if you would like to donate money for the work I put in to this hack, a donation would show your appreciation.
https://vborg.vbsupport.ru/external/2010/02/12.gif

ForYou 07-22-2005 01:47 PM

Nice Award ,

is there away to give users Award , it's like this hack ,

Regards

Azhrialilu 07-22-2005 04:10 PM

Nice :D

Darth Gill 07-22-2005 04:34 PM

Where's the PHP file (award.php) and where is the SQL to update the database. Also I found a problem in the templates editing...

You have

in MEMBERINFO:
Code:

find:
--------------------------------------------------------------------
<if condition="$vboptions['profilelastpost']">
--------------------------------------------------------------------

replace with:
--------------------------------------------------------------------
<tr>
<td><a href="search.php?$session[sessionurl]do=findawards&amp;u=$userinfo[userid]">Find all awarded posts by $userinfo[username]</a></td>
</tr>
--------------------------------------------------------------------

It should be:
Code:

find:

<td><a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;exactname=1&amp;searchuser=$userinfo[urlusername]"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></td>
                                </tr>



after it add:

<!-- HACK -->
<tr>
<td><a href="search.php?$session[sessionurl]do=findawards&amp;u=$userinfo[userid]">Find all awarded posts by $userinfo[username]</a></td>
</tr>
<!-- HACK -->


Darth Gill 07-22-2005 04:45 PM

Nevermind I see the sql in the xml.

Abe1 07-22-2005 04:48 PM

Quote:

Originally Posted by Darth Gill
Where's the PHP file (award.php) and where is the SQL to update the database. Also I found a problem in the templates editing...

You have

in MEMBERINFO:
Code:

find:
--------------------------------------------------------------------
<if condition="$vboptions['profilelastpost']">
--------------------------------------------------------------------

replace with:
--------------------------------------------------------------------
<tr>
<td><a href="search.php?$session[sessionurl]do=findawards&amp;u=$userinfo[userid]">Find all awarded posts by $userinfo[username]</a></td>
</tr>
--------------------------------------------------------------------

It should be:
Code:

find:

<td><a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;exactname=1&amp;searchuser=$userinfo[urlusername]"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></td>
                                </tr>



after it add:

<!-- HACK -->
<tr>
<td><a href="search.php?$session[sessionurl]do=findawards&amp;u=$userinfo[userid]">Find all awarded posts by $userinfo[username]</a></td>
</tr>
<!-- HACK -->


First, thanks for that template error. It should have said "add before" instead or "replace". I fixed it in the zip download.

Second, the award.php is no longer needed. All actions are in the plugings. Yhe SQL change is also done by the installer when you import the plugings. It's a pritty cool way how the installer and uninstaller work using the plug-in sytem.

Darth Gill 07-22-2005 04:52 PM

Why do some of the templates link to award.php then if it's handled by the plugin?

Abe1 07-22-2005 04:57 PM

Quote:

Originally Posted by Darth Gill
Why do some of the templates link to award.php then if it's handled by the plugin?

I must have been sleeping when I made the installer. Anyways, I just fixed it over. award.php was not changed to showthread.php. The search features I had made already go to search.php.

Darth Gill 07-22-2005 05:08 PM

Oh, another bug, you have in the instructions to upload to images/buttons when it should be images/misc

Abe1 07-22-2005 06:04 PM

Quote:

Originally Posted by Darth Gill
Oh, another bug, you have in the instructions to upload to images/buttons when it should be images/misc

Anything else? I'm glad I call this Beta.

I had copied the image location from my Post Thanks Hack that is why is said button and not misc.

Anyways, all showld be good now.

Darth Gill 07-22-2005 06:59 PM

Yes all is good now. I have the hack install perfectly! I love it, thank you very much. Here's an example of the icon I made: http://forums.5solas.org/showthread....4232#post34232

ForYou 07-22-2005 08:19 PM

Quote:

Originally Posted by ForYou
Nice Award ,

is there away to give users Award , it's like this hack ,

Regards

Please i need to give some users Award not just post ,

is there away to let this hack work with tow way , Award for Post and award for user ,

Regards

ForYou 07-22-2005 09:31 PM

Hello ,

when i install the hack , i just see Remove Award , and there is no link to add Award ,

what is the problem ?

Regards

Abe1 07-22-2005 09:44 PM

Quote:

Originally Posted by ForYou
Hello ,

when i install the hack , i just see Remove Award , and there is no link to add Award ,

what is the problem ?

Regards

Did you import the xml?

Darth Gill 07-22-2005 09:45 PM

Hey another thing you could add to the XML is the code to index the award column in the post table. Searching on my board was taking several seconds without the index. Added the index and searching was instantaneous.

theArchitect 07-22-2005 11:54 PM

Very cool. I loved this hack for 3 and will really install it once it goes gold.

TrueDeath 07-23-2005 03:11 PM

all was well except when i went to give an award i got
Quote:

Invalid SQL:

UPDATE `post` SET `award` = '1' WHERE `postid` = '4967' LIMIT 1;

MySQL Error : Table 'usr_vbb.post' doesn't exist
Error Number : 1146
Date : Saturday, July 23rd 2005 @ 09:10:18 AM
Script : http://www.*removed*.co.uk/forum/sho...rd&postid=4967
Referrer :
IP Address : *removed*
Username : Matt
Classname : vb_database
edit:
i fixed this by adding my table prefix in the plugin.

Abe1 08-04-2005 09:15 PM

Updated and will work on rc1 and rc2.

Gizmo5h1t3 08-12-2005 12:25 AM

works a treat on RC2

NuclioN 08-13-2005 10:40 AM

Is it possible to make more award types to award with? :)

VB-STYLE 08-16-2005 09:24 PM

when i want to give an award i get

Quote:

Database error in vBulletin 3.5.0 Release Candidate 2:

Invalid SQL:

UPDATE `post` SET `award` = '1' WHERE `postid` = '202938' LIMIT 1;

MySQL Error : Unknown column 'award' in 'field list'
Error Number : 1054
Date : Tuesday, August 16th 2005 @ 05:08:25 PM
Script : http://XXXXXXXX showthread.php?do=award&postid=202938
Referrer :
IP Address : XXXXXXX
Username : XXXXX
Classname : vb_database
also when i want to Uninstall the hack i get

Quote:

Database error in vBulletin 3.5.0 Release Candidate 2:

Invalid SQL:
ALTER TABLE `post` DROP `award`;

MySQL Error : Can't DROP 'award'. Check that column/key exists
Error Number : 1091
Date : Tuesday, August 16th 2005 @ 05:25:00 PM
Script : http://XXXXXXXXXX/vb/admincp/plugin.php
Referrer : http://XXXXXXXXXX/vb/admincp/plugin....=post_award&s=
IP Address : XXXXXXX
Username : XXXXXX
Classname : vb_database

Abe1 08-16-2005 09:53 PM

Quote:

Originally Posted by VB-STYLE
when i want to give an award i get



also when i want to Uninstall the hack i get

You mostlikey installed the wrong file. You must have imported the the Update xml.

VB-STYLE 08-16-2005 10:20 PM

I'm using FRESH INSTALLATIONS ONLY :)

and yesterday i install the hack so i don't need
the Update xml ..

VB-STYLE 08-19-2005 11:02 AM

MySQL Error : Unknown column 'award' in 'field list' :(

Abe1 08-19-2005 03:00 PM

Quote:

Originally Posted by VB-STYLE
MySQL Error : Unknown column 'award' in 'field list' :(

Did you import the xml into products or plugins?

VB-STYLE 08-19-2005 07:28 PM

into products

Abe1 08-19-2005 07:30 PM

Quote:

Originally Posted by VB-STYLE
into products

Sorry, I dont know the problem. Are you useing Prefexes?

VB-STYLE 08-19-2005 07:32 PM

what is Prefexes?

Abe1 08-19-2005 07:33 PM

Quote:

Originally Posted by VB-STYLE
what is Prefexes?

an add on to each table in you database

VB-STYLE 08-19-2005 07:37 PM

ok
do you think if i run Manual Query will work?
i mean to add award.

Abe1 08-19-2005 08:38 PM

Quote:

Originally Posted by VB-STYLE
ok
do you think if i run Manual Query will work?
i mean to add award.

It should.

ALTER TABLE `post` ADD `award` TINYINT( 1 ) UNSIGNED DEFAULT '0' NOT NULL

VB-STYLE 08-19-2005 09:23 PM

:)
it's working now aftar
i add the query manual.

thank you.

chikkoo 08-20-2005 12:02 PM

This is a very nice idea to encourage the posters.

I found the same type of errors. The UPDATE sql query is not having TABLE PREFIX. I added manually, then started working.

I would suggest adding more categories. Like I am using this for Best Poem of the Month. I also want to use it for Best Joke, Best Story, etc.

Or you can change colors and sizes to add more steps, like 1st Price 2nd Price 3rd Price and so on. This is just a suggestion. I don't know whether it is possible.

Abe1 08-21-2005 05:36 AM

Quote:

Originally Posted by chikkoo
This is a very nice idea to encourage the posters.

I found the same type of errors. The UPDATE sql query is not having TABLE PREFIX. I added manually, then started working.

I would suggest adding more categories. Like I am using this for Best Poem of the Month. I also want to use it for Best Joke, Best Story, etc.

Or you can change colors and sizes to add more steps, like 1st Price 2nd Price 3rd Price and so on. This is just a suggestion. I don't know whether it is possible.

Fixed now.

Biker_GA 08-21-2005 03:12 PM

Quote:

Originally Posted by ForYou
Hello ,

when i install the hack , i just see Remove Award , and there is no link to add Award ,

what is the problem ?

Regards

I have the same issue. There's a Remove option, but no add option. (And yes, I imported the xml under Products.

Abe1 08-21-2005 03:18 PM

Quote:

Originally Posted by Biker_GA
I have the same issue. There's a Remove option, but no add option. (And yes, I imported the xml under Products.

did you download the latest version that was just released?

Biker_GA 08-21-2005 03:24 PM

Yepper... And uploaded product-post_award_2_0b3.xml into products (new install). I just removed the plugin and reinstalled. Same thing. Can remove, but there's no add option.

Abe1 08-21-2005 03:31 PM

Quote:

Originally Posted by Biker_GA
Yepper... And uploaded product-post_award_2_0b3.xml into products (new install). I just removed the plugin and reinstalled. Same thing. Can remove, but there's no add option.

I just tested a fresh installation an it worked fine. I need me info from you. What happend when you click remove?

Biker_GA 08-21-2005 03:33 PM

It removed the plugin. :)

ForYou 08-21-2005 07:14 PM

Quote:

Originally Posted by Abe1
did you download the latest version that was just released?

Hello ,

There is the same problem just i see Add Award and remove ، But i can't add award and how can i remove the award without add ??? Look at the attach

https://vborg.vbsupport.ru/

Regards


All times are GMT. The time now is 04:50 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.01548 seconds
  • Memory Usage 1,837KB
  • 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
  • (4)bbcode_code_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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